From 916791de7c79e104b30ed1acbdc94a9dc88c9d13 Mon Sep 17 00:00:00 2001 From: msmerc Date: Thu, 23 Sep 2021 03:51:02 +0100 Subject: [PATCH 01/50] Add semicolon as a special case (#10451) Please could you also add `;` as a special case in enums? --- .../src/main/java/org/openapitools/codegen/DefaultCodegen.java | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index b7d31d9fce5..68f7412a550 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -1651,6 +1651,7 @@ public class DefaultCodegen implements CodegenConfig { specialCharReplacements.put("!", "Exclamation"); specialCharReplacements.put("+", "Plus"); specialCharReplacements.put(":", "Colon"); + specialCharReplacements.put(";", "Semicolon"); specialCharReplacements.put(">", "Greater_Than"); specialCharReplacements.put("<", "Less_Than"); specialCharReplacements.put(".", "Period"); From 7c133be61791b714920a194bd48fd61c51b63311 Mon Sep 17 00:00:00 2001 From: Bruno Coelho <4brunu@users.noreply.github.com> Date: Thu, 23 Sep 2021 03:53:57 +0100 Subject: [PATCH 02/50] [swift5][client] add support for async await (#10442) * [swift5][client] add support for async await * [swift5][client] disable CI for the async await sample project temporarily --- bin/configs/swift5-asyncAwaitLibrary.yaml | 11 + docs/generators/swift5.md | 2 +- .../languages/Swift5ClientCodegen.java | 6 +- .../src/main/resources/swift5/api.mustache | 48 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 24 +- .../APIs/FakeClassnameTags123API.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 18 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 8 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 16 +- .../swift5/asyncAwaitLibrary/.gitignore | 105 +++ .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 110 +++ .../.openapi-generator/VERSION | 1 + .../swift5/asyncAwaitLibrary/Cartfile | 1 + .../swift5/asyncAwaitLibrary/Info.plist | 22 + .../swift5/asyncAwaitLibrary/Package.resolved | 16 + .../swift5/asyncAwaitLibrary/Package.swift | 33 + .../asyncAwaitLibrary/PetstoreClient.podspec | 15 + .../PetstoreClient.xcodeproj/project.pbxproj | 537 +++++++++++++ .../xcschemes/PetstoreClient.xcscheme | 93 +++ .../Classes/OpenAPIs/APIHelper.swift | 71 ++ .../Classes/OpenAPIs/APIs.swift | 69 ++ .../OpenAPIs/APIs/AnotherFakeAPI.swift | 60 ++ .../Classes/OpenAPIs/APIs/FakeAPI.swift | 723 ++++++++++++++++++ .../APIs/FakeClassnameTags123API.swift | 63 ++ .../Classes/OpenAPIs/APIs/PetAPI.swift | 513 +++++++++++++ .../Classes/OpenAPIs/APIs/StoreAPI.swift | 204 +++++ .../Classes/OpenAPIs/APIs/UserAPI.swift | 393 ++++++++++ .../Classes/OpenAPIs/CodableHelper.swift | 49 ++ .../Classes/OpenAPIs/Configuration.swift | 15 + .../Classes/OpenAPIs/Extensions.swift | 188 +++++ .../Classes/OpenAPIs/JSONDataEncoding.swift | 53 ++ .../Classes/OpenAPIs/JSONEncodingHelper.swift | 45 ++ .../Classes/OpenAPIs/Models.swift | 54 ++ .../Models/AdditionalPropertiesClass.swift | 36 + .../Classes/OpenAPIs/Models/Animal.swift | 36 + .../Classes/OpenAPIs/Models/AnimalFarm.swift | 13 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 40 + .../Models/ArrayOfArrayOfNumberOnly.swift | 32 + .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 32 + .../Classes/OpenAPIs/Models/ArrayTest.swift | 40 + .../OpenAPIs/Models/Capitalization.swift | 53 ++ .../Classes/OpenAPIs/Models/Cat.swift | 40 + .../Classes/OpenAPIs/Models/CatAllOf.swift | 32 + .../Classes/OpenAPIs/Models/Category.swift | 36 + .../Classes/OpenAPIs/Models/ClassModel.swift | 33 + .../Classes/OpenAPIs/Models/Client.swift | 32 + .../Classes/OpenAPIs/Models/Dog.swift | 40 + .../Classes/OpenAPIs/Models/DogAllOf.swift | 32 + .../Classes/OpenAPIs/Models/EnumArrays.swift | 44 ++ .../Classes/OpenAPIs/Models/EnumClass.swift | 17 + .../Classes/OpenAPIs/Models/EnumTest.swift | 66 ++ .../Classes/OpenAPIs/Models/File.swift | 34 + .../OpenAPIs/Models/FileSchemaTestClass.swift | 36 + .../Classes/OpenAPIs/Models/FormatTest.swift | 80 ++ .../OpenAPIs/Models/HasOnlyReadOnly.swift | 36 + .../Classes/OpenAPIs/Models/List.swift | 32 + .../Classes/OpenAPIs/Models/MapTest.swift | 48 ++ ...opertiesAndAdditionalPropertiesClass.swift | 40 + .../OpenAPIs/Models/Model200Response.swift | 37 + .../Classes/OpenAPIs/Models/Name.swift | 45 ++ .../Classes/OpenAPIs/Models/NumberOnly.swift | 32 + .../Classes/OpenAPIs/Models/Order.swift | 58 ++ .../OpenAPIs/Models/OuterComposite.swift | 40 + .../Classes/OpenAPIs/Models/OuterEnum.swift | 17 + .../Classes/OpenAPIs/Models/Pet.swift | 58 ++ .../OpenAPIs/Models/ReadOnlyFirst.swift | 36 + .../Classes/OpenAPIs/Models/Return.swift | 33 + .../OpenAPIs/Models/SpecialModelName.swift | 32 + .../OpenAPIs/Models/StringBooleanMap.swift | 52 ++ .../Classes/OpenAPIs/Models/Tag.swift | 36 + .../OpenAPIs/Models/TypeHolderDefault.swift | 48 ++ .../OpenAPIs/Models/TypeHolderExample.swift | 48 ++ .../Classes/OpenAPIs/Models/User.swift | 61 ++ .../OpenAPIs/OpenISO8601DateFormatter.swift | 44 ++ .../OpenAPIs/SynchronizedDictionary.swift | 36 + .../OpenAPIs/URLSessionImplementations.swift | 649 ++++++++++++++++ .../swift5/asyncAwaitLibrary/README.md | 141 ++++ .../docs/AdditionalPropertiesClass.md | 11 + .../swift5/asyncAwaitLibrary/docs/Animal.md | 11 + .../asyncAwaitLibrary/docs/AnimalFarm.md | 9 + .../asyncAwaitLibrary/docs/AnotherFakeAPI.md | 59 ++ .../asyncAwaitLibrary/docs/ApiResponse.md | 12 + .../docs/ArrayOfArrayOfNumberOnly.md | 10 + .../docs/ArrayOfNumberOnly.md | 10 + .../asyncAwaitLibrary/docs/ArrayTest.md | 12 + .../asyncAwaitLibrary/docs/Capitalization.md | 15 + .../swift5/asyncAwaitLibrary/docs/Cat.md | 10 + .../swift5/asyncAwaitLibrary/docs/CatAllOf.md | 10 + .../swift5/asyncAwaitLibrary/docs/Category.md | 11 + .../asyncAwaitLibrary/docs/ClassModel.md | 10 + .../swift5/asyncAwaitLibrary/docs/Client.md | 10 + .../swift5/asyncAwaitLibrary/docs/Dog.md | 10 + .../swift5/asyncAwaitLibrary/docs/DogAllOf.md | 10 + .../asyncAwaitLibrary/docs/EnumArrays.md | 11 + .../asyncAwaitLibrary/docs/EnumClass.md | 9 + .../swift5/asyncAwaitLibrary/docs/EnumTest.md | 14 + .../swift5/asyncAwaitLibrary/docs/FakeAPI.md | 662 ++++++++++++++++ .../docs/FakeClassnameTags123API.md | 59 ++ .../swift5/asyncAwaitLibrary/docs/File.md | 10 + .../docs/FileSchemaTestClass.md | 11 + .../asyncAwaitLibrary/docs/FormatTest.md | 22 + .../asyncAwaitLibrary/docs/HasOnlyReadOnly.md | 11 + .../swift5/asyncAwaitLibrary/docs/List.md | 10 + .../swift5/asyncAwaitLibrary/docs/MapTest.md | 13 + ...dPropertiesAndAdditionalPropertiesClass.md | 12 + .../docs/Model200Response.md | 11 + .../swift5/asyncAwaitLibrary/docs/Name.md | 13 + .../asyncAwaitLibrary/docs/NumberOnly.md | 10 + .../swift5/asyncAwaitLibrary/docs/Order.md | 15 + .../asyncAwaitLibrary/docs/OuterComposite.md | 12 + .../asyncAwaitLibrary/docs/OuterEnum.md | 9 + .../swift5/asyncAwaitLibrary/docs/Pet.md | 15 + .../swift5/asyncAwaitLibrary/docs/PetAPI.md | 469 ++++++++++++ .../asyncAwaitLibrary/docs/ReadOnlyFirst.md | 11 + .../swift5/asyncAwaitLibrary/docs/Return.md | 10 + .../docs/SpecialModelName.md | 10 + .../swift5/asyncAwaitLibrary/docs/StoreAPI.md | 206 +++++ .../docs/StringBooleanMap.md | 9 + .../swift5/asyncAwaitLibrary/docs/Tag.md | 11 + .../docs/TypeHolderDefault.md | 14 + .../docs/TypeHolderExample.md | 14 + .../swift5/asyncAwaitLibrary/docs/User.md | 17 + .../swift5/asyncAwaitLibrary/docs/UserAPI.md | 406 ++++++++++ .../swift5/asyncAwaitLibrary/git_push.sh | 57 ++ .../petstore/swift5/asyncAwaitLibrary/pom.xml | 43 ++ .../swift5/asyncAwaitLibrary/project.yml | 15 + .../swift5/asyncAwaitLibrary/run_spmbuild.sh | 3 + .../OpenAPIs/APIs/AnotherFakeAPI.swift | 6 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 72 +- .../APIs/FakeClassnameTags123API.swift | 6 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 54 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 24 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 48 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 28 +- .../APIs/FakeClassnameTags123API.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 18 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 8 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 16 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 16 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 8 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 16 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 24 +- .../APIs/FakeClassnameTags123API.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 18 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 8 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 16 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 24 +- .../APIs/FakeClassnameTags123API.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 18 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 8 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 16 +- .../Classes/OpenAPIs/APIs/DefaultAPI.swift | 2 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 24 +- .../APIs/FakeClassnameTags123API.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 18 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 8 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 16 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 24 +- .../APIs/FakeClassnameTags123API.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 18 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 8 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 16 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 24 +- .../APIs/FakeClassnameTags123API.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 18 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 8 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 16 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 24 +- .../APIs/FakeClassnameTags123API.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 18 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 8 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 16 +- .../client/petstore/swift5/swift5_test_all.sh | 1 + .../PetstoreClient/APIs/AnotherFakeAPI.swift | 2 +- .../Sources/PetstoreClient/APIs/FakeAPI.swift | 24 +- .../APIs/FakeClassnameTags123API.swift | 2 +- .../Sources/PetstoreClient/APIs/PetAPI.swift | 18 +- .../PetstoreClient/APIs/StoreAPI.swift | 8 +- .../Sources/PetstoreClient/APIs/UserAPI.swift | 16 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 24 +- .../APIs/FakeClassnameTags123API.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 18 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 8 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 16 +- 194 files changed, 8900 insertions(+), 487 deletions(-) create mode 100644 bin/configs/swift5-asyncAwaitLibrary.yaml create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/.gitignore create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator-ignore create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/FILES create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/VERSION create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/Cartfile create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/Info.plist create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/Package.resolved create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/Package.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient.podspec create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient.xcodeproj/project.pbxproj create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/README.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/AdditionalPropertiesClass.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/Animal.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/AnimalFarm.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/AnotherFakeAPI.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/ApiResponse.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/ArrayOfArrayOfNumberOnly.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/ArrayOfNumberOnly.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/ArrayTest.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/Capitalization.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/Cat.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/CatAllOf.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/Category.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/ClassModel.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/Client.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/Dog.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/DogAllOf.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/EnumArrays.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/EnumClass.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/EnumTest.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/FakeAPI.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/FakeClassnameTags123API.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/File.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/FileSchemaTestClass.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/FormatTest.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/HasOnlyReadOnly.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/List.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/MapTest.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/Model200Response.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/Name.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/NumberOnly.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/Order.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/OuterComposite.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/OuterEnum.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/Pet.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/PetAPI.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/ReadOnlyFirst.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/Return.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/SpecialModelName.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/StoreAPI.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/StringBooleanMap.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/Tag.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/TypeHolderDefault.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/TypeHolderExample.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/User.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/docs/UserAPI.md create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/git_push.sh create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/pom.xml create mode 100644 samples/client/petstore/swift5/asyncAwaitLibrary/project.yml create mode 100755 samples/client/petstore/swift5/asyncAwaitLibrary/run_spmbuild.sh diff --git a/bin/configs/swift5-asyncAwaitLibrary.yaml b/bin/configs/swift5-asyncAwaitLibrary.yaml new file mode 100644 index 00000000000..fed714a2d68 --- /dev/null +++ b/bin/configs/swift5-asyncAwaitLibrary.yaml @@ -0,0 +1,11 @@ +generatorName: swift5 +outputDir: samples/client/petstore/swift5/asyncAwaitLibrary +inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/swift5 +generateAliasAsModel: true +additionalProperties: + responseAs: AsyncAwait + podAuthors: "" + podSummary: PetstoreClient + projectName: PetstoreClient + podHomepage: https://github.com/openapitools/openapi-generator diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md index 33f1a29ca77..e74a239be25 100644 --- a/docs/generators/swift5.md +++ b/docs/generators/swift5.md @@ -34,7 +34,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |projectName|Project name in Xcode| |null| |readonlyProperties|Make properties readonly (default: false)| |null| |removeMigrationProjectNameClass|Make properties removeMigrationProjectNameClass (default: false)| |null| -|responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift, Result, Combine are available.| |null| +|responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift, Result, Combine, AsyncAwait are available.| |null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |swiftPackagePath|Set a custom source path instead of OpenAPIClient/Classes/OpenAPIs.| |null| 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 5fadeb9d41f..df038dad832 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 @@ -76,7 +76,8 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig protected static final String RESPONSE_LIBRARY_RX_SWIFT = "RxSwift"; protected static final String RESPONSE_LIBRARY_RESULT = "Result"; protected static final String RESPONSE_LIBRARY_COMBINE = "Combine"; - protected static final String[] RESPONSE_LIBRARIES = {RESPONSE_LIBRARY_PROMISE_KIT, RESPONSE_LIBRARY_RX_SWIFT, RESPONSE_LIBRARY_RESULT, RESPONSE_LIBRARY_COMBINE}; + protected static final String RESPONSE_LIBRARY_ASYNC_AWAIT = "AsyncAwait"; + protected static final String[] RESPONSE_LIBRARIES = {RESPONSE_LIBRARY_PROMISE_KIT, RESPONSE_LIBRARY_RX_SWIFT, RESPONSE_LIBRARY_RESULT, RESPONSE_LIBRARY_COMBINE, RESPONSE_LIBRARY_ASYNC_AWAIT}; protected String projectName = "OpenAPIClient"; protected boolean nonPublicApi = false; protected boolean objcCompatible = false; @@ -443,6 +444,9 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig if (ArrayUtils.contains(responseAs, RESPONSE_LIBRARY_COMBINE)) { additionalProperties.put("useCombine", true); } + if (ArrayUtils.contains(responseAs, RESPONSE_LIBRARY_ASYNC_AWAIT)) { + additionalProperties.put("useAsyncAwait", true); + } // Setup readonlyProperties option, which declares properties so they can only // be set at initialization diff --git a/modules/openapi-generator/src/main/resources/swift5/api.mustache b/modules/openapi-generator/src/main/resources/swift5/api.mustache index b3d89985a46..88e705c7645 100644 --- a/modules/openapi-generator/src/main/resources/swift5/api.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/api.mustache @@ -44,6 +44,7 @@ extension {{projectName}}API { {{^useRxSwift}} {{^useResult}} {{^useCombine}} +{{^useAsyncAwait}} /** {{#summary}} {{{.}}} @@ -56,7 +57,7 @@ extension {{projectName}}API { @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}}Void{{/returnType}}?, _ error: Error?) -> Void)) { - {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute(apiResponseQueue) { result -> Void in + {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute(apiResponseQueue) { result in switch result { {{#returnType}} case let .success(response): @@ -71,6 +72,7 @@ extension {{projectName}}API { } } } +{{/useAsyncAwait}} {{/useCombine}} {{/useResult}} {{/useRxSwift}} @@ -90,7 +92,7 @@ extension {{projectName}}API { {{/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) -> Promise<{{{returnType}}}{{^returnType}}Void{{/returnType}}> { let deferred = Promise<{{{returnType}}}{{^returnType}}Void{{/returnType}}>.pending() - {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute(apiResponseQueue) { result -> Void in + {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute(apiResponseQueue) { result in switch result { {{#returnType}} case let .success(response): @@ -121,7 +123,7 @@ extension {{projectName}}API { {{/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) -> Observable<{{{returnType}}}{{^returnType}}Void{{/returnType}}> { return Observable.create { observer -> Disposable in - {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute(apiResponseQueue) { result -> Void in + {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute(apiResponseQueue) { result in switch result { {{#returnType}} case let .success(response): @@ -153,10 +155,10 @@ extension {{projectName}}API { {{#isDeprecated}} @available(*, deprecated, message: "This operation is deprecated.") {{/isDeprecated}} - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) {{#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) -> AnyPublisher<{{{returnType}}}{{^returnType}}Void{{/returnType}}, Error> { - return Future<{{{returnType}}}{{^returnType}}Void{{/returnType}}, Error>.init { promise in - {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute(apiResponseQueue) { result -> Void in + return Future<{{{returnType}}}{{^returnType}}Void{{/returnType}}, Error> { promise in + {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute(apiResponseQueue) { result in switch result { {{#returnType}} case let .success(response): @@ -174,6 +176,38 @@ extension {{projectName}}API { } #endif {{/useCombine}} +{{#useAsyncAwait}} + /** + {{#summary}} + {{{.}}} + {{/summary}}{{#allParams}} + - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}} + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: {{{returnType}}}{{^returnType}}Void{{/returnType}} + */ + {{#isDeprecated}} + @available(*, deprecated, message: "This operation is deprecated.") + {{/isDeprecated}} + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + {{#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) async throws{{#returnType}} -> {{{returnType}}}{{/returnType}} { + return try await withCheckedThrowingContinuation { continuation in + {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute(apiResponseQueue) { result in + switch result { + {{#returnType}} + case let .success(response): + continuation.resume(returning: response.body!) + {{/returnType}} + {{^returnType}} + case .success: + continuation.resume(returning: ()) + {{/returnType}} + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } +{{/useAsyncAwait}} {{#useResult}} /** {{#summary}} @@ -187,7 +221,7 @@ extension {{projectName}}API { @available(*, deprecated, message: "This operation is deprecated.") {{/isDeprecated}} open class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<{{{returnType}}}{{^returnType}}Void{{/returnType}}, Error>) -> Void)) { - {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute(apiResponseQueue) { result -> Void in + {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute(apiResponseQueue) { result in switch result { {{#returnType}} case let .success(response): 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 8099bf1c37c..43abbb33519 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 @@ -20,7 +20,7 @@ open class AnotherFakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 5f58bd5c37b..7f43de2f5ea 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 @@ -19,7 +19,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { - fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -60,7 +60,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { - fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -101,7 +101,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { - fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -142,7 +142,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -183,7 +183,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -225,7 +225,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -270,7 +270,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -326,7 +326,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - 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 + 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 in switch result { case .success: completion((), nil) @@ -477,7 +477,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -546,7 +546,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -601,7 +601,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -644,7 +644,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) 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 ca7ca48c4e8..34c654e4499 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 @@ -20,7 +20,7 @@ open class FakeClassnameTags123API { - parameter completion: completion handler to receive the data and the error objects */ open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 49530dc2840..29d68b9f526 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 @@ -20,7 +20,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -66,7 +66,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -124,7 +124,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -174,7 +174,7 @@ open class PetAPI { */ @available(*, deprecated, message: "This operation is deprecated.") open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -224,7 +224,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { - getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -273,7 +273,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -320,7 +320,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -378,7 +378,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -436,7 +436,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 8555e093682..fbe47386f98 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 @@ -20,7 +20,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -65,7 +65,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { - getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -110,7 +110,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -156,7 +156,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 49132e5612f..f61db9b14f2 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 @@ -20,7 +20,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -63,7 +63,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -105,7 +105,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -147,7 +147,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -193,7 +193,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { - getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -239,7 +239,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -286,7 +286,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -328,7 +328,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in + updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/.gitignore b/samples/client/petstore/swift5/asyncAwaitLibrary/.gitignore new file mode 100644 index 00000000000..627d360a903 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/.gitignore @@ -0,0 +1,105 @@ +# Created by https://www.toptal.com/developers/gitignore/api/swift,xcode +# Edit at https://www.toptal.com/developers/gitignore?templates=swift,xcode + +### Swift ### +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings +xcuserdata/ + +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) +*.xcscmblueprint +*.xccheckout + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) +build/ +DerivedData/ +*.moved-aside +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 + +## Obj-C/Swift specific +*.hmap + +## App packaging +*.ipa +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +# Package.pins +# Package.resolved +# *.xcodeproj +# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata +# hence it is not needed unless you have added a package configuration file to your project +# .swiftpm + +.build/ + +# CocoaPods +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# Pods/ +# Add this line if you want to avoid checking in source code from the Xcode workspace +# *.xcworkspace + +# Carthage +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build/ + +# Add this lines if you are using Accio dependency management (Deprecated since Xcode 12) +# Dependencies/ +# .accio/ + +# fastlane +# It is recommended to not store the screenshots in the git repo. +# Instead, use fastlane to re-generate the screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots/**/*.png +fastlane/test_output + +# Code Injection +# After new code Injection tools there's a generated folder /iOSInjectionProject +# https://github.com/johnno1962/injectionforxcode + +iOSInjectionProject/ + +### Xcode ### +# Xcode +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + + + + +## Gcc Patch +/*.gcno + +### Xcode Patch ### +*.xcodeproj/* +!*.xcodeproj/project.pbxproj +!*.xcodeproj/xcshareddata/ +!*.xcworkspace/contents.xcworkspacedata +**/xcshareddata/WorkspaceSettings.xcsettings + +# End of https://www.toptal.com/developers/gitignore/api/swift,xcode diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator-ignore b/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator-ignore new file mode 100644 index 00000000000..7484ee590a3 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/FILES b/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/FILES new file mode 100644 index 00000000000..c81943baf2a --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/FILES @@ -0,0 +1,110 @@ +.gitignore +Cartfile +Package.swift +PetstoreClient.podspec +PetstoreClient/Classes/OpenAPIs/APIHelper.swift +PetstoreClient/Classes/OpenAPIs/APIs.swift +PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +PetstoreClient/Classes/OpenAPIs/Configuration.swift +PetstoreClient/Classes/OpenAPIs/Extensions.swift +PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +PetstoreClient/Classes/OpenAPIs/Models.swift +PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +PetstoreClient/Classes/OpenAPIs/Models/Category.swift +PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +PetstoreClient/Classes/OpenAPIs/Models/Client.swift +PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +PetstoreClient/Classes/OpenAPIs/Models/File.swift +PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +PetstoreClient/Classes/OpenAPIs/Models/List.swift +PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +PetstoreClient/Classes/OpenAPIs/Models/Name.swift +PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +PetstoreClient/Classes/OpenAPIs/Models/Order.swift +PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +PetstoreClient/Classes/OpenAPIs/Models/Return.swift +PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +PetstoreClient/Classes/OpenAPIs/Models/User.swift +PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift +PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift +PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +README.md +docs/AdditionalPropertiesClass.md +docs/Animal.md +docs/AnimalFarm.md +docs/AnotherFakeAPI.md +docs/ApiResponse.md +docs/ArrayOfArrayOfNumberOnly.md +docs/ArrayOfNumberOnly.md +docs/ArrayTest.md +docs/Capitalization.md +docs/Cat.md +docs/CatAllOf.md +docs/Category.md +docs/ClassModel.md +docs/Client.md +docs/Dog.md +docs/DogAllOf.md +docs/EnumArrays.md +docs/EnumClass.md +docs/EnumTest.md +docs/FakeAPI.md +docs/FakeClassnameTags123API.md +docs/File.md +docs/FileSchemaTestClass.md +docs/FormatTest.md +docs/HasOnlyReadOnly.md +docs/List.md +docs/MapTest.md +docs/MixedPropertiesAndAdditionalPropertiesClass.md +docs/Model200Response.md +docs/Name.md +docs/NumberOnly.md +docs/Order.md +docs/OuterComposite.md +docs/OuterEnum.md +docs/Pet.md +docs/PetAPI.md +docs/ReadOnlyFirst.md +docs/Return.md +docs/SpecialModelName.md +docs/StoreAPI.md +docs/StringBooleanMap.md +docs/Tag.md +docs/TypeHolderDefault.md +docs/TypeHolderExample.md +docs/User.md +docs/UserAPI.md +git_push.sh +project.yml diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/VERSION new file mode 100644 index 00000000000..4b448de535c --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/Cartfile b/samples/client/petstore/swift5/asyncAwaitLibrary/Cartfile new file mode 100644 index 00000000000..3f7e6304cab --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/Cartfile @@ -0,0 +1 @@ +github "Flight-School/AnyCodable" ~> 0.6.1 diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/Info.plist b/samples/client/petstore/swift5/asyncAwaitLibrary/Info.plist new file mode 100644 index 00000000000..323e5ecfc42 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/Package.resolved b/samples/client/petstore/swift5/asyncAwaitLibrary/Package.resolved new file mode 100644 index 00000000000..79610c3b3b3 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/Package.resolved @@ -0,0 +1,16 @@ +{ + "object": { + "pins": [ + { + "package": "AnyCodable", + "repositoryURL": "https://github.com/Flight-School/AnyCodable", + "state": { + "branch": null, + "revision": "69261f239f0fffaf51495dadc4f8483fbfe97025", + "version": "0.6.1" + } + } + ] + }, + "version": 1 +} diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/Package.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/Package.swift new file mode 100644 index 00000000000..87bb775fb72 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/Package.swift @@ -0,0 +1,33 @@ +// swift-tools-version:5.1 + +import PackageDescription + +let package = Package( + name: "PetstoreClient", + platforms: [ + .iOS(.v9), + .macOS(.v10_11), + .tvOS(.v9), + .watchOS(.v3), + ], + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "PetstoreClient", + targets: ["PetstoreClient"] + ), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + .package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"), + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "PetstoreClient", + dependencies: ["AnyCodable", ], + path: "PetstoreClient/Classes" + ), + ] +) diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient.podspec b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient.podspec new file mode 100644 index 00000000000..0e6bf7ec024 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient.podspec @@ -0,0 +1,15 @@ +Pod::Spec.new do |s| + s.name = 'PetstoreClient' + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.11' + s.tvos.deployment_target = '9.0' + s.watchos.deployment_target = '3.0' + s.version = '1.0.0' + s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' } + s.authors = '' + s.license = 'Proprietary' + s.homepage = 'https://github.com/openapitools/openapi-generator' + s.summary = 'PetstoreClient' + s.source_files = 'PetstoreClient/Classes/**/*.swift' + s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' +end diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient.xcodeproj/project.pbxproj new file mode 100644 index 00000000000..7c3beef86d8 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient.xcodeproj/project.pbxproj @@ -0,0 +1,537 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; + 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9D22720B1B12BE43D3B45ADE /* JSONDataEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A3E16915AA7FD644C4FE162E /* URLSessionImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11F49B24B6239C324722572C /* URLSessionImplementations.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD3A3107C12F2634CD22163B /* SynchronizedDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + B637B9432565A6A8E7C73E7F /* OpenISO8601DateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONDataEncoding.swift; sourceTree = ""; }; + 11F49B24B6239C324722572C /* URLSessionImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLSessionImplementations.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SynchronizedDictionary.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; + FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenISO8601DateFormatter.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXGroup section */ + 4FBDCF1330A9AB9122780DB3 /* Models */ = { + isa = PBXGroup; + children = ( + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, + ); + path = Models; + sourceTree = ""; + }; + 5FBA6AE5F64CD737F88B4565 = { + isa = PBXGroup; + children = ( + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 857F0DEA1890CE66D6DAD556 /* Products */, + ); + sourceTree = ""; + }; + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { + isa = PBXGroup; + children = ( + 897716962D472FE162B723CB /* APIHelper.swift */, + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, + 28A444949BBC254798C3B3DD /* Configuration.swift */, + B8C298FC8929DCB369053F11 /* Extensions.swift */, + 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */, + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, + 8699F7966F748ED026A6FB4C /* Models.swift */, + FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */, + D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */, + 11F49B24B6239C324722572C /* URLSessionImplementations.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, + ); + path = OpenAPIs; + sourceTree = ""; + }; + 857F0DEA1890CE66D6DAD556 /* Products */ = { + isa = PBXGroup; + children = ( + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, + ); + name = Products; + sourceTree = ""; + }; + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { + isa = PBXGroup; + children = ( + EF4C81BDD734856ED5023B77 /* Classes */, + ); + path = PetstoreClient; + sourceTree = ""; + }; + EF4C81BDD734856ED5023B77 /* Classes */ = { + isa = PBXGroup; + children = ( + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, + ); + path = Classes; + sourceTree = ""; + }; + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { + isa = PBXGroup; + children = ( + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, + ); + path = APIs; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C1282C2230015E0D204BEAED /* PetstoreClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildPhases = ( + E539708354CE60FE486F81ED /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PetstoreClient; + productName = PetstoreClient; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E7D276EE2369D8C455513C2E /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + TargetAttributes = { + }; + }; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 5FBA6AE5F64CD737F88B4565; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C1282C2230015E0D204BEAED /* PetstoreClient */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + E539708354CE60FE486F81ED /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, + 72547ECFB451A509409311EE /* Configuration.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 9D22720B1B12BE43D3B45ADE /* JSONDataEncoding.swift in Sources */, + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + B637B9432565A6A8E7C73E7F /* OpenISO8601DateFormatter.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + AD3A3107C12F2634CD22163B /* SynchronizedDictionary.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + A3E16915AA7FD644C4FE162E /* URLSessionImplementations.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 3B2C02AFB91CB5C82766ED5C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + A9EB0A02B94C427CBACFEC7C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "DEBUG=1", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + DD3EEB93949E9EBA4437E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; +} diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme new file mode 100644 index 00000000000..ce431fd1d1d --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift new file mode 100644 index 00000000000..f7bb5274bd9 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -0,0 +1,71 @@ +// APIHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct APIHelper { + public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + let destination = source.reduce(into: [String: Any]()) { result, item in + if let value = item.value { + result[item.key] = value + } + } + + if destination.isEmpty { + return nil + } + return destination + } + + 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: ",") + } else if let value: Any = item.value { + result[item.key] = "\(value)" + } + } + } + + public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { + guard let source = source else { + return nil + } + + return source.reduce(into: [String: Any]()) { result, item in + switch item.value { + case let x as Bool: + result[item.key] = x.description + default: + result[item.key] = item.value + } + } + } + + public static func mapValueToPathItem(_ source: Any) -> Any { + if let collection = source as? [Any?] { + return collection.filter { $0 != nil }.map { "\($0!)" }.joined(separator: ",") + } + return source + } + + 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 + result.append(URLQueryItem(name: item.key, value: value)) + } + } else if let value = item.value { + result.append(URLQueryItem(name: item.key, value: "\(value)")) + } + } + + if destination.isEmpty { + return nil + } + return destination + } +} diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift new file mode 100644 index 00000000000..38ffbb4394a --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -0,0 +1,69 @@ +// APIs.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +// We reverted the change of PetstoreClientAPI to PetstoreClient introduced in https://github.com/OpenAPITools/openapi-generator/pull/9624 +// Because it was causing the following issue https://github.com/OpenAPITools/openapi-generator/issues/9953 +// If you are affected by this issue, please consider removing the following two lines, +// By setting the option removeMigrationProjectNameClass to true in the generator +@available(*, deprecated, renamed: "PetstoreClientAPI") +public typealias PetstoreClient = PetstoreClientAPI + +open class PetstoreClientAPI { + public static var basePath = "http://petstore.swagger.io:80/v2" + public static var customHeaders: [String: String] = [:] + public static var credential: URLCredential? + public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() + public static var apiResponseQueue: DispatchQueue = .main +} + +open class RequestBuilder { + var credential: URLCredential? + var headers: [String: String] + public let parameters: [String: Any]? + public let method: String + public let URLString: String + + /// Optional block to obtain a reference to the request's progress instance when available. + /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. + /// If you need to get the request's progress in older OS versions, please use Alamofire http client. + public var onProgressReady: ((Progress) -> Void)? + + required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:]) { + self.method = method + self.URLString = URLString + self.parameters = parameters + self.headers = headers + + addHeaders(PetstoreClientAPI.customHeaders) + } + + open func addHeaders(_ aHeaders: [String: String]) { + for (header, value) in aHeaders { + headers[header] = value + } + } + + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { } + + public func addHeader(name: String, value: String) -> Self { + if !value.isEmpty { + headers[name] = value + } + return self + } + + open func addCredential() -> Self { + credential = PetstoreClientAPI.credential + return self + } +} + +public protocol RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type +} diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift new file mode 100644 index 00000000000..4b777e5291a --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -0,0 +1,60 @@ +// +// AnotherFakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +open class AnotherFakeAPI { + + /** + To test special tags + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Client + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> Client { + return try await withCheckedThrowingContinuation { continuation in + call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + continuation.resume(returning: response.body!) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + To test special tags + - PATCH /another-fake/dummy + - To test special tags and operation ID starting with number + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func call123testSpecialTagsWithRequestBuilder(body: Client) -> RequestBuilder { + let localVariablePath = "/another-fake/dummy" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } +} diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift new file mode 100644 index 00000000000..4e950ffbc77 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -0,0 +1,723 @@ +// +// FakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +open class FakeAPI { + + /** + + - parameter body: (body) Input boolean as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Bool + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> Bool { + return try await withCheckedThrowingContinuation { continuation in + fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + continuation.resume(returning: response.body!) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + - POST /fake/outer/boolean + - Test serialization of outer boolean types + - parameter body: (body) Input boolean as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil) -> RequestBuilder { + let localVariablePath = "/fake/outer/boolean" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + + - parameter body: (body) Input composite as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: OuterComposite + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> OuterComposite { + return try await withCheckedThrowingContinuation { continuation in + fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + continuation.resume(returning: response.body!) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + - POST /fake/outer/composite + - Test serialization of object with outer number type + - parameter body: (body) Input composite as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder { + let localVariablePath = "/fake/outer/composite" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + + - parameter body: (body) Input number as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Double + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> Double { + return try await withCheckedThrowingContinuation { continuation in + fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + continuation.resume(returning: response.body!) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + - POST /fake/outer/number + - Test serialization of outer number types + - parameter body: (body) Input number as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil) -> RequestBuilder { + let localVariablePath = "/fake/outer/number" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + + - parameter body: (body) Input string as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: String + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> String { + return try await withCheckedThrowingContinuation { continuation in + fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + continuation.resume(returning: response.body!) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + - POST /fake/outer/string + - Test serialization of outer string types + - parameter body: (body) Input string as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil) -> RequestBuilder { + let localVariablePath = "/fake/outer/string" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + + - parameter body: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Void + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws { + return try await withCheckedThrowingContinuation { continuation in + testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result in + switch result { + case .success: + continuation.resume(returning: ()) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + - PUT /fake/body-with-file-schema + - For this test, the body for this request much reference a schema named `File`. + - parameter body: (body) + - returns: RequestBuilder + */ + open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass) -> RequestBuilder { + let localVariablePath = "/fake/body-with-file-schema" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + + - parameter query: (query) + - parameter body: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Void + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws { + return try await withCheckedThrowingContinuation { continuation in + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result in + switch result { + case .success: + continuation.resume(returning: ()) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + - PUT /fake/body-with-query-params + - parameter query: (query) + - parameter body: (body) + - returns: RequestBuilder + */ + open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User) -> RequestBuilder { + let localVariablePath = "/fake/body-with-query-params" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "query": query.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + To test \"client\" model + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Client + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> Client { + return try await withCheckedThrowingContinuation { continuation in + testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + continuation.resume(returning: response.body!) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + To test \"client\" model + - PATCH /fake + - To test \"client\" model + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder { + let localVariablePath = "/fake" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Void + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + 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) async throws { + return try await withCheckedThrowingContinuation { continuation in + testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result in + switch result { + case .success: + continuation.resume(returning: ()) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - POST /fake + - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - BASIC: + - type: http + - name: http_basic_test + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - returns: RequestBuilder + */ + open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + let localVariablePath = "/fake" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableFormParams: [String: Any?] = [ + "integer": integer?.encodeToJSON(), + "int32": int32?.encodeToJSON(), + "int64": int64?.encodeToJSON(), + "number": number.encodeToJSON(), + "float": float?.encodeToJSON(), + "double": double.encodeToJSON(), + "string": string?.encodeToJSON(), + "pattern_without_delimiter": patternWithoutDelimiter.encodeToJSON(), + "byte": byte.encodeToJSON(), + "binary": binary?.encodeToJSON(), + "date": date?.encodeToJSON(), + "dateTime": dateTime?.encodeToJSON(), + "password": password?.encodeToJSON(), + "callback": callback?.encodeToJSON(), + ] + + let localVariableNonNullParameters = APIHelper.rejectNil(localVariableFormParams) + let localVariableParameters = APIHelper.convertBoolToString(localVariableNonNullParameters) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + "Content-Type": "application/x-www-form-urlencoded", + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + * enum for parameter enumHeaderStringArray + */ + public enum EnumHeaderStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumHeaderString + */ + public enum EnumHeaderString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryStringArray + */ + public enum EnumQueryStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumQueryString + */ + public enum EnumQueryString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryInteger + */ + public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { + case _1 = 1 + case number2 = -2 + } + + /** + * enum for parameter enumQueryDouble + */ + public enum EnumQueryDouble_testEnumParameters: Double, CaseIterable { + case _11 = 1.1 + case number12 = -1.2 + } + + /** + * enum for parameter enumFormStringArray + */ + public enum EnumFormStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumFormString + */ + public enum EnumFormString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + To test enum parameters + + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Void + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + 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) async throws { + return try await withCheckedThrowingContinuation { continuation in + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result in + switch result { + case .success: + continuation.resume(returning: ()) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + To test enum parameters + - GET /fake + - To test enum parameters + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) + - returns: RequestBuilder + */ + open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { + let localVariablePath = "/fake" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableFormParams: [String: Any?] = [ + "enum_form_string_array": enumFormStringArray?.encodeToJSON(), + "enum_form_string": enumFormString?.encodeToJSON(), + ] + + let localVariableNonNullParameters = APIHelper.rejectNil(localVariableFormParams) + let localVariableParameters = APIHelper.convertBoolToString(localVariableNonNullParameters) + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), + "enum_query_double": enumQueryDouble?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + "Content-Type": "application/x-www-form-urlencoded", + "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(), + "enum_header_string": enumHeaderString?.encodeToJSON(), + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Fake endpoint to test group parameters (optional) + + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Void + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws { + return try await withCheckedThrowingContinuation { continuation in + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result in + switch result { + case .success: + continuation.resume(returning: ()) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + Fake endpoint to test group parameters (optional) + - DELETE /fake + - Fake endpoint to test group parameters (optional) + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - returns: RequestBuilder + */ + open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { + let localVariablePath = "/fake" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), + "int64_group": int64Group?.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + "required_boolean_group": requiredBooleanGroup.encodeToJSON(), + "boolean_group": booleanGroup?.encodeToJSON(), + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + test inline additionalProperties + + - parameter param: (body) request body + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Void + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws { + return try await withCheckedThrowingContinuation { continuation in + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result in + switch result { + case .success: + continuation.resume(returning: ()) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + test inline additionalProperties + - POST /fake/inline-additionalProperties + - parameter param: (body) request body + - returns: RequestBuilder + */ + open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { + let localVariablePath = "/fake/inline-additionalProperties" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + test json serialization of form data + + - parameter param: (form) field1 + - parameter param2: (form) field2 + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Void + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws { + return try await withCheckedThrowingContinuation { continuation in + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result in + switch result { + case .success: + continuation.resume(returning: ()) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + test json serialization of form data + - GET /fake/jsonFormData + - parameter param: (form) field1 + - parameter param2: (form) field2 + - returns: RequestBuilder + */ + open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { + let localVariablePath = "/fake/jsonFormData" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableFormParams: [String: Any?] = [ + "param": param.encodeToJSON(), + "param2": param2.encodeToJSON(), + ] + + let localVariableNonNullParameters = APIHelper.rejectNil(localVariableFormParams) + let localVariableParameters = APIHelper.convertBoolToString(localVariableNonNullParameters) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + "Content-Type": "application/x-www-form-urlencoded", + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } +} diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift new file mode 100644 index 00000000000..83a249280d7 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -0,0 +1,63 @@ +// +// FakeClassnameTags123API.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +open class FakeClassnameTags123API { + + /** + To test class name in snake case + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Client + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> Client { + return try await withCheckedThrowingContinuation { continuation in + testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + continuation.resume(returning: response.body!) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + To test class name in snake case + - PATCH /fake_classname_test + - To test class name in snake case + - API Key: + - type: apiKey api_key_query (QUERY) + - name: api_key_query + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder { + let localVariablePath = "/fake_classname_test" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "PATCH", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } +} diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift new file mode 100644 index 00000000000..434db991d21 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -0,0 +1,513 @@ +// +// PetAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +open class PetAPI { + + /** + Add a new pet to the store + + - parameter body: (body) Pet object that needs to be added to the store + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Void + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws { + return try await withCheckedThrowingContinuation { continuation in + addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in + switch result { + case .success: + continuation.resume(returning: ()) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + Add a new pet to the store + - POST /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + open class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder { + let localVariablePath = "/pet" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Deletes a pet + + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Void + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws { + return try await withCheckedThrowingContinuation { continuation in + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result in + switch result { + case .success: + continuation.resume(returning: ()) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + Deletes a pet + - DELETE /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - returns: RequestBuilder + */ + open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder { + var localVariablePath = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + "api_key": apiKey?.encodeToJSON(), + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + * enum for parameter status + */ + public enum Status_findPetsByStatus: String, CaseIterable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + + /** + Finds Pets by status + + - parameter status: (query) Status values that need to be considered for filter + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: [Pet] + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> [Pet] { + return try await withCheckedThrowingContinuation { continuation in + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + continuation.resume(returning: response.body!) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + Finds Pets by status + - GET /pet/findByStatus + - Multiple status values can be provided with comma separated strings + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter status: (query) Status values that need to be considered for filter + - returns: RequestBuilder<[Pet]> + */ + open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { + let localVariablePath = "/pet/findByStatus" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "status": status.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Finds Pets by tags + + - parameter tags: (query) Tags to filter by + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: [Pet] + */ + @available(*, deprecated, message: "This operation is deprecated.") + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> [Pet] { + return try await withCheckedThrowingContinuation { continuation in + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + continuation.resume(returning: response.body!) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + Finds Pets by tags + - GET /pet/findByTags + - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter tags: (query) Tags to filter by + - returns: RequestBuilder<[Pet]> + */ + @available(*, deprecated, message: "This operation is deprecated.") + open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { + let localVariablePath = "/pet/findByTags" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "tags": tags.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Find pet by ID + + - parameter petId: (path) ID of pet to return + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Pet + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> Pet { + return try await withCheckedThrowingContinuation { continuation in + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + continuation.resume(returning: response.body!) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + Find pet by ID + - GET /pet/{petId} + - Returns a single pet + - API Key: + - type: apiKey api_key + - name: api_key + - parameter petId: (path) ID of pet to return + - returns: RequestBuilder + */ + open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder { + var localVariablePath = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Update an existing pet + + - parameter body: (body) Pet object that needs to be added to the store + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Void + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws { + return try await withCheckedThrowingContinuation { continuation in + updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in + switch result { + case .success: + continuation.resume(returning: ()) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + Update an existing pet + - PUT /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + open class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder { + let localVariablePath = "/pet" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Updates a pet in the store with form data + + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Void + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws { + return try await withCheckedThrowingContinuation { continuation in + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result in + switch result { + case .success: + continuation.resume(returning: ()) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + Updates a pet in the store with form data + - POST /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - returns: RequestBuilder + */ + open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { + var localVariablePath = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableFormParams: [String: Any?] = [ + "name": name?.encodeToJSON(), + "status": status?.encodeToJSON(), + ] + + let localVariableNonNullParameters = APIHelper.rejectNil(localVariableFormParams) + let localVariableParameters = APIHelper.convertBoolToString(localVariableNonNullParameters) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + "Content-Type": "application/x-www-form-urlencoded", + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: ApiResponse + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> ApiResponse { + return try await withCheckedThrowingContinuation { continuation in + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + continuation.resume(returning: response.body!) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + uploads an image + - POST /pet/{petId}/uploadImage + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + var localVariablePath = "/pet/{petId}/uploadImage" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableFormParams: [String: Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "file": file?.encodeToJSON(), + ] + + let localVariableNonNullParameters = APIHelper.rejectNil(localVariableFormParams) + let localVariableParameters = APIHelper.convertBoolToString(localVariableNonNullParameters) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + "Content-Type": "multipart/form-data", + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + uploads an image (required) + + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: ApiResponse + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> ApiResponse { + return try await withCheckedThrowingContinuation { continuation in + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + continuation.resume(returning: response.body!) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + uploads an image (required) + - POST /fake/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var localVariablePath = "/fake/{petId}/uploadImageWithRequiredFile" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableFormParams: [String: Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "requiredFile": requiredFile.encodeToJSON(), + ] + + let localVariableNonNullParameters = APIHelper.rejectNil(localVariableFormParams) + let localVariableParameters = APIHelper.convertBoolToString(localVariableNonNullParameters) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + "Content-Type": "multipart/form-data", + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } +} diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift new file mode 100644 index 00000000000..42bb0a26c4a --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -0,0 +1,204 @@ +// +// StoreAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +open class StoreAPI { + + /** + Delete purchase order by ID + + - parameter orderId: (path) ID of the order that needs to be deleted + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Void + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws { + return try await withCheckedThrowingContinuation { continuation in + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in + switch result { + case .success: + continuation.resume(returning: ()) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + Delete purchase order by ID + - DELETE /store/order/{order_id} + - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + - parameter orderId: (path) ID of the order that needs to be deleted + - returns: RequestBuilder + */ + open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder { + var localVariablePath = "/store/order/{order_id}" + let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" + let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Returns pet inventories by status + + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: [String: Int] + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> [String: Int] { + return try await withCheckedThrowingContinuation { continuation in + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result in + switch result { + case let .success(response): + continuation.resume(returning: response.body!) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + Returns pet inventories by status + - GET /store/inventory + - Returns a map of status codes to quantities + - API Key: + - type: apiKey api_key + - name: api_key + - returns: RequestBuilder<[String: Int]> + */ + open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { + let localVariablePath = "/store/inventory" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Find purchase order by ID + + - parameter orderId: (path) ID of pet that needs to be fetched + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Order + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> Order { + return try await withCheckedThrowingContinuation { continuation in + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + continuation.resume(returning: response.body!) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + Find purchase order by ID + - GET /store/order/{order_id} + - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - parameter orderId: (path) ID of pet that needs to be fetched + - returns: RequestBuilder + */ + open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder { + var localVariablePath = "/store/order/{order_id}" + let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" + let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Place an order for a pet + + - parameter body: (body) order placed for purchasing the pet + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Order + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> Order { + return try await withCheckedThrowingContinuation { continuation in + placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + continuation.resume(returning: response.body!) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + Place an order for a pet + - POST /store/order + - parameter body: (body) order placed for purchasing the pet + - returns: RequestBuilder + */ + open class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder { + let localVariablePath = "/store/order" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } +} diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift new file mode 100644 index 00000000000..c26f2f6984a --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -0,0 +1,393 @@ +// +// UserAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +open class UserAPI { + + /** + Create user + + - parameter body: (body) Created user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Void + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws { + return try await withCheckedThrowingContinuation { continuation in + createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result in + switch result { + case .success: + continuation.resume(returning: ()) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + Create user + - POST /user + - This can only be done by the logged in user. + - parameter body: (body) Created user object + - returns: RequestBuilder + */ + open class func createUserWithRequestBuilder(body: User) -> RequestBuilder { + let localVariablePath = "/user" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Creates list of users with given input array + + - parameter body: (body) List of user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Void + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws { + return try await withCheckedThrowingContinuation { continuation in + createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in + switch result { + case .success: + continuation.resume(returning: ()) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + Creates list of users with given input array + - POST /user/createWithArray + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + open class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder { + let localVariablePath = "/user/createWithArray" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Creates list of users with given input array + + - parameter body: (body) List of user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Void + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws { + return try await withCheckedThrowingContinuation { continuation in + createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in + switch result { + case .success: + continuation.resume(returning: ()) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + Creates list of users with given input array + - POST /user/createWithList + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + open class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder { + let localVariablePath = "/user/createWithList" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Delete user + + - parameter username: (path) The name that needs to be deleted + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Void + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws { + return try await withCheckedThrowingContinuation { continuation in + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result in + switch result { + case .success: + continuation.resume(returning: ()) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + Delete user + - DELETE /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) The name that needs to be deleted + - returns: RequestBuilder + */ + open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder { + var localVariablePath = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return localVariableRequestBuilder.init(method: "DELETE", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Get user by user name + + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: User + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> User { + return try await withCheckedThrowingContinuation { continuation in + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + continuation.resume(returning: response.body!) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + Get user by user name + - GET /user/{username} + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - returns: RequestBuilder + */ + open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder { + var localVariablePath = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Logs user into the system + + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: String + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws -> String { + return try await withCheckedThrowingContinuation { continuation in + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result in + switch result { + case let .success(response): + continuation.resume(returning: response.body!) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + Logs user into the system + - GET /user/login + - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - returns: RequestBuilder + */ + open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { + let localVariablePath = "/user/login" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + var localVariableUrlComponents = URLComponents(string: localVariableURLString) + localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ + "username": username.encodeToJSON(), + "password": password.encodeToJSON(), + ]) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Logs out current logged in user session + + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Void + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws { + return try await withCheckedThrowingContinuation { continuation in + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result in + switch result { + case .success: + continuation.resume(returning: ()) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + Logs out current logged in user session + - GET /user/logout + - returns: RequestBuilder + */ + open class func logoutUserWithRequestBuilder() -> RequestBuilder { + let localVariablePath = "/user/logout" + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters: [String: Any]? = nil + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } + + /** + Updated user + + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Void + */ + @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) + open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) async throws { + return try await withCheckedThrowingContinuation { continuation in + updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result in + switch result { + case .success: + continuation.resume(returning: ()) + case let .failure(error): + continuation.resume(throwing: error) + } + } + } + } + + /** + Updated user + - PUT /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - returns: RequestBuilder + */ + open class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder { + var localVariablePath = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + localVariablePath = localVariablePath.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let localVariableUrlComponents = URLComponents(string: localVariableURLString) + + let localVariableNillableHeaders: [String: Any?] = [ + : + ] + + let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) + + let localVariableRequestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return localVariableRequestBuilder.init(method: "PUT", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) + } +} diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift new file mode 100644 index 00000000000..09c82e53e13 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -0,0 +1,49 @@ +// +// CodableHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class CodableHelper { + private static var customDateFormatter: DateFormatter? + private static var defaultDateFormatter: DateFormatter = OpenISO8601DateFormatter() + + private static var customJSONDecoder: JSONDecoder? + private static var defaultJSONDecoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) + return decoder + }() + + private static var customJSONEncoder: JSONEncoder? + private static var defaultJSONEncoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) + encoder.outputFormatting = .prettyPrinted + return encoder + }() + + public static var dateFormatter: DateFormatter { + get { return customDateFormatter ?? defaultDateFormatter } + set { customDateFormatter = newValue } + } + public static var jsonDecoder: JSONDecoder { + get { return customJSONDecoder ?? defaultJSONDecoder } + set { customJSONDecoder = newValue } + } + public static var jsonEncoder: JSONEncoder { + get { return customJSONEncoder ?? defaultJSONEncoder } + set { customJSONEncoder = newValue } + } + + open class func decode(_ type: T.Type, from data: Data) -> Swift.Result where T: Decodable { + return Swift.Result { try jsonDecoder.decode(type, from: data) } + } + + open class func encode(_ value: T) -> Swift.Result where T: Encodable { + return Swift.Result { try jsonEncoder.encode(value) } + } +} diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift new file mode 100644 index 00000000000..8fb05331889 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -0,0 +1,15 @@ +// Configuration.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class Configuration { + + // This value is used to configure the date formatter that is used to serialize dates into JSON format. + // You must set it prior to encoding any dates, and it will only be read once. + @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") + public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" +} diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift new file mode 100644 index 00000000000..e23035dde30 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -0,0 +1,188 @@ +// Extensions.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +extension Bool: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Float: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int32: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } +} + +extension Int64: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } +} + +extension Double: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension String: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension RawRepresentable where RawValue: JSONEncodable { + func encodeToJSON() -> Any { return self.rawValue as Any } +} + +private func encodeIfPossible(_ object: T) -> Any { + if let encodableObject = object as? JSONEncodable { + return encodableObject.encodeToJSON() + } else { + return object as Any + } +} + +extension Array: JSONEncodable { + func encodeToJSON() -> Any { + return self.map(encodeIfPossible) + } +} + +extension Set: JSONEncodable { + func encodeToJSON() -> Any { + return Array(self).encodeToJSON() + } +} + +extension Dictionary: JSONEncodable { + func encodeToJSON() -> Any { + var dictionary = [AnyHashable: Any]() + for (key, value) in self { + dictionary[key] = encodeIfPossible(value) + } + return dictionary as Any + } +} + +extension Data: JSONEncodable { + func encodeToJSON() -> Any { + return self.base64EncodedString(options: Data.Base64EncodingOptions()) + } +} + +extension Date: JSONEncodable { + func encodeToJSON() -> Any { + return CodableHelper.dateFormatter.string(from: self) as Any + } +} + +extension URL: JSONEncodable { + func encodeToJSON() -> Any { + return self + } +} + +extension UUID: JSONEncodable { + func encodeToJSON() -> Any { + return self.uuidString + } +} + +extension String: CodingKey { + + public var stringValue: String { + return self + } + + public init?(stringValue: String) { + self.init(stringLiteral: stringValue) + } + + public var intValue: Int? { + return nil + } + + public init?(intValue: Int) { + return nil + } + +} + +extension KeyedEncodingContainerProtocol { + + public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + var arrayContainer = nestedUnkeyedContainer(forKey: key) + try arrayContainer.encode(contentsOf: values) + } + + public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { + if let values = values { + try encodeArray(values, forKey: key) + } + } + + public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { + for (key, value) in pairs { + try encode(value, forKey: key) + } + } + + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { + if let pairs = pairs { + try encodeMap(pairs) + } + } + +} + +extension KeyedDecodingContainerProtocol { + + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + var tmpArray = [T]() + + var nestedContainer = try nestedUnkeyedContainer(forKey: key) + while !nestedContainer.isAtEnd { + let arrayValue = try nestedContainer.decode(T.self) + tmpArray.append(arrayValue) + } + + return tmpArray + } + + public func decodeArrayIfPresent(_ 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) + } + + return tmpArray + } + + public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { + var map: [Self.Key: T] = [:] + + for key in allKeys { + if !excludedKeys.contains(key) { + let value = try decode(T.self, forKey: key) + map[key] = value + } + } + + return map + } + +} + +extension HTTPURLResponse { + var isStatusCodeSuccessful: Bool { + return Array(200 ..< 300).contains(statusCode) + } +} diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift new file mode 100644 index 00000000000..b79e9f5e64d --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -0,0 +1,53 @@ +// +// JSONDataEncoding.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct JSONDataEncoding { + + // MARK: Properties + + private static let jsonDataKey = "jsonData" + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. This should have a single key/value + /// pair with "jsonData" as the key and a Data object as the value. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) -> URLRequest { + var urlRequest = urlRequest + + guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { + return urlRequest + } + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = jsonData + + return urlRequest + } + + public static func encodingParameters(jsonData: Data?) -> [String: Any]? { + var returnedParams: [String: Any]? + if let jsonData = jsonData, !jsonData.isEmpty { + var params: [String: Any] = [:] + params[jsonDataKey] = jsonData + returnedParams = params + } + return returnedParams + } + +} diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift new file mode 100644 index 00000000000..02f78ffb470 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -0,0 +1,45 @@ +// +// JSONEncodingHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class JSONEncodingHelper { + + open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? + + // Encode the Encodable object + if let encodableObj = encodableObj { + let encodeResult = CodableHelper.encode(encodableObj) + do { + let data = try encodeResult.get() + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + } + } + + return params + } + + open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + var params: [String: Any]? + + if let encodableObj = encodableObj { + do { + let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + return nil + } + } + + return params + } + +} diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift new file mode 100644 index 00000000000..96e26a20f7d --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -0,0 +1,54 @@ +// Models.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +protocol JSONEncodable { + func encodeToJSON() -> Any +} + +public enum ErrorResponse: Error { + case error(Int, Data?, URLResponse?, Error) +} + +public enum DownloadException: Error { + case responseDataMissing + case responseFailed + case requestMissing + case requestMissingPath + case requestMissingURL +} + +public enum DecodableRequestBuilderError: Error { + case emptyDataResponse + case nilHTTPResponse + case unsuccessfulHTTPStatusCode + case jsonDecoding(DecodingError) + case generalError(Error) +} + +open class Response { + public let statusCode: Int + public let header: [String: String] + public let body: T? + + public init(statusCode: Int, header: [String: String], body: T?) { + self.statusCode = statusCode + self.header = header + self.body = body + } + + public convenience init(response: HTTPURLResponse, body: T?) { + let rawHeader = response.allHeaderFields + var header = [String: String]() + for (key, value) in rawHeader { + if let key = key.base as? String, let value = value as? String { + header[key] = value + } + } + self.init(statusCode: response.statusCode, header: header, body: body) + } +} diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift new file mode 100644 index 00000000000..621afb93561 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -0,0 +1,36 @@ +// +// AdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct AdditionalPropertiesClass: Codable, Hashable { + + public var mapString: [String: String]? + public var mapMapString: [String: [String: String]]? + + public init(mapString: [String: String]? = nil, mapMapString: [String: [String: String]]? = nil) { + self.mapString = mapString + self.mapMapString = mapMapString + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case mapString = "map_string" + case mapMapString = "map_map_string" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(mapString, forKey: .mapString) + try container.encodeIfPresent(mapMapString, forKey: .mapMapString) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift new file mode 100644 index 00000000000..cdd4f5335b9 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -0,0 +1,36 @@ +// +// Animal.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct Animal: Codable, Hashable { + + public var className: String + public var color: String? = "red" + + public init(className: String, color: String? = "red") { + self.className = className + self.color = color + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case className + case color + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(className, forKey: .className) + try container.encodeIfPresent(color, forKey: .color) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift new file mode 100644 index 00000000000..a0b09cb9761 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -0,0 +1,13 @@ +// +// AnimalFarm.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift new file mode 100644 index 00000000000..c365505ab9d --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -0,0 +1,40 @@ +// +// ApiResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ApiResponse: Codable, Hashable { + + public var code: Int? + public var type: String? + public var message: String? + + public init(code: Int? = nil, type: String? = nil, message: String? = nil) { + self.code = code + self.type = type + self.message = message + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case code + case type + case message + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(code, forKey: .code) + try container.encodeIfPresent(type, forKey: .type) + try container.encodeIfPresent(message, forKey: .message) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift new file mode 100644 index 00000000000..226f7456181 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -0,0 +1,32 @@ +// +// ArrayOfArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ArrayOfArrayOfNumberOnly: Codable, Hashable { + + public var arrayArrayNumber: [[Double]]? + + public init(arrayArrayNumber: [[Double]]? = nil) { + self.arrayArrayNumber = arrayArrayNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayArrayNumber = "ArrayArrayNumber" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(arrayArrayNumber, forKey: .arrayArrayNumber) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift new file mode 100644 index 00000000000..39831127871 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -0,0 +1,32 @@ +// +// ArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ArrayOfNumberOnly: Codable, Hashable { + + public var arrayNumber: [Double]? + + public init(arrayNumber: [Double]? = nil) { + self.arrayNumber = arrayNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayNumber = "ArrayNumber" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(arrayNumber, forKey: .arrayNumber) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift new file mode 100644 index 00000000000..8865d76bef2 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -0,0 +1,40 @@ +// +// ArrayTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ArrayTest: Codable, Hashable { + + public var arrayOfString: [String]? + public var arrayArrayOfInteger: [[Int64]]? + public var arrayArrayOfModel: [[ReadOnlyFirst]]? + + public init(arrayOfString: [String]? = nil, arrayArrayOfInteger: [[Int64]]? = nil, arrayArrayOfModel: [[ReadOnlyFirst]]? = nil) { + self.arrayOfString = arrayOfString + self.arrayArrayOfInteger = arrayArrayOfInteger + self.arrayArrayOfModel = arrayArrayOfModel + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayOfString = "array_of_string" + case arrayArrayOfInteger = "array_array_of_integer" + case arrayArrayOfModel = "array_array_of_model" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(arrayOfString, forKey: .arrayOfString) + try container.encodeIfPresent(arrayArrayOfInteger, forKey: .arrayArrayOfInteger) + try container.encodeIfPresent(arrayArrayOfModel, forKey: .arrayArrayOfModel) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift new file mode 100644 index 00000000000..71cd93bce5f --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -0,0 +1,53 @@ +// +// Capitalization.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct Capitalization: Codable, Hashable { + + public var smallCamel: String? + public var capitalCamel: String? + public var smallSnake: String? + public var capitalSnake: String? + public var sCAETHFlowPoints: String? + /** Name of the pet */ + public var ATT_NAME: String? + + public init(smallCamel: String? = nil, capitalCamel: String? = nil, smallSnake: String? = nil, capitalSnake: String? = nil, sCAETHFlowPoints: String? = nil, ATT_NAME: String? = nil) { + self.smallCamel = smallCamel + self.capitalCamel = capitalCamel + self.smallSnake = smallSnake + self.capitalSnake = capitalSnake + self.sCAETHFlowPoints = sCAETHFlowPoints + self.ATT_NAME = ATT_NAME + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case smallCamel + case capitalCamel = "CapitalCamel" + case smallSnake = "small_Snake" + case capitalSnake = "Capital_Snake" + case sCAETHFlowPoints = "SCA_ETH_Flow_Points" + case ATT_NAME + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(smallCamel, forKey: .smallCamel) + try container.encodeIfPresent(capitalCamel, forKey: .capitalCamel) + try container.encodeIfPresent(smallSnake, forKey: .smallSnake) + try container.encodeIfPresent(capitalSnake, forKey: .capitalSnake) + try container.encodeIfPresent(sCAETHFlowPoints, forKey: .sCAETHFlowPoints) + try container.encodeIfPresent(ATT_NAME, forKey: .ATT_NAME) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift new file mode 100644 index 00000000000..457e04bd475 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -0,0 +1,40 @@ +// +// Cat.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct Cat: Codable, Hashable { + + public var className: String + public var color: String? = "red" + public var declawed: Bool? + + public init(className: String, color: String? = "red", declawed: Bool? = nil) { + self.className = className + self.color = color + self.declawed = declawed + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case className + case color + case declawed + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(className, forKey: .className) + try container.encodeIfPresent(color, forKey: .color) + try container.encodeIfPresent(declawed, forKey: .declawed) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift new file mode 100644 index 00000000000..8caebb1c206 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -0,0 +1,32 @@ +// +// CatAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct CatAllOf: Codable, Hashable { + + public var declawed: Bool? + + public init(declawed: Bool? = nil) { + self.declawed = declawed + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case declawed + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(declawed, forKey: .declawed) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift new file mode 100644 index 00000000000..89016ca353d --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -0,0 +1,36 @@ +// +// Category.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct Category: Codable, Hashable { + + public var id: Int64? + public var name: String? = "default-name" + + public init(id: Int64? = nil, name: String? = "default-name") { + self.id = id + self.name = name + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case name + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(id, forKey: .id) + try container.encode(name, forKey: .name) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift new file mode 100644 index 00000000000..16e69e560bd --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -0,0 +1,33 @@ +// +// ClassModel.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Model for testing model with \"_class\" property */ +public struct ClassModel: Codable, Hashable { + + public var _class: String? + + public init(_class: String? = nil) { + self._class = _class + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _class + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(_class, forKey: ._class) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift new file mode 100644 index 00000000000..60dbc5dc5c1 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -0,0 +1,32 @@ +// +// Client.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct Client: Codable, Hashable { + + public var client: String? + + public init(client: String? = nil) { + self.client = client + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case client + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(client, forKey: .client) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift new file mode 100644 index 00000000000..658732a7f36 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -0,0 +1,40 @@ +// +// Dog.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct Dog: Codable, Hashable { + + public var className: String + public var color: String? = "red" + public var breed: String? + + public init(className: String, color: String? = "red", breed: String? = nil) { + self.className = className + self.color = color + self.breed = breed + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case className + case color + case breed + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(className, forKey: .className) + try container.encodeIfPresent(color, forKey: .color) + try container.encodeIfPresent(breed, forKey: .breed) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift new file mode 100644 index 00000000000..82b0dedf35b --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -0,0 +1,32 @@ +// +// DogAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct DogAllOf: Codable, Hashable { + + public var breed: String? + + public init(breed: String? = nil) { + self.breed = breed + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case breed + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(breed, forKey: .breed) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift new file mode 100644 index 00000000000..1d8ce99539c --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -0,0 +1,44 @@ +// +// EnumArrays.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct EnumArrays: Codable, Hashable { + + public enum JustSymbol: String, Codable, CaseIterable { + case greaterThanOrEqualTo = ">=" + case dollar = "$" + } + public enum ArrayEnum: String, Codable, CaseIterable { + case fish = "fish" + case crab = "crab" + } + public var justSymbol: JustSymbol? + public var arrayEnum: [ArrayEnum]? + + public init(justSymbol: JustSymbol? = nil, arrayEnum: [ArrayEnum]? = nil) { + self.justSymbol = justSymbol + self.arrayEnum = arrayEnum + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case justSymbol = "just_symbol" + case arrayEnum = "array_enum" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(justSymbol, forKey: .justSymbol) + try container.encodeIfPresent(arrayEnum, forKey: .arrayEnum) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift new file mode 100644 index 00000000000..6ea2895aee5 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -0,0 +1,17 @@ +// +// EnumClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public enum EnumClass: String, Codable, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" +} diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift new file mode 100644 index 00000000000..8c8bca49774 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -0,0 +1,66 @@ +// +// EnumTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct EnumTest: Codable, Hashable { + + public enum EnumString: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumStringRequired: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumInteger: Int, Codable, CaseIterable { + case _1 = 1 + case number1 = -1 + } + public enum EnumNumber: Double, Codable, CaseIterable { + case _11 = 1.1 + case number12 = -1.2 + } + public var enumString: EnumString? + public var enumStringRequired: EnumStringRequired + public var enumInteger: EnumInteger? + public var enumNumber: EnumNumber? + public var outerEnum: OuterEnum? + + public init(enumString: EnumString? = nil, enumStringRequired: EnumStringRequired, enumInteger: EnumInteger? = nil, enumNumber: EnumNumber? = nil, outerEnum: OuterEnum? = nil) { + self.enumString = enumString + self.enumStringRequired = enumStringRequired + self.enumInteger = enumInteger + self.enumNumber = enumNumber + self.outerEnum = outerEnum + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case enumString = "enum_string" + case enumStringRequired = "enum_string_required" + case enumInteger = "enum_integer" + case enumNumber = "enum_number" + case outerEnum + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(enumString, forKey: .enumString) + try container.encode(enumStringRequired, forKey: .enumStringRequired) + try container.encodeIfPresent(enumInteger, forKey: .enumInteger) + try container.encodeIfPresent(enumNumber, forKey: .enumNumber) + try container.encodeIfPresent(outerEnum, forKey: .outerEnum) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift new file mode 100644 index 00000000000..05dd5b1a825 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -0,0 +1,34 @@ +// +// File.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Must be named `File` for test. */ +public struct File: Codable, Hashable { + + /** Test capitalization */ + public var sourceURI: String? + + public init(sourceURI: String? = nil) { + self.sourceURI = sourceURI + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case sourceURI + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(sourceURI, forKey: .sourceURI) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift new file mode 100644 index 00000000000..3ca66a31359 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -0,0 +1,36 @@ +// +// FileSchemaTestClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct FileSchemaTestClass: Codable, Hashable { + + public var file: File? + public var files: [File]? + + public init(file: File? = nil, files: [File]? = nil) { + self.file = file + self.files = files + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case file + case files + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(file, forKey: .file) + try container.encodeIfPresent(files, forKey: .files) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift new file mode 100644 index 00000000000..a7a4b39e720 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -0,0 +1,80 @@ +// +// FormatTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct FormatTest: Codable, Hashable { + + public var integer: Int? + public var int32: Int? + public var int64: Int64? + public var number: Double + public var float: Float? + public var double: Double? + public var string: String? + public var byte: Data + public var binary: URL? + public var date: Date + public var dateTime: Date? + public var uuid: UUID? + public var password: String + + public init(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double? = nil, string: String? = nil, byte: Data, binary: URL? = nil, date: Date, dateTime: Date? = nil, uuid: UUID? = nil, password: String) { + self.integer = integer + self.int32 = int32 + self.int64 = int64 + self.number = number + self.float = float + self.double = double + self.string = string + self.byte = byte + self.binary = binary + self.date = date + self.dateTime = dateTime + self.uuid = uuid + self.password = password + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case integer + case int32 + case int64 + case number + case float + case double + case string + case byte + case binary + case date + case dateTime + case uuid + case password + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(integer, forKey: .integer) + try container.encodeIfPresent(int32, forKey: .int32) + try container.encodeIfPresent(int64, forKey: .int64) + try container.encode(number, forKey: .number) + try container.encodeIfPresent(float, forKey: .float) + try container.encodeIfPresent(double, forKey: .double) + try container.encodeIfPresent(string, forKey: .string) + try container.encode(byte, forKey: .byte) + try container.encodeIfPresent(binary, forKey: .binary) + try container.encode(date, forKey: .date) + try container.encodeIfPresent(dateTime, forKey: .dateTime) + try container.encodeIfPresent(uuid, forKey: .uuid) + try container.encode(password, forKey: .password) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift new file mode 100644 index 00000000000..54ed8a723c6 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -0,0 +1,36 @@ +// +// HasOnlyReadOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct HasOnlyReadOnly: Codable, Hashable { + + public var bar: String? + public var foo: String? + + public init(bar: String? = nil, foo: String? = nil) { + self.bar = bar + self.foo = foo + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case bar + case foo + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(bar, forKey: .bar) + try container.encodeIfPresent(foo, forKey: .foo) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift new file mode 100644 index 00000000000..67e3048469f --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -0,0 +1,32 @@ +// +// List.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct List: Codable, Hashable { + + public var _123list: String? + + public init(_123list: String? = nil) { + self._123list = _123list + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _123list = "123-list" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(_123list, forKey: ._123list) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift new file mode 100644 index 00000000000..1e728fcdf58 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -0,0 +1,48 @@ +// +// MapTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct MapTest: Codable, Hashable { + + public enum MapOfEnumString: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + } + public var mapMapOfString: [String: [String: String]]? + public var mapOfEnumString: [String: String]? + public var directMap: [String: Bool]? + public var indirectMap: StringBooleanMap? + + public init(mapMapOfString: [String: [String: String]]? = nil, mapOfEnumString: [String: String]? = nil, directMap: [String: Bool]? = nil, indirectMap: StringBooleanMap? = nil) { + self.mapMapOfString = mapMapOfString + self.mapOfEnumString = mapOfEnumString + self.directMap = directMap + self.indirectMap = indirectMap + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case mapMapOfString = "map_map_of_string" + case mapOfEnumString = "map_of_enum_string" + case directMap = "direct_map" + case indirectMap = "indirect_map" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(mapMapOfString, forKey: .mapMapOfString) + try container.encodeIfPresent(mapOfEnumString, forKey: .mapOfEnumString) + try container.encodeIfPresent(directMap, forKey: .directMap) + try container.encodeIfPresent(indirectMap, forKey: .indirectMap) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift new file mode 100644 index 00000000000..c79ca459217 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -0,0 +1,40 @@ +// +// MixedPropertiesAndAdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, Hashable { + + public var uuid: UUID? + public var dateTime: Date? + public var map: [String: Animal]? + + public init(uuid: UUID? = nil, dateTime: Date? = nil, map: [String: Animal]? = nil) { + self.uuid = uuid + self.dateTime = dateTime + self.map = map + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case uuid + case dateTime + case map + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(uuid, forKey: .uuid) + try container.encodeIfPresent(dateTime, forKey: .dateTime) + try container.encodeIfPresent(map, forKey: .map) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift new file mode 100644 index 00000000000..23402143f71 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -0,0 +1,37 @@ +// +// Model200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Model for testing model name starting with number */ +public struct Model200Response: Codable, Hashable { + + public var name: Int? + public var _class: String? + + public init(name: Int? = nil, _class: String? = nil) { + self.name = name + self._class = _class + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case _class = "class" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(_class, forKey: ._class) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift new file mode 100644 index 00000000000..a28f46a33ce --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -0,0 +1,45 @@ +// +// Name.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Model for testing model name same as property name */ +public struct Name: Codable, Hashable { + + public var name: Int + public var snakeCase: Int? + public var property: String? + public var _123number: Int? + + public init(name: Int, snakeCase: Int? = nil, property: String? = nil, _123number: Int? = nil) { + self.name = name + self.snakeCase = snakeCase + self.property = property + self._123number = _123number + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case snakeCase = "snake_case" + case property + case _123number = "123Number" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(name, forKey: .name) + try container.encodeIfPresent(snakeCase, forKey: .snakeCase) + try container.encodeIfPresent(property, forKey: .property) + try container.encodeIfPresent(_123number, forKey: ._123number) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift new file mode 100644 index 00000000000..87ceb64bb97 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -0,0 +1,32 @@ +// +// NumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct NumberOnly: Codable, Hashable { + + public var justNumber: Double? + + public init(justNumber: Double? = nil) { + self.justNumber = justNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case justNumber = "JustNumber" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(justNumber, forKey: .justNumber) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift new file mode 100644 index 00000000000..e2eeced4c57 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -0,0 +1,58 @@ +// +// Order.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct Order: Codable, Hashable { + + public enum Status: String, Codable, CaseIterable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" + } + public var id: Int64? + public var petId: Int64? + public var quantity: Int? + public var shipDate: Date? + /** Order Status */ + public var status: Status? + public var complete: Bool? = false + + public init(id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = false) { + self.id = id + self.petId = petId + self.quantity = quantity + self.shipDate = shipDate + self.status = status + self.complete = complete + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case petId + case quantity + case shipDate + case status + case complete + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(id, forKey: .id) + try container.encodeIfPresent(petId, forKey: .petId) + try container.encodeIfPresent(quantity, forKey: .quantity) + try container.encodeIfPresent(shipDate, forKey: .shipDate) + try container.encodeIfPresent(status, forKey: .status) + try container.encodeIfPresent(complete, forKey: .complete) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift new file mode 100644 index 00000000000..edeaccaeaa6 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -0,0 +1,40 @@ +// +// OuterComposite.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct OuterComposite: Codable, Hashable { + + public var myNumber: Double? + public var myString: String? + public var myBoolean: Bool? + + public init(myNumber: Double? = nil, myString: String? = nil, myBoolean: Bool? = nil) { + self.myNumber = myNumber + self.myString = myString + self.myBoolean = myBoolean + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case myNumber = "my_number" + case myString = "my_string" + case myBoolean = "my_boolean" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(myNumber, forKey: .myNumber) + try container.encodeIfPresent(myString, forKey: .myString) + try container.encodeIfPresent(myBoolean, forKey: .myBoolean) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift new file mode 100644 index 00000000000..76c34b3c2ce --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -0,0 +1,17 @@ +// +// OuterEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public enum OuterEnum: String, Codable, CaseIterable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" +} diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift new file mode 100644 index 00000000000..ddd1186b891 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -0,0 +1,58 @@ +// +// Pet.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct Pet: Codable, Hashable { + + public enum Status: String, Codable, CaseIterable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + public var id: Int64? + public var category: Category? + public var name: String + public var photoUrls: [String] + public var tags: [Tag]? + /** pet status in the store */ + public var status: Status? + + public init(id: Int64? = nil, category: Category? = nil, name: String, photoUrls: [String], tags: [Tag]? = nil, status: Status? = nil) { + self.id = id + self.category = category + self.name = name + self.photoUrls = photoUrls + self.tags = tags + self.status = status + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case category + case name + case photoUrls + case tags + case status + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(id, forKey: .id) + try container.encodeIfPresent(category, forKey: .category) + try container.encode(name, forKey: .name) + try container.encode(photoUrls, forKey: .photoUrls) + try container.encodeIfPresent(tags, forKey: .tags) + try container.encodeIfPresent(status, forKey: .status) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift new file mode 100644 index 00000000000..57ba3f577c8 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -0,0 +1,36 @@ +// +// ReadOnlyFirst.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct ReadOnlyFirst: Codable, Hashable { + + public var bar: String? + public var baz: String? + + public init(bar: String? = nil, baz: String? = nil) { + self.bar = bar + self.baz = baz + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case bar + case baz + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(bar, forKey: .bar) + try container.encodeIfPresent(baz, forKey: .baz) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift new file mode 100644 index 00000000000..afc2b51f8f3 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -0,0 +1,33 @@ +// +// Return.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +/** Model for testing reserved words */ +public struct Return: Codable, Hashable { + + public var _return: Int? + + public init(_return: Int? = nil) { + self._return = _return + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _return = "return" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(_return, forKey: ._return) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift new file mode 100644 index 00000000000..bfe9723f888 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -0,0 +1,32 @@ +// +// SpecialModelName.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct SpecialModelName: Codable, Hashable { + + public var specialPropertyName: Int64? + + public init(specialPropertyName: Int64? = nil) { + self.specialPropertyName = specialPropertyName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case specialPropertyName = "$special[property.name]" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(specialPropertyName, forKey: .specialPropertyName) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift new file mode 100644 index 00000000000..126c35c85a6 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -0,0 +1,52 @@ +// +// StringBooleanMap.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct StringBooleanMap: Codable, Hashable { + + + public enum CodingKeys: CodingKey, CaseIterable { + } + + public var additionalProperties: [String: Bool] = [:] + + public subscript(key: String) -> Bool? { + get { + if let value = additionalProperties[key] { + return value + } + return nil + } + + set { + additionalProperties[key] = newValue + } + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + var additionalPropertiesContainer = encoder.container(keyedBy: String.self) + try additionalPropertiesContainer.encodeMap(additionalProperties) + } + + // Decodable protocol methods + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + + var nonAdditionalPropertyKeys = Set() + let additionalPropertiesContainer = try decoder.container(keyedBy: String.self) + additionalProperties = try additionalPropertiesContainer.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift new file mode 100644 index 00000000000..07b826264f3 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -0,0 +1,36 @@ +// +// Tag.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct Tag: Codable, Hashable { + + public var id: Int64? + public var name: String? + + public init(id: Int64? = nil, name: String? = nil) { + self.id = id + self.name = name + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case name + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(id, forKey: .id) + try container.encodeIfPresent(name, forKey: .name) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift new file mode 100644 index 00000000000..e58eecd960f --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -0,0 +1,48 @@ +// +// TypeHolderDefault.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct TypeHolderDefault: Codable, Hashable { + + public var stringItem: String = "what" + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool = true + public var arrayItem: [Int] + + public init(stringItem: String = "what", numberItem: Double, integerItem: Int, boolItem: Bool = true, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(stringItem, forKey: .stringItem) + try container.encode(numberItem, forKey: .numberItem) + try container.encode(integerItem, forKey: .integerItem) + try container.encode(boolItem, forKey: .boolItem) + try container.encode(arrayItem, forKey: .arrayItem) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift new file mode 100644 index 00000000000..6c22fdbae7a --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -0,0 +1,48 @@ +// +// TypeHolderExample.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct TypeHolderExample: Codable, Hashable { + + public var stringItem: String + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool + public var arrayItem: [Int] + + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(stringItem, forKey: .stringItem) + try container.encode(numberItem, forKey: .numberItem) + try container.encode(integerItem, forKey: .integerItem) + try container.encode(boolItem, forKey: .boolItem) + try container.encode(arrayItem, forKey: .arrayItem) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift new file mode 100644 index 00000000000..7afe359ae40 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -0,0 +1,61 @@ +// +// User.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct User: Codable, Hashable { + + public var id: Int64? + public var username: String? + public var firstName: String? + public var lastName: String? + public var email: String? + public var password: String? + public var phone: String? + /** User Status */ + public var userStatus: Int? + + public init(id: Int64? = nil, username: String? = nil, firstName: String? = nil, lastName: String? = nil, email: String? = nil, password: String? = nil, phone: String? = nil, userStatus: Int? = nil) { + self.id = id + self.username = username + self.firstName = firstName + self.lastName = lastName + self.email = email + self.password = password + self.phone = phone + self.userStatus = userStatus + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case id + case username + case firstName + case lastName + case email + case password + case phone + case userStatus + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(id, forKey: .id) + try container.encodeIfPresent(username, forKey: .username) + try container.encodeIfPresent(firstName, forKey: .firstName) + try container.encodeIfPresent(lastName, forKey: .lastName) + try container.encodeIfPresent(email, forKey: .email) + try container.encodeIfPresent(password, forKey: .password) + try container.encodeIfPresent(phone, forKey: .phone) + try container.encodeIfPresent(userStatus, forKey: .userStatus) + } +} + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift new file mode 100644 index 00000000000..e06208074cd --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift @@ -0,0 +1,44 @@ +// +// OpenISO8601DateFormatter.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +// https://stackoverflow.com/a/50281094/976628 +public class OpenISO8601DateFormatter: DateFormatter { + static let withoutSeconds: DateFormatter = { + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ" + return formatter + }() + + private func setup() { + calendar = Calendar(identifier: .iso8601) + locale = Locale(identifier: "en_US_POSIX") + timeZone = TimeZone(secondsFromGMT: 0) + dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + } + + override init() { + super.init() + setup() + } + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + setup() + } + + override public func date(from string: String) -> Date? { + if let result = super.date(from: string) { + return result + } + return OpenISO8601DateFormatter.withoutSeconds.date(from: string) + } +} diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift new file mode 100644 index 00000000000..acf7ff4031b --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift @@ -0,0 +1,36 @@ +// SynchronizedDictionary.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct SynchronizedDictionary { + + private var dictionary = [K: V]() + private let queue = DispatchQueue( + label: "SynchronizedDictionary", + qos: DispatchQoS.userInitiated, + attributes: [DispatchQueue.Attributes.concurrent], + autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, + target: nil + ) + + internal subscript(key: K) -> V? { + get { + var value: V? + + queue.sync { + value = self.dictionary[key] + } + + return value + } + set { + queue.sync(flags: DispatchWorkItemFlags.barrier) { + self.dictionary[key] = newValue + } + } + } +} diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift new file mode 100644 index 00000000000..19c7d89462e --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -0,0 +1,649 @@ +// URLSessionImplementations.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if !os(macOS) +import MobileCoreServices +#endif + +class URLSessionRequestBuilderFactory: RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type { + return URLSessionRequestBuilder.self + } + + func getBuilder() -> RequestBuilder.Type { + return URLSessionDecodableRequestBuilder.self + } +} + +// Store the URLSession to retain its reference +private var urlSessionStore = SynchronizedDictionary() + +open class URLSessionRequestBuilder: RequestBuilder { + + /** + May be assigned if you want to control the authentication challenges. + */ + public var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + /** + May be assigned if you want to do any of those things: + - control the task completion + - 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]?, 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. + */ + open func createURLSession() -> URLSession { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = buildHeaders() + let sessionDelegate = SessionDelegate() + sessionDelegate.credential = credential + sessionDelegate.taskDidReceiveChallenge = taskDidReceiveChallenge + return URLSession(configuration: configuration, delegate: sessionDelegate, delegateQueue: nil) + } + + /** + May be overridden by a subclass if you want to control the Content-Type + that is given to an uploaded form part. + + Return nil to use the default behavior (inferring the Content-Type from + the file extension). Return the desired Content-Type otherwise. + */ + open func contentTypeForFormPart(fileURL: URL) -> String? { + return nil + } + + /** + May be overridden by a subclass if you want to control the URLRequest + configuration (e.g. to override the cache policy). + */ + open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + + 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 open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + let urlSessionId = UUID().uuidString + // Create a new manager for each request to customize its request header + let urlSession = createURLSession() + urlSessionStore[urlSessionId] = urlSession + + guard let xMethod = HTTPMethod(rawValue: method) else { + fatalError("Unsupported 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("Unsupported Media Type - \(contentType)") + } + } + + let cleanupRequest = { + urlSessionStore[urlSessionId]?.finishTasksAndInvalidate() + urlSessionStore[urlSessionId] = nil + } + + do { + let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) + + let dataTask = urlSession.dataTask(with: request) { data, response, error in + + if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { + + taskCompletionShouldRetry(data, response, error) { shouldRetry in + + if shouldRetry { + cleanupRequest() + self.execute(apiResponseQueue, completion) + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + cleanupRequest() + } + } + } + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + cleanupRequest() + } + } + } + + 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, Error>) -> Void) { + + if let error = error { + completion(.failure(ErrorResponse.error(-1, data, response, error))) + return + } + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + guard httpResponse.isStatusCodeSuccessful else { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode))) + return + } + + switch T.self { + case is String.Type: + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is URL.Type: + do { + + guard error == nil else { + throw DownloadException.responseFailed + } + + guard let data = data else { + throw DownloadException.responseDataMissing + } + + let fileManager = FileManager.default + let cachesDirectory = fileManager.urls(for: .cachesDirectory, in: .userDomainMask)[0] + let requestURL = try getURL(from: urlRequest) + + var requestPath = try getPath(from: requestURL) + + if let headerFileName = getFileName(fromContentDisposition: httpResponse.allHeaderFields["Content-Disposition"] as? String) { + requestPath = requestPath.appending("/\(headerFileName)") + } else { + requestPath = requestPath.appending("/tmp.PetstoreClient.\(UUID().uuidString)") + } + + let filePath = cachesDirectory.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 { + completion(.failure(ErrorResponse.error(400, data, response, error))) + } + + 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: + + completion(.success(Response(response: httpResponse, body: data as? T))) + } + + } + + open func buildHeaders() -> [String: String] { + var httpHeaders: [String: String] = [:] + for (key, value) in headers { + httpHeaders[key] = value + } + for (key, value) in PetstoreClientAPI.customHeaders { + httpHeaders[key] = value + } + return httpHeaders + } + + fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + + guard let contentDisposition = contentDisposition else { + return nil + } + + let items = contentDisposition.components(separatedBy: ";") + + var filename: String? + + for contentItem in items { + + let filenameKey = "filename=" + guard let range = contentItem.range(of: filenameKey) else { + continue + } + + filename = contentItem + return filename? + .replacingCharacters(in: range, with: "") + .replacingOccurrences(of: "\"", with: "") + .trimmingCharacters(in: .whitespacesAndNewlines) + } + + return filename + + } + + fileprivate func getPath(from url: URL) throws -> String { + + guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { + throw DownloadException.requestMissingPath + } + + if path.hasPrefix("/") { + path.remove(at: path.startIndex) + } + + return path + + } + + fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + return url + } + +} + +open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + + if let error = error { + completion(.failure(ErrorResponse.error(-1, data, response, error))) + return + } + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, data, response, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + guard httpResponse.isStatusCodeSuccessful else { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, DecodableRequestBuilderError.unsuccessfulHTTPStatusCode))) + return + } + + switch T.self { + case is String.Type: + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is URL.Type: + do { + + guard error == nil else { + throw DownloadException.responseFailed + } + + guard let data = data else { + throw DownloadException.responseDataMissing + } + + let fileManager = FileManager.default + let cachesDirectory = fileManager.urls(for: .cachesDirectory, in: .userDomainMask)[0] + let requestURL = try getURL(from: urlRequest) + + var requestPath = try getPath(from: requestURL) + + if let headerFileName = getFileName(fromContentDisposition: httpResponse.allHeaderFields["Content-Disposition"] as? String) { + requestPath = requestPath.appending("/\(headerFileName)") + } else { + requestPath = requestPath.appending("/tmp.PetstoreClient.\(UUID().uuidString)") + } + + let filePath = cachesDirectory.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 { + completion(.failure(ErrorResponse.error(400, data, response, error))) + } + + 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))) + case let .failure(error): + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error))) + } + } + } +} + +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) { + + var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling + + var credential: URLCredential? + + if let taskDidReceiveChallenge = taskDidReceiveChallenge { + (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) + } else { + if challenge.previousFailureCount > 0 { + disposition = .rejectProtectionSpace + } else { + credential = self.credential ?? session.configuration.urlCredentialStorage?.defaultCredential(for: challenge.protectionSpace) + + if credential != nil { + disposition = .useCredential + } + } + } + + completionHandler(disposition, credential) + } +} + +public enum HTTPMethod: String { + case options = "OPTIONS" + case get = "GET" + case head = "HEAD" + case post = "POST" + case put = "PUT" + case patch = "PATCH" + case delete = "DELETE" + case trace = "TRACE" + case connect = "CONNECT" +} + +public protocol ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest +} + +private class URLEncoding: ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { + + var urlRequest = urlRequest + + guard let parameters = parameters else { return urlRequest } + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty { + urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) + urlRequest.url = urlComponents.url + } + + return urlRequest + } +} + +private class FormDataEncoding: ParameterEncoding { + + let contentTypeForFormPart: (_ fileURL: URL) -> String? + + init(contentTypeForFormPart: @escaping (_ fileURL: URL) -> String?) { + self.contentTypeForFormPart = contentTypeForFormPart + } + + 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 { + switch value { + case let fileURL as URL: + + urlRequest = try configureFileUploadRequest( + urlRequest: urlRequest, + boundary: boundary, + name: key, + fileURL: fileURL + ) + + case let string as String: + + if let data = string.data(using: .utf8) { + urlRequest = configureDataUploadRequest( + urlRequest: urlRequest, + boundary: boundary, + name: key, + data: data + ) + } + + case let number as NSNumber: + + if let data = number.stringValue.data(using: .utf8) { + urlRequest = configureDataUploadRequest( + urlRequest: urlRequest, + boundary: boundary, + name: key, + data: data + ) + } + + default: + fatalError("Unprocessable value \(value) with key \(key)") + } + } + + var body = urlRequest.httpBody.orEmpty + + body.append("\r\n--\(boundary)--\r\n") + + urlRequest.httpBody = body + + return urlRequest + } + + private func configureFileUploadRequest(urlRequest: URLRequest, boundary: String, name: String, fileURL: URL) throws -> URLRequest { + + var urlRequest = urlRequest + + var body = urlRequest.httpBody.orEmpty + + let fileData = try Data(contentsOf: fileURL) + + let mimetype = contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) + + let fileName = fileURL.lastPathComponent + + // If we already added something then we need an additional newline. + if body.count > 0 { + body.append("\r\n") + } + + // Value boundary. + body.append("--\(boundary)\r\n") + + // Value headers. + body.append("Content-Disposition: form-data; name=\"\(name)\"; filename=\"\(fileName)\"\r\n") + body.append("Content-Type: \(mimetype)\r\n") + + // Separate headers and body. + body.append("\r\n") + + // 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 { + body.append("\r\n") + } + + // Value boundary. + body.append("--\(boundary)\r\n") + + // Value headers. + body.append("Content-Disposition: form-data; name=\"\(name)\"\r\n") + + // Separate headers and body. + body.append("\r\n") + + // The value data. + body.append(data) + + urlRequest.httpBody = body + + return urlRequest + + } + + func mimeType(for url: URL) -> String { + let pathExtension = url.pathExtension + + if let uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as NSString, nil)?.takeRetainedValue() { + if let mimetype = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType)?.takeRetainedValue() { + return mimetype as String + } + } + return "application/octet-stream" + } + +} + +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. + /// + /// - parameter string: The string to be added to the `Data`. + + mutating func append(_ string: String) { + if let data = string.data(using: .utf8) { + append(data) + } + } +} + +private extension Optional where Wrapped == Data { + var orEmpty: Data { + self ?? Data() + } +} + +extension JSONDataEncoding: ParameterEncoding {} diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/README.md b/samples/client/petstore/swift5/asyncAwaitLibrary/README.md new file mode 100644 index 00000000000..1725415f7e0 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/README.md @@ -0,0 +1,141 @@ +# Swift5 API client for PetstoreClient + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build package: org.openapitools.codegen.languages.Swift5ClientCodegen + +## Installation + +### Carthage + +Run `carthage update` + +### CocoaPods + +Run `pod install` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AnotherFakeAPI* | [**call123testSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags +*FakeAPI* | [**fakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +*FakeAPI* | [**fakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +*FakeAPI* | [**fakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +*FakeAPI* | [**fakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*FakeAPI* | [**testBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +*FakeAPI* | [**testBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +*FakeAPI* | [**testClientModel**](docs/FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +*FakeAPI* | [**testEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeAPI* | [**testEnumParameters**](docs/FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +*FakeAPI* | [**testGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +*FakeAPI* | [**testInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeAPI* | [**testJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeClassnameTags123API* | [**testClassname**](docs/FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case +*PetAPI* | [**addPet**](docs/PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +*PetAPI* | [**deletePet**](docs/PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetAPI* | [**findPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetAPI* | [**findPetsByTags**](docs/PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetAPI* | [**getPetById**](docs/PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetAPI* | [**updatePet**](docs/PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +*PetAPI* | [**updatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetAPI* | [**uploadFile**](docs/PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetAPI* | [**uploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreAPI* | [**deleteOrder**](docs/StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +*StoreAPI* | [**getInventory**](docs/StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreAPI* | [**getOrderById**](docs/StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +*StoreAPI* | [**placeOrder**](docs/StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserAPI* | [**createUser**](docs/UserAPI.md#createuser) | **POST** /user | Create user +*UserAPI* | [**createUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserAPI* | [**createUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserAPI* | [**deleteUser**](docs/UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserAPI* | [**getUserByName**](docs/UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserAPI* | [**loginUser**](docs/UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +*UserAPI* | [**logoutUser**](docs/UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserAPI* | [**updateUser**](docs/UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +## Documentation For Models + + - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [Animal](docs/Animal.md) + - [AnimalFarm](docs/AnimalFarm.md) + - [ApiResponse](docs/ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [ArrayTest](docs/ArrayTest.md) + - [Capitalization](docs/Capitalization.md) + - [Cat](docs/Cat.md) + - [CatAllOf](docs/CatAllOf.md) + - [Category](docs/Category.md) + - [ClassModel](docs/ClassModel.md) + - [Client](docs/Client.md) + - [Dog](docs/Dog.md) + - [DogAllOf](docs/DogAllOf.md) + - [EnumArrays](docs/EnumArrays.md) + - [EnumClass](docs/EnumClass.md) + - [EnumTest](docs/EnumTest.md) + - [File](docs/File.md) + - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [FormatTest](docs/FormatTest.md) + - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [List](docs/List.md) + - [MapTest](docs/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](docs/Model200Response.md) + - [Name](docs/Name.md) + - [NumberOnly](docs/NumberOnly.md) + - [Order](docs/Order.md) + - [OuterComposite](docs/OuterComposite.md) + - [OuterEnum](docs/OuterEnum.md) + - [Pet](docs/Pet.md) + - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [Return](docs/Return.md) + - [SpecialModelName](docs/SpecialModelName.md) + - [StringBooleanMap](docs/StringBooleanMap.md) + - [Tag](docs/Tag.md) + - [TypeHolderDefault](docs/TypeHolderDefault.md) + - [TypeHolderExample](docs/TypeHolderExample.md) + - [User](docs/User.md) + + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +## api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +## http_basic_test + +- **Type**: HTTP basic authentication + +## petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + + +## Author + + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/AdditionalPropertiesClass.md new file mode 100644 index 00000000000..1f222244134 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/AdditionalPropertiesClass.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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/asyncAwaitLibrary/docs/Animal.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Animal.md new file mode 100644 index 00000000000..69c601455cd --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Animal.md @@ -0,0 +1,11 @@ +# Animal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] [default to "red"] + +[[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/asyncAwaitLibrary/docs/AnimalFarm.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/AnimalFarm.md new file mode 100644 index 00000000000..df6bab21dae --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/AnimalFarm.md @@ -0,0 +1,9 @@ +# AnimalFarm + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/AnotherFakeAPI.md new file mode 100644 index 00000000000..26346e81a4c --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/AnotherFakeAPI.md @@ -0,0 +1,59 @@ +# AnotherFakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**call123testSpecialTags**](AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags + + +# **call123testSpecialTags** +```swift + open class func call123testSpecialTags(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test special tags + +To test special tags and operation ID starting with number + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test special tags +AnotherFakeAPI.call123testSpecialTags(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/ApiResponse.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/ApiResponse.md new file mode 100644 index 00000000000..c6d9768fe9b --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/ApiResponse.md @@ -0,0 +1,12 @@ +# ApiResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Int** | | [optional] +**type** | **String** | | [optional] +**message** | **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/asyncAwaitLibrary/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 00000000000..c6fceff5e08 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayArrayNumber** | [[Double]] | | [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/asyncAwaitLibrary/docs/ArrayOfNumberOnly.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/ArrayOfNumberOnly.md new file mode 100644 index 00000000000..f09f8fa6f70 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/ArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayNumber** | **[Double]** | | [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/asyncAwaitLibrary/docs/ArrayTest.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/ArrayTest.md new file mode 100644 index 00000000000..bf416b8330c --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/ArrayTest.md @@ -0,0 +1,12 @@ +# ArrayTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayOfString** | **[String]** | | [optional] +**arrayArrayOfInteger** | [[Int64]] | | [optional] +**arrayArrayOfModel** | [[ReadOnlyFirst]] | | [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/asyncAwaitLibrary/docs/Capitalization.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Capitalization.md new file mode 100644 index 00000000000..95374216c77 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Capitalization.md @@ -0,0 +1,15 @@ +# Capitalization + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] +**smallSnake** | **String** | | [optional] +**capitalSnake** | **String** | | [optional] +**sCAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [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/asyncAwaitLibrary/docs/Cat.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Cat.md new file mode 100644 index 00000000000..fb5949b1576 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Cat.md @@ -0,0 +1,10 @@ +# Cat + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/CatAllOf.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/CatAllOf.md new file mode 100644 index 00000000000..79789be61c0 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/CatAllOf.md @@ -0,0 +1,10 @@ +# CatAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Category.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Category.md new file mode 100644 index 00000000000..5ca5408c0f9 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Category.md @@ -0,0 +1,11 @@ +# Category + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [default to "default-name"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/ClassModel.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/ClassModel.md new file mode 100644 index 00000000000..e3912fdf0fd --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/ClassModel.md @@ -0,0 +1,10 @@ +# ClassModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Client.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Client.md new file mode 100644 index 00000000000..0de1b238c36 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Client.md @@ -0,0 +1,10 @@ +# Client + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client** | **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/asyncAwaitLibrary/docs/Dog.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Dog.md new file mode 100644 index 00000000000..4824786da04 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Dog.md @@ -0,0 +1,10 @@ +# Dog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **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/asyncAwaitLibrary/docs/DogAllOf.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/DogAllOf.md new file mode 100644 index 00000000000..9302ef52e93 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/DogAllOf.md @@ -0,0 +1,10 @@ +# DogAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **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/asyncAwaitLibrary/docs/EnumArrays.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/EnumArrays.md new file mode 100644 index 00000000000..b9a9807d3c8 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/EnumArrays.md @@ -0,0 +1,11 @@ +# EnumArrays + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justSymbol** | **String** | | [optional] +**arrayEnum** | **[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/asyncAwaitLibrary/docs/EnumClass.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/EnumClass.md new file mode 100644 index 00000000000..67f017becd0 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/EnumClass.md @@ -0,0 +1,9 @@ +# EnumClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/EnumTest.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/EnumTest.md new file mode 100644 index 00000000000..bc9b036dd76 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/EnumTest.md @@ -0,0 +1,14 @@ +# EnumTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumString** | **String** | | [optional] +**enumStringRequired** | **String** | | +**enumInteger** | **Int** | | [optional] +**enumNumber** | **Double** | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.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/asyncAwaitLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/FakeAPI.md new file mode 100644 index 00000000000..f0799125084 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/FakeAPI.md @@ -0,0 +1,662 @@ +# FakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fakeOuterBooleanSerialize**](FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +[**fakeOuterCompositeSerialize**](FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +[**fakeOuterNumberSerialize**](FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +[**fakeOuterStringSerialize**](FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +[**testBodyWithFileSchema**](FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +[**testBodyWithQueryParams**](FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +[**testClientModel**](FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +[**testEndpointParameters**](FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEnumParameters**](FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +[**testGroupParameters**](FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**testInlineAdditionalProperties**](FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**testJsonFormData**](FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data + + +# **fakeOuterBooleanSerialize** +```swift + open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping (_ data: Bool?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer boolean types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = true // Bool | Input boolean as post body (optional) + +FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Bool** | Input boolean as post body | [optional] + +### Return type + +**Bool** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterCompositeSerialize** +```swift + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping (_ data: OuterComposite?, _ error: Error?) -> Void) +``` + + + +Test serialization of object with outer number type + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = OuterComposite(myNumber: 123, myString: "myString_example", myBoolean: false) // OuterComposite | Input composite as post body (optional) + +FakeAPI.fakeOuterCompositeSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterNumberSerialize** +```swift + open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping (_ data: Double?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer number types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = 987 // Double | Input number as post body (optional) + +FakeAPI.fakeOuterNumberSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Double** | Input number as post body | [optional] + +### Return type + +**Double** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterStringSerialize** +```swift + open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping (_ data: String?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer string types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = "body_example" // String | Input string as post body (optional) + +FakeAPI.fakeOuterStringSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **String** | Input string as post body | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithFileSchema** +```swift + open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + + + +For this test, the body for this request much reference a schema named `File`. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [nil]) // FileSchemaTestClass | + +FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithQueryParams** +```swift + open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + + + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let query = "query_example" // String | +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | + +FakeAPI.testBodyWithQueryParams(query: query, body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **String** | | + **body** | [**User**](User.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testClientModel** +```swift + open class func testClientModel(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test \"client\" model + +To test \"client\" model + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test \"client\" model +FakeAPI.testClientModel(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEndpointParameters** +```swift + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let number = 987 // Double | None +let double = 987 // Double | None +let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None +let byte = Data([9, 8, 7]) // Data | None +let integer = 987 // Int | None (optional) +let int32 = 987 // Int | None (optional) +let int64 = 987 // Int64 | None (optional) +let float = 987 // Float | None (optional) +let string = "string_example" // String | None (optional) +let binary = URL(string: "https://example.com")! // URL | None (optional) +let date = Date() // Date | None (optional) +let dateTime = Date() // Date | None (optional) +let password = "password_example" // String | None (optional) +let callback = "callback_example" // String | None (optional) + +// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +FakeAPI.testEndpointParameters(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) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **Double** | None | + **double** | **Double** | None | + **patternWithoutDelimiter** | **String** | None | + **byte** | **Data** | None | + **integer** | **Int** | None | [optional] + **int32** | **Int** | None | [optional] + **int64** | **Int64** | None | [optional] + **float** | **Float** | None | [optional] + **string** | **String** | None | [optional] + **binary** | **URL** | None | [optional] + **date** | **Date** | None | [optional] + **dateTime** | **Date** | None | [optional] + **password** | **String** | None | [optional] + **callback** | **String** | None | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEnumParameters** +```swift + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +To test enum parameters + +To test enum parameters + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let enumHeaderStringArray = ["enumHeaderStringArray_example"] // [String] | Header parameter enum test (string array) (optional) +let enumHeaderString = "enumHeaderString_example" // String | Header parameter enum test (string) (optional) (default to .efg) +let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query parameter enum test (string array) (optional) +let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) +let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) +let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) +let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) + +// To test enum parameters +FakeAPI.testEnumParameters(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumHeaderStringArray** | [**[String]**](String.md) | Header parameter enum test (string array) | [optional] + **enumHeaderString** | **String** | Header parameter enum test (string) | [optional] [default to .efg] + **enumQueryStringArray** | [**[String]**](String.md) | Query parameter enum test (string array) | [optional] + **enumQueryString** | **String** | Query parameter enum test (string) | [optional] [default to .efg] + **enumQueryInteger** | **Int** | Query parameter enum test (double) | [optional] + **enumQueryDouble** | **Double** | Query parameter enum test (double) | [optional] + **enumFormStringArray** | [**[String]**](String.md) | Form parameter enum test (string array) | [optional] [default to .dollar] + **enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to .efg] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testGroupParameters** +```swift + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let requiredStringGroup = 987 // Int | Required String in group parameters +let requiredBooleanGroup = true // Bool | Required Boolean in group parameters +let requiredInt64Group = 987 // Int64 | Required Integer in group parameters +let stringGroup = 987 // Int | String in group parameters (optional) +let booleanGroup = true // Bool | Boolean in group parameters (optional) +let int64Group = 987 // Int64 | Integer in group parameters (optional) + +// Fake endpoint to test group parameters (optional) +FakeAPI.testGroupParameters(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requiredStringGroup** | **Int** | Required String in group parameters | + **requiredBooleanGroup** | **Bool** | Required Boolean in group parameters | + **requiredInt64Group** | **Int64** | Required Integer in group parameters | + **stringGroup** | **Int** | String in group parameters | [optional] + **booleanGroup** | **Bool** | Boolean in group parameters | [optional] + **int64Group** | **Int64** | Integer in group parameters | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testInlineAdditionalProperties** +```swift + open class func testInlineAdditionalProperties(param: [String: String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +test inline additionalProperties + +### Example +```swift +// 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 + +// test inline additionalProperties +FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | [**[String: String]**](String.md) | request body | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testJsonFormData** +```swift + open class func testJsonFormData(param: String, param2: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +test json serialization of form data + +### Example +```swift +// 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 = "param_example" // String | field1 +let param2 = "param2_example" // String | field2 + +// test json serialization of form data +FakeAPI.testJsonFormData(param: param, param2: param2) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **String** | field1 | + **param2** | **String** | field2 | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/FakeClassnameTags123API.md new file mode 100644 index 00000000000..5b9b66073fe --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/FakeClassnameTags123API.md @@ -0,0 +1,59 @@ +# FakeClassnameTags123API + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testClassname**](FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case + + +# **testClassname** +```swift + open class func testClassname(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test class name in snake case + +To test class name in snake case + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test class name in snake case +FakeClassnameTags123API.testClassname(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/File.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/File.md new file mode 100644 index 00000000000..3edfef17b79 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/File.md @@ -0,0 +1,10 @@ +# File + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourceURI** | **String** | Test capitalization | [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/asyncAwaitLibrary/docs/FileSchemaTestClass.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/FileSchemaTestClass.md new file mode 100644 index 00000000000..afdacc60b2c --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/FileSchemaTestClass.md @@ -0,0 +1,11 @@ +# FileSchemaTestClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | [**File**](File.md) | | [optional] +**files** | [File] | | [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/asyncAwaitLibrary/docs/FormatTest.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/FormatTest.md new file mode 100644 index 00000000000..f74d94f6c46 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/FormatTest.md @@ -0,0 +1,22 @@ +# FormatTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Int** | | [optional] +**int32** | **Int** | | [optional] +**int64** | **Int64** | | [optional] +**number** | **Double** | | +**float** | **Float** | | [optional] +**double** | **Double** | | [optional] +**string** | **String** | | [optional] +**byte** | **Data** | | +**binary** | **URL** | | [optional] +**date** | **Date** | | +**dateTime** | **Date** | | [optional] +**uuid** | **UUID** | | [optional] +**password** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/HasOnlyReadOnly.md new file mode 100644 index 00000000000..57b6e3a17e6 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/HasOnlyReadOnly.md @@ -0,0 +1,11 @@ +# HasOnlyReadOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/List.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/List.md new file mode 100644 index 00000000000..b77718302ed --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/List.md @@ -0,0 +1,10 @@ +# List + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_123list** | **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/asyncAwaitLibrary/docs/MapTest.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/MapTest.md new file mode 100644 index 00000000000..73f9e0d50ac --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/MapTest.md @@ -0,0 +1,13 @@ +# MapTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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/asyncAwaitLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 00000000000..3fdfd03f0e3 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,12 @@ +# MixedPropertiesAndAdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **UUID** | | [optional] +**dateTime** | **Date** | | [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/asyncAwaitLibrary/docs/Model200Response.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Model200Response.md new file mode 100644 index 00000000000..5865ea690cc --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Model200Response.md @@ -0,0 +1,11 @@ +# Model200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | [optional] +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Name.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Name.md new file mode 100644 index 00000000000..f7b180292cd --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Name.md @@ -0,0 +1,13 @@ +# Name + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | +**snakeCase** | **Int** | | [optional] [readonly] +**property** | **String** | | [optional] +**_123number** | **Int** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/NumberOnly.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/NumberOnly.md new file mode 100644 index 00000000000..72bd361168b --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/NumberOnly.md @@ -0,0 +1,10 @@ +# NumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justNumber** | **Double** | | [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/asyncAwaitLibrary/docs/Order.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Order.md new file mode 100644 index 00000000000..15487f01175 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Order.md @@ -0,0 +1,15 @@ +# Order + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**petId** | **Int64** | | [optional] +**quantity** | **Int** | | [optional] +**shipDate** | **Date** | | [optional] +**status** | **String** | Order Status | [optional] +**complete** | **Bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/OuterComposite.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/OuterComposite.md new file mode 100644 index 00000000000..d6b3583bc3f --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/OuterComposite.md @@ -0,0 +1,12 @@ +# OuterComposite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myNumber** | **Double** | | [optional] +**myString** | **String** | | [optional] +**myBoolean** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/OuterEnum.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/OuterEnum.md new file mode 100644 index 00000000000..06d413b0168 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/OuterEnum.md @@ -0,0 +1,9 @@ +# OuterEnum + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Pet.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Pet.md new file mode 100644 index 00000000000..5c05f98fad4 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Pet.md @@ -0,0 +1,15 @@ +# Pet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **String** | | +**photoUrls** | **[String]** | | +**tags** | [Tag] | | [optional] +**status** | **String** | pet status in the store | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/PetAPI.md new file mode 100644 index 00000000000..5babbd06a3c --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/PetAPI.md @@ -0,0 +1,469 @@ +# PetAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) + + +# **addPet** +```swift + open class func addPet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Add a new pet to the store + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Add a new pet to the store +PetAPI.addPet(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deletePet** +```swift + open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Deletes a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | Pet id to delete +let apiKey = "apiKey_example" // String | (optional) + +// Deletes a pet +PetAPI.deletePet(petId: petId, apiKey: apiKey) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | Pet id to delete | + **apiKey** | **String** | | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByStatus** +```swift + open class func findPetsByStatus(status: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) +``` + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let status = ["status_example"] // [String] | Status values that need to be considered for filter + +// Finds Pets by status +PetAPI.findPetsByStatus(status: status) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**[String]**](String.md) | Status values that need to be considered for filter | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByTags** +```swift + open class func findPetsByTags(tags: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) +``` + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let tags = ["inner_example"] // [String] | Tags to filter by + +// Finds Pets by tags +PetAPI.findPetsByTags(tags: tags) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**[String]**](String.md) | Tags to filter by | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getPetById** +```swift + open class func getPetById(petId: Int64, completion: @escaping (_ data: Pet?, _ error: Error?) -> Void) +``` + +Find pet by ID + +Returns a single pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to return + +// Find pet by ID +PetAPI.getPetById(petId: petId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePet** +```swift + open class func updatePet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Update an existing pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Update an existing pet +PetAPI.updatePet(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePetWithForm** +```swift + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Updates a pet in the store with form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet that needs to be updated +let name = "name_example" // String | Updated name of the pet (optional) +let status = "status_example" // String | Updated status of the pet (optional) + +// Updates a pet in the store with form data +PetAPI.updatePetWithForm(petId: petId, name: name, status: status) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet that needs to be updated | + **name** | **String** | Updated name of the pet | [optional] + **status** | **String** | Updated status of the pet | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFile** +```swift + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) +``` + +uploads an image + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) +let file = URL(string: "https://example.com")! // URL | file to upload (optional) + +// uploads an image +PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + **file** | **URL** | file to upload | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFileWithRequiredFile** +```swift + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) +``` + +uploads an image (required) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) + +// uploads an image (required) +PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **requiredFile** | **URL** | file to upload | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/ReadOnlyFirst.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/ReadOnlyFirst.md new file mode 100644 index 00000000000..ed537b87598 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/ReadOnlyFirst.md @@ -0,0 +1,11 @@ +# ReadOnlyFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**baz** | **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/asyncAwaitLibrary/docs/Return.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Return.md new file mode 100644 index 00000000000..66d17c27c88 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Return.md @@ -0,0 +1,10 @@ +# Return + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/SpecialModelName.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/SpecialModelName.md new file mode 100644 index 00000000000..3ec27a38c2a --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/SpecialModelName.md @@ -0,0 +1,10 @@ +# SpecialModelName + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**specialPropertyName** | **Int64** | | [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/asyncAwaitLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/StoreAPI.md new file mode 100644 index 00000000000..b023aa9e452 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/StoreAPI.md @@ -0,0 +1,206 @@ +# StoreAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[**getInventory**](StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +[**placeOrder**](StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet + + +# **deleteOrder** +```swift + open class func deleteOrder(orderId: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = "orderId_example" // String | ID of the order that needs to be deleted + +// Delete purchase order by ID +StoreAPI.deleteOrder(orderId: orderId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String** | ID of the order that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getInventory** +```swift + open class func getInventory(completion: @escaping (_ data: [String: Int]?, _ error: Error?) -> Void) +``` + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Returns pet inventories by status +StoreAPI.getInventory() { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**[String: Int]** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrderById** +```swift + open class func getOrderById(orderId: Int64, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) +``` + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = 987 // Int64 | ID of pet that needs to be fetched + +// Find purchase order by ID +StoreAPI.getOrderById(orderId: orderId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **Int64** | ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **placeOrder** +```swift + open class func placeOrder(body: Order, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) +``` + +Place an order for a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Order(id: 123, petId: 123, quantity: 123, shipDate: Date(), status: "status_example", complete: false) // Order | order placed for purchasing the pet + +// Place an order for a pet +StoreAPI.placeOrder(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md) | order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/StringBooleanMap.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/StringBooleanMap.md new file mode 100644 index 00000000000..7abf11ec68b --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/StringBooleanMap.md @@ -0,0 +1,9 @@ +# StringBooleanMap + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Tag.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Tag.md new file mode 100644 index 00000000000..ff4ac8aa451 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/Tag.md @@ -0,0 +1,11 @@ +# Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **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/asyncAwaitLibrary/docs/TypeHolderDefault.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/TypeHolderDefault.md new file mode 100644 index 00000000000..5161394bdc3 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/TypeHolderDefault.md @@ -0,0 +1,14 @@ +# TypeHolderDefault + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | [default to "what"] +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | [default to true] +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/TypeHolderExample.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/TypeHolderExample.md new file mode 100644 index 00000000000..46d0471cd71 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/TypeHolderExample.md @@ -0,0 +1,14 @@ +# TypeHolderExample + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/User.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/User.md new file mode 100644 index 00000000000..5a439de0ff9 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/User.md @@ -0,0 +1,17 @@ +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**username** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] +**email** | **String** | | [optional] +**password** | **String** | | [optional] +**phone** | **String** | | [optional] +**userStatus** | **Int** | User Status | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/UserAPI.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/UserAPI.md new file mode 100644 index 00000000000..5fc9160daf4 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/UserAPI.md @@ -0,0 +1,406 @@ +# UserAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserAPI.md#createuser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +# **createUser** +```swift + open class func createUser(body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Create user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Created user object + +// Create user +UserAPI.createUser(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md) | Created user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithArrayInput** +```swift + open class func createUsersWithArrayInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithArrayInput(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithListInput** +```swift + open class func createUsersWithListInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithListInput(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteUser** +```swift + open class func deleteUser(username: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Delete user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be deleted + +// Delete user +UserAPI.deleteUser(username: username) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getUserByName** +```swift + open class func getUserByName(username: String, completion: @escaping (_ data: User?, _ error: Error?) -> Void) +``` + +Get user by user name + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be fetched. Use user1 for testing. + +// Get user by user name +UserAPI.getUserByName(username: username) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loginUser** +```swift + open class func loginUser(username: String, password: String, completion: @escaping (_ data: String?, _ error: Error?) -> Void) +``` + +Logs user into the system + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The user name for login +let password = "password_example" // String | The password for login in clear text + +// Logs user into the system +UserAPI.loginUser(username: username, password: password) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The user name for login | + **password** | **String** | The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **logoutUser** +```swift + open class func logoutUser(completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Logs out current logged in user session + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Logs out current logged in user session +UserAPI.logoutUser() { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +```swift + open class func updateUser(username: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Updated user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | name that need to be deleted +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Updated user object + +// Updated user +UserAPI.updateUser(username: username, body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | name that need to be deleted | + **body** | [**User**](User.md) | Updated user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/git_push.sh b/samples/client/petstore/swift5/asyncAwaitLibrary/git_push.sh new file mode 100644 index 00000000000..f53a75d4fab --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/pom.xml b/samples/client/petstore/swift5/asyncAwaitLibrary/pom.xml new file mode 100644 index 00000000000..c1b201eb3b4 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/pom.xml @@ -0,0 +1,43 @@ + + 4.0.0 + io.swagger + Swift5PetstoreClientTests + pom + 1.0-SNAPSHOT + Swift5 Swagger Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + xcodebuild-test + integration-test + + exec + + + ./run_spmbuild.sh + + + + + + + diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/project.yml b/samples/client/petstore/swift5/asyncAwaitLibrary/project.yml new file mode 100644 index 00000000000..0493cf65896 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/project.yml @@ -0,0 +1,15 @@ +name: PetstoreClient +targets: + PetstoreClient: + type: framework + platform: iOS + deploymentTarget: "9.0" + sources: [PetstoreClient] + info: + path: ./Info.plist + version: 1.0.0 + settings: + APPLICATION_EXTENSION_API_ONLY: true + scheme: {} + dependencies: + - carthage: AnyCodable diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/run_spmbuild.sh b/samples/client/petstore/swift5/asyncAwaitLibrary/run_spmbuild.sh new file mode 100755 index 00000000000..1a9f585ad05 --- /dev/null +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/run_spmbuild.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +swift build && exit ${PIPESTATUS[0]} 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 70d40d6eecf..fac7d89a646 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 @@ -23,10 +23,10 @@ open class AnotherFakeAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + return Future { promise in + call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): promise(.success(response.body!)) 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 dbbc277247e..e1a64636954 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 @@ -22,10 +22,10 @@ open class FakeAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + return Future { promise in + fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): promise(.success(response.body!)) @@ -68,10 +68,10 @@ open class FakeAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + return Future { promise in + fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): promise(.success(response.body!)) @@ -114,10 +114,10 @@ open class FakeAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + return Future { promise in + fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): promise(.success(response.body!)) @@ -160,10 +160,10 @@ open class FakeAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + return Future { promise in + fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): promise(.success(response.body!)) @@ -206,10 +206,10 @@ open class FakeAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + return Future { promise in + testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: promise(.success(())) @@ -253,10 +253,10 @@ open class FakeAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in + return Future { promise in + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result in switch result { case .success: promise(.success(())) @@ -303,10 +303,10 @@ open class FakeAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + return Future { promise in + testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): promise(.success(response.body!)) @@ -364,10 +364,10 @@ open class FakeAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) 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) -> AnyPublisher { - return Future.init { promise in - testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in + return Future { promise in + testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result in switch result { case .success: promise(.success(())) @@ -520,10 +520,10 @@ open class FakeAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) 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) -> AnyPublisher { - return Future.init { promise in - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in + return Future { promise in + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result in switch result { case .success: promise(.success(())) @@ -594,10 +594,10 @@ open class FakeAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in + return Future { promise in + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result in switch result { case .success: promise(.success(())) @@ -654,10 +654,10 @@ open class FakeAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in + return Future { promise in + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result in switch result { case .success: promise(.success(())) @@ -702,10 +702,10 @@ open class FakeAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in + return Future { promise in + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result in switch result { case .success: promise(.success(())) 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 d2b506fe5af..c28ec3ec79c 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 @@ -23,10 +23,10 @@ open class FakeClassnameTags123API { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + return Future { promise in + testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): promise(.success(response.body!)) 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 930834052b7..0e4ef7ffdf9 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 @@ -23,10 +23,10 @@ open class PetAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + return Future { promise in + addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: promise(.success(())) @@ -74,10 +74,10 @@ open class PetAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in + return Future { promise in + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result in switch result { case .success: promise(.success(())) @@ -137,10 +137,10 @@ open class PetAPI { - returns: AnyPublisher<[Pet], Error> */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher<[Pet], Error> { - return Future<[Pet], Error>.init { promise in - findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in + return Future<[Pet], Error> { promise in + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result in switch result { case let .success(response): promise(.success(response.body!)) @@ -192,10 +192,10 @@ open class PetAPI { */ #if canImport(Combine) @available(*, deprecated, message: "This operation is deprecated.") - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher<[Pet], Error> { - return Future<[Pet], Error>.init { promise in - findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in + return Future<[Pet], Error> { promise in + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result in switch result { case let .success(response): promise(.success(response.body!)) @@ -247,10 +247,10 @@ open class PetAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in + return Future { promise in + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result in switch result { case let .success(response): promise(.success(response.body!)) @@ -301,10 +301,10 @@ open class PetAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + return Future { promise in + updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: promise(.success(())) @@ -353,10 +353,10 @@ open class PetAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in + return Future { promise in + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result in switch result { case .success: promise(.success(())) @@ -416,10 +416,10 @@ open class PetAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in + return Future { promise in + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result in switch result { case let .success(response): promise(.success(response.body!)) @@ -479,10 +479,10 @@ open class PetAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in + return Future { promise in + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result in switch result { case let .success(response): promise(.success(response.body!)) 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 a58cc47dca9..2e5cc6f0c37 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 @@ -23,10 +23,10 @@ open class StoreAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + return Future { promise in + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case .success: promise(.success(())) @@ -73,10 +73,10 @@ open class StoreAPI { - returns: AnyPublisher<[String: Int], Error> */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher<[String: Int], Error> { - return Future<[String: Int], Error>.init { promise in - getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + return Future<[String: Int], Error> { promise in + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case let .success(response): promise(.success(response.body!)) @@ -123,10 +123,10 @@ open class StoreAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + return Future { promise in + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case let .success(response): promise(.success(response.body!)) @@ -174,10 +174,10 @@ open class StoreAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + return Future { promise in + placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): promise(.success(response.body!)) 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 d2e8f2110e4..75a25afeec8 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 @@ -23,10 +23,10 @@ open class UserAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + return Future { promise in + createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: promise(.success(())) @@ -71,10 +71,10 @@ open class UserAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + return Future { promise in + createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: promise(.success(())) @@ -118,10 +118,10 @@ open class UserAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + return Future { promise in + createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: promise(.success(())) @@ -165,10 +165,10 @@ open class UserAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + return Future { promise in + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case .success: promise(.success(())) @@ -216,10 +216,10 @@ open class UserAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + return Future { promise in + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case let .success(response): promise(.success(response.body!)) @@ -267,10 +267,10 @@ open class UserAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in + return Future { promise in + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result in switch result { case let .success(response): promise(.success(response.body!)) @@ -319,10 +319,10 @@ open class UserAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + return Future { promise in + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case .success: promise(.success(())) @@ -366,10 +366,10 @@ open class UserAPI { - returns: AnyPublisher */ #if canImport(Combine) - @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { - return Future.init { promise in - updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in + return Future { promise in + updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result in switch result { case .success: promise(.success(())) 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 8099bf1c37c..43abbb33519 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 @@ -20,7 +20,7 @@ open class AnotherFakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 2cea23a8ca9..063bcca0b8c 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 @@ -20,7 +20,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func createXmlItem(xmlItem: XmlItem, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createXmlItemWithRequestBuilder(xmlItem: xmlItem).execute(apiResponseQueue) { result -> Void in + createXmlItemWithRequestBuilder(xmlItem: xmlItem).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -62,7 +62,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { - fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -103,7 +103,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { - fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -144,7 +144,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { - fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -185,7 +185,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -226,7 +226,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -268,7 +268,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -313,7 +313,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -369,7 +369,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - 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 + 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 in switch result { case .success: completion((), nil) @@ -520,7 +520,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -589,7 +589,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -644,7 +644,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -687,7 +687,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -739,7 +739,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testQueryParameterCollectionFormat(pipe: [String], ioutil: [String], http: [String], url: [String], context: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testQueryParameterCollectionFormatWithRequestBuilder(pipe: pipe, ioutil: ioutil, http: http, url: url, context: context).execute(apiResponseQueue) { result -> Void in + testQueryParameterCollectionFormatWithRequestBuilder(pipe: pipe, ioutil: ioutil, http: http, url: url, context: context).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) 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 ca7ca48c4e8..34c654e4499 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 @@ -20,7 +20,7 @@ open class FakeClassnameTags123API { - parameter completion: completion handler to receive the data and the error objects */ open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 c593e444159..1aaff13713c 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 @@ -20,7 +20,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -66,7 +66,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -124,7 +124,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -174,7 +174,7 @@ open class PetAPI { */ @available(*, deprecated, message: "This operation is deprecated.") open class func findPetsByTags(tags: Set, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Set?, _ error: Error?) -> Void)) { - findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -224,7 +224,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { - getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -273,7 +273,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -320,7 +320,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -378,7 +378,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -436,7 +436,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 8555e093682..fbe47386f98 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 @@ -20,7 +20,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -65,7 +65,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { - getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -110,7 +110,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -156,7 +156,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 49132e5612f..f61db9b14f2 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 @@ -20,7 +20,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -63,7 +63,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -105,7 +105,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -147,7 +147,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -193,7 +193,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { - getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -239,7 +239,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -286,7 +286,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -328,7 +328,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in + updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) 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 9a46e4e614f..020b10a51d9 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 @@ -20,7 +20,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func addPet(pet: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - addPetWithRequestBuilder(pet: pet).execute(apiResponseQueue) { result -> Void in + addPetWithRequestBuilder(pet: pet).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -66,7 +66,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -124,7 +124,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -174,7 +174,7 @@ open class PetAPI { */ @available(*, deprecated, message: "This operation is deprecated.") open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -224,7 +224,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { - getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -273,7 +273,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func updatePet(pet: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithRequestBuilder(pet: pet).execute(apiResponseQueue) { result -> Void in + updatePetWithRequestBuilder(pet: pet).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -320,7 +320,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -378,7 +378,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 d43a27d28d7..9f881ab2f41 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 @@ -20,7 +20,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -65,7 +65,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { - getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -110,7 +110,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -156,7 +156,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func placeOrder(order: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - placeOrderWithRequestBuilder(order: order).execute(apiResponseQueue) { result -> Void in + placeOrderWithRequestBuilder(order: order).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 2519f9a101e..4087bbb1be3 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 @@ -20,7 +20,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func createUser(user: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUserWithRequestBuilder(user: user).execute(apiResponseQueue) { result -> Void in + createUserWithRequestBuilder(user: user).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -66,7 +66,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func createUsersWithArrayInput(user: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(user: user).execute(apiResponseQueue) { result -> Void in + createUsersWithArrayInputWithRequestBuilder(user: user).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -111,7 +111,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func createUsersWithListInput(user: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithListInputWithRequestBuilder(user: user).execute(apiResponseQueue) { result -> Void in + createUsersWithListInputWithRequestBuilder(user: user).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -156,7 +156,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -205,7 +205,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { - getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -251,7 +251,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -298,7 +298,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -343,7 +343,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func updateUser(username: String, user: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updateUserWithRequestBuilder(username: username, user: user).execute(apiResponseQueue) { result -> Void in + updateUserWithRequestBuilder(username: username, user: user).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) 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 55b9a4ad1ca..81c4518c49e 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 @@ -20,7 +20,7 @@ internal class AnotherFakeAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 1058198e7a8..f7df9298d89 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 @@ -19,7 +19,7 @@ internal class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { - fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -60,7 +60,7 @@ internal class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { - fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -101,7 +101,7 @@ internal class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { - fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -142,7 +142,7 @@ internal class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -183,7 +183,7 @@ internal class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -225,7 +225,7 @@ internal class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -270,7 +270,7 @@ internal class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -326,7 +326,7 @@ internal class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func testEndpointParameters(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double, string: String? = nil, patternWithoutDelimiter: String, byte: Data, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEndpointParametersWithRequestBuilder(integer: integer, int32: int32, int64: int64, number: number, float: float, double: double, string: string, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in + testEndpointParametersWithRequestBuilder(integer: integer, int32: int32, int64: int64, number: number, float: float, double: double, string: string, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -477,7 +477,7 @@ internal class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -546,7 +546,7 @@ internal class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -601,7 +601,7 @@ internal class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -644,7 +644,7 @@ internal class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) 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 86f24b19ded..ebbe6ed6889 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 @@ -20,7 +20,7 @@ internal class FakeClassnameTags123API { - parameter completion: completion handler to receive the data and the error objects */ internal class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 719ed4e4e39..17abb526e9c 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 @@ -20,7 +20,7 @@ internal class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -66,7 +66,7 @@ internal class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func deletePet(apiKey: String? = nil, petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deletePetWithRequestBuilder(apiKey: apiKey, petId: petId).execute(apiResponseQueue) { result -> Void in + deletePetWithRequestBuilder(apiKey: apiKey, petId: petId).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -124,7 +124,7 @@ internal class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -174,7 +174,7 @@ internal class PetAPI { */ @available(*, deprecated, message: "This operation is deprecated.") internal class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -224,7 +224,7 @@ internal class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { - getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -273,7 +273,7 @@ internal class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -320,7 +320,7 @@ internal class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -378,7 +378,7 @@ internal class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -436,7 +436,7 @@ internal class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func uploadFileWithRequiredFile(petId: Int64, additionalMetadata: String? = nil, requiredFile: URL, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, requiredFile: requiredFile).execute(apiResponseQueue) { result -> Void in + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, requiredFile: requiredFile).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 9b327afa8c0..4d59194aa02 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 @@ -20,7 +20,7 @@ internal class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -65,7 +65,7 @@ internal class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { - getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -110,7 +110,7 @@ internal class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -156,7 +156,7 @@ internal class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 89566dc1191..19984b8c359 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 @@ -20,7 +20,7 @@ internal class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -63,7 +63,7 @@ internal class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -105,7 +105,7 @@ internal class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -147,7 +147,7 @@ internal class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -193,7 +193,7 @@ internal class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { - getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -239,7 +239,7 @@ internal class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -286,7 +286,7 @@ internal class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -328,7 +328,7 @@ internal class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ internal class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in + updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) 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 d010037e66e..7aa5118caff 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 @@ -20,7 +20,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 58cbe6666a7..328b2dca858 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 @@ -19,7 +19,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { - fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -60,7 +60,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { - fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -101,7 +101,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { - fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -142,7 +142,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -183,7 +183,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -225,7 +225,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -270,7 +270,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -326,7 +326,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - 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 + 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 in switch result { case .success: completion((), nil) @@ -477,7 +477,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -546,7 +546,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -601,7 +601,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -644,7 +644,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) 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 9ca929b7938..85b43e2b291 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 @@ -20,7 +20,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 8c8d9a77218..715bf9df6c4 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 @@ -20,7 +20,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -66,7 +66,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -124,7 +124,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -174,7 +174,7 @@ import AnyCodable */ @available(*, deprecated, message: "This operation is deprecated.") open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -224,7 +224,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { - getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -273,7 +273,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -320,7 +320,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -378,7 +378,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -436,7 +436,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 f6169ff450b..dd6f0bb0ad2 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 @@ -20,7 +20,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -65,7 +65,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { - getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -110,7 +110,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -156,7 +156,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 d41cdc7a3f4..5896d7ecb36 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 @@ -20,7 +20,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -63,7 +63,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -105,7 +105,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -147,7 +147,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -193,7 +193,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { - getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -239,7 +239,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -286,7 +286,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -328,7 +328,7 @@ import AnyCodable - parameter completion: completion handler to receive the data and the error objects */ open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in + updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/APIs/DefaultAPI.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/APIs/DefaultAPI.swift index 69c486d2ab5..e184995f52c 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/APIs/DefaultAPI.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/APIs/DefaultAPI.swift @@ -18,7 +18,7 @@ open class DefaultAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func rootGet(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Fruit?, _ error: Error?) -> Void)) { - rootGetWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + rootGetWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 bf779e155a3..75fd284604e 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 @@ -22,7 +22,7 @@ open class AnotherFakeAPI { */ open class func call123testSpecialTags( body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): deferred.resolver.fulfill(response.body!) 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 bc46e333fbe..3009dcc5901 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 @@ -21,7 +21,7 @@ open class FakeAPI { */ open class func fakeOuterBooleanSerialize( body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): deferred.resolver.fulfill(response.body!) @@ -64,7 +64,7 @@ open class FakeAPI { */ open class func fakeOuterCompositeSerialize( body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): deferred.resolver.fulfill(response.body!) @@ -107,7 +107,7 @@ open class FakeAPI { */ open class func fakeOuterNumberSerialize( body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): deferred.resolver.fulfill(response.body!) @@ -150,7 +150,7 @@ open class FakeAPI { */ open class func fakeOuterStringSerialize( body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): deferred.resolver.fulfill(response.body!) @@ -193,7 +193,7 @@ open class FakeAPI { */ open class func testBodyWithFileSchema( body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: deferred.resolver.fulfill(()) @@ -237,7 +237,7 @@ open class FakeAPI { */ open class func testBodyWithQueryParams( query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result in switch result { case .success: deferred.resolver.fulfill(()) @@ -284,7 +284,7 @@ open class FakeAPI { */ open class func testClientModel( body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): deferred.resolver.fulfill(response.body!) @@ -342,7 +342,7 @@ open class FakeAPI { */ open class func testEndpointParameters( number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in + 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 in switch result { case .success: deferred.resolver.fulfill(()) @@ -495,7 +495,7 @@ open class FakeAPI { */ open class func testEnumParameters( enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result in switch result { case .success: deferred.resolver.fulfill(()) @@ -566,7 +566,7 @@ open class FakeAPI { */ open class func testGroupParameters( requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result in switch result { case .success: deferred.resolver.fulfill(()) @@ -623,7 +623,7 @@ open class FakeAPI { */ open class func testInlineAdditionalProperties( param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result in switch result { case .success: deferred.resolver.fulfill(()) @@ -668,7 +668,7 @@ open class FakeAPI { */ open class func testJsonFormData( param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result in switch result { case .success: deferred.resolver.fulfill(()) 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 26b28047ab8..1a81a5cc681 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 @@ -22,7 +22,7 @@ open class FakeClassnameTags123API { */ open class func testClassname( body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): deferred.resolver.fulfill(response.body!) 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 35d69df3e45..5545eb0b7ac 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 @@ -22,7 +22,7 @@ open class PetAPI { */ open class func addPet( body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: deferred.resolver.fulfill(()) @@ -70,7 +70,7 @@ open class PetAPI { */ open class func deletePet( petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result in switch result { case .success: deferred.resolver.fulfill(()) @@ -130,7 +130,7 @@ open class PetAPI { */ open class func findPetsByStatus( status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<[Pet]> { let deferred = Promise<[Pet]>.pending() - findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result in switch result { case let .success(response): deferred.resolver.fulfill(response.body!) @@ -182,7 +182,7 @@ open class PetAPI { @available(*, deprecated, message: "This operation is deprecated.") open class func findPetsByTags( tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<[Pet]> { let deferred = Promise<[Pet]>.pending() - findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result in switch result { case let .success(response): deferred.resolver.fulfill(response.body!) @@ -234,7 +234,7 @@ open class PetAPI { */ open class func getPetById( petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result in switch result { case let .success(response): deferred.resolver.fulfill(response.body!) @@ -285,7 +285,7 @@ open class PetAPI { */ open class func updatePet( body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: deferred.resolver.fulfill(()) @@ -334,7 +334,7 @@ open class PetAPI { */ open class func updatePetWithForm( petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result in switch result { case .success: deferred.resolver.fulfill(()) @@ -394,7 +394,7 @@ open class PetAPI { */ open class func uploadFile( petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result in switch result { case let .success(response): deferred.resolver.fulfill(response.body!) @@ -454,7 +454,7 @@ open class PetAPI { */ open class func uploadFileWithRequiredFile( petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result in switch result { case let .success(response): deferred.resolver.fulfill(response.body!) 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 7ca6e82fae3..af27df36ea4 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 @@ -22,7 +22,7 @@ open class StoreAPI { */ open class func deleteOrder( orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case .success: deferred.resolver.fulfill(()) @@ -69,7 +69,7 @@ open class StoreAPI { */ open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<[String: Int]> { let deferred = Promise<[String: Int]>.pending() - getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case let .success(response): deferred.resolver.fulfill(response.body!) @@ -116,7 +116,7 @@ open class StoreAPI { */ open class func getOrderById( orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case let .success(response): deferred.resolver.fulfill(response.body!) @@ -164,7 +164,7 @@ open class StoreAPI { */ open class func placeOrder( body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): deferred.resolver.fulfill(response.body!) 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 339bab01474..76e6ed4d0b3 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 @@ -22,7 +22,7 @@ open class UserAPI { */ open class func createUser( body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: deferred.resolver.fulfill(()) @@ -67,7 +67,7 @@ open class UserAPI { */ open class func createUsersWithArrayInput( body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: deferred.resolver.fulfill(()) @@ -111,7 +111,7 @@ open class UserAPI { */ open class func createUsersWithListInput( body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: deferred.resolver.fulfill(()) @@ -155,7 +155,7 @@ open class UserAPI { */ open class func deleteUser( username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case .success: deferred.resolver.fulfill(()) @@ -203,7 +203,7 @@ open class UserAPI { */ open class func getUserByName( username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case let .success(response): deferred.resolver.fulfill(response.body!) @@ -251,7 +251,7 @@ open class UserAPI { */ open class func loginUser( username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result in switch result { case let .success(response): deferred.resolver.fulfill(response.body!) @@ -300,7 +300,7 @@ open class UserAPI { */ open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case .success: deferred.resolver.fulfill(()) @@ -344,7 +344,7 @@ open class UserAPI { */ open class func updateUser( username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() - updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in + updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result in switch result { case .success: deferred.resolver.fulfill(()) 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 8099bf1c37c..43abbb33519 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 @@ -20,7 +20,7 @@ open class AnotherFakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 5f58bd5c37b..7f43de2f5ea 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 @@ -19,7 +19,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { - fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -60,7 +60,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { - fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -101,7 +101,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { - fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -142,7 +142,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -183,7 +183,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -225,7 +225,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -270,7 +270,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -326,7 +326,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - 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 + 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 in switch result { case .success: completion((), nil) @@ -477,7 +477,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -546,7 +546,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -601,7 +601,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -644,7 +644,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) 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 ca7ca48c4e8..34c654e4499 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 @@ -20,7 +20,7 @@ open class FakeClassnameTags123API { - parameter completion: completion handler to receive the data and the error objects */ open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 49530dc2840..29d68b9f526 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 @@ -20,7 +20,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -66,7 +66,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -124,7 +124,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -174,7 +174,7 @@ open class PetAPI { */ @available(*, deprecated, message: "This operation is deprecated.") open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -224,7 +224,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { - getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -273,7 +273,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -320,7 +320,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -378,7 +378,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -436,7 +436,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 8555e093682..fbe47386f98 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 @@ -20,7 +20,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -65,7 +65,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { - getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -110,7 +110,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -156,7 +156,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) 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 49132e5612f..f61db9b14f2 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 @@ -20,7 +20,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -63,7 +63,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -105,7 +105,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -147,7 +147,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -193,7 +193,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { - getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -239,7 +239,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -286,7 +286,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -328,7 +328,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in + updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) 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 ad4ab52ca1e..ea619c6b49f 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 @@ -20,7 +20,7 @@ open class AnotherFakeAPI { - parameter completion: completion handler to receive the result */ open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(.success(response.body!)) 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 ca2690c9f66..d503508de6a 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 @@ -19,7 +19,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the result */ open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(.success(response.body!)) @@ -60,7 +60,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the result */ open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(.success(response.body!)) @@ -101,7 +101,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the result */ open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(.success(response.body!)) @@ -142,7 +142,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the result */ open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(.success(response.body!)) @@ -183,7 +183,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the result */ open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion(.success(())) @@ -225,7 +225,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the result */ open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result in switch result { case .success: completion(.success(())) @@ -270,7 +270,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the result */ open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(.success(response.body!)) @@ -326,7 +326,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the result */ open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in + testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result in switch result { case .success: completion(.success(())) @@ -477,7 +477,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the result */ open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result in switch result { case .success: completion(.success(())) @@ -546,7 +546,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the result */ open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result in switch result { case .success: completion(.success(())) @@ -601,7 +601,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the result */ open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result in switch result { case .success: completion(.success(())) @@ -644,7 +644,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the result */ open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result in switch result { case .success: completion(.success(())) 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 2be412263be..a5b5f93115d 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 @@ -20,7 +20,7 @@ open class FakeClassnameTags123API { - parameter completion: completion handler to receive the result */ open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(.success(response.body!)) 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 2c2ae0ad94b..efda2b42f0c 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 @@ -20,7 +20,7 @@ open class PetAPI { - parameter completion: completion handler to receive the result */ open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion(.success(())) @@ -66,7 +66,7 @@ open class PetAPI { - parameter completion: completion handler to receive the result */ open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result in switch result { case .success: completion(.success(())) @@ -124,7 +124,7 @@ open class PetAPI { - parameter completion: completion handler to receive the result */ open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<[Pet], Error>) -> Void)) { - findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(.success(response.body!)) @@ -174,7 +174,7 @@ open class PetAPI { */ @available(*, deprecated, message: "This operation is deprecated.") open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<[Pet], Error>) -> Void)) { - findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(.success(response.body!)) @@ -224,7 +224,7 @@ open class PetAPI { - parameter completion: completion handler to receive the result */ open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(.success(response.body!)) @@ -273,7 +273,7 @@ open class PetAPI { - parameter completion: completion handler to receive the result */ open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion(.success(())) @@ -320,7 +320,7 @@ open class PetAPI { - parameter completion: completion handler to receive the result */ open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result in switch result { case .success: completion(.success(())) @@ -378,7 +378,7 @@ open class PetAPI { - parameter completion: completion handler to receive the result */ open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(.success(response.body!)) @@ -436,7 +436,7 @@ open class PetAPI { - parameter completion: completion handler to receive the result */ open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(.success(response.body!)) 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 29def799390..3a96edb8393 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 @@ -20,7 +20,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the result */ open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case .success: completion(.success(())) @@ -65,7 +65,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the result */ open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<[String: Int], Error>) -> Void)) { - getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case let .success(response): completion(.success(response.body!)) @@ -110,7 +110,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the result */ open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(.success(response.body!)) @@ -156,7 +156,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the result */ open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(.success(response.body!)) 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 ec49c514d1c..de46300cfc7 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 @@ -20,7 +20,7 @@ open class UserAPI { - parameter completion: completion handler to receive the result */ open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion(.success(())) @@ -63,7 +63,7 @@ open class UserAPI { - parameter completion: completion handler to receive the result */ open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion(.success(())) @@ -105,7 +105,7 @@ open class UserAPI { - parameter completion: completion handler to receive the result */ open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion(.success(())) @@ -147,7 +147,7 @@ open class UserAPI { - parameter completion: completion handler to receive the result */ open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case .success: completion(.success(())) @@ -193,7 +193,7 @@ open class UserAPI { - parameter completion: completion handler to receive the result */ open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(.success(response.body!)) @@ -239,7 +239,7 @@ open class UserAPI { - parameter completion: completion handler to receive the result */ open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(.success(response.body!)) @@ -286,7 +286,7 @@ open class UserAPI { - parameter completion: completion handler to receive the result */ open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case .success: completion(.success(())) @@ -328,7 +328,7 @@ open class UserAPI { - parameter completion: completion handler to receive the result */ open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { - updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in + updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result in switch result { case .success: completion(.success(())) 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 97b121b7ab4..829cf959b76 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 @@ -22,7 +22,7 @@ open class AnotherFakeAPI { */ open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): observer.onNext(response.body!) 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 6f3a99d0514..9d0211f1186 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 @@ -21,7 +21,7 @@ open class FakeAPI { */ open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): observer.onNext(response.body!) @@ -66,7 +66,7 @@ open class FakeAPI { */ open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): observer.onNext(response.body!) @@ -111,7 +111,7 @@ open class FakeAPI { */ open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): observer.onNext(response.body!) @@ -156,7 +156,7 @@ open class FakeAPI { */ open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): observer.onNext(response.body!) @@ -201,7 +201,7 @@ open class FakeAPI { */ open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: observer.onNext(()) @@ -247,7 +247,7 @@ open class FakeAPI { */ open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result in switch result { case .success: observer.onNext(()) @@ -296,7 +296,7 @@ open class FakeAPI { */ open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): observer.onNext(response.body!) @@ -356,7 +356,7 @@ open class FakeAPI { */ open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in + testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result in switch result { case .success: observer.onNext(()) @@ -511,7 +511,7 @@ open class FakeAPI { */ open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result in switch result { case .success: observer.onNext(()) @@ -584,7 +584,7 @@ open class FakeAPI { */ open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result in switch result { case .success: observer.onNext(()) @@ -643,7 +643,7 @@ open class FakeAPI { */ open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result in switch result { case .success: observer.onNext(()) @@ -690,7 +690,7 @@ open class FakeAPI { */ open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result in switch result { case .success: observer.onNext(()) 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 3145bc3740c..22bb23afb48 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 @@ -22,7 +22,7 @@ open class FakeClassnameTags123API { */ open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): observer.onNext(response.body!) 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 f3d015c350d..b9e23efd760 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 @@ -22,7 +22,7 @@ open class PetAPI { */ open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: observer.onNext(()) @@ -72,7 +72,7 @@ open class PetAPI { */ open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result in switch result { case .success: observer.onNext(()) @@ -134,7 +134,7 @@ open class PetAPI { */ open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable<[Pet]> { return Observable.create { observer -> Disposable in - findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result in switch result { case let .success(response): observer.onNext(response.body!) @@ -188,7 +188,7 @@ open class PetAPI { @available(*, deprecated, message: "This operation is deprecated.") open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable<[Pet]> { return Observable.create { observer -> Disposable in - findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result in switch result { case let .success(response): observer.onNext(response.body!) @@ -242,7 +242,7 @@ open class PetAPI { */ open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result in switch result { case let .success(response): observer.onNext(response.body!) @@ -295,7 +295,7 @@ open class PetAPI { */ open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: observer.onNext(()) @@ -346,7 +346,7 @@ open class PetAPI { */ open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result in switch result { case .success: observer.onNext(()) @@ -408,7 +408,7 @@ open class PetAPI { */ open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result in switch result { case let .success(response): observer.onNext(response.body!) @@ -470,7 +470,7 @@ open class PetAPI { */ open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result in switch result { case let .success(response): observer.onNext(response.body!) 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 6125faa1092..64965dcac0e 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 @@ -22,7 +22,7 @@ open class StoreAPI { */ open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case .success: observer.onNext(()) @@ -71,7 +71,7 @@ open class StoreAPI { */ open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable<[String: Int]> { return Observable.create { observer -> Disposable in - getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case let .success(response): observer.onNext(response.body!) @@ -120,7 +120,7 @@ open class StoreAPI { */ open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case let .success(response): observer.onNext(response.body!) @@ -170,7 +170,7 @@ open class StoreAPI { */ open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): observer.onNext(response.body!) 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 46370c40726..e51f11a4951 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 @@ -22,7 +22,7 @@ open class UserAPI { */ open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: observer.onNext(()) @@ -69,7 +69,7 @@ open class UserAPI { */ open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: observer.onNext(()) @@ -115,7 +115,7 @@ open class UserAPI { */ open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: observer.onNext(()) @@ -161,7 +161,7 @@ open class UserAPI { */ open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case .success: observer.onNext(()) @@ -211,7 +211,7 @@ open class UserAPI { */ open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case let .success(response): observer.onNext(response.body!) @@ -261,7 +261,7 @@ open class UserAPI { */ open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result in switch result { case let .success(response): observer.onNext(response.body!) @@ -312,7 +312,7 @@ open class UserAPI { */ open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case .success: observer.onNext(()) @@ -358,7 +358,7 @@ open class UserAPI { */ open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in - updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in + updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result in switch result { case .success: observer.onNext(()) diff --git a/samples/client/petstore/swift5/swift5_test_all.sh b/samples/client/petstore/swift5/swift5_test_all.sh index 0b5ef4780b5..f621187c463 100755 --- a/samples/client/petstore/swift5/swift5_test_all.sh +++ b/samples/client/petstore/swift5/swift5_test_all.sh @@ -15,6 +15,7 @@ DIRECTORY=`dirname $0` # spm build mvn -f $DIRECTORY/alamofireLibrary/pom.xml integration-test +# mvn -f $DIRECTORY/asyncAwaitLibrary/pom.xml integration-test mvn -f $DIRECTORY/combineLibrary/pom.xml integration-test mvn -f $DIRECTORY/default/pom.xml integration-test mvn -f $DIRECTORY/deprecated/pom.xml integration-test diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift index 4d10df33862..20147cf8c90 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift @@ -23,7 +23,7 @@ open class AnotherFakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift index ded19a29600..4abbbfd3f37 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift @@ -22,7 +22,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { - fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -63,7 +63,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { - fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -104,7 +104,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { - fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -145,7 +145,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -186,7 +186,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -228,7 +228,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -273,7 +273,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -329,7 +329,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - 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 + 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 in switch result { case .success: completion((), nil) @@ -480,7 +480,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -549,7 +549,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -604,7 +604,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -647,7 +647,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeClassnameTags123API.swift index 012af77fd31..f519e442ae4 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeClassnameTags123API.swift @@ -23,7 +23,7 @@ open class FakeClassnameTags123API { - parameter completion: completion handler to receive the data and the error objects */ open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/PetAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/PetAPI.swift index 283fb3bfea3..763e21a7dff 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/PetAPI.swift @@ -23,7 +23,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -69,7 +69,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -127,7 +127,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -177,7 +177,7 @@ open class PetAPI { */ @available(*, deprecated, message: "This operation is deprecated.") open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -227,7 +227,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { - getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -276,7 +276,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -323,7 +323,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -381,7 +381,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -439,7 +439,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift index 570dad7e757..55d86dea71a 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift @@ -23,7 +23,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -68,7 +68,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { - getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -113,7 +113,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -159,7 +159,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/UserAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/UserAPI.swift index f21c6eab570..55da91b6376 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/UserAPI.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/UserAPI.swift @@ -23,7 +23,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -66,7 +66,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -108,7 +108,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -150,7 +150,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -196,7 +196,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { - getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -242,7 +242,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -289,7 +289,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -331,7 +331,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in + updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 8099bf1c37c..43abbb33519 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -20,7 +20,7 @@ open class AnotherFakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 5f58bd5c37b..7f43de2f5ea 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -19,7 +19,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { - fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -60,7 +60,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { - fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -101,7 +101,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { - fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -142,7 +142,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -183,7 +183,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -225,7 +225,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -270,7 +270,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -326,7 +326,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - 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 + 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 in switch result { case .success: completion((), nil) @@ -477,7 +477,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -546,7 +546,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -601,7 +601,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -644,7 +644,7 @@ open class FakeAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index ca7ca48c4e8..34c654e4499 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -20,7 +20,7 @@ open class FakeClassnameTags123API { - parameter completion: completion handler to receive the data and the error objects */ open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 49530dc2840..29d68b9f526 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -20,7 +20,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -66,7 +66,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -124,7 +124,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -174,7 +174,7 @@ open class PetAPI { */ @available(*, deprecated, message: "This operation is deprecated.") open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -224,7 +224,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { - getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -273,7 +273,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -320,7 +320,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -378,7 +378,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -436,7 +436,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index 8555e093682..fbe47386f98 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -20,7 +20,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -65,7 +65,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { - getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -110,7 +110,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -156,7 +156,7 @@ open class StoreAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index 49132e5612f..f61db9b14f2 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -20,7 +20,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -63,7 +63,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -105,7 +105,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -147,7 +147,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -193,7 +193,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { - getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -239,7 +239,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -286,7 +286,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) @@ -328,7 +328,7 @@ open class UserAPI { - parameter completion: completion handler to receive the data and the error objects */ open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in + updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result in switch result { case .success: completion((), nil) From 31342580cb285b49efc1da839f46d0503859a35f Mon Sep 17 00:00:00 2001 From: Pi Delport Date: Thu, 23 Sep 2021 05:31:09 +0200 Subject: [PATCH 03/50] feat(rust,client): derive Default for operation parameter structs (#10432) * feat(rust,client): derive Default for model & api structs This makes operations with many parameters easier to work with. * chore(rust,client): capture sample changes: derive Default --- .../src/main/resources/rust/model.mustache | 2 +- .../src/main/resources/rust/reqwest/api.mustache | 2 +- .../hyper/petstore/src/models/api_response.rs | 2 +- .../rust/hyper/petstore/src/models/category.rs | 2 +- .../rust/hyper/petstore/src/models/order.rs | 2 +- .../rust/hyper/petstore/src/models/pet.rs | 2 +- .../rust/hyper/petstore/src/models/tag.rs | 2 +- .../rust/hyper/petstore/src/models/user.rs | 2 +- .../reqwest/petstore-async/src/apis/pet_api.rs | 16 ++++++++-------- .../reqwest/petstore-async/src/apis/store_api.rs | 6 +++--- .../reqwest/petstore-async/src/apis/user_api.rs | 14 +++++++------- .../petstore-async/src/models/api_response.rs | 2 +- .../petstore-async/src/models/category.rs | 2 +- .../reqwest/petstore-async/src/models/order.rs | 2 +- .../reqwest/petstore-async/src/models/pet.rs | 2 +- .../reqwest/petstore-async/src/models/tag.rs | 2 +- .../reqwest/petstore-async/src/models/user.rs | 2 +- .../reqwest/petstore/src/models/api_response.rs | 2 +- .../rust/reqwest/petstore/src/models/category.rs | 2 +- .../rust/reqwest/petstore/src/models/order.rs | 2 +- .../rust/reqwest/petstore/src/models/pet.rs | 2 +- .../rust/reqwest/petstore/src/models/tag.rs | 2 +- .../rust/reqwest/petstore/src/models/user.rs | 2 +- 23 files changed, 38 insertions(+), 38 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/rust/model.mustache b/modules/openapi-generator/src/main/resources/rust/model.mustache index ebd0a455dfd..c4ed5beb64d 100644 --- a/modules/openapi-generator/src/main/resources/rust/model.mustache +++ b/modules/openapi-generator/src/main/resources/rust/model.mustache @@ -56,7 +56,7 @@ pub enum {{{classname}}} { {{!-- for non-enum schemas --}} {{^isEnum}} {{^discriminator}} -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct {{{classname}}} { {{#vars}} {{#description}} diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache index c37112258ba..02a6077a159 100644 --- a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache +++ b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache @@ -11,7 +11,7 @@ use super::{Error, configuration}; {{#allParams}} {{#-first}} /// struct for passing parameters to the method `{{operationId}}` -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct {{{operationIdCamelCase}}}Params { {{/-first}} {{#description}} diff --git a/samples/client/petstore/rust/hyper/petstore/src/models/api_response.rs b/samples/client/petstore/rust/hyper/petstore/src/models/api_response.rs index 16c49d8d61d..eff3b44e36b 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/models/api_response.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/models/api_response.rs @@ -12,7 +12,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ApiResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, diff --git a/samples/client/petstore/rust/hyper/petstore/src/models/category.rs b/samples/client/petstore/rust/hyper/petstore/src/models/category.rs index ed937ac261d..750bdeddd6f 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/models/category.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/models/category.rs @@ -12,7 +12,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Category { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, diff --git a/samples/client/petstore/rust/hyper/petstore/src/models/order.rs b/samples/client/petstore/rust/hyper/petstore/src/models/order.rs index c64eae6d4ff..3e6a00aaeae 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/models/order.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/models/order.rs @@ -12,7 +12,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Order { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, diff --git a/samples/client/petstore/rust/hyper/petstore/src/models/pet.rs b/samples/client/petstore/rust/hyper/petstore/src/models/pet.rs index 1e055fc00f8..358961f2c71 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/models/pet.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/models/pet.rs @@ -12,7 +12,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Pet { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, diff --git a/samples/client/petstore/rust/hyper/petstore/src/models/tag.rs b/samples/client/petstore/rust/hyper/petstore/src/models/tag.rs index e0ae6e9efcc..b5813027846 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/models/tag.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/models/tag.rs @@ -12,7 +12,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Tag { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, diff --git a/samples/client/petstore/rust/hyper/petstore/src/models/user.rs b/samples/client/petstore/rust/hyper/petstore/src/models/user.rs index 360df3b9ec3..746cb571f49 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/models/user.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/models/user.rs @@ -12,7 +12,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct User { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs index f98bb21e72a..08aea52a52b 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs @@ -15,14 +15,14 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; /// struct for passing parameters to the method `add_pet` -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct AddPetParams { /// Pet object that needs to be added to the store pub pet: crate::models::Pet } /// struct for passing parameters to the method `delete_pet` -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct DeletePetParams { /// Pet id to delete pub pet_id: i64, @@ -30,35 +30,35 @@ pub struct DeletePetParams { } /// struct for passing parameters to the method `find_pets_by_status` -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct FindPetsByStatusParams { /// Status values that need to be considered for filter pub status: Vec } /// struct for passing parameters to the method `find_pets_by_tags` -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct FindPetsByTagsParams { /// Tags to filter by pub tags: Vec } /// struct for passing parameters to the method `get_pet_by_id` -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct GetPetByIdParams { /// ID of pet to return pub pet_id: i64 } /// struct for passing parameters to the method `update_pet` -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct UpdatePetParams { /// Pet object that needs to be added to the store pub pet: crate::models::Pet } /// struct for passing parameters to the method `update_pet_with_form` -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct UpdatePetWithFormParams { /// ID of pet that needs to be updated pub pet_id: i64, @@ -69,7 +69,7 @@ pub struct UpdatePetWithFormParams { } /// struct for passing parameters to the method `upload_file` -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct UploadFileParams { /// ID of pet to update pub pet_id: i64, diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs index 13fd06a985e..6766b0747d7 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs @@ -15,21 +15,21 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; /// struct for passing parameters to the method `delete_order` -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct DeleteOrderParams { /// ID of the order that needs to be deleted pub order_id: String } /// struct for passing parameters to the method `get_order_by_id` -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct GetOrderByIdParams { /// ID of pet that needs to be fetched pub order_id: i64 } /// struct for passing parameters to the method `place_order` -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct PlaceOrderParams { /// order placed for purchasing the pet pub order: crate::models::Order diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/user_api.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/user_api.rs index b4a57fd726d..1171bfb3cb8 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/user_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/user_api.rs @@ -15,42 +15,42 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; /// struct for passing parameters to the method `create_user` -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct CreateUserParams { /// Created user object pub user: crate::models::User } /// struct for passing parameters to the method `create_users_with_array_input` -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct CreateUsersWithArrayInputParams { /// List of user object pub user: Vec } /// struct for passing parameters to the method `create_users_with_list_input` -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct CreateUsersWithListInputParams { /// List of user object pub user: Vec } /// struct for passing parameters to the method `delete_user` -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct DeleteUserParams { /// The name that needs to be deleted pub username: String } /// struct for passing parameters to the method `get_user_by_name` -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct GetUserByNameParams { /// The name that needs to be fetched. Use user1 for testing. pub username: String } /// struct for passing parameters to the method `login_user` -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct LoginUserParams { /// The user name for login pub username: String, @@ -59,7 +59,7 @@ pub struct LoginUserParams { } /// struct for passing parameters to the method `update_user` -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct UpdateUserParams { /// name that need to be deleted pub username: String, diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/models/api_response.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/models/api_response.rs index 16c49d8d61d..eff3b44e36b 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/models/api_response.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/models/api_response.rs @@ -12,7 +12,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ApiResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/models/category.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/models/category.rs index ed937ac261d..750bdeddd6f 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/models/category.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/models/category.rs @@ -12,7 +12,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Category { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/models/order.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/models/order.rs index c64eae6d4ff..3e6a00aaeae 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/models/order.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/models/order.rs @@ -12,7 +12,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Order { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/models/pet.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/models/pet.rs index 1e055fc00f8..358961f2c71 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/models/pet.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/models/pet.rs @@ -12,7 +12,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Pet { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/models/tag.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/models/tag.rs index e0ae6e9efcc..b5813027846 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/models/tag.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/models/tag.rs @@ -12,7 +12,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Tag { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/models/user.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/models/user.rs index 360df3b9ec3..746cb571f49 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/models/user.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/models/user.rs @@ -12,7 +12,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct User { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, diff --git a/samples/client/petstore/rust/reqwest/petstore/src/models/api_response.rs b/samples/client/petstore/rust/reqwest/petstore/src/models/api_response.rs index 16c49d8d61d..eff3b44e36b 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/models/api_response.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/models/api_response.rs @@ -12,7 +12,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ApiResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, diff --git a/samples/client/petstore/rust/reqwest/petstore/src/models/category.rs b/samples/client/petstore/rust/reqwest/petstore/src/models/category.rs index ed937ac261d..750bdeddd6f 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/models/category.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/models/category.rs @@ -12,7 +12,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Category { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, diff --git a/samples/client/petstore/rust/reqwest/petstore/src/models/order.rs b/samples/client/petstore/rust/reqwest/petstore/src/models/order.rs index c64eae6d4ff..3e6a00aaeae 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/models/order.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/models/order.rs @@ -12,7 +12,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Order { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, diff --git a/samples/client/petstore/rust/reqwest/petstore/src/models/pet.rs b/samples/client/petstore/rust/reqwest/petstore/src/models/pet.rs index 1e055fc00f8..358961f2c71 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/models/pet.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/models/pet.rs @@ -12,7 +12,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Pet { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, diff --git a/samples/client/petstore/rust/reqwest/petstore/src/models/tag.rs b/samples/client/petstore/rust/reqwest/petstore/src/models/tag.rs index e0ae6e9efcc..b5813027846 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/models/tag.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/models/tag.rs @@ -12,7 +12,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Tag { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, diff --git a/samples/client/petstore/rust/reqwest/petstore/src/models/user.rs b/samples/client/petstore/rust/reqwest/petstore/src/models/user.rs index 360df3b9ec3..746cb571f49 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/models/user.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/models/user.rs @@ -12,7 +12,7 @@ -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct User { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, From 538f12c36df8f01c1728c6e0608d3cb79d2c8260 Mon Sep 17 00:00:00 2001 From: Himanshu Pant Date: Thu, 23 Sep 2021 11:53:56 +0530 Subject: [PATCH 04/50] fix: :bug: Added ability to override basePath while creating ApiClient instance (#10327) Solves #9179 --- .../src/main/resources/Javascript/es6/ApiClient.mustache | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache index de2134ade06..d0f55eb3126 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache @@ -16,13 +16,18 @@ import querystring from "querystring"; * @class */{{/emitJSDoc}} class ApiClient { - constructor() { + /** + * The base URL against which to resolve every API call's (relative) path. + * Overrides the default value set in spec file if present + * @param {String} basePath + */ + constructor(basePath = '{{{basePath}}}') { {{#emitJSDoc}}/** * The base URL against which to resolve every API call's (relative) path. * @type {String} * @default {{{basePath}}} */{{/emitJSDoc}} - this.basePath = '{{{basePath}}}'.replace(/\/+$/, ''); + this.basePath = basePath.replace(/\/+$/, ''); {{#emitJSDoc}}/** * The authentication methods to be included for all API calls. From 1d934643fdbc15e90caf27fcce603ed4e6cbe028 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 23 Sep 2021 14:29:33 +0800 Subject: [PATCH 05/50] update samples --- samples/client/petstore/javascript-es6/src/ApiClient.js | 9 +++++++-- .../petstore/javascript-promise-es6/src/ApiClient.js | 9 +++++++-- .../haskell-servant/lib/OpenAPIPetstore/Types.hs | 1 + .../petstore/haskell-yesod/src/OpenAPIPetstore/Types.hs | 1 + 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/samples/client/petstore/javascript-es6/src/ApiClient.js b/samples/client/petstore/javascript-es6/src/ApiClient.js index e21c4712f59..137f64a1cb5 100644 --- a/samples/client/petstore/javascript-es6/src/ApiClient.js +++ b/samples/client/petstore/javascript-es6/src/ApiClient.js @@ -28,13 +28,18 @@ import querystring from "querystring"; * @class */ class ApiClient { - constructor() { + /** + * The base URL against which to resolve every API call's (relative) path. + * Overrides the default value set in spec file if present + * @param {String} basePath + */ + constructor(basePath = 'http://petstore.swagger.io:80/v2') { /** * The base URL against which to resolve every API call's (relative) path. * @type {String} * @default http://petstore.swagger.io:80/v2 */ - this.basePath = 'http://petstore.swagger.io:80/v2'.replace(/\/+$/, ''); + this.basePath = basePath.replace(/\/+$/, ''); /** * The authentication methods to be included for all API calls. diff --git a/samples/client/petstore/javascript-promise-es6/src/ApiClient.js b/samples/client/petstore/javascript-promise-es6/src/ApiClient.js index 49869fffe92..8ca4d9fc8fe 100644 --- a/samples/client/petstore/javascript-promise-es6/src/ApiClient.js +++ b/samples/client/petstore/javascript-promise-es6/src/ApiClient.js @@ -28,13 +28,18 @@ import querystring from "querystring"; * @class */ class ApiClient { - constructor() { + /** + * The base URL against which to resolve every API call's (relative) path. + * Overrides the default value set in spec file if present + * @param {String} basePath + */ + constructor(basePath = 'http://petstore.swagger.io:80/v2') { /** * The base URL against which to resolve every API call's (relative) path. * @type {String} * @default http://petstore.swagger.io:80/v2 */ - this.basePath = 'http://petstore.swagger.io:80/v2'.replace(/\/+$/, ''); + this.basePath = basePath.replace(/\/+$/, ''); /** * The authentication methods to be included for all API calls. diff --git a/samples/server/petstore/haskell-servant/lib/OpenAPIPetstore/Types.hs b/samples/server/petstore/haskell-servant/lib/OpenAPIPetstore/Types.hs index af002e481c9..9bb39c771ab 100644 --- a/samples/server/petstore/haskell-servant/lib/OpenAPIPetstore/Types.hs +++ b/samples/server/petstore/haskell-servant/lib/OpenAPIPetstore/Types.hs @@ -184,6 +184,7 @@ removeFieldLabelPrefix forParsing prefix = , (".", "'Period") , ("/", "'Slash") , (":", "'Colon") + , (";", "'Semicolon") , ("{", "'Left_Curly_Bracket") , ("|", "'Pipe") , ("<", "'LessThan") diff --git a/samples/server/petstore/haskell-yesod/src/OpenAPIPetstore/Types.hs b/samples/server/petstore/haskell-yesod/src/OpenAPIPetstore/Types.hs index 44a78e76afd..1ba7c5d1487 100644 --- a/samples/server/petstore/haskell-yesod/src/OpenAPIPetstore/Types.hs +++ b/samples/server/petstore/haskell-yesod/src/OpenAPIPetstore/Types.hs @@ -154,6 +154,7 @@ removeFieldLabelPrefix forParsing prefix = , (".", "'Period") , ("/", "'Slash") , (":", "'Colon") + , (";", "'Semicolon") , ("{", "'Left_Curly_Bracket") , ("|", "'Pipe") , ("<", "'LessThan") From 5096a00087489c7a5089fbadc4ff7416c6fd9b56 Mon Sep 17 00:00:00 2001 From: Pi Delport Date: Thu, 23 Sep 2021 19:03:01 +0200 Subject: [PATCH 06/50] Rust client docs improvements (#10461) * docs(rust,client): link from parameter structs to operation methods * docs(rust,client): move "more information" text up This prevents the "more information" text from flowing into the previous bullet point. * docs(rust,client): use code formatting for generatorClass * docs(rust,client): use packageName variable for Cargo.toml dependencies example * chore(rust,client): capture sample updates --- .../src/main/resources/rust/README.mustache | 11 +++-- .../main/resources/rust/reqwest/api.mustache | 6 +-- .../petstore/rust/hyper/petstore/README.md | 5 +- .../rust/reqwest/petstore-async/README.md | 5 +- .../petstore-async/src/apis/pet_api.rs | 48 +++++++++---------- .../petstore-async/src/apis/store_api.rs | 22 ++++----- .../petstore-async/src/apis/user_api.rs | 46 +++++++++--------- .../petstore/rust/reqwest/petstore/README.md | 5 +- .../rust/reqwest/petstore/src/apis/pet_api.rs | 16 +++---- .../reqwest/petstore/src/apis/store_api.rs | 8 ++-- .../reqwest/petstore/src/apis/user_api.rs | 16 +++---- 11 files changed, 96 insertions(+), 92 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/rust/README.mustache b/modules/openapi-generator/src/main/resources/rust/README.mustache index 654bd564920..b948eb10d5c 100644 --- a/modules/openapi-generator/src/main/resources/rust/README.mustache +++ b/modules/openapi-generator/src/main/resources/rust/README.mustache @@ -4,6 +4,10 @@ {{{.}}} {{/appDescriptionWithNewLines}} +{{#infoUrl}} +For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) +{{/infoUrl}} + ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. @@ -13,17 +17,14 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat {{^hideGenerationTimestamp}} - Build date: {{{generatedDate}}} {{/hideGenerationTimestamp}} -- Build package: {{{generatorClass}}} -{{#infoUrl}} -For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) -{{/infoUrl}} +- Build package: `{{{generatorClass}}}` ## Installation Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`: ``` - openapi = { path = "./generated" } +{{{packageName}}} = { path = "./generated" } ``` ## Documentation for API Endpoints diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache index 02a6077a159..0e13e0ab8cc 100644 --- a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache +++ b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache @@ -10,7 +10,7 @@ use super::{Error, configuration}; {{#vendorExtensions.x-group-parameters}} {{#allParams}} {{#-first}} -/// struct for passing parameters to the method `{{operationId}}` +/// struct for passing parameters to the method [`{{operationId}}`] #[derive(Clone, Debug, Default)] pub struct {{{operationIdCamelCase}}}Params { {{/-first}} @@ -30,7 +30,7 @@ pub struct {{{operationIdCamelCase}}}Params { {{#supportMultipleResponses}} {{#operations}} {{#operation}} -/// struct for typed successes of method `{{operationId}}` +/// struct for typed successes of method [`{{operationId}}`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum {{{operationIdCamelCase}}}Success { @@ -50,7 +50,7 @@ pub enum {{{operationIdCamelCase}}}Success { {{/supportMultipleResponses}} {{#operations}} {{#operation}} -/// struct for typed errors of method `{{operationId}}` +/// struct for typed errors of method [`{{operationId}}`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum {{{operationIdCamelCase}}}Error { diff --git a/samples/client/petstore/rust/hyper/petstore/README.md b/samples/client/petstore/rust/hyper/petstore/README.md index 83a8b77584e..b7971071b7d 100644 --- a/samples/client/petstore/rust/hyper/petstore/README.md +++ b/samples/client/petstore/rust/hyper/petstore/README.md @@ -2,20 +2,21 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. - API version: 1.0.0 - Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.RustClientCodegen +- Build package: `org.openapitools.codegen.languages.RustClientCodegen` ## Installation Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`: ``` - openapi = { path = "./generated" } +petstore-hyper = { path = "./generated" } ``` ## Documentation for API Endpoints diff --git a/samples/client/petstore/rust/reqwest/petstore-async/README.md b/samples/client/petstore/rust/reqwest/petstore-async/README.md index 6f195d6388d..8b0301dbbfc 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/README.md +++ b/samples/client/petstore/rust/reqwest/petstore-async/README.md @@ -2,20 +2,21 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. - API version: 1.0.0 - Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.RustClientCodegen +- Build package: `org.openapitools.codegen.languages.RustClientCodegen` ## Installation Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`: ``` - openapi = { path = "./generated" } +petstore-reqwest-async = { path = "./generated" } ``` ## Documentation for API Endpoints diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs index 08aea52a52b..741c3fa741b 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs @@ -14,14 +14,14 @@ use reqwest; use crate::apis::ResponseContent; use super::{Error, configuration}; -/// struct for passing parameters to the method `add_pet` +/// struct for passing parameters to the method [`add_pet`] #[derive(Clone, Debug, Default)] pub struct AddPetParams { /// Pet object that needs to be added to the store pub pet: crate::models::Pet } -/// struct for passing parameters to the method `delete_pet` +/// struct for passing parameters to the method [`delete_pet`] #[derive(Clone, Debug, Default)] pub struct DeletePetParams { /// Pet id to delete @@ -29,35 +29,35 @@ pub struct DeletePetParams { pub api_key: Option } -/// struct for passing parameters to the method `find_pets_by_status` +/// struct for passing parameters to the method [`find_pets_by_status`] #[derive(Clone, Debug, Default)] pub struct FindPetsByStatusParams { /// Status values that need to be considered for filter pub status: Vec } -/// struct for passing parameters to the method `find_pets_by_tags` +/// struct for passing parameters to the method [`find_pets_by_tags`] #[derive(Clone, Debug, Default)] pub struct FindPetsByTagsParams { /// Tags to filter by pub tags: Vec } -/// struct for passing parameters to the method `get_pet_by_id` +/// struct for passing parameters to the method [`get_pet_by_id`] #[derive(Clone, Debug, Default)] pub struct GetPetByIdParams { /// ID of pet to return pub pet_id: i64 } -/// struct for passing parameters to the method `update_pet` +/// struct for passing parameters to the method [`update_pet`] #[derive(Clone, Debug, Default)] pub struct UpdatePetParams { /// Pet object that needs to be added to the store pub pet: crate::models::Pet } -/// struct for passing parameters to the method `update_pet_with_form` +/// struct for passing parameters to the method [`update_pet_with_form`] #[derive(Clone, Debug, Default)] pub struct UpdatePetWithFormParams { /// ID of pet that needs to be updated @@ -68,7 +68,7 @@ pub struct UpdatePetWithFormParams { pub status: Option } -/// struct for passing parameters to the method `upload_file` +/// struct for passing parameters to the method [`upload_file`] #[derive(Clone, Debug, Default)] pub struct UploadFileParams { /// ID of pet to update @@ -80,7 +80,7 @@ pub struct UploadFileParams { } -/// struct for typed successes of method `add_pet` +/// struct for typed successes of method [`add_pet`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AddPetSuccess { @@ -88,14 +88,14 @@ pub enum AddPetSuccess { UnknownValue(serde_json::Value), } -/// struct for typed successes of method `delete_pet` +/// struct for typed successes of method [`delete_pet`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeletePetSuccess { UnknownValue(serde_json::Value), } -/// struct for typed successes of method `find_pets_by_status` +/// struct for typed successes of method [`find_pets_by_status`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum FindPetsByStatusSuccess { @@ -103,7 +103,7 @@ pub enum FindPetsByStatusSuccess { UnknownValue(serde_json::Value), } -/// struct for typed successes of method `find_pets_by_tags` +/// struct for typed successes of method [`find_pets_by_tags`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum FindPetsByTagsSuccess { @@ -111,7 +111,7 @@ pub enum FindPetsByTagsSuccess { UnknownValue(serde_json::Value), } -/// struct for typed successes of method `get_pet_by_id` +/// struct for typed successes of method [`get_pet_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetPetByIdSuccess { @@ -119,7 +119,7 @@ pub enum GetPetByIdSuccess { UnknownValue(serde_json::Value), } -/// struct for typed successes of method `update_pet` +/// struct for typed successes of method [`update_pet`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum UpdatePetSuccess { @@ -127,14 +127,14 @@ pub enum UpdatePetSuccess { UnknownValue(serde_json::Value), } -/// struct for typed successes of method `update_pet_with_form` +/// struct for typed successes of method [`update_pet_with_form`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum UpdatePetWithFormSuccess { UnknownValue(serde_json::Value), } -/// struct for typed successes of method `upload_file` +/// struct for typed successes of method [`upload_file`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum UploadFileSuccess { @@ -142,7 +142,7 @@ pub enum UploadFileSuccess { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `add_pet` +/// struct for typed errors of method [`add_pet`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AddPetError { @@ -150,7 +150,7 @@ pub enum AddPetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `delete_pet` +/// struct for typed errors of method [`delete_pet`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeletePetError { @@ -158,7 +158,7 @@ pub enum DeletePetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `find_pets_by_status` +/// struct for typed errors of method [`find_pets_by_status`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum FindPetsByStatusError { @@ -166,7 +166,7 @@ pub enum FindPetsByStatusError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `find_pets_by_tags` +/// struct for typed errors of method [`find_pets_by_tags`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum FindPetsByTagsError { @@ -174,7 +174,7 @@ pub enum FindPetsByTagsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_pet_by_id` +/// struct for typed errors of method [`get_pet_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetPetByIdError { @@ -183,7 +183,7 @@ pub enum GetPetByIdError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `update_pet` +/// struct for typed errors of method [`update_pet`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum UpdatePetError { @@ -193,7 +193,7 @@ pub enum UpdatePetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `update_pet_with_form` +/// struct for typed errors of method [`update_pet_with_form`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum UpdatePetWithFormError { @@ -201,7 +201,7 @@ pub enum UpdatePetWithFormError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `upload_file` +/// struct for typed errors of method [`upload_file`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum UploadFileError { diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs index 6766b0747d7..8f58ce294ec 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs @@ -14,21 +14,21 @@ use reqwest; use crate::apis::ResponseContent; use super::{Error, configuration}; -/// struct for passing parameters to the method `delete_order` +/// struct for passing parameters to the method [`delete_order`] #[derive(Clone, Debug, Default)] pub struct DeleteOrderParams { /// ID of the order that needs to be deleted pub order_id: String } -/// struct for passing parameters to the method `get_order_by_id` +/// struct for passing parameters to the method [`get_order_by_id`] #[derive(Clone, Debug, Default)] pub struct GetOrderByIdParams { /// ID of pet that needs to be fetched pub order_id: i64 } -/// struct for passing parameters to the method `place_order` +/// struct for passing parameters to the method [`place_order`] #[derive(Clone, Debug, Default)] pub struct PlaceOrderParams { /// order placed for purchasing the pet @@ -36,14 +36,14 @@ pub struct PlaceOrderParams { } -/// struct for typed successes of method `delete_order` +/// struct for typed successes of method [`delete_order`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeleteOrderSuccess { UnknownValue(serde_json::Value), } -/// struct for typed successes of method `get_inventory` +/// struct for typed successes of method [`get_inventory`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetInventorySuccess { @@ -51,7 +51,7 @@ pub enum GetInventorySuccess { UnknownValue(serde_json::Value), } -/// struct for typed successes of method `get_order_by_id` +/// struct for typed successes of method [`get_order_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetOrderByIdSuccess { @@ -59,7 +59,7 @@ pub enum GetOrderByIdSuccess { UnknownValue(serde_json::Value), } -/// struct for typed successes of method `place_order` +/// struct for typed successes of method [`place_order`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum PlaceOrderSuccess { @@ -67,7 +67,7 @@ pub enum PlaceOrderSuccess { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `delete_order` +/// struct for typed errors of method [`delete_order`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeleteOrderError { @@ -76,14 +76,14 @@ pub enum DeleteOrderError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_inventory` +/// struct for typed errors of method [`get_inventory`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetInventoryError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_order_by_id` +/// struct for typed errors of method [`get_order_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetOrderByIdError { @@ -92,7 +92,7 @@ pub enum GetOrderByIdError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `place_order` +/// struct for typed errors of method [`place_order`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum PlaceOrderError { diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/user_api.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/user_api.rs index 1171bfb3cb8..55fb3e1db68 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/user_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/user_api.rs @@ -14,42 +14,42 @@ use reqwest; use crate::apis::ResponseContent; use super::{Error, configuration}; -/// struct for passing parameters to the method `create_user` +/// struct for passing parameters to the method [`create_user`] #[derive(Clone, Debug, Default)] pub struct CreateUserParams { /// Created user object pub user: crate::models::User } -/// struct for passing parameters to the method `create_users_with_array_input` +/// struct for passing parameters to the method [`create_users_with_array_input`] #[derive(Clone, Debug, Default)] pub struct CreateUsersWithArrayInputParams { /// List of user object pub user: Vec } -/// struct for passing parameters to the method `create_users_with_list_input` +/// struct for passing parameters to the method [`create_users_with_list_input`] #[derive(Clone, Debug, Default)] pub struct CreateUsersWithListInputParams { /// List of user object pub user: Vec } -/// struct for passing parameters to the method `delete_user` +/// struct for passing parameters to the method [`delete_user`] #[derive(Clone, Debug, Default)] pub struct DeleteUserParams { /// The name that needs to be deleted pub username: String } -/// struct for passing parameters to the method `get_user_by_name` +/// struct for passing parameters to the method [`get_user_by_name`] #[derive(Clone, Debug, Default)] pub struct GetUserByNameParams { /// The name that needs to be fetched. Use user1 for testing. pub username: String } -/// struct for passing parameters to the method `login_user` +/// struct for passing parameters to the method [`login_user`] #[derive(Clone, Debug, Default)] pub struct LoginUserParams { /// The user name for login @@ -58,7 +58,7 @@ pub struct LoginUserParams { pub password: String } -/// struct for passing parameters to the method `update_user` +/// struct for passing parameters to the method [`update_user`] #[derive(Clone, Debug, Default)] pub struct UpdateUserParams { /// name that need to be deleted @@ -68,35 +68,35 @@ pub struct UpdateUserParams { } -/// struct for typed successes of method `create_user` +/// struct for typed successes of method [`create_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CreateUserSuccess { UnknownValue(serde_json::Value), } -/// struct for typed successes of method `create_users_with_array_input` +/// struct for typed successes of method [`create_users_with_array_input`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CreateUsersWithArrayInputSuccess { UnknownValue(serde_json::Value), } -/// struct for typed successes of method `create_users_with_list_input` +/// struct for typed successes of method [`create_users_with_list_input`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CreateUsersWithListInputSuccess { UnknownValue(serde_json::Value), } -/// struct for typed successes of method `delete_user` +/// struct for typed successes of method [`delete_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeleteUserSuccess { UnknownValue(serde_json::Value), } -/// struct for typed successes of method `get_user_by_name` +/// struct for typed successes of method [`get_user_by_name`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetUserByNameSuccess { @@ -104,7 +104,7 @@ pub enum GetUserByNameSuccess { UnknownValue(serde_json::Value), } -/// struct for typed successes of method `login_user` +/// struct for typed successes of method [`login_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum LoginUserSuccess { @@ -112,21 +112,21 @@ pub enum LoginUserSuccess { UnknownValue(serde_json::Value), } -/// struct for typed successes of method `logout_user` +/// struct for typed successes of method [`logout_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum LogoutUserSuccess { UnknownValue(serde_json::Value), } -/// struct for typed successes of method `update_user` +/// struct for typed successes of method [`update_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum UpdateUserSuccess { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `create_user` +/// struct for typed errors of method [`create_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CreateUserError { @@ -134,7 +134,7 @@ pub enum CreateUserError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `create_users_with_array_input` +/// struct for typed errors of method [`create_users_with_array_input`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CreateUsersWithArrayInputError { @@ -142,7 +142,7 @@ pub enum CreateUsersWithArrayInputError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `create_users_with_list_input` +/// struct for typed errors of method [`create_users_with_list_input`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CreateUsersWithListInputError { @@ -150,7 +150,7 @@ pub enum CreateUsersWithListInputError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `delete_user` +/// struct for typed errors of method [`delete_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeleteUserError { @@ -159,7 +159,7 @@ pub enum DeleteUserError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_user_by_name` +/// struct for typed errors of method [`get_user_by_name`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetUserByNameError { @@ -168,7 +168,7 @@ pub enum GetUserByNameError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `login_user` +/// struct for typed errors of method [`login_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum LoginUserError { @@ -176,7 +176,7 @@ pub enum LoginUserError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `logout_user` +/// struct for typed errors of method [`logout_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum LogoutUserError { @@ -184,7 +184,7 @@ pub enum LogoutUserError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `update_user` +/// struct for typed errors of method [`update_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum UpdateUserError { diff --git a/samples/client/petstore/rust/reqwest/petstore/README.md b/samples/client/petstore/rust/reqwest/petstore/README.md index 57aa8f05026..57cd46f384b 100644 --- a/samples/client/petstore/rust/reqwest/petstore/README.md +++ b/samples/client/petstore/rust/reqwest/petstore/README.md @@ -2,20 +2,21 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. - API version: 1.0.0 - Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.RustClientCodegen +- Build package: `org.openapitools.codegen.languages.RustClientCodegen` ## Installation Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`: ``` - openapi = { path = "./generated" } +petstore-reqwest = { path = "./generated" } ``` ## Documentation for API Endpoints diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs index bdaedd6128f..7718490b73c 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs @@ -15,7 +15,7 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; -/// struct for typed errors of method `add_pet` +/// struct for typed errors of method [`add_pet`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AddPetError { @@ -23,7 +23,7 @@ pub enum AddPetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `delete_pet` +/// struct for typed errors of method [`delete_pet`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeletePetError { @@ -31,7 +31,7 @@ pub enum DeletePetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `find_pets_by_status` +/// struct for typed errors of method [`find_pets_by_status`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum FindPetsByStatusError { @@ -39,7 +39,7 @@ pub enum FindPetsByStatusError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `find_pets_by_tags` +/// struct for typed errors of method [`find_pets_by_tags`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum FindPetsByTagsError { @@ -47,7 +47,7 @@ pub enum FindPetsByTagsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_pet_by_id` +/// struct for typed errors of method [`get_pet_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetPetByIdError { @@ -56,7 +56,7 @@ pub enum GetPetByIdError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `update_pet` +/// struct for typed errors of method [`update_pet`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum UpdatePetError { @@ -66,7 +66,7 @@ pub enum UpdatePetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `update_pet_with_form` +/// struct for typed errors of method [`update_pet_with_form`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum UpdatePetWithFormError { @@ -74,7 +74,7 @@ pub enum UpdatePetWithFormError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `upload_file` +/// struct for typed errors of method [`upload_file`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum UploadFileError { diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs index a76b17ff6ec..d62ef3dcafb 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs @@ -15,7 +15,7 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; -/// struct for typed errors of method `delete_order` +/// struct for typed errors of method [`delete_order`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeleteOrderError { @@ -24,14 +24,14 @@ pub enum DeleteOrderError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_inventory` +/// struct for typed errors of method [`get_inventory`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetInventoryError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_order_by_id` +/// struct for typed errors of method [`get_order_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetOrderByIdError { @@ -40,7 +40,7 @@ pub enum GetOrderByIdError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `place_order` +/// struct for typed errors of method [`place_order`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum PlaceOrderError { diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs index 16dbf8c53d8..a6f457481dd 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs @@ -15,7 +15,7 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; -/// struct for typed errors of method `create_user` +/// struct for typed errors of method [`create_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CreateUserError { @@ -23,7 +23,7 @@ pub enum CreateUserError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `create_users_with_array_input` +/// struct for typed errors of method [`create_users_with_array_input`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CreateUsersWithArrayInputError { @@ -31,7 +31,7 @@ pub enum CreateUsersWithArrayInputError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `create_users_with_list_input` +/// struct for typed errors of method [`create_users_with_list_input`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CreateUsersWithListInputError { @@ -39,7 +39,7 @@ pub enum CreateUsersWithListInputError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `delete_user` +/// struct for typed errors of method [`delete_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeleteUserError { @@ -48,7 +48,7 @@ pub enum DeleteUserError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `get_user_by_name` +/// struct for typed errors of method [`get_user_by_name`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetUserByNameError { @@ -57,7 +57,7 @@ pub enum GetUserByNameError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `login_user` +/// struct for typed errors of method [`login_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum LoginUserError { @@ -65,7 +65,7 @@ pub enum LoginUserError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `logout_user` +/// struct for typed errors of method [`logout_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum LogoutUserError { @@ -73,7 +73,7 @@ pub enum LogoutUserError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `update_user` +/// struct for typed errors of method [`update_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum UpdateUserError { From 476a82cb75781fcdf9b23f9b34208b56ef17d676 Mon Sep 17 00:00:00 2001 From: Yoann Ricordel Date: Thu, 23 Sep 2021 19:13:22 +0200 Subject: [PATCH 07/50] [bash] Force Content-Length: 0 on empty posts (#10462) In the case where we are making empty posts, use -d '' to force curl to set the Content-Length header to 0. Some backends (among which Microsoft Kestrel) are sensitive about POST without a Content-Length set. --- .../src/main/resources/bash/client.mustache | 4 +- samples/client/petstore/bash/petstore-cli | 76 +++++++++---------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/bash/client.mustache b/modules/openapi-generator/src/main/resources/bash/client.mustache index 8ed8c31663d..8d18a78f13e 100644 --- a/modules/openapi-generator/src/main/resources/bash/client.mustache +++ b/modules/openapi-generator/src/main/resources/bash/client.mustache @@ -842,9 +842,9 @@ call_{{operationId}}() { {{/hasBodyParam}} {{^hasBodyParam}} if [[ "$print_curl" = true ]]; then - echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + echo "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" else - eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + eval "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" fi {{/hasBodyParam}} } diff --git a/samples/client/petstore/bash/petstore-cli b/samples/client/petstore/bash/petstore-cli index 2eafd08b250..d72c7fdabe5 100755 --- a/samples/client/petstore/bash/petstore-cli +++ b/samples/client/petstore/bash/petstore-cli @@ -2287,9 +2287,9 @@ call_testEndpointParameters() { basic_auth_option="-u ${basic_auth_credential}" fi if [[ "$print_curl" = true ]]; then - echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + echo "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" else - eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + eval "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" fi } @@ -2323,9 +2323,9 @@ call_testEnumParameters() { basic_auth_option="-u ${basic_auth_credential}" fi if [[ "$print_curl" = true ]]; then - echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + echo "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" else - eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + eval "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" fi } @@ -2359,9 +2359,9 @@ call_testGroupParameters() { basic_auth_option="-u ${basic_auth_credential}" fi if [[ "$print_curl" = true ]]; then - echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + echo "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" else - eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + eval "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" fi } @@ -2473,9 +2473,9 @@ call_testJsonFormData() { basic_auth_option="-u ${basic_auth_credential}" fi if [[ "$print_curl" = true ]]; then - echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + echo "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" else - eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + eval "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" fi } @@ -2509,9 +2509,9 @@ call_testQueryParameterCollectionFormat() { basic_auth_option="-u ${basic_auth_credential}" fi if [[ "$print_curl" = true ]]; then - echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + echo "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" else - eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + eval "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" fi } @@ -2699,9 +2699,9 @@ call_deletePet() { basic_auth_option="-u ${basic_auth_credential}" fi if [[ "$print_curl" = true ]]; then - echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + echo "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" else - eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + eval "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" fi } @@ -2735,9 +2735,9 @@ call_findPetsByStatus() { basic_auth_option="-u ${basic_auth_credential}" fi if [[ "$print_curl" = true ]]; then - echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + echo "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" else - eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + eval "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" fi } @@ -2771,9 +2771,9 @@ call_findPetsByTags() { basic_auth_option="-u ${basic_auth_credential}" fi if [[ "$print_curl" = true ]]; then - echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + echo "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" else - eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + eval "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" fi } @@ -2807,9 +2807,9 @@ call_getPetById() { basic_auth_option="-u ${basic_auth_credential}" fi if [[ "$print_curl" = true ]]; then - echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + echo "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" else - eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + eval "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" fi } @@ -2919,9 +2919,9 @@ call_updatePetWithForm() { basic_auth_option="-u ${basic_auth_credential}" fi if [[ "$print_curl" = true ]]; then - echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + echo "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" else - eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + eval "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" fi } @@ -2955,9 +2955,9 @@ call_uploadFile() { basic_auth_option="-u ${basic_auth_credential}" fi if [[ "$print_curl" = true ]]; then - echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + echo "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" else - eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + eval "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" fi } @@ -2991,9 +2991,9 @@ call_uploadFileWithRequiredFile() { basic_auth_option="-u ${basic_auth_credential}" fi if [[ "$print_curl" = true ]]; then - echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + echo "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" else - eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + eval "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" fi } @@ -3027,9 +3027,9 @@ call_deleteOrder() { basic_auth_option="-u ${basic_auth_credential}" fi if [[ "$print_curl" = true ]]; then - echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + echo "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" else - eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + eval "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" fi } @@ -3063,9 +3063,9 @@ call_getInventory() { basic_auth_option="-u ${basic_auth_credential}" fi if [[ "$print_curl" = true ]]; then - echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + echo "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" else - eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + eval "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" fi } @@ -3099,9 +3099,9 @@ call_getOrderById() { basic_auth_option="-u ${basic_auth_credential}" fi if [[ "$print_curl" = true ]]; then - echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + echo "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" else - eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + eval "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" fi } @@ -3411,9 +3411,9 @@ call_deleteUser() { basic_auth_option="-u ${basic_auth_credential}" fi if [[ "$print_curl" = true ]]; then - echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + echo "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" else - eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + eval "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" fi } @@ -3447,9 +3447,9 @@ call_getUserByName() { basic_auth_option="-u ${basic_auth_credential}" fi if [[ "$print_curl" = true ]]; then - echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + echo "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" else - eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + eval "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" fi } @@ -3483,9 +3483,9 @@ call_loginUser() { basic_auth_option="-u ${basic_auth_credential}" fi if [[ "$print_curl" = true ]]; then - echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + echo "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" else - eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + eval "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" fi } @@ -3519,9 +3519,9 @@ call_logoutUser() { basic_auth_option="-u ${basic_auth_credential}" fi if [[ "$print_curl" = true ]]; then - echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + echo "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" else - eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" + eval "curl -d '' ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\"" fi } From be3bd2e6c7fa110007e354200b5f3bbbe4be507f Mon Sep 17 00:00:00 2001 From: Bodo Graumann Date: Fri, 24 Sep 2021 23:53:37 +0200 Subject: [PATCH 08/50] [Typescript] Improve exception for unknown responses (#10361) * Clean up tests * Change pets to async-await * Use different pets for each test * Workaround multiple petstore server instances * Add test for unknown error response code * Remove call duplication Running the petstore server locally fixes all issues. * Make body of unexpected error responses available * Regenerate all consolidated typescript samples * Remove json heuristic for unknown error responses --- .../resources/typescript/api/api.mustache | 7 +- .../typescript/api/exception.mustache | 4 +- .../resources/typescript/http/http.mustache | 16 + .../composed-schemas/apis/DefaultApi.ts | 9 +- .../builds/composed-schemas/apis/exception.ts | 4 +- .../builds/composed-schemas/http/http.ts | 16 + .../typescript/builds/default/apis/PetApi.ts | 44 +- .../builds/default/apis/StoreApi.ts | 22 +- .../typescript/builds/default/apis/UserApi.ts | 46 +- .../builds/default/apis/exception.ts | 4 +- .../typescript/builds/default/http/http.ts | 16 + .../typescript/builds/deno/apis/PetApi.ts | 44 +- .../typescript/builds/deno/apis/StoreApi.ts | 22 +- .../typescript/builds/deno/apis/UserApi.ts | 46 +- .../typescript/builds/deno/apis/exception.ts | 4 +- .../typescript/builds/deno/http/http.ts | 16 + .../builds/inversify/apis/PetApi.ts | 44 +- .../builds/inversify/apis/StoreApi.ts | 22 +- .../builds/inversify/apis/UserApi.ts | 46 +- .../builds/inversify/apis/exception.ts | 4 +- .../typescript/builds/inversify/http/http.ts | 16 + .../typescript/builds/jquery/apis/PetApi.ts | 44 +- .../typescript/builds/jquery/apis/StoreApi.ts | 22 +- .../typescript/builds/jquery/apis/UserApi.ts | 46 +- .../builds/jquery/apis/exception.ts | 4 +- .../typescript/builds/jquery/http/http.ts | 16 + .../builds/object_params/apis/PetApi.ts | 44 +- .../builds/object_params/apis/StoreApi.ts | 22 +- .../builds/object_params/apis/UserApi.ts | 46 +- .../builds/object_params/apis/exception.ts | 4 +- .../builds/object_params/http/http.ts | 16 + .../tests/default/package-lock.json | 2055 ++++++++++++++++- .../tests/default/test/api/PetApi.test.ts | 184 +- 33 files changed, 2465 insertions(+), 490 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache index 9fa8f1de585..1252a5451e6 100644 --- a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache @@ -200,7 +200,7 @@ export class {{classname}}ResponseProcessor { return body; {{/is2xx}} {{^is2xx}} - throw new ApiException<{{{dataType}}}>({{code}}, body); + throw new ApiException<{{{dataType}}}>({{code}}, "{{message}}", body); {{/is2xx}} {{/dataType}} {{^dataType}} @@ -208,7 +208,7 @@ export class {{classname}}ResponseProcessor { return; {{/is2xx}} {{^is2xx}} - throw new ApiException(response.httpStatusCode, "{{message}}"); + throw new ApiException(response.httpStatusCode, "{{message}}", undefined); {{/is2xx}} {{/dataType}} } @@ -233,8 +233,7 @@ export class {{classname}}ResponseProcessor { {{/returnType}} } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } {{/operation}} diff --git a/modules/openapi-generator/src/main/resources/typescript/api/exception.mustache b/modules/openapi-generator/src/main/resources/typescript/api/exception.mustache index ca5a926c596..aa91d14ebb8 100644 --- a/modules/openapi-generator/src/main/resources/typescript/api/exception.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/api/exception.mustache @@ -8,7 +8,7 @@ * */ export class ApiException extends Error { - public constructor(public code: number, public body: T) { - super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body)) + public constructor(public code: number, message: string, public body: T) { + super("HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body)) } } diff --git a/modules/openapi-generator/src/main/resources/typescript/http/http.mustache b/modules/openapi-generator/src/main/resources/typescript/http/http.mustache index fc485a7fec8..2f71d86109f 100644 --- a/modules/openapi-generator/src/main/resources/typescript/http/http.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/http/http.mustache @@ -287,6 +287,22 @@ export class ResponseContext { {{/node}} {{/platforms}} } + + /** + * Use a heuristic to get a body of unknown data structure. + * Return as string if possible, otherwise as binary. + */ + public getBodyAsAny(): Promise { + try { + return this.body.text(); + } catch {} + + try { + return this.body.binary(); + } catch {} + + return Promise.resolve(undefined); + } } export interface HttpLibrary { diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts index 0e394cc4791..0f8397d59a4 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts @@ -134,8 +134,7 @@ export class DefaultApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -160,8 +159,7 @@ export class DefaultApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -186,8 +184,7 @@ export class DefaultApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/exception.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/exception.ts index ca5a926c596..aa91d14ebb8 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/exception.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/exception.ts @@ -8,7 +8,7 @@ * */ export class ApiException extends Error { - public constructor(public code: number, public body: T) { - super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body)) + public constructor(public code: number, message: string, public body: T) { + super("HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body)) } } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/http/http.ts index 79a4889b958..f19e206b19f 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/http/http.ts @@ -201,6 +201,22 @@ export class ResponseContext { }); } } + + /** + * Use a heuristic to get a body of unknown data structure. + * Return as string if possible, otherwise as binary. + */ + public getBodyAsAny(): Promise { + try { + return this.body.text(); + } catch {} + + try { + return this.body.binary(); + } catch {} + + return Promise.resolve(undefined); + } } export interface HttpLibrary { diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts index adea9e4a0ee..469e0d17426 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts @@ -402,7 +402,7 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("405", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid input"); + throw new ApiException(response.httpStatusCode, "Invalid input", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -414,8 +414,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -428,7 +427,7 @@ export class PetApiResponseProcessor { public async deletePet(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid pet value"); + throw new ApiException(response.httpStatusCode, "Invalid pet value", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -436,8 +435,7 @@ export class PetApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -457,7 +455,7 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid status value"); + throw new ApiException(response.httpStatusCode, "Invalid status value", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -469,8 +467,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -490,7 +487,7 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid tag value"); + throw new ApiException(response.httpStatusCode, "Invalid tag value", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -502,8 +499,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -523,10 +519,10 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid ID supplied"); + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Pet not found"); + throw new ApiException(response.httpStatusCode, "Pet not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -538,8 +534,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -559,13 +554,13 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid ID supplied"); + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Pet not found"); + throw new ApiException(response.httpStatusCode, "Pet not found", undefined); } if (isCodeInRange("405", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Validation exception"); + throw new ApiException(response.httpStatusCode, "Validation exception", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -577,8 +572,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -591,7 +585,7 @@ export class PetApiResponseProcessor { public async updatePetWithForm(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("405", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid input"); + throw new ApiException(response.httpStatusCode, "Invalid input", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -599,8 +593,7 @@ export class PetApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -629,8 +622,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts index 5709bad523e..1a6d8de0c9b 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts @@ -145,10 +145,10 @@ export class StoreApiResponseProcessor { public async deleteOrder(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid ID supplied"); + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Order not found"); + throw new ApiException(response.httpStatusCode, "Order not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -156,8 +156,7 @@ export class StoreApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -186,8 +185,7 @@ export class StoreApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -207,10 +205,10 @@ export class StoreApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid ID supplied"); + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Order not found"); + throw new ApiException(response.httpStatusCode, "Order not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -222,8 +220,7 @@ export class StoreApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -243,7 +240,7 @@ export class StoreApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid Order"); + throw new ApiException(response.httpStatusCode, "Invalid Order", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -255,8 +252,7 @@ export class StoreApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts index 424c02a45a4..642cdaac90b 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts @@ -333,7 +333,7 @@ export class UserApiResponseProcessor { public async createUser(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("0", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "successful operation"); + throw new ApiException(response.httpStatusCode, "successful operation", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -341,8 +341,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -355,7 +354,7 @@ export class UserApiResponseProcessor { public async createUsersWithArrayInput(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("0", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "successful operation"); + throw new ApiException(response.httpStatusCode, "successful operation", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -363,8 +362,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -377,7 +375,7 @@ export class UserApiResponseProcessor { public async createUsersWithListInput(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("0", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "successful operation"); + throw new ApiException(response.httpStatusCode, "successful operation", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -385,8 +383,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -399,10 +396,10 @@ export class UserApiResponseProcessor { public async deleteUser(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid username supplied"); + throw new ApiException(response.httpStatusCode, "Invalid username supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "User not found"); + throw new ApiException(response.httpStatusCode, "User not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -410,8 +407,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -431,10 +427,10 @@ export class UserApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid username supplied"); + throw new ApiException(response.httpStatusCode, "Invalid username supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "User not found"); + throw new ApiException(response.httpStatusCode, "User not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -446,8 +442,7 @@ export class UserApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -467,7 +462,7 @@ export class UserApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid username/password supplied"); + throw new ApiException(response.httpStatusCode, "Invalid username/password supplied", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -479,8 +474,7 @@ export class UserApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -493,7 +487,7 @@ export class UserApiResponseProcessor { public async logoutUser(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("0", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "successful operation"); + throw new ApiException(response.httpStatusCode, "successful operation", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -501,8 +495,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -515,10 +508,10 @@ export class UserApiResponseProcessor { public async updateUser(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid user supplied"); + throw new ApiException(response.httpStatusCode, "Invalid user supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "User not found"); + throw new ApiException(response.httpStatusCode, "User not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -526,8 +519,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/exception.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/exception.ts index ca5a926c596..aa91d14ebb8 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/exception.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/exception.ts @@ -8,7 +8,7 @@ * */ export class ApiException extends Error { - public constructor(public code: number, public body: T) { - super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body)) + public constructor(public code: number, message: string, public body: T) { + super("HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body)) } } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts index 21195a4dc51..a623aef1278 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts @@ -187,6 +187,22 @@ export class ResponseContext { const fileName = this.getParsedHeader("content-disposition")["filename"] || ""; return { data, name: fileName }; } + + /** + * Use a heuristic to get a body of unknown data structure. + * Return as string if possible, otherwise as binary. + */ + public getBodyAsAny(): Promise { + try { + return this.body.text(); + } catch {} + + try { + return this.body.binary(); + } catch {} + + return Promise.resolve(undefined); + } } export interface HttpLibrary { diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts index 8107d865287..b9be2b7fede 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts @@ -400,7 +400,7 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("405", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid input"); + throw new ApiException(response.httpStatusCode, "Invalid input", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -412,8 +412,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -426,7 +425,7 @@ export class PetApiResponseProcessor { public async deletePet(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid pet value"); + throw new ApiException(response.httpStatusCode, "Invalid pet value", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -434,8 +433,7 @@ export class PetApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -455,7 +453,7 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid status value"); + throw new ApiException(response.httpStatusCode, "Invalid status value", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -467,8 +465,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -488,7 +485,7 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid tag value"); + throw new ApiException(response.httpStatusCode, "Invalid tag value", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -500,8 +497,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -521,10 +517,10 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid ID supplied"); + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Pet not found"); + throw new ApiException(response.httpStatusCode, "Pet not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -536,8 +532,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -557,13 +552,13 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid ID supplied"); + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Pet not found"); + throw new ApiException(response.httpStatusCode, "Pet not found", undefined); } if (isCodeInRange("405", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Validation exception"); + throw new ApiException(response.httpStatusCode, "Validation exception", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -575,8 +570,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -589,7 +583,7 @@ export class PetApiResponseProcessor { public async updatePetWithForm(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("405", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid input"); + throw new ApiException(response.httpStatusCode, "Invalid input", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -597,8 +591,7 @@ export class PetApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -627,8 +620,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts index b7b9eb284c3..d7c7b610935 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts @@ -143,10 +143,10 @@ export class StoreApiResponseProcessor { public async deleteOrder(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid ID supplied"); + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Order not found"); + throw new ApiException(response.httpStatusCode, "Order not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -154,8 +154,7 @@ export class StoreApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -184,8 +183,7 @@ export class StoreApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -205,10 +203,10 @@ export class StoreApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid ID supplied"); + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Order not found"); + throw new ApiException(response.httpStatusCode, "Order not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -220,8 +218,7 @@ export class StoreApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -241,7 +238,7 @@ export class StoreApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid Order"); + throw new ApiException(response.httpStatusCode, "Invalid Order", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -253,8 +250,7 @@ export class StoreApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts index 0eb20195ccb..6ec2dbe6597 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts @@ -331,7 +331,7 @@ export class UserApiResponseProcessor { public async createUser(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("0", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "successful operation"); + throw new ApiException(response.httpStatusCode, "successful operation", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -339,8 +339,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -353,7 +352,7 @@ export class UserApiResponseProcessor { public async createUsersWithArrayInput(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("0", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "successful operation"); + throw new ApiException(response.httpStatusCode, "successful operation", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -361,8 +360,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -375,7 +373,7 @@ export class UserApiResponseProcessor { public async createUsersWithListInput(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("0", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "successful operation"); + throw new ApiException(response.httpStatusCode, "successful operation", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -383,8 +381,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -397,10 +394,10 @@ export class UserApiResponseProcessor { public async deleteUser(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid username supplied"); + throw new ApiException(response.httpStatusCode, "Invalid username supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "User not found"); + throw new ApiException(response.httpStatusCode, "User not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -408,8 +405,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -429,10 +425,10 @@ export class UserApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid username supplied"); + throw new ApiException(response.httpStatusCode, "Invalid username supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "User not found"); + throw new ApiException(response.httpStatusCode, "User not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -444,8 +440,7 @@ export class UserApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -465,7 +460,7 @@ export class UserApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid username/password supplied"); + throw new ApiException(response.httpStatusCode, "Invalid username/password supplied", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -477,8 +472,7 @@ export class UserApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -491,7 +485,7 @@ export class UserApiResponseProcessor { public async logoutUser(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("0", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "successful operation"); + throw new ApiException(response.httpStatusCode, "successful operation", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -499,8 +493,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -513,10 +506,10 @@ export class UserApiResponseProcessor { public async updateUser(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid user supplied"); + throw new ApiException(response.httpStatusCode, "Invalid user supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "User not found"); + throw new ApiException(response.httpStatusCode, "User not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -524,8 +517,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/exception.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/exception.ts index ca5a926c596..aa91d14ebb8 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/exception.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/exception.ts @@ -8,7 +8,7 @@ * */ export class ApiException extends Error { - public constructor(public code: number, public body: T) { - super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body)) + public constructor(public code: number, message: string, public body: T) { + super("HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body)) } } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/deno/http/http.ts index a45d304d694..139149cec97 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/http/http.ts @@ -219,6 +219,22 @@ export class ResponseContext { }); } } + + /** + * Use a heuristic to get a body of unknown data structure. + * Return as string if possible, otherwise as binary. + */ + public getBodyAsAny(): Promise { + try { + return this.body.text(); + } catch {} + + try { + return this.body.binary(); + } catch {} + + return Promise.resolve(undefined); + } } export interface HttpLibrary { diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts index 46b1a2ab03e..3ed430e9c26 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts @@ -405,7 +405,7 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("405", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid input"); + throw new ApiException(response.httpStatusCode, "Invalid input", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -417,8 +417,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -431,7 +430,7 @@ export class PetApiResponseProcessor { public async deletePet(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid pet value"); + throw new ApiException(response.httpStatusCode, "Invalid pet value", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -439,8 +438,7 @@ export class PetApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -460,7 +458,7 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid status value"); + throw new ApiException(response.httpStatusCode, "Invalid status value", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -472,8 +470,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -493,7 +490,7 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid tag value"); + throw new ApiException(response.httpStatusCode, "Invalid tag value", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -505,8 +502,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -526,10 +522,10 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid ID supplied"); + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Pet not found"); + throw new ApiException(response.httpStatusCode, "Pet not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -541,8 +537,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -562,13 +557,13 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid ID supplied"); + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Pet not found"); + throw new ApiException(response.httpStatusCode, "Pet not found", undefined); } if (isCodeInRange("405", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Validation exception"); + throw new ApiException(response.httpStatusCode, "Validation exception", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -580,8 +575,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -594,7 +588,7 @@ export class PetApiResponseProcessor { public async updatePetWithForm(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("405", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid input"); + throw new ApiException(response.httpStatusCode, "Invalid input", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -602,8 +596,7 @@ export class PetApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -632,8 +625,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts index a90223b0a9e..23f1ea1b5d5 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts @@ -148,10 +148,10 @@ export class StoreApiResponseProcessor { public async deleteOrder(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid ID supplied"); + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Order not found"); + throw new ApiException(response.httpStatusCode, "Order not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -159,8 +159,7 @@ export class StoreApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -189,8 +188,7 @@ export class StoreApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -210,10 +208,10 @@ export class StoreApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid ID supplied"); + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Order not found"); + throw new ApiException(response.httpStatusCode, "Order not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -225,8 +223,7 @@ export class StoreApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -246,7 +243,7 @@ export class StoreApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid Order"); + throw new ApiException(response.httpStatusCode, "Invalid Order", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -258,8 +255,7 @@ export class StoreApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts index f8594e27cf6..dc625dfd3ae 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts @@ -336,7 +336,7 @@ export class UserApiResponseProcessor { public async createUser(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("0", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "successful operation"); + throw new ApiException(response.httpStatusCode, "successful operation", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -344,8 +344,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -358,7 +357,7 @@ export class UserApiResponseProcessor { public async createUsersWithArrayInput(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("0", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "successful operation"); + throw new ApiException(response.httpStatusCode, "successful operation", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -366,8 +365,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -380,7 +378,7 @@ export class UserApiResponseProcessor { public async createUsersWithListInput(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("0", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "successful operation"); + throw new ApiException(response.httpStatusCode, "successful operation", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -388,8 +386,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -402,10 +399,10 @@ export class UserApiResponseProcessor { public async deleteUser(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid username supplied"); + throw new ApiException(response.httpStatusCode, "Invalid username supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "User not found"); + throw new ApiException(response.httpStatusCode, "User not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -413,8 +410,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -434,10 +430,10 @@ export class UserApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid username supplied"); + throw new ApiException(response.httpStatusCode, "Invalid username supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "User not found"); + throw new ApiException(response.httpStatusCode, "User not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -449,8 +445,7 @@ export class UserApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -470,7 +465,7 @@ export class UserApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid username/password supplied"); + throw new ApiException(response.httpStatusCode, "Invalid username/password supplied", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -482,8 +477,7 @@ export class UserApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -496,7 +490,7 @@ export class UserApiResponseProcessor { public async logoutUser(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("0", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "successful operation"); + throw new ApiException(response.httpStatusCode, "successful operation", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -504,8 +498,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -518,10 +511,10 @@ export class UserApiResponseProcessor { public async updateUser(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid user supplied"); + throw new ApiException(response.httpStatusCode, "Invalid user supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "User not found"); + throw new ApiException(response.httpStatusCode, "User not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -529,8 +522,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/exception.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/exception.ts index ca5a926c596..aa91d14ebb8 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/exception.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/exception.ts @@ -8,7 +8,7 @@ * */ export class ApiException extends Error { - public constructor(public code: number, public body: T) { - super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body)) + public constructor(public code: number, message: string, public body: T) { + super("HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body)) } } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts index 21195a4dc51..a623aef1278 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts @@ -187,6 +187,22 @@ export class ResponseContext { const fileName = this.getParsedHeader("content-disposition")["filename"] || ""; return { data, name: fileName }; } + + /** + * Use a heuristic to get a body of unknown data structure. + * Return as string if possible, otherwise as binary. + */ + public getBodyAsAny(): Promise { + try { + return this.body.text(); + } catch {} + + try { + return this.body.binary(); + } catch {} + + return Promise.resolve(undefined); + } } export interface HttpLibrary { diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts index 9d9c00153c4..8d427ab3ec6 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts @@ -400,7 +400,7 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("405", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid input"); + throw new ApiException(response.httpStatusCode, "Invalid input", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -412,8 +412,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -426,7 +425,7 @@ export class PetApiResponseProcessor { public async deletePet(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid pet value"); + throw new ApiException(response.httpStatusCode, "Invalid pet value", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -434,8 +433,7 @@ export class PetApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -455,7 +453,7 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid status value"); + throw new ApiException(response.httpStatusCode, "Invalid status value", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -467,8 +465,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -488,7 +485,7 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid tag value"); + throw new ApiException(response.httpStatusCode, "Invalid tag value", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -500,8 +497,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -521,10 +517,10 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid ID supplied"); + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Pet not found"); + throw new ApiException(response.httpStatusCode, "Pet not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -536,8 +532,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -557,13 +552,13 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid ID supplied"); + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Pet not found"); + throw new ApiException(response.httpStatusCode, "Pet not found", undefined); } if (isCodeInRange("405", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Validation exception"); + throw new ApiException(response.httpStatusCode, "Validation exception", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -575,8 +570,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -589,7 +583,7 @@ export class PetApiResponseProcessor { public async updatePetWithForm(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("405", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid input"); + throw new ApiException(response.httpStatusCode, "Invalid input", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -597,8 +591,7 @@ export class PetApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -627,8 +620,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts index 0c887d5b8f4..4bb51211dce 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts @@ -143,10 +143,10 @@ export class StoreApiResponseProcessor { public async deleteOrder(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid ID supplied"); + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Order not found"); + throw new ApiException(response.httpStatusCode, "Order not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -154,8 +154,7 @@ export class StoreApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -184,8 +183,7 @@ export class StoreApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -205,10 +203,10 @@ export class StoreApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid ID supplied"); + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Order not found"); + throw new ApiException(response.httpStatusCode, "Order not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -220,8 +218,7 @@ export class StoreApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -241,7 +238,7 @@ export class StoreApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid Order"); + throw new ApiException(response.httpStatusCode, "Invalid Order", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -253,8 +250,7 @@ export class StoreApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts index 1e6fb2ce5d0..845757f5e83 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts @@ -331,7 +331,7 @@ export class UserApiResponseProcessor { public async createUser(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("0", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "successful operation"); + throw new ApiException(response.httpStatusCode, "successful operation", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -339,8 +339,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -353,7 +352,7 @@ export class UserApiResponseProcessor { public async createUsersWithArrayInput(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("0", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "successful operation"); + throw new ApiException(response.httpStatusCode, "successful operation", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -361,8 +360,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -375,7 +373,7 @@ export class UserApiResponseProcessor { public async createUsersWithListInput(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("0", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "successful operation"); + throw new ApiException(response.httpStatusCode, "successful operation", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -383,8 +381,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -397,10 +394,10 @@ export class UserApiResponseProcessor { public async deleteUser(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid username supplied"); + throw new ApiException(response.httpStatusCode, "Invalid username supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "User not found"); + throw new ApiException(response.httpStatusCode, "User not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -408,8 +405,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -429,10 +425,10 @@ export class UserApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid username supplied"); + throw new ApiException(response.httpStatusCode, "Invalid username supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "User not found"); + throw new ApiException(response.httpStatusCode, "User not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -444,8 +440,7 @@ export class UserApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -465,7 +460,7 @@ export class UserApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid username/password supplied"); + throw new ApiException(response.httpStatusCode, "Invalid username/password supplied", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -477,8 +472,7 @@ export class UserApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -491,7 +485,7 @@ export class UserApiResponseProcessor { public async logoutUser(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("0", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "successful operation"); + throw new ApiException(response.httpStatusCode, "successful operation", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -499,8 +493,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -513,10 +506,10 @@ export class UserApiResponseProcessor { public async updateUser(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid user supplied"); + throw new ApiException(response.httpStatusCode, "Invalid user supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "User not found"); + throw new ApiException(response.httpStatusCode, "User not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -524,8 +517,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/exception.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/exception.ts index ca5a926c596..aa91d14ebb8 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/exception.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/exception.ts @@ -8,7 +8,7 @@ * */ export class ApiException extends Error { - public constructor(public code: number, public body: T) { - super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body)) + public constructor(public code: number, message: string, public body: T) { + super("HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body)) } } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/http/http.ts index 242e1a72a5a..4b9ef54beeb 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/http/http.ts @@ -201,6 +201,22 @@ export class ResponseContext { }); } } + + /** + * Use a heuristic to get a body of unknown data structure. + * Return as string if possible, otherwise as binary. + */ + public getBodyAsAny(): Promise { + try { + return this.body.text(); + } catch {} + + try { + return this.body.binary(); + } catch {} + + return Promise.resolve(undefined); + } } export interface HttpLibrary { diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts index adea9e4a0ee..469e0d17426 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts @@ -402,7 +402,7 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("405", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid input"); + throw new ApiException(response.httpStatusCode, "Invalid input", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -414,8 +414,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -428,7 +427,7 @@ export class PetApiResponseProcessor { public async deletePet(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid pet value"); + throw new ApiException(response.httpStatusCode, "Invalid pet value", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -436,8 +435,7 @@ export class PetApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -457,7 +455,7 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid status value"); + throw new ApiException(response.httpStatusCode, "Invalid status value", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -469,8 +467,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -490,7 +487,7 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid tag value"); + throw new ApiException(response.httpStatusCode, "Invalid tag value", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -502,8 +499,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -523,10 +519,10 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid ID supplied"); + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Pet not found"); + throw new ApiException(response.httpStatusCode, "Pet not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -538,8 +534,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -559,13 +554,13 @@ export class PetApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid ID supplied"); + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Pet not found"); + throw new ApiException(response.httpStatusCode, "Pet not found", undefined); } if (isCodeInRange("405", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Validation exception"); + throw new ApiException(response.httpStatusCode, "Validation exception", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -577,8 +572,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -591,7 +585,7 @@ export class PetApiResponseProcessor { public async updatePetWithForm(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("405", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid input"); + throw new ApiException(response.httpStatusCode, "Invalid input", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -599,8 +593,7 @@ export class PetApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -629,8 +622,7 @@ export class PetApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts index 5709bad523e..1a6d8de0c9b 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts @@ -145,10 +145,10 @@ export class StoreApiResponseProcessor { public async deleteOrder(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid ID supplied"); + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Order not found"); + throw new ApiException(response.httpStatusCode, "Order not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -156,8 +156,7 @@ export class StoreApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -186,8 +185,7 @@ export class StoreApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -207,10 +205,10 @@ export class StoreApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid ID supplied"); + throw new ApiException(response.httpStatusCode, "Invalid ID supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Order not found"); + throw new ApiException(response.httpStatusCode, "Order not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -222,8 +220,7 @@ export class StoreApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -243,7 +240,7 @@ export class StoreApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid Order"); + throw new ApiException(response.httpStatusCode, "Invalid Order", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -255,8 +252,7 @@ export class StoreApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts index 424c02a45a4..642cdaac90b 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts @@ -333,7 +333,7 @@ export class UserApiResponseProcessor { public async createUser(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("0", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "successful operation"); + throw new ApiException(response.httpStatusCode, "successful operation", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -341,8 +341,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -355,7 +354,7 @@ export class UserApiResponseProcessor { public async createUsersWithArrayInput(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("0", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "successful operation"); + throw new ApiException(response.httpStatusCode, "successful operation", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -363,8 +362,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -377,7 +375,7 @@ export class UserApiResponseProcessor { public async createUsersWithListInput(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("0", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "successful operation"); + throw new ApiException(response.httpStatusCode, "successful operation", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -385,8 +383,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -399,10 +396,10 @@ export class UserApiResponseProcessor { public async deleteUser(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid username supplied"); + throw new ApiException(response.httpStatusCode, "Invalid username supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "User not found"); + throw new ApiException(response.httpStatusCode, "User not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -410,8 +407,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -431,10 +427,10 @@ export class UserApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid username supplied"); + throw new ApiException(response.httpStatusCode, "Invalid username supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "User not found"); + throw new ApiException(response.httpStatusCode, "User not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -446,8 +442,7 @@ export class UserApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -467,7 +462,7 @@ export class UserApiResponseProcessor { return body; } if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid username/password supplied"); + throw new ApiException(response.httpStatusCode, "Invalid username/password supplied", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -479,8 +474,7 @@ export class UserApiResponseProcessor { return body; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -493,7 +487,7 @@ export class UserApiResponseProcessor { public async logoutUser(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("0", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "successful operation"); + throw new ApiException(response.httpStatusCode, "successful operation", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -501,8 +495,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } /** @@ -515,10 +508,10 @@ export class UserApiResponseProcessor { public async updateUser(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("400", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "Invalid user supplied"); + throw new ApiException(response.httpStatusCode, "Invalid user supplied", undefined); } if (isCodeInRange("404", response.httpStatusCode)) { - throw new ApiException(response.httpStatusCode, "User not found"); + throw new ApiException(response.httpStatusCode, "User not found", undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -526,8 +519,7 @@ export class UserApiResponseProcessor { return; } - let body = response.body || ""; - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny()); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/exception.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/exception.ts index ca5a926c596..aa91d14ebb8 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/exception.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/exception.ts @@ -8,7 +8,7 @@ * */ export class ApiException extends Error { - public constructor(public code: number, public body: T) { - super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body)) + public constructor(public code: number, message: string, public body: T) { + super("HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body)) } } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts index 21195a4dc51..a623aef1278 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts @@ -187,6 +187,22 @@ export class ResponseContext { const fileName = this.getParsedHeader("content-disposition")["filename"] || ""; return { data, name: fileName }; } + + /** + * Use a heuristic to get a body of unknown data structure. + * Return as string if possible, otherwise as binary. + */ + public getBodyAsAny(): Promise { + try { + return this.body.text(); + } catch {} + + try { + return this.body.binary(); + } catch {} + + return Promise.resolve(undefined); + } } export interface HttpLibrary { diff --git a/samples/openapi3/client/petstore/typescript/tests/default/package-lock.json b/samples/openapi3/client/petstore/typescript/tests/default/package-lock.json index 9baade4dc28..b50025343dc 100644 --- a/samples/openapi3/client/petstore/typescript/tests/default/package-lock.json +++ b/samples/openapi3/client/petstore/typescript/tests/default/package-lock.json @@ -1,8 +1,2017 @@ { "name": "typescript-test", "version": "1.0.0", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "typescript-test", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@types/rewire": "^2.5.28", + "form-data": "^2.5.0", + "rewire": "^4.0.1", + "ts-node": "^3.3.0", + "ts-petstore-client": "file:../../builds/default" + }, + "devDependencies": { + "@types/chai": "^4.0.1", + "@types/isomorphic-fetch": "0.0.34", + "@types/mocha": "^2.2.41", + "@types/node": "^8.10.38", + "chai": "^4.1.0", + "mocha": "^5.2.0", + "ts-loader": "^2.3.0", + "typescript": "^2.4.1" + } + }, + "../../builds/default": { + "name": "ts-petstore-client", + "version": "1.0.0", + "license": "Unlicense", + "dependencies": { + "@types/node": "*", + "@types/node-fetch": "^2.5.7", + "btoa": "^1.2.1", + "es6-promise": "^4.2.4", + "form-data": "^2.5.0", + "node-fetch": "^2.6.0", + "url-parse": "^1.4.3" + }, + "devDependencies": { + "typescript": "^3.9.3" + } + }, + "../../builds/default/node_modules/@types/node": { + "version": "12.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.7.tgz", + "integrity": "sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w==", + "license": "MIT" + }, + "../../builds/default/node_modules/@types/node-fetch": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.7.tgz", + "integrity": "sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw==", + "license": "MIT", + "dependencies": { + "@types/node": "*", + "form-data": "^3.0.0" + } + }, + "../../builds/default/node_modules/@types/node-fetch/node_modules/form-data": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", + "integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "../../builds/default/node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "license": "MIT" + }, + "../../builds/default/node_modules/btoa": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz", + "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==", + "license": "(MIT OR Apache-2.0)", + "bin": { + "btoa": "bin/btoa.js" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "../../builds/default/node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "../../builds/default/node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "../../builds/default/node_modules/es6-promise": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.5.tgz", + "integrity": "sha512-n6wvpdE43VFtJq+lUDYDBFUwV8TZbuGXLV4D6wKafg13ldznKsyEvatubnmUe31zcvelSzOHF+XbaT+Bl9ObDg==", + "license": "MIT" + }, + "../../builds/default/node_modules/form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "../../builds/default/node_modules/mime-db": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", + "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "../../builds/default/node_modules/mime-types": { + "version": "2.1.24", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", + "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "license": "MIT", + "dependencies": { + "mime-db": "1.40.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "../../builds/default/node_modules/node-fetch": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==", + "license": "MIT", + "engines": { + "node": "4.x || >=6.0.0" + } + }, + "../../builds/default/node_modules/querystringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.0.tgz", + "integrity": "sha512-sluvZZ1YiTLD5jsqZcDmFyV2EwToyXZBfpoVOmktMmW+VEnhgakFHnasVph65fOjGPTWN0Nw3+XQaSeMayr0kg==", + "license": "MIT" + }, + "../../builds/default/node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "license": "MIT" + }, + "../../builds/default/node_modules/typescript": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", + "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "../../builds/default/node_modules/url-parse": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.3.tgz", + "integrity": "sha512-rh+KuAW36YKo0vClhQzLLveoj8FwPJNu65xLb7Mrt+eZht0IPT0IXgSv8gcMegZ6NvjJUALf6Mf25POlMwD1Fw==", + "license": "MIT", + "dependencies": { + "querystringify": "^2.0.0", + "requires-port": "^1.0.0" + } + }, + "node_modules/@types/chai": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.1.6.tgz", + "integrity": "sha512-CBk7KTZt3FhPsEkYioG6kuCIpWISw+YI8o+3op4+NXwTpvAPxE1ES8+PY8zfaK2L98b1z5oq03UHa4VYpeUxnw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/isomorphic-fetch": { + "version": "0.0.34", + "resolved": "https://registry.npmjs.org/@types/isomorphic-fetch/-/isomorphic-fetch-0.0.34.tgz", + "integrity": "sha1-PDSD5gbAQTeEOOlRRk8A5OYHBtY=", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/mocha": { + "version": "2.2.48", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.48.tgz", + "integrity": "sha512-nlK/iyETgafGli8Zh9zJVCTicvU3iajSkRwOh3Hhiva598CMqNJ4NcVCGMTGKpGpTYj/9R8RLzS9NAykSSCqGw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "8.10.38", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.38.tgz", + "integrity": "sha512-EibsnbJerd0hBFaDjJStFrVbVBAtOy4dgL8zZFw0uOvPqzBAX59Ci8cgjg3+RgJIWhsB5A4c+pi+D4P9tQQh/A==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/rewire": { + "version": "2.5.28", + "resolved": "https://registry.npmjs.org/@types/rewire/-/rewire-2.5.28.tgz", + "integrity": "sha512-uD0j/AQOa5le7afuK+u+woi8jNKF1vf3DN0H7LCJhft/lNNibUr7VcAesdgtWfEKveZol3ZG1CJqwx2Bhrnl8w==", + "license": "MIT" + }, + "node_modules/acorn": { + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "3.0.1", + "resolved": "http://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "license": "MIT", + "dependencies": { + "acorn": "^3.0.4" + } + }, + "node_modules/acorn-jsx/node_modules/acorn": { + "version": "3.3.0", + "resolved": "http://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "license": "MIT", + "dependencies": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "node_modules/ajv-keywords": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", + "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", + "license": "MIT", + "peerDependencies": { + "ajv": "^5.0.0" + } + }, + "node_modules/ansi-escapes": { + "version": "3.1.0", + "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "license": "MIT" + }, + "node_modules/babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "license": "MIT", + "dependencies": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + } + }, + "node_modules/babel-code-frame/node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-code-frame/node_modules/chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "license": "MIT", + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-code-frame/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-code-frame/node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "license": "MIT" + }, + "node_modules/big.js": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true, + "license": "ISC" + }, + "node_modules/buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "license": "MIT" + }, + "node_modules/caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "license": "MIT", + "dependencies": { + "callsites": "^0.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/callsites": { + "version": "0.2.0", + "resolved": "http://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/chai": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", + "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", + "dev": true, + "license": "MIT", + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.0", + "type-detect": "^4.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "license": "MIT" + }, + "node_modules/check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "license": "MIT" + }, + "node_modules/cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "license": "MIT", + "dependencies": { + "restore-cursor": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "license": "ISC" + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "license": "MIT", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "2.15.1", + "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "license": "MIT" + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "engines": [ + "node >= 0.8" + ], + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "license": "MIT", + "dependencies": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "node_modules/debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "license": "MIT (https://github.com/thlorenz/deep-is/blob/master/LICENSE)" + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/enhanced-resolve": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz", + "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "object-assign": "^4.0.1", + "tapable": "^0.2.7" + }, + "engines": { + "node": ">=4.3.0 <5.0.0 || >=5.10" + } + }, + "node_modules/errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "dev": true, + "license": "MIT", + "dependencies": { + "prr": "~1.0.1" + }, + "bin": { + "errno": "cli.js" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint": { + "version": "4.19.1", + "resolved": "http://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz", + "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", + "license": "MIT", + "dependencies": { + "ajv": "^5.3.0", + "babel-code-frame": "^6.22.0", + "chalk": "^2.1.0", + "concat-stream": "^1.6.0", + "cross-spawn": "^5.1.0", + "debug": "^3.1.0", + "doctrine": "^2.1.0", + "eslint-scope": "^3.7.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^3.5.4", + "esquery": "^1.0.0", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.0.1", + "ignore": "^3.3.3", + "imurmurhash": "^0.1.4", + "inquirer": "^3.0.6", + "is-resolvable": "^1.0.0", + "js-yaml": "^3.9.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.4", + "minimatch": "^3.0.2", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "pluralize": "^7.0.0", + "progress": "^2.0.0", + "regexpp": "^1.0.1", + "require-uncached": "^1.0.3", + "semver": "^5.3.0", + "strip-ansi": "^4.0.0", + "strip-json-comments": "~2.0.1", + "table": "4.0.2", + "text-table": "~0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-scope": { + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.3.tgz", + "integrity": "sha512-W+B0SvF4gamyCTmUc+uITPY0989iXVfKvhwtmJocTaYoc/3khEHmEmvfY/Gn9HA9VV75jrQECsHizkNw1b68FA==", + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=4" + } + }, + "node_modules/espree": { + "version": "3.5.4", + "resolved": "http://registry.npmjs.org/espree/-/espree-3.5.4.tgz", + "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^5.5.0", + "acorn-jsx": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^4.0.0" + }, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^4.1.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/external-editor": { + "version": "2.2.0", + "resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "license": "MIT", + "dependencies": { + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/fast-deep-equal": { + "version": "1.1.0", + "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "license": "MIT" + }, + "node_modules/figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "license": "MIT", + "dependencies": { + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/flat-cache": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.4.tgz", + "integrity": "sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==", + "license": "MIT", + "dependencies": { + "circular-json": "^0.3.1", + "graceful-fs": "^4.1.2", + "rimraf": "~2.6.2", + "write": "^0.2.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "license": "ISC" + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "license": "MIT" + }, + "node_modules/get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/globals": { + "version": "11.9.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.9.0.tgz", + "integrity": "sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "license": "ISC", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.x" + } + }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, + "node_modules/homedir-polyfill": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", + "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "license": "MIT", + "dependencies": { + "parse-passwd": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "license": "MIT" + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "license": "ISC" + }, + "node_modules/inquirer": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", + "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "license": "MIT", + "dependencies": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.0.4", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rx-lite": "^4.0.8", + "rx-lite-aggregates": "^4.0.8", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "license": "MIT" + }, + "node_modules/is-resolvable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "license": "ISC" + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "license": "ISC" + }, + "node_modules/js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "license": "MIT" + }, + "node_modules/json5": { + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "license": "MIT", + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/loader-utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "dev": true, + "license": "MIT", + "dependencies": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "license": "ISC", + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "node_modules/make-error": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", + "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", + "license": "ISC" + }, + "node_modules/memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "license": "MIT", + "dependencies": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "node_modules/mime-db": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", + "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.24", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", + "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "license": "MIT", + "dependencies": { + "mime-db": "1.40.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "license": "MIT" + }, + "node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mocha": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", + "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "browser-stdout": "1.3.1", + "commander": "2.15.1", + "debug": "3.1.0", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.5", + "he": "1.1.1", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "supports-color": "5.4.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/mocha/node_modules/minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true, + "license": "MIT" + }, + "node_modules/mocha/node_modules/mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "0.0.8" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mocha/node_modules/supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "license": "MIT" + }, + "node_modules/mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "license": "ISC" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "license": "MIT" + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "license": "MIT", + "dependencies": { + "mimic-fn": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "license": "MIT", + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "license": "(WTFPL OR MIT)" + }, + "node_modules/pathval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/pluralize": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "license": "MIT" + }, + "node_modules/progress": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.1.tgz", + "integrity": "sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true, + "license": "MIT" + }, + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "license": "ISC" + }, + "node_modules/readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/regexpp": { + "version": "1.1.0", + "resolved": "http://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", + "integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==", + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/require-uncached": { + "version": "1.0.3", + "resolved": "http://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "license": "MIT", + "dependencies": { + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "license": "MIT", + "dependencies": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/rewire": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/rewire/-/rewire-4.0.1.tgz", + "integrity": "sha512-+7RQ/BYwTieHVXetpKhT11UbfF6v1kGhKFrtZN7UDL2PybMsSt/rpLWeEUGF5Ndsl1D5BxiCB14VDJyoX+noYw==", + "license": "MIT", + "dependencies": { + "eslint": "^4.19.1" + } + }, + "node_modules/rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "license": "ISC", + "dependencies": { + "glob": "^7.0.5" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "license": "MIT", + "dependencies": { + "is-promise": "^2.1.0" + }, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/rx-lite": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=" + }, + "node_modules/rx-lite-aggregates": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", + "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "dependencies": { + "rx-lite": "*" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "license": "MIT", + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "license": "ISC" + }, + "node_modules/slice-ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "license": "MIT", + "dependencies": { + "is-fullwidth-code-point": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "license": "MIT", + "dependencies": { + "source-map": "^0.5.6" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "license": "BSD-3-Clause" + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "license": "MIT", + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "license": "MIT", + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-ansi/node_modules/ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/table": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", + "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", + "license": "BSD-3-Clause", + "dependencies": { + "ajv": "^5.2.3", + "ajv-keywords": "^2.1.0", + "chalk": "^2.1.0", + "lodash": "^4.17.4", + "slice-ansi": "1.0.0", + "string-width": "^2.1.1" + } + }, + "node_modules/tapable": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz", + "integrity": "sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI=", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "license": "MIT" + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "license": "MIT" + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/ts-loader": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-2.3.7.tgz", + "integrity": "sha512-8t3bu2FcEkXb+D4L+Cn8qiK2E2C6Ms4/GQChvz6IMbVurcFHLXrhW4EMtfaol1a1ASQACZGDUGit4NHnX9g7hQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^2.0.1", + "enhanced-resolve": "^3.0.0", + "loader-utils": "^1.0.2", + "semver": "^5.0.1" + }, + "engines": { + "node": ">=4.3.0 <5.0.0 || >=5.10" + } + }, + "node_modules/ts-node": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-3.3.0.tgz", + "integrity": "sha1-wTxqMCTjC+EYDdUwOPwgkonUv2k=", + "license": "MIT", + "dependencies": { + "arrify": "^1.0.0", + "chalk": "^2.0.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.0", + "tsconfig": "^6.0.0", + "v8flags": "^3.0.0", + "yn": "^2.0.0" + }, + "bin": { + "_ts-node": "dist/_bin.js", + "ts-node": "dist/bin.js" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/ts-petstore-client": { + "resolved": "../../builds/default", + "link": true + }, + "node_modules/tsconfig": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-6.0.0.tgz", + "integrity": "sha1-aw6DdgA9evGGT434+J3QBZ/80DI=", + "license": "MIT", + "dependencies": { + "strip-bom": "^3.0.0", + "strip-json-comments": "^2.0.0" + } + }, + "node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "license": "MIT", + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "license": "MIT" + }, + "node_modules/typescript": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", + "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "license": "MIT" + }, + "node_modules/v8flags": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.1.tgz", + "integrity": "sha512-iw/1ViSEaff8NJ3HLyEjawk/8hjJib3E7pvG4pddVXfUg1983s3VGsiClDjhK64MQVDGqc1Q8r18S4VKQZS9EQ==", + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "license": "MIT" + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "license": "ISC" + }, + "node_modules/write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "license": "MIT", + "dependencies": { + "mkdirp": "^0.5.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "license": "ISC" + }, + "node_modules/yn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", + "license": "MIT", + "engines": { + "node": ">=4" + } + } + }, "dependencies": { "@types/chai": { "version": "4.1.6", @@ -67,7 +2076,8 @@ "ajv-keywords": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", - "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=" + "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", + "requires": {} }, "ansi-escapes": { "version": "3.1.0", @@ -1104,6 +3114,14 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -1113,14 +3131,6 @@ "strip-ansi": "^4.0.0" } }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -1229,14 +3239,10 @@ "es6-promise": "^4.2.4", "form-data": "^2.5.0", "node-fetch": "^2.6.0", + "typescript": "^3.9.3", "url-parse": "^1.4.3" }, "dependencies": { - "@types/isomorphic-fetch": { - "version": "0.0.34", - "resolved": "https://registry.npmjs.org/@types/isomorphic-fetch/-/isomorphic-fetch-0.0.34.tgz", - "integrity": "sha1-PDSD5gbAQTeEOOlRRk8A5OYHBtY=" - }, "@types/node": { "version": "12.12.7", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.7.tgz", @@ -1301,14 +3307,6 @@ "mime-types": "^2.1.12" } }, - "isomorphic-fetch": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", - "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", - "requires": { - "whatwg-fetch": ">=0.10.0" - } - }, "mime-db": { "version": "1.40.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", @@ -1338,9 +3336,9 @@ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" }, "typescript": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", - "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==" + "version": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", + "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", + "dev": true }, "url-parse": { "version": "1.4.3", @@ -1350,11 +3348,6 @@ "querystringify": "^2.0.0", "requires-port": "^1.0.0" } - }, - "whatwg-fetch": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz", - "integrity": "sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==" } } }, diff --git a/samples/openapi3/client/petstore/typescript/tests/default/test/api/PetApi.test.ts b/samples/openapi3/client/petstore/typescript/tests/default/test/api/PetApi.test.ts index 35f118994ce..5372106656d 100644 --- a/samples/openapi3/client/petstore/typescript/tests/default/test/api/PetApi.test.ts +++ b/samples/openapi3/client/petstore/typescript/tests/default/test/api/PetApi.test.ts @@ -1,6 +1,6 @@ import * as petstore from 'ts-petstore-client' -import { expect, assert } from "chai"; +import { expect } from "chai"; import * as fs from 'fs'; const configuration = petstore.createConfiguration() @@ -10,122 +10,96 @@ const tag = new petstore.Tag(); tag.name = "tag1" tag.id = Math.floor(Math.random() * 100000) -const pet = new petstore.Pet() -pet.id = Math.floor(Math.random() * 100000) -pet.name = "PetName" -pet.photoUrls = [] -pet.status = 'available' -pet.tags = [ tag ] -pet.category = undefined +let pet: petstore.Pet; -describe("PetApi", () =>{ - it("addPet", (done) => { - petApi.addPet(pet).then(() => { - return petApi.getPetById(pet.id) - }).then((createdPet: petstore.Pet) => { - expect(createdPet).to.deep.equal(pet); - done() - }).catch((err: any) => { - done(err) - }) +describe("PetApi", () => { + beforeEach(async () => { + pet = new petstore.Pet() + pet.id = Math.floor(Math.random() * 100000) + pet.name = "PetName" + pet.photoUrls = [] + pet.status = 'available' + pet.tags = [ tag ] + pet.category = undefined + + await petApi.addPet(pet); + }); + + it("addPet", async () => { + const createdPet = await petApi.getPetById(pet.id) + expect(createdPet).to.deep.equal(pet); }) - it("deletePet", (done) => { - petApi.addPet(pet).then(() => { - return petApi.deletePet(pet.id) - }).then(() => { - return petApi.getPetById(pet.id) - }).then((pet: petstore.Pet) => { - done("Pet with id " + pet.id + " was not deleted!"); - }).catch((err: any) => { - if (err.code && err.code == 404) { - done(); - } else { - done(err) - } - }) + it("deletePet", async () => { + await petApi.deletePet(pet.id); + let deletedPet; + try { + deletedPet = await petApi.getPetById(pet.id) + } catch (err) { + expect(err.code).to.equal(404); + expect(err.message).to.include("Pet not found"); + return; + } + throw new Error("Pet with id " + deletedPet.id + " was not deleted!"); }) - it("findPetsByStatus", (done) => { - petApi.addPet(pet).then(() => { - return petApi.findPetsByStatus(["available"]) - }).then((pets: petstore.Pet[]) => { - expect(pets.length).to.be.at.least(1); - done(); - }).catch((err: any) => { - done(err) - }) + it("deleteNonExistantPet", async () => { + // Use an id that is too big for the server to handle. + const nonExistantId = 100000000000000000000000000; + try { + await petApi.deletePet(nonExistantId) + } catch (err) { + // The 404 response for this endpoint is officially documented, but + // that documentation is not used for generating the client code. + // That means we get an error about the response being undefined + // here. + expect(err.code).to.equal(404); + expect(err.message).to.include("Unknown API Status Code"); + expect(err.body).to.include("404"); + expect(err.body).to.include("message"); + return; + } + throw new Error("Deleted non-existant pet with id " + nonExistantId + "!"); }) - // bugged on server side! Code 500 -/* it("findPetsByTag", (done) => { - petApi.addPet(pet).then(() => { - return petApi.findPetsByTags([tag.name]) - }).then((pets: Pet[]) => { - expect(pets.length).to.be.at.least(1); - done(); - }).catch((err: any) => { - done(err); - }) - })*/ - - it("getPetById", (done) => { - petApi.addPet(pet).then(() => { - return petApi.getPetById(pet.id) - }).then((returnedPet: petstore.Pet) => { - expect(returnedPet).to.deep.equal(pet); - done(); - }).catch((err: any) => { - done(err); - }) + it("findPetsByStatus", async () => { + const pets = await petApi.findPetsByStatus(["available"]); + expect(pets.length).to.be.at.least(1); }) - it("updatePet", (done) => { - const oldName = pet.name + it("findPetsByTag", async () => { + const pets = await petApi.findPetsByTags([tag.name]) + expect(pets.length).to.be.at.least(1); + }) + + it("getPetById", async () => { + const returnedPet = await petApi.getPetById(pet.id); + expect(returnedPet).to.deep.equal(pet); + }) + + it("updatePet", async () => { + pet.name = "updated name"; + await petApi.updatePet(pet); + await petApi.updatePet(pet); + + const returnedPet = await petApi.getPetById(pet.id); + expect(returnedPet.id).to.equal(pet.id) + expect(returnedPet.name).to.equal(pet.name); + }) + + it("updatePetWithForm", async () => { const updatedName = "updated name"; - petApi.addPet(pet).then(() => { - pet.name = updatedName - return petApi.updatePet(pet).then(() => { - pet.name = oldName; - }).catch((err: any) => { - pet.name = oldName - throw err; - }); - }).then(() => { - return petApi.getPetById(pet.id); - }).then((returnedPet: petstore.Pet) => { - expect(returnedPet.id).to.equal(pet.id) - expect(returnedPet.name).to.equal(updatedName); - done(); - }).catch((err: any) => { - done(err) - }) + await petApi.updatePetWithForm(pet.id, updatedName); + + const returnedPet = await petApi.getPetById(pet.id) + expect(returnedPet.id).to.equal(pet.id) + expect(returnedPet.name).to.equal(updatedName); }) -// not supported by online swagger api? -/* it("updatePetWithForm", (done) => { - const updatedName = "updated name"; - petApi.addPet(pet).then(() => { - return petApi.updatePetWithForm(pet.id, updatedName) - }).then(() => { - return petApi.getPetById(pet.id) - }).then((returnedPet: Pet) => { - expect(returnedPet.id).to.equal(pet.id) - expect(returnedPet.name).to.equal(updatedName); - done() - }).catch((err: any) => { - done(err) - }) - })*/ - - it("uploadFile", (done) => { + it("uploadFile", async () => { const image = fs.readFileSync(__dirname + "/pet.png") - petApi.uploadFile(pet.id, "Metadata", { name: "pet.png", data: image}).then((response: any) => { - expect(response.code).to.be.gte(200).and.lt(300); - expect(response.message).to.contain("pet.png"); - done(); - }).catch((err: any) => { - done(err); - }) + const response = await petApi.uploadFile(pet.id, "Metadata", { name: "pet.png", data: image}); + expect(response.code).to.be.gte(200).and.lt(300); + expect(response.message).to.contain("pet.png"); }) }) \ No newline at end of file From c9047a6faae74dd352126673bf619fef1d7a03e5 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 25 Sep 2021 12:09:34 +0800 Subject: [PATCH 09/50] [php] enhance type mapping (#10457) * map BigDecimal to float * enhance type mapping in php generators * update tests * update doc, samples * remove primitive types from phpdt, mezzio --- docs/generators/php-dt.md | 1 - docs/generators/php-laravel.md | 3 ++- docs/generators/php-lumen.md | 3 ++- docs/generators/php-mezzio-ph.md | 1 - docs/generators/php-slim-deprecated.md | 3 ++- docs/generators/php-slim4.md | 3 ++- docs/generators/php-symfony.md | 2 ++ docs/generators/php.md | 3 ++- .../codegen/languages/AbstractPhpCodegen.java | 22 +++++++++++++++---- .../PhpDataTransferClientCodegen.java | 4 ++++ .../PhpMezzioPathHandlerServerCodegen.java | 4 ++++ .../languages/PhpSymfonyServerCodegen.java | 5 ++++- .../codegen/php/PhpModelTest.java | 2 +- .../docs/Model/FormatTest.md | 8 +++---- ...dPropertiesAndAdditionalPropertiesClass.md | 2 +- .../docs/Model/NullableClass.md | 4 ++-- .../php/OpenAPIClient-php/docs/Model/Order.md | 2 +- .../lib/Model/FormatTest.php | 6 ++--- .../lib/ObjectSerializer.php | 4 ++-- .../php-laravel/lib/app/Models/FormatTest.php | 2 +- .../Resources/docs/Model/Order.md | 2 +- 21 files changed, 58 insertions(+), 28 deletions(-) diff --git a/docs/generators/php-dt.md b/docs/generators/php-dt.md index a61f3cd351c..6f9dae63804 100644 --- a/docs/generators/php-dt.md +++ b/docs/generators/php-dt.md @@ -40,7 +40,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl ## LANGUAGE PRIMITIVES
    -
  • DateTime
  • array
  • bool
  • boolean
  • diff --git a/docs/generators/php-laravel.md b/docs/generators/php-laravel.md index b28504c1d02..fa6717217ad 100644 --- a/docs/generators/php-laravel.md +++ b/docs/generators/php-laravel.md @@ -39,7 +39,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl ## LANGUAGE PRIMITIVES
      -
    • DateTime
    • +
    • \DateTime
    • +
    • \SplFileObject
    • array
    • bool
    • boolean
    • diff --git a/docs/generators/php-lumen.md b/docs/generators/php-lumen.md index 28f4810873d..1c39477ad47 100644 --- a/docs/generators/php-lumen.md +++ b/docs/generators/php-lumen.md @@ -39,7 +39,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl ## LANGUAGE PRIMITIVES
        -
      • DateTime
      • +
      • \DateTime
      • +
      • \SplFileObject
      • array
      • bool
      • boolean
      • diff --git a/docs/generators/php-mezzio-ph.md b/docs/generators/php-mezzio-ph.md index 8460e439084..35bedda05f9 100644 --- a/docs/generators/php-mezzio-ph.md +++ b/docs/generators/php-mezzio-ph.md @@ -40,7 +40,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl ## LANGUAGE PRIMITIVES
          -
        • DateTime
        • array
        • bool
        • boolean
        • diff --git a/docs/generators/php-slim-deprecated.md b/docs/generators/php-slim-deprecated.md index 838b14ab7c3..d6f8b35c7f2 100644 --- a/docs/generators/php-slim-deprecated.md +++ b/docs/generators/php-slim-deprecated.md @@ -39,7 +39,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl ## LANGUAGE PRIMITIVES
            -
          • DateTime
          • +
          • \DateTime
          • +
          • \SplFileObject
          • array
          • bool
          • boolean
          • diff --git a/docs/generators/php-slim4.md b/docs/generators/php-slim4.md index 5e0ec649254..ae6cc1cb656 100644 --- a/docs/generators/php-slim4.md +++ b/docs/generators/php-slim4.md @@ -40,7 +40,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl ## LANGUAGE PRIMITIVES
              -
            • DateTime
            • +
            • \DateTime
            • +
            • \SplFileObject
            • array
            • bool
            • boolean
            • diff --git a/docs/generators/php-symfony.md b/docs/generators/php-symfony.md index 03112d4ff8b..4d268ab389e 100644 --- a/docs/generators/php-symfony.md +++ b/docs/generators/php-symfony.md @@ -45,6 +45,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl ## LANGUAGE PRIMITIVES
                +
              • UploadedFile
              • +
              • \DateTime
              • array
              • bool
              • byte
              • diff --git a/docs/generators/php.md b/docs/generators/php.md index 8a99d592df2..dcee69588f4 100644 --- a/docs/generators/php.md +++ b/docs/generators/php.md @@ -40,7 +40,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl ## LANGUAGE PRIMITIVES
                  -
                • DateTime
                • +
                • \DateTime
                • +
                • \SplFileObject
                • array
                • bool
                • boolean
                • diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java index 2805cd301ee..077555a5743 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java @@ -90,7 +90,8 @@ public abstract class AbstractPhpCodegen extends DefaultCodegen implements Codeg "string", "object", "array", - "DateTime", + "\\DateTime", + "\\SplFileObject", "mixed", "number", "void", @@ -111,6 +112,7 @@ public abstract class AbstractPhpCodegen extends DefaultCodegen implements Codeg typeMapping.put("long", "int"); typeMapping.put("number", "float"); typeMapping.put("float", "float"); + typeMapping.put("decimal", "float"); typeMapping.put("double", "double"); typeMapping.put("string", "string"); typeMapping.put("byte", "int"); @@ -341,6 +343,12 @@ public abstract class AbstractPhpCodegen extends DefaultCodegen implements Codeg public String getSchemaType(Schema p) { String openAPIType = super.getSchemaType(p); String type = null; + + if (openAPIType == null) { + LOGGER.error("OpenAPI Type for {} is null. Default to UNKNOWN_OPENAPI_TYPE instead.", p.getName()); + openAPIType = "UNKNOWN_OPENAPI_TYPE"; + } + if (typeMapping.containsKey(openAPIType)) { type = typeMapping.get(openAPIType); if (languageSpecificPrimitives.contains(type)) { @@ -348,12 +356,18 @@ public abstract class AbstractPhpCodegen extends DefaultCodegen implements Codeg } else if (instantiationTypes.containsKey(type)) { return type; } + /* + // comment out the following as php-dt, php-mezzio still need to treat DateTime, SplFileObject as objects + } else { + throw new RuntimeException("OpenAPI type `" + openAPIType + "` defined but can't mapped to language type." + + " Please report the issue via OpenAPI Generator github repo." + + " (if you're not using custom format with proper type mappings provided to openapi-generator)"); + } + */ } else { type = openAPIType; } - if (type == null) { - return null; - } + return toModelName(type); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpDataTransferClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpDataTransferClientCodegen.java index 38fc3332ee1..d50c1326958 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpDataTransferClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpDataTransferClientCodegen.java @@ -95,6 +95,10 @@ public class PhpDataTransferClientCodegen extends AbstractPhpCodegen { //no point to use double - http://php.net/manual/en/language.types.float.php , especially because of PHP 7+ float type declaration typeMapping.put("double", "float"); + // remove these from primitive types to make the output works + languageSpecificPrimitives.remove("\\DateTime"); + languageSpecificPrimitives.remove("\\SplFileObject"); + apiTemplateFiles.clear(); apiTestTemplateFiles.clear(); apiDocTemplateFiles.clear(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpMezzioPathHandlerServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpMezzioPathHandlerServerCodegen.java index 529c5a27e21..06388626d4c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpMezzioPathHandlerServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpMezzioPathHandlerServerCodegen.java @@ -87,6 +87,10 @@ public class PhpMezzioPathHandlerServerCodegen extends AbstractPhpCodegen { //no point to use double - http://php.net/manual/en/language.types.float.php , especially because of PHP 7+ float type declaration typeMapping.put("double", "float"); + // remove these from primitive types to make the output works + languageSpecificPrimitives.remove("\\DateTime"); + languageSpecificPrimitives.remove("\\SplFileObject"); + embeddedTemplateDir = templateDir = "php-mezzio-ph"; invokerPackage = "App"; srcBasePath = "src" + File.separator + "App"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java index 705185cf220..17d970d39c5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java @@ -151,7 +151,9 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg "number", "void", "byte", - "array" + "array", + "\\DateTime", + "UploadedFile" ) ); @@ -174,6 +176,7 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg typeMapping = new HashMap(); typeMapping.put("integer", "int"); typeMapping.put("long", "int"); + typeMapping.put("decimal", "float"); typeMapping.put("number", "float"); typeMapping.put("float", "float"); typeMapping.put("double", "double"); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/PhpModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/PhpModelTest.java index ca12192f278..926d90732b7 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/PhpModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/PhpModelTest.java @@ -76,7 +76,7 @@ public class PhpModelTest { final CodegenProperty property3 = cm.vars.get(2); Assert.assertEquals(property3.baseName, "createdAt"); - Assert.assertEquals(property3.complexType, "\\DateTime"); + Assert.assertEquals(property3.complexType, null); Assert.assertEquals(property3.dataType, "\\DateTime"); Assert.assertEquals(property3.name, "created_at"); Assert.assertEquals(property3.defaultValue, null); diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/FormatTest.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/FormatTest.md index 28f426d0cf8..2ce2f9dcb85 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/FormatTest.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/FormatTest.md @@ -10,12 +10,12 @@ Name | Type | Description | Notes **number** | **float** | | **float** | **float** | | [optional] **double** | **double** | | [optional] -**decimal** | [**Decimal**](Decimal.md) | | [optional] +**decimal** | **float** | | [optional] **string** | **string** | | [optional] **byte** | **string** | | -**binary** | [**\SplFileObject**](\SplFileObject.md) | | [optional] -**date** | [**\DateTime**](\DateTime.md) | | -**date_time** | [**\DateTime**](\DateTime.md) | | [optional] +**binary** | **\SplFileObject** | | [optional] +**date** | **\DateTime** | | +**date_time** | **\DateTime** | | [optional] **uuid** | **string** | | [optional] **password** | **string** | | **pattern_with_digits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/MixedPropertiesAndAdditionalPropertiesClass.md index cdc5e7093de..d86cc9fccce 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/MixedPropertiesAndAdditionalPropertiesClass.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uuid** | **string** | | [optional] -**date_time** | [**\DateTime**](\DateTime.md) | | [optional] +**date_time** | **\DateTime** | | [optional] **map** | [**array**](Animal.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/NullableClass.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/NullableClass.md index 14cacbbd4d3..83b78eaa819 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/NullableClass.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/NullableClass.md @@ -8,8 +8,8 @@ Name | Type | Description | Notes **number_prop** | **float** | | [optional] **boolean_prop** | **bool** | | [optional] **string_prop** | **string** | | [optional] -**date_prop** | [**\DateTime**](\DateTime.md) | | [optional] -**datetime_prop** | [**\DateTime**](\DateTime.md) | | [optional] +**date_prop** | **\DateTime** | | [optional] +**datetime_prop** | **\DateTime** | | [optional] **array_nullable_prop** | **object[]** | | [optional] **array_and_items_nullable_prop** | **object[]** | | [optional] **array_items_nullable** | **object[]** | | [optional] diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/Order.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/Order.md index 14c7ef9fbe5..c6ec90a33c1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/Order.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/Order.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **id** | **int** | | [optional] **pet_id** | **int** | | [optional] **quantity** | **int** | | [optional] -**ship_date** | [**\DateTime**](\DateTime.md) | | [optional] +**ship_date** | **\DateTime** | | [optional] **status** | **string** | Order Status | [optional] **complete** | **bool** | | [optional] [default to false] 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 deed199f79a..42017054335 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php @@ -65,7 +65,7 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable 'number' => 'float', 'float' => 'float', 'double' => 'double', - 'decimal' => 'Decimal', + 'decimal' => 'float', 'string' => 'string', 'byte' => 'string', 'binary' => '\SplFileObject', @@ -554,7 +554,7 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable /** * Gets decimal * - * @return Decimal|null + * @return float|null */ public function getDecimal() { @@ -564,7 +564,7 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable /** * Sets decimal * - * @param Decimal|null $decimal decimal + * @param float|null $decimal decimal * * @return self */ diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index c82083b1c99..69188fda3ec 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -86,7 +86,7 @@ class ObjectSerializer foreach ($data::openAPITypes() as $property => $openAPIType) { $getter = $data::getters()[$property]; $value = $data->$getter(); - if ($value !== null && !in_array($openAPIType, ['DateTime', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { $callable = [$openAPIType, 'getAllowableEnumValues']; if (is_callable($callable)) { /** array $callable */ @@ -330,7 +330,7 @@ class ObjectSerializer } /** @psalm-suppress ParadoxicalCondition */ - if (in_array($class, ['DateTime', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); return $data; } diff --git a/samples/server/petstore/php-laravel/lib/app/Models/FormatTest.php b/samples/server/petstore/php-laravel/lib/app/Models/FormatTest.php index 32e11e6c107..c7dbd850eb6 100644 --- a/samples/server/petstore/php-laravel/lib/app/Models/FormatTest.php +++ b/samples/server/petstore/php-laravel/lib/app/Models/FormatTest.php @@ -27,7 +27,7 @@ class FormatTest { /** @var double $double */ private $double; - /** @var Decimal $decimal */ + /** @var float $decimal */ private $decimal; /** @var string $string */ diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/Resources/docs/Model/Order.md b/samples/server/petstore/php-symfony/SymfonyBundle-php/Resources/docs/Model/Order.md index ee823c472c3..63a984cd357 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/Resources/docs/Model/Order.md +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/Resources/docs/Model/Order.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **id** | **int** | | [optional] **petId** | **int** | | [optional] **quantity** | **int** | | [optional] -**shipDate** | [**\DateTime**](\DateTime.md) | | [optional] +**shipDate** | **\DateTime** | | [optional] **status** | **string** | Order Status | [optional] **complete** | **bool** | | [optional] [default to false] From 56b060c6fad2a2751e9fe77abf9ba24cf28d1662 Mon Sep 17 00:00:00 2001 From: jakubskopal Date: Sat, 25 Sep 2021 07:47:10 +0200 Subject: [PATCH 10/50] Fix missing import for JsonTypeName (#8815) Attempt to fix #8157 --- modules/openapi-generator/src/main/resources/Java/model.mustache | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/openapi-generator/src/main/resources/Java/model.mustache b/modules/openapi-generator/src/main/resources/Java/model.mustache index 8fd078eb3d6..42efebb6809 100644 --- a/modules/openapi-generator/src/main/resources/Java/model.mustache +++ b/modules/openapi-generator/src/main/resources/Java/model.mustache @@ -16,6 +16,7 @@ import java.io.Serializable; {{/serializableModel}} {{#jackson}} import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; {{#withXml}} import com.fasterxml.jackson.dataformat.xml.annotation.*; {{/withXml}} From 4e029e99eafc6370bc279c19f3cb21120ae7d313 Mon Sep 17 00:00:00 2001 From: Wim Van Renterghem Date: Sat, 25 Sep 2021 07:52:50 +0200 Subject: [PATCH 11/50] Remove type erasure of the Error response, as it is always the same type (#10460) --- .../src/main/resources/swift5/APIs.mustache | 2 +- .../src/main/resources/swift5/api.mustache | 2 +- .../AlamofireImplementations.mustache | 6 ++--- .../URLSessionImplementations.mustache | 6 ++--- .../Classes/OpenAPIs/APIs.swift | 2 +- .../OpenAPIs/AlamofireImplementations.swift | 6 ++--- .../Classes/OpenAPIs/APIs.swift | 2 +- .../OpenAPIs/URLSessionImplementations.swift | 6 ++--- .../Classes/OpenAPIs/APIs.swift | 2 +- .../OpenAPIs/URLSessionImplementations.swift | 6 ++--- .../Classes/OpenAPIs/APIs.swift | 2 +- .../OpenAPIs/URLSessionImplementations.swift | 6 ++--- .../Classes/OpenAPIs/APIs.swift | 2 +- .../OpenAPIs/URLSessionImplementations.swift | 6 ++--- .../Classes/OpenAPIs/APIs.swift | 2 +- .../OpenAPIs/URLSessionImplementations.swift | 6 ++--- .../Classes/OpenAPIs/APIs.swift | 2 +- .../OpenAPIs/URLSessionImplementations.swift | 6 ++--- .../Classes/OpenAPIs/APIs.swift | 2 +- .../OpenAPIs/URLSessionImplementations.swift | 6 ++--- .../Classes/OpenAPIs/APIs.swift | 2 +- .../OpenAPIs/URLSessionImplementations.swift | 6 ++--- .../Classes/OpenAPIs/APIs.swift | 2 +- .../OpenAPIs/URLSessionImplementations.swift | 6 ++--- .../Classes/OpenAPIs/APIs.swift | 2 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 24 +++++++++---------- .../APIs/FakeClassnameTags123API.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 18 +++++++------- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 8 +++---- .../Classes/OpenAPIs/APIs/UserAPI.swift | 16 ++++++------- .../OpenAPIs/URLSessionImplementations.swift | 6 ++--- .../Classes/OpenAPIs/APIs.swift | 2 +- .../OpenAPIs/URLSessionImplementations.swift | 6 ++--- .../Sources/PetstoreClient/APIs.swift | 2 +- .../URLSessionImplementations.swift | 6 ++--- .../Classes/OpenAPIs/APIs.swift | 2 +- .../OpenAPIs/URLSessionImplementations.swift | 6 ++--- 38 files changed, 99 insertions(+), 99 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/swift5/APIs.mustache b/modules/openapi-generator/src/main/resources/swift5/APIs.mustache index 5066c60a6a8..978f5d6052f 100644 --- a/modules/openapi-generator/src/main/resources/swift5/APIs.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/APIs.mustache @@ -57,7 +57,7 @@ import Vapor } } - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func execute(_ apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { } + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func execute(_ apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { } {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func addHeader(name: String, value: String) -> Self { if !value.isEmpty { diff --git a/modules/openapi-generator/src/main/resources/swift5/api.mustache b/modules/openapi-generator/src/main/resources/swift5/api.mustache index 88e705c7645..323c21c1650 100644 --- a/modules/openapi-generator/src/main/resources/swift5/api.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/api.mustache @@ -220,7 +220,7 @@ extension {{projectName}}API { {{#isDeprecated}} @available(*, deprecated, message: "This operation is deprecated.") {{/isDeprecated}} - open class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<{{{returnType}}}{{^returnType}}Void{{/returnType}}, Error>) -> Void)) { + open class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<{{{returnType}}}{{^returnType}}Void{{/returnType}}, ErrorResponse>) -> Void)) { {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute(apiResponseQueue) { result 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 47305a4f629..06d0fca6b50 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 @@ -78,7 +78,7 @@ private var managerStore = SynchronizedDictionary() return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: HTTPHeaders(headers)) } - override {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func execute(_ apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func execute(_ apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { let managerId = UUID().uuidString // Create a new manager for each request to customize its request header let manager = createAlamofireSession() @@ -144,7 +144,7 @@ private var managerStore = SynchronizedDictionary() } } - fileprivate func processRequest(request: DataRequest, _ managerId: String, _ apiResponseQueue: DispatchQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + fileprivate func processRequest(request: DataRequest, _ managerId: String, _ apiResponseQueue: DispatchQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let credential = self.credential { request.authenticate(with: credential) } @@ -316,7 +316,7 @@ private var managerStore = SynchronizedDictionary() {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { - override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ apiResponseQueue: DispatchQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ apiResponseQueue: DispatchQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let credential = self.credential { request.authenticate(with: credential) } 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 040ff4ed38d..36240f6c6c0 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 @@ -93,7 +93,7 @@ private var urlSessionStore = SynchronizedDictionary() return modifiedRequest } - override {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func execute(_ apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func execute(_ apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { let urlSessionId = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() @@ -169,7 +169,7 @@ private var urlSessionStore = SynchronizedDictionary() } } - fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) @@ -310,7 +310,7 @@ private var urlSessionStore = SynchronizedDictionary() } {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { - override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) 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 8c3de7a6df2..554d96c9f2e 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -46,7 +46,7 @@ open class RequestBuilder { } } - open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { } + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { } public func addHeader(name: String, value: String) -> Self { if !value.isEmpty { 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 bb209af75c6..24e3924b253 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift @@ -78,7 +78,7 @@ open class AlamofireRequestBuilder: RequestBuilder { return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: HTTPHeaders(headers)) } - override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { let managerId = UUID().uuidString // Create a new manager for each request to customize its request header let manager = createAlamofireSession() @@ -144,7 +144,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } } - fileprivate func processRequest(request: DataRequest, _ managerId: String, _ apiResponseQueue: DispatchQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + fileprivate func processRequest(request: DataRequest, _ managerId: String, _ apiResponseQueue: DispatchQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let credential = self.credential { request.authenticate(with: credential) } @@ -316,7 +316,7 @@ open class AlamofireRequestBuilder: RequestBuilder { open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { - override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ apiResponseQueue: DispatchQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ apiResponseQueue: DispatchQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let credential = self.credential { request.authenticate(with: credential) } diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift index 38ffbb4394a..8da1e4814ff 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -48,7 +48,7 @@ open class RequestBuilder { } } - open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { } + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { } public func addHeader(name: String, value: String) -> Self { if !value.isEmpty { diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 19c7d89462e..762df8c3045 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -93,7 +93,7 @@ open class URLSessionRequestBuilder: RequestBuilder { return modifiedRequest } - override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { let urlSessionId = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() @@ -169,7 +169,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } } - fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) @@ -310,7 +310,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { - override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) 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 38ffbb4394a..8da1e4814ff 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -48,7 +48,7 @@ open class RequestBuilder { } } - open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { } + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { } public func addHeader(name: String, value: String) -> Self { if !value.isEmpty { 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 19c7d89462e..762df8c3045 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -93,7 +93,7 @@ open class URLSessionRequestBuilder: RequestBuilder { return modifiedRequest } - override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { let urlSessionId = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() @@ -169,7 +169,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } } - fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) @@ -310,7 +310,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { - override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) 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 38ffbb4394a..8da1e4814ff 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -48,7 +48,7 @@ open class RequestBuilder { } } - open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { } + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { } public func addHeader(name: String, value: String) -> Self { if !value.isEmpty { 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 19c7d89462e..762df8c3045 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -93,7 +93,7 @@ open class URLSessionRequestBuilder: RequestBuilder { return modifiedRequest } - override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { let urlSessionId = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() @@ -169,7 +169,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } } - fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) @@ -310,7 +310,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { - override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) 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 f33d9d30c64..4f921412e2b 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -48,7 +48,7 @@ open class RequestBuilder { } } - open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { } + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { } public func addHeader(name: String, value: String) -> Self { if !value.isEmpty { 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 19c7d89462e..762df8c3045 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -93,7 +93,7 @@ open class URLSessionRequestBuilder: RequestBuilder { return modifiedRequest } - override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { let urlSessionId = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() @@ -169,7 +169,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } } - fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) @@ -310,7 +310,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { - override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) 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 824637e7199..1049498918e 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -48,7 +48,7 @@ internal class RequestBuilder { } } - internal func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { } + internal func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { } internal func addHeader(name: String, value: String) -> Self { if !value.isEmpty { 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 ba8e4968b11..9a76a452f22 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -93,7 +93,7 @@ internal class URLSessionRequestBuilder: RequestBuilder { return modifiedRequest } - override internal func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override internal func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { let urlSessionId = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() @@ -169,7 +169,7 @@ internal class URLSessionRequestBuilder: RequestBuilder { } } - fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) @@ -310,7 +310,7 @@ internal class URLSessionRequestBuilder: RequestBuilder { } internal class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { - override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) 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 38ffbb4394a..8da1e4814ff 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -48,7 +48,7 @@ open class RequestBuilder { } } - open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { } + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { } public func addHeader(name: String, value: String) -> Self { if !value.isEmpty { 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 19c7d89462e..762df8c3045 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -93,7 +93,7 @@ open class URLSessionRequestBuilder: RequestBuilder { return modifiedRequest } - override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { let urlSessionId = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() @@ -169,7 +169,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } } - fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) @@ -310,7 +310,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { - override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/APIs.swift index 261bd0eb644..04add0b222a 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -48,7 +48,7 @@ open class RequestBuilder { } } - open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { } + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { } public func addHeader(name: String, value: String) -> Self { if !value.isEmpty { diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 19c7d89462e..762df8c3045 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -93,7 +93,7 @@ open class URLSessionRequestBuilder: RequestBuilder { return modifiedRequest } - override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { let urlSessionId = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() @@ -169,7 +169,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } } - fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) @@ -310,7 +310,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { - override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) 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 38ffbb4394a..8da1e4814ff 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -48,7 +48,7 @@ open class RequestBuilder { } } - open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { } + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { } public func addHeader(name: String, value: String) -> Self { if !value.isEmpty { 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 19c7d89462e..762df8c3045 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -93,7 +93,7 @@ open class URLSessionRequestBuilder: RequestBuilder { return modifiedRequest } - override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { let urlSessionId = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() @@ -169,7 +169,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } } - fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) @@ -310,7 +310,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { - override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) 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 38ffbb4394a..8da1e4814ff 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -48,7 +48,7 @@ open class RequestBuilder { } } - open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { } + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { } public func addHeader(name: String, value: String) -> Self { if !value.isEmpty { 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 19c7d89462e..762df8c3045 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -93,7 +93,7 @@ open class URLSessionRequestBuilder: RequestBuilder { return modifiedRequest } - override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { let urlSessionId = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() @@ -169,7 +169,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } } - fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) @@ -310,7 +310,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { - override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) 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 68d309f0a31..4bb3249bda8 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -40,7 +40,7 @@ open class RequestBuilder { } } - open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { } + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { } public func addHeader(name: String, value: String) -> Self { if !value.isEmpty { 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 ea619c6b49f..80ee4bc707a 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 @@ -19,7 +19,7 @@ open class AnotherFakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): 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 d503508de6a..36f9d0bf137 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 @@ -18,7 +18,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -59,7 +59,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -100,7 +100,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -141,7 +141,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -182,7 +182,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: @@ -224,7 +224,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result in switch result { case .success: @@ -269,7 +269,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -325,7 +325,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result in switch result { case .success: @@ -476,7 +476,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result in switch result { case .success: @@ -545,7 +545,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result in switch result { case .success: @@ -600,7 +600,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result in switch result { case .success: @@ -643,7 +643,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result in switch result { case .success: 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 a5b5f93115d..ad810db3ec6 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 @@ -19,7 +19,7 @@ open class FakeClassnameTags123API { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): 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 efda2b42f0c..f9dcab45b3f 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 @@ -19,7 +19,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: @@ -65,7 +65,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result in switch result { case .success: @@ -123,7 +123,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<[Pet], Error>) -> Void)) { + open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<[Pet], ErrorResponse>) -> Void)) { findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -173,7 +173,7 @@ open class PetAPI { - parameter completion: completion handler to receive the result */ @available(*, deprecated, message: "This operation is deprecated.") - open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<[Pet], Error>) -> Void)) { + open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<[Pet], ErrorResponse>) -> Void)) { findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -223,7 +223,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -272,7 +272,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: @@ -319,7 +319,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result in switch result { case .success: @@ -377,7 +377,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -435,7 +435,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result in switch result { case let .success(response): 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 3a96edb8393..3b20fcd01b0 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 @@ -19,7 +19,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case .success: @@ -64,7 +64,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<[String: Int], Error>) -> Void)) { + open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<[String: Int], ErrorResponse>) -> Void)) { getInventoryWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -109,7 +109,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -155,7 +155,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): 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 de46300cfc7..9dfe41e0605 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 @@ -19,7 +19,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: @@ -62,7 +62,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: @@ -104,7 +104,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { case .success: @@ -146,7 +146,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case .success: @@ -192,7 +192,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -238,7 +238,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result in switch result { case let .success(response): @@ -285,7 +285,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { logoutUserWithRequestBuilder().execute(apiResponseQueue) { result in switch result { case .success: @@ -327,7 +327,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result in switch result { case .success: 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 19c7d89462e..762df8c3045 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -93,7 +93,7 @@ open class URLSessionRequestBuilder: RequestBuilder { return modifiedRequest } - override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { let urlSessionId = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() @@ -169,7 +169,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } } - fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) @@ -310,7 +310,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { - override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) 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 38ffbb4394a..8da1e4814ff 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -48,7 +48,7 @@ open class RequestBuilder { } } - open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { } + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { } public func addHeader(name: String, value: String) -> Self { if !value.isEmpty { 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 19c7d89462e..762df8c3045 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -93,7 +93,7 @@ open class URLSessionRequestBuilder: RequestBuilder { return modifiedRequest } - override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { let urlSessionId = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() @@ -169,7 +169,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } } - fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) @@ -310,7 +310,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { - override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs.swift index 38ffbb4394a..8da1e4814ff 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs.swift @@ -48,7 +48,7 @@ open class RequestBuilder { } } - open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { } + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { } public func addHeader(name: String, value: String) -> Self { if !value.isEmpty { diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/URLSessionImplementations.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/URLSessionImplementations.swift index 19c7d89462e..762df8c3045 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/URLSessionImplementations.swift @@ -93,7 +93,7 @@ open class URLSessionRequestBuilder: RequestBuilder { return modifiedRequest } - override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { let urlSessionId = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() @@ -169,7 +169,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } } - fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) @@ -310,7 +310,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { - override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs.swift index 38ffbb4394a..8da1e4814ff 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -48,7 +48,7 @@ open class RequestBuilder { } } - open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { } + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { } public func addHeader(name: String, value: String) -> Self { if !value.isEmpty { diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 19c7d89462e..762df8c3045 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -93,7 +93,7 @@ open class URLSessionRequestBuilder: RequestBuilder { return modifiedRequest } - override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { let urlSessionId = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() @@ -169,7 +169,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } } - fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) @@ -310,7 +310,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { - override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, ErrorResponse>) -> Void) { if let error = error { completion(.failure(ErrorResponse.error(-1, data, response, error))) From 150e304b4ce5c84d1f26ad765b3977af3288c59e Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 25 Sep 2021 13:56:00 +0800 Subject: [PATCH 12/50] update samples --- .../openapitools/client/model/AdditionalPropertiesAnyType.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesArray.java | 1 + .../openapitools/client/model/AdditionalPropertiesBoolean.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesClass.java | 1 + .../openapitools/client/model/AdditionalPropertiesInteger.java | 1 + .../openapitools/client/model/AdditionalPropertiesNumber.java | 1 + .../openapitools/client/model/AdditionalPropertiesObject.java | 1 + .../openapitools/client/model/AdditionalPropertiesString.java | 1 + .../src/main/java/org/openapitools/client/model/Animal.java | 1 + .../org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java | 1 + .../java/org/openapitools/client/model/ArrayOfNumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/ArrayTest.java | 1 + .../src/main/java/org/openapitools/client/model/BigCat.java | 1 + .../src/main/java/org/openapitools/client/model/BigCatAllOf.java | 1 + .../main/java/org/openapitools/client/model/Capitalization.java | 1 + .../src/main/java/org/openapitools/client/model/Cat.java | 1 + .../src/main/java/org/openapitools/client/model/CatAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/Category.java | 1 + .../src/main/java/org/openapitools/client/model/ClassModel.java | 1 + .../src/main/java/org/openapitools/client/model/Client.java | 1 + .../src/main/java/org/openapitools/client/model/Dog.java | 1 + .../src/main/java/org/openapitools/client/model/DogAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/EnumArrays.java | 1 + .../src/main/java/org/openapitools/client/model/EnumClass.java | 1 + .../src/main/java/org/openapitools/client/model/EnumTest.java | 1 + .../java/org/openapitools/client/model/FileSchemaTestClass.java | 1 + .../src/main/java/org/openapitools/client/model/FormatTest.java | 1 + .../main/java/org/openapitools/client/model/HasOnlyReadOnly.java | 1 + .../src/main/java/org/openapitools/client/model/MapTest.java | 1 + .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../java/org/openapitools/client/model/Model200Response.java | 1 + .../java/org/openapitools/client/model/ModelApiResponse.java | 1 + .../src/main/java/org/openapitools/client/model/ModelReturn.java | 1 + .../src/main/java/org/openapitools/client/model/Name.java | 1 + .../src/main/java/org/openapitools/client/model/NumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/Order.java | 1 + .../main/java/org/openapitools/client/model/OuterComposite.java | 1 + .../src/main/java/org/openapitools/client/model/OuterEnum.java | 1 + .../src/main/java/org/openapitools/client/model/Pet.java | 1 + .../main/java/org/openapitools/client/model/ReadOnlyFirst.java | 1 + .../java/org/openapitools/client/model/SpecialModelName.java | 1 + .../src/main/java/org/openapitools/client/model/Tag.java | 1 + .../java/org/openapitools/client/model/TypeHolderDefault.java | 1 + .../java/org/openapitools/client/model/TypeHolderExample.java | 1 + .../src/main/java/org/openapitools/client/model/User.java | 1 + .../src/main/java/org/openapitools/client/model/XmlItem.java | 1 + .../openapitools/client/model/AdditionalPropertiesAnyType.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesArray.java | 1 + .../openapitools/client/model/AdditionalPropertiesBoolean.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesClass.java | 1 + .../openapitools/client/model/AdditionalPropertiesInteger.java | 1 + .../openapitools/client/model/AdditionalPropertiesNumber.java | 1 + .../openapitools/client/model/AdditionalPropertiesObject.java | 1 + .../openapitools/client/model/AdditionalPropertiesString.java | 1 + .../src/main/java/org/openapitools/client/model/Animal.java | 1 + .../org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java | 1 + .../java/org/openapitools/client/model/ArrayOfNumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/ArrayTest.java | 1 + .../src/main/java/org/openapitools/client/model/BigCat.java | 1 + .../src/main/java/org/openapitools/client/model/BigCatAllOf.java | 1 + .../main/java/org/openapitools/client/model/Capitalization.java | 1 + .../src/main/java/org/openapitools/client/model/Cat.java | 1 + .../src/main/java/org/openapitools/client/model/CatAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/Category.java | 1 + .../src/main/java/org/openapitools/client/model/ClassModel.java | 1 + .../src/main/java/org/openapitools/client/model/Client.java | 1 + .../src/main/java/org/openapitools/client/model/Dog.java | 1 + .../src/main/java/org/openapitools/client/model/DogAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/EnumArrays.java | 1 + .../src/main/java/org/openapitools/client/model/EnumClass.java | 1 + .../src/main/java/org/openapitools/client/model/EnumTest.java | 1 + .../java/org/openapitools/client/model/FileSchemaTestClass.java | 1 + .../src/main/java/org/openapitools/client/model/FormatTest.java | 1 + .../main/java/org/openapitools/client/model/HasOnlyReadOnly.java | 1 + .../src/main/java/org/openapitools/client/model/MapTest.java | 1 + .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../java/org/openapitools/client/model/Model200Response.java | 1 + .../java/org/openapitools/client/model/ModelApiResponse.java | 1 + .../src/main/java/org/openapitools/client/model/ModelReturn.java | 1 + .../src/main/java/org/openapitools/client/model/Name.java | 1 + .../src/main/java/org/openapitools/client/model/NumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/Order.java | 1 + .../main/java/org/openapitools/client/model/OuterComposite.java | 1 + .../src/main/java/org/openapitools/client/model/OuterEnum.java | 1 + .../src/main/java/org/openapitools/client/model/Pet.java | 1 + .../main/java/org/openapitools/client/model/ReadOnlyFirst.java | 1 + .../java/org/openapitools/client/model/SpecialModelName.java | 1 + .../src/main/java/org/openapitools/client/model/Tag.java | 1 + .../java/org/openapitools/client/model/TypeHolderDefault.java | 1 + .../java/org/openapitools/client/model/TypeHolderExample.java | 1 + .../src/main/java/org/openapitools/client/model/User.java | 1 + .../src/main/java/org/openapitools/client/model/XmlItem.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesClass.java | 1 + .../src/main/java/org/openapitools/client/model/Animal.java | 1 + .../org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java | 1 + .../java/org/openapitools/client/model/ArrayOfNumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/ArrayTest.java | 1 + .../main/java/org/openapitools/client/model/Capitalization.java | 1 + .../feign/src/main/java/org/openapitools/client/model/Cat.java | 1 + .../src/main/java/org/openapitools/client/model/CatAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/Category.java | 1 + .../src/main/java/org/openapitools/client/model/ClassModel.java | 1 + .../src/main/java/org/openapitools/client/model/Client.java | 1 + .../java/org/openapitools/client/model/DeprecatedObject.java | 1 + .../feign/src/main/java/org/openapitools/client/model/Dog.java | 1 + .../src/main/java/org/openapitools/client/model/DogAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/EnumArrays.java | 1 + .../src/main/java/org/openapitools/client/model/EnumClass.java | 1 + .../src/main/java/org/openapitools/client/model/EnumTest.java | 1 + .../java/org/openapitools/client/model/FileSchemaTestClass.java | 1 + .../feign/src/main/java/org/openapitools/client/model/Foo.java | 1 + .../src/main/java/org/openapitools/client/model/FormatTest.java | 1 + .../main/java/org/openapitools/client/model/HasOnlyReadOnly.java | 1 + .../java/org/openapitools/client/model/HealthCheckResult.java | 1 + .../org/openapitools/client/model/InlineResponseDefault.java | 1 + .../src/main/java/org/openapitools/client/model/MapTest.java | 1 + .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../java/org/openapitools/client/model/Model200Response.java | 1 + .../java/org/openapitools/client/model/ModelApiResponse.java | 1 + .../src/main/java/org/openapitools/client/model/ModelReturn.java | 1 + .../feign/src/main/java/org/openapitools/client/model/Name.java | 1 + .../main/java/org/openapitools/client/model/NullableClass.java | 1 + .../src/main/java/org/openapitools/client/model/NumberOnly.java | 1 + .../openapitools/client/model/ObjectWithDeprecatedFields.java | 1 + .../feign/src/main/java/org/openapitools/client/model/Order.java | 1 + .../main/java/org/openapitools/client/model/OuterComposite.java | 1 + .../src/main/java/org/openapitools/client/model/OuterEnum.java | 1 + .../org/openapitools/client/model/OuterEnumDefaultValue.java | 1 + .../java/org/openapitools/client/model/OuterEnumInteger.java | 1 + .../openapitools/client/model/OuterEnumIntegerDefaultValue.java | 1 + .../openapitools/client/model/OuterObjectWithEnumProperty.java | 1 + .../feign/src/main/java/org/openapitools/client/model/Pet.java | 1 + .../main/java/org/openapitools/client/model/ReadOnlyFirst.java | 1 + .../java/org/openapitools/client/model/SpecialModelName.java | 1 + .../feign/src/main/java/org/openapitools/client/model/Tag.java | 1 + .../feign/src/main/java/org/openapitools/client/model/User.java | 1 + .../openapitools/client/model/AdditionalPropertiesAnyType.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesArray.java | 1 + .../openapitools/client/model/AdditionalPropertiesBoolean.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesClass.java | 1 + .../openapitools/client/model/AdditionalPropertiesInteger.java | 1 + .../openapitools/client/model/AdditionalPropertiesNumber.java | 1 + .../openapitools/client/model/AdditionalPropertiesObject.java | 1 + .../openapitools/client/model/AdditionalPropertiesString.java | 1 + .../src/main/java/org/openapitools/client/model/Animal.java | 1 + .../org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java | 1 + .../java/org/openapitools/client/model/ArrayOfNumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/ArrayTest.java | 1 + .../src/main/java/org/openapitools/client/model/BigCat.java | 1 + .../src/main/java/org/openapitools/client/model/BigCatAllOf.java | 1 + .../main/java/org/openapitools/client/model/Capitalization.java | 1 + .../src/main/java/org/openapitools/client/model/Cat.java | 1 + .../src/main/java/org/openapitools/client/model/CatAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/Category.java | 1 + .../src/main/java/org/openapitools/client/model/ClassModel.java | 1 + .../src/main/java/org/openapitools/client/model/Client.java | 1 + .../src/main/java/org/openapitools/client/model/Dog.java | 1 + .../src/main/java/org/openapitools/client/model/DogAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/EnumArrays.java | 1 + .../src/main/java/org/openapitools/client/model/EnumClass.java | 1 + .../src/main/java/org/openapitools/client/model/EnumTest.java | 1 + .../java/org/openapitools/client/model/FileSchemaTestClass.java | 1 + .../src/main/java/org/openapitools/client/model/FormatTest.java | 1 + .../main/java/org/openapitools/client/model/HasOnlyReadOnly.java | 1 + .../src/main/java/org/openapitools/client/model/MapTest.java | 1 + .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../java/org/openapitools/client/model/Model200Response.java | 1 + .../java/org/openapitools/client/model/ModelApiResponse.java | 1 + .../src/main/java/org/openapitools/client/model/ModelReturn.java | 1 + .../src/main/java/org/openapitools/client/model/Name.java | 1 + .../src/main/java/org/openapitools/client/model/NumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/Order.java | 1 + .../main/java/org/openapitools/client/model/OuterComposite.java | 1 + .../src/main/java/org/openapitools/client/model/OuterEnum.java | 1 + .../src/main/java/org/openapitools/client/model/Pet.java | 1 + .../main/java/org/openapitools/client/model/ReadOnlyFirst.java | 1 + .../java/org/openapitools/client/model/SpecialModelName.java | 1 + .../src/main/java/org/openapitools/client/model/Tag.java | 1 + .../java/org/openapitools/client/model/TypeHolderDefault.java | 1 + .../java/org/openapitools/client/model/TypeHolderExample.java | 1 + .../src/main/java/org/openapitools/client/model/User.java | 1 + .../src/main/java/org/openapitools/client/model/XmlItem.java | 1 + .../openapitools/client/model/AdditionalPropertiesAnyType.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesArray.java | 1 + .../openapitools/client/model/AdditionalPropertiesBoolean.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesClass.java | 1 + .../openapitools/client/model/AdditionalPropertiesInteger.java | 1 + .../openapitools/client/model/AdditionalPropertiesNumber.java | 1 + .../openapitools/client/model/AdditionalPropertiesObject.java | 1 + .../openapitools/client/model/AdditionalPropertiesString.java | 1 + .../src/main/java/org/openapitools/client/model/Animal.java | 1 + .../org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java | 1 + .../java/org/openapitools/client/model/ArrayOfNumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/ArrayTest.java | 1 + .../src/main/java/org/openapitools/client/model/BigCat.java | 1 + .../src/main/java/org/openapitools/client/model/BigCatAllOf.java | 1 + .../main/java/org/openapitools/client/model/Capitalization.java | 1 + .../jersey1/src/main/java/org/openapitools/client/model/Cat.java | 1 + .../src/main/java/org/openapitools/client/model/CatAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/Category.java | 1 + .../src/main/java/org/openapitools/client/model/ClassModel.java | 1 + .../src/main/java/org/openapitools/client/model/Client.java | 1 + .../jersey1/src/main/java/org/openapitools/client/model/Dog.java | 1 + .../src/main/java/org/openapitools/client/model/DogAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/EnumArrays.java | 1 + .../src/main/java/org/openapitools/client/model/EnumClass.java | 1 + .../src/main/java/org/openapitools/client/model/EnumTest.java | 1 + .../java/org/openapitools/client/model/FileSchemaTestClass.java | 1 + .../src/main/java/org/openapitools/client/model/FormatTest.java | 1 + .../main/java/org/openapitools/client/model/HasOnlyReadOnly.java | 1 + .../src/main/java/org/openapitools/client/model/MapTest.java | 1 + .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../java/org/openapitools/client/model/Model200Response.java | 1 + .../java/org/openapitools/client/model/ModelApiResponse.java | 1 + .../src/main/java/org/openapitools/client/model/ModelReturn.java | 1 + .../src/main/java/org/openapitools/client/model/Name.java | 1 + .../src/main/java/org/openapitools/client/model/NumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/Order.java | 1 + .../main/java/org/openapitools/client/model/OuterComposite.java | 1 + .../src/main/java/org/openapitools/client/model/OuterEnum.java | 1 + .../jersey1/src/main/java/org/openapitools/client/model/Pet.java | 1 + .../main/java/org/openapitools/client/model/ReadOnlyFirst.java | 1 + .../java/org/openapitools/client/model/SpecialModelName.java | 1 + .../jersey1/src/main/java/org/openapitools/client/model/Tag.java | 1 + .../java/org/openapitools/client/model/TypeHolderDefault.java | 1 + .../java/org/openapitools/client/model/TypeHolderExample.java | 1 + .../src/main/java/org/openapitools/client/model/User.java | 1 + .../src/main/java/org/openapitools/client/model/XmlItem.java | 1 + .../openapitools/client/model/AdditionalPropertiesAnyType.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesArray.java | 1 + .../openapitools/client/model/AdditionalPropertiesBoolean.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesClass.java | 1 + .../openapitools/client/model/AdditionalPropertiesInteger.java | 1 + .../openapitools/client/model/AdditionalPropertiesNumber.java | 1 + .../openapitools/client/model/AdditionalPropertiesObject.java | 1 + .../openapitools/client/model/AdditionalPropertiesString.java | 1 + .../src/main/java/org/openapitools/client/model/Animal.java | 1 + .../org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java | 1 + .../java/org/openapitools/client/model/ArrayOfNumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/ArrayTest.java | 1 + .../src/main/java/org/openapitools/client/model/BigCat.java | 1 + .../src/main/java/org/openapitools/client/model/BigCatAllOf.java | 1 + .../main/java/org/openapitools/client/model/Capitalization.java | 1 + .../src/main/java/org/openapitools/client/model/Cat.java | 1 + .../src/main/java/org/openapitools/client/model/CatAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/Category.java | 1 + .../src/main/java/org/openapitools/client/model/ClassModel.java | 1 + .../src/main/java/org/openapitools/client/model/Client.java | 1 + .../src/main/java/org/openapitools/client/model/Dog.java | 1 + .../src/main/java/org/openapitools/client/model/DogAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/EnumArrays.java | 1 + .../src/main/java/org/openapitools/client/model/EnumClass.java | 1 + .../src/main/java/org/openapitools/client/model/EnumTest.java | 1 + .../java/org/openapitools/client/model/FileSchemaTestClass.java | 1 + .../src/main/java/org/openapitools/client/model/FormatTest.java | 1 + .../main/java/org/openapitools/client/model/HasOnlyReadOnly.java | 1 + .../src/main/java/org/openapitools/client/model/MapTest.java | 1 + .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../java/org/openapitools/client/model/Model200Response.java | 1 + .../java/org/openapitools/client/model/ModelApiResponse.java | 1 + .../src/main/java/org/openapitools/client/model/ModelReturn.java | 1 + .../src/main/java/org/openapitools/client/model/Name.java | 1 + .../src/main/java/org/openapitools/client/model/NumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/Order.java | 1 + .../main/java/org/openapitools/client/model/OuterComposite.java | 1 + .../src/main/java/org/openapitools/client/model/OuterEnum.java | 1 + .../src/main/java/org/openapitools/client/model/Pet.java | 1 + .../main/java/org/openapitools/client/model/ReadOnlyFirst.java | 1 + .../java/org/openapitools/client/model/SpecialModelName.java | 1 + .../src/main/java/org/openapitools/client/model/Tag.java | 1 + .../java/org/openapitools/client/model/TypeHolderDefault.java | 1 + .../java/org/openapitools/client/model/TypeHolderExample.java | 1 + .../src/main/java/org/openapitools/client/model/User.java | 1 + .../src/main/java/org/openapitools/client/model/XmlItem.java | 1 + .../openapitools/client/model/AdditionalPropertiesAnyType.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesArray.java | 1 + .../openapitools/client/model/AdditionalPropertiesBoolean.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesClass.java | 1 + .../openapitools/client/model/AdditionalPropertiesInteger.java | 1 + .../openapitools/client/model/AdditionalPropertiesNumber.java | 1 + .../openapitools/client/model/AdditionalPropertiesObject.java | 1 + .../openapitools/client/model/AdditionalPropertiesString.java | 1 + .../src/main/java/org/openapitools/client/model/Animal.java | 1 + .../org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java | 1 + .../java/org/openapitools/client/model/ArrayOfNumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/ArrayTest.java | 1 + .../src/main/java/org/openapitools/client/model/BigCat.java | 1 + .../src/main/java/org/openapitools/client/model/BigCatAllOf.java | 1 + .../main/java/org/openapitools/client/model/Capitalization.java | 1 + .../src/main/java/org/openapitools/client/model/Cat.java | 1 + .../src/main/java/org/openapitools/client/model/CatAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/Category.java | 1 + .../src/main/java/org/openapitools/client/model/ClassModel.java | 1 + .../src/main/java/org/openapitools/client/model/Client.java | 1 + .../src/main/java/org/openapitools/client/model/Dog.java | 1 + .../src/main/java/org/openapitools/client/model/DogAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/EnumArrays.java | 1 + .../src/main/java/org/openapitools/client/model/EnumClass.java | 1 + .../src/main/java/org/openapitools/client/model/EnumTest.java | 1 + .../java/org/openapitools/client/model/FileSchemaTestClass.java | 1 + .../src/main/java/org/openapitools/client/model/FormatTest.java | 1 + .../main/java/org/openapitools/client/model/HasOnlyReadOnly.java | 1 + .../src/main/java/org/openapitools/client/model/MapTest.java | 1 + .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../java/org/openapitools/client/model/Model200Response.java | 1 + .../java/org/openapitools/client/model/ModelApiResponse.java | 1 + .../src/main/java/org/openapitools/client/model/ModelReturn.java | 1 + .../src/main/java/org/openapitools/client/model/Name.java | 1 + .../src/main/java/org/openapitools/client/model/NumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/Order.java | 1 + .../main/java/org/openapitools/client/model/OuterComposite.java | 1 + .../src/main/java/org/openapitools/client/model/OuterEnum.java | 1 + .../src/main/java/org/openapitools/client/model/Pet.java | 1 + .../main/java/org/openapitools/client/model/ReadOnlyFirst.java | 1 + .../java/org/openapitools/client/model/SpecialModelName.java | 1 + .../src/main/java/org/openapitools/client/model/Tag.java | 1 + .../java/org/openapitools/client/model/TypeHolderDefault.java | 1 + .../java/org/openapitools/client/model/TypeHolderExample.java | 1 + .../src/main/java/org/openapitools/client/model/User.java | 1 + .../src/main/java/org/openapitools/client/model/XmlItem.java | 1 + .../openapitools/client/model/AdditionalPropertiesAnyType.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesArray.java | 1 + .../openapitools/client/model/AdditionalPropertiesBoolean.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesClass.java | 1 + .../openapitools/client/model/AdditionalPropertiesInteger.java | 1 + .../openapitools/client/model/AdditionalPropertiesNumber.java | 1 + .../openapitools/client/model/AdditionalPropertiesObject.java | 1 + .../openapitools/client/model/AdditionalPropertiesString.java | 1 + .../src/main/java/org/openapitools/client/model/Animal.java | 1 + .../org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java | 1 + .../java/org/openapitools/client/model/ArrayOfNumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/ArrayTest.java | 1 + .../src/main/java/org/openapitools/client/model/BigCat.java | 1 + .../src/main/java/org/openapitools/client/model/BigCatAllOf.java | 1 + .../main/java/org/openapitools/client/model/Capitalization.java | 1 + .../src/main/java/org/openapitools/client/model/Cat.java | 1 + .../src/main/java/org/openapitools/client/model/CatAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/Category.java | 1 + .../src/main/java/org/openapitools/client/model/ClassModel.java | 1 + .../src/main/java/org/openapitools/client/model/Client.java | 1 + .../src/main/java/org/openapitools/client/model/Dog.java | 1 + .../src/main/java/org/openapitools/client/model/DogAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/EnumArrays.java | 1 + .../src/main/java/org/openapitools/client/model/EnumClass.java | 1 + .../src/main/java/org/openapitools/client/model/EnumTest.java | 1 + .../java/org/openapitools/client/model/FileSchemaTestClass.java | 1 + .../src/main/java/org/openapitools/client/model/FormatTest.java | 1 + .../main/java/org/openapitools/client/model/HasOnlyReadOnly.java | 1 + .../src/main/java/org/openapitools/client/model/MapTest.java | 1 + .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../java/org/openapitools/client/model/Model200Response.java | 1 + .../java/org/openapitools/client/model/ModelApiResponse.java | 1 + .../src/main/java/org/openapitools/client/model/ModelReturn.java | 1 + .../src/main/java/org/openapitools/client/model/Name.java | 1 + .../src/main/java/org/openapitools/client/model/NumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/Order.java | 1 + .../main/java/org/openapitools/client/model/OuterComposite.java | 1 + .../src/main/java/org/openapitools/client/model/OuterEnum.java | 1 + .../src/main/java/org/openapitools/client/model/Pet.java | 1 + .../main/java/org/openapitools/client/model/ReadOnlyFirst.java | 1 + .../java/org/openapitools/client/model/SpecialModelName.java | 1 + .../src/main/java/org/openapitools/client/model/Tag.java | 1 + .../java/org/openapitools/client/model/TypeHolderDefault.java | 1 + .../java/org/openapitools/client/model/TypeHolderExample.java | 1 + .../src/main/java/org/openapitools/client/model/User.java | 1 + .../src/main/java/org/openapitools/client/model/XmlItem.java | 1 + .../openapitools/client/model/AdditionalPropertiesAnyType.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesArray.java | 1 + .../openapitools/client/model/AdditionalPropertiesBoolean.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesClass.java | 1 + .../openapitools/client/model/AdditionalPropertiesInteger.java | 1 + .../openapitools/client/model/AdditionalPropertiesNumber.java | 1 + .../openapitools/client/model/AdditionalPropertiesObject.java | 1 + .../openapitools/client/model/AdditionalPropertiesString.java | 1 + .../src/main/java/org/openapitools/client/model/Animal.java | 1 + .../org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java | 1 + .../java/org/openapitools/client/model/ArrayOfNumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/ArrayTest.java | 1 + .../src/main/java/org/openapitools/client/model/BigCat.java | 1 + .../src/main/java/org/openapitools/client/model/BigCatAllOf.java | 1 + .../main/java/org/openapitools/client/model/Capitalization.java | 1 + .../src/main/java/org/openapitools/client/model/Cat.java | 1 + .../src/main/java/org/openapitools/client/model/CatAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/Category.java | 1 + .../src/main/java/org/openapitools/client/model/ClassModel.java | 1 + .../src/main/java/org/openapitools/client/model/Client.java | 1 + .../src/main/java/org/openapitools/client/model/Dog.java | 1 + .../src/main/java/org/openapitools/client/model/DogAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/EnumArrays.java | 1 + .../src/main/java/org/openapitools/client/model/EnumClass.java | 1 + .../src/main/java/org/openapitools/client/model/EnumTest.java | 1 + .../java/org/openapitools/client/model/FileSchemaTestClass.java | 1 + .../src/main/java/org/openapitools/client/model/FormatTest.java | 1 + .../main/java/org/openapitools/client/model/HasOnlyReadOnly.java | 1 + .../src/main/java/org/openapitools/client/model/MapTest.java | 1 + .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../java/org/openapitools/client/model/Model200Response.java | 1 + .../java/org/openapitools/client/model/ModelApiResponse.java | 1 + .../src/main/java/org/openapitools/client/model/ModelReturn.java | 1 + .../src/main/java/org/openapitools/client/model/Name.java | 1 + .../src/main/java/org/openapitools/client/model/NumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/Order.java | 1 + .../main/java/org/openapitools/client/model/OuterComposite.java | 1 + .../src/main/java/org/openapitools/client/model/OuterEnum.java | 1 + .../src/main/java/org/openapitools/client/model/Pet.java | 1 + .../main/java/org/openapitools/client/model/ReadOnlyFirst.java | 1 + .../java/org/openapitools/client/model/SpecialModelName.java | 1 + .../src/main/java/org/openapitools/client/model/Tag.java | 1 + .../java/org/openapitools/client/model/TypeHolderDefault.java | 1 + .../java/org/openapitools/client/model/TypeHolderExample.java | 1 + .../src/main/java/org/openapitools/client/model/User.java | 1 + .../src/main/java/org/openapitools/client/model/XmlItem.java | 1 + .../openapitools/client/model/AdditionalPropertiesAnyType.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesArray.java | 1 + .../openapitools/client/model/AdditionalPropertiesBoolean.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesClass.java | 1 + .../openapitools/client/model/AdditionalPropertiesInteger.java | 1 + .../openapitools/client/model/AdditionalPropertiesNumber.java | 1 + .../openapitools/client/model/AdditionalPropertiesObject.java | 1 + .../openapitools/client/model/AdditionalPropertiesString.java | 1 + .../src/main/java/org/openapitools/client/model/Animal.java | 1 + .../org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java | 1 + .../java/org/openapitools/client/model/ArrayOfNumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/ArrayTest.java | 1 + .../src/main/java/org/openapitools/client/model/BigCat.java | 1 + .../src/main/java/org/openapitools/client/model/BigCatAllOf.java | 1 + .../main/java/org/openapitools/client/model/Capitalization.java | 1 + .../src/main/java/org/openapitools/client/model/Cat.java | 1 + .../src/main/java/org/openapitools/client/model/CatAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/Category.java | 1 + .../src/main/java/org/openapitools/client/model/ClassModel.java | 1 + .../src/main/java/org/openapitools/client/model/Client.java | 1 + .../src/main/java/org/openapitools/client/model/Dog.java | 1 + .../src/main/java/org/openapitools/client/model/DogAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/EnumArrays.java | 1 + .../src/main/java/org/openapitools/client/model/EnumClass.java | 1 + .../src/main/java/org/openapitools/client/model/EnumTest.java | 1 + .../java/org/openapitools/client/model/FileSchemaTestClass.java | 1 + .../src/main/java/org/openapitools/client/model/FormatTest.java | 1 + .../main/java/org/openapitools/client/model/HasOnlyReadOnly.java | 1 + .../src/main/java/org/openapitools/client/model/MapTest.java | 1 + .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../java/org/openapitools/client/model/Model200Response.java | 1 + .../java/org/openapitools/client/model/ModelApiResponse.java | 1 + .../src/main/java/org/openapitools/client/model/ModelReturn.java | 1 + .../src/main/java/org/openapitools/client/model/Name.java | 1 + .../src/main/java/org/openapitools/client/model/NumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/Order.java | 1 + .../main/java/org/openapitools/client/model/OuterComposite.java | 1 + .../src/main/java/org/openapitools/client/model/OuterEnum.java | 1 + .../src/main/java/org/openapitools/client/model/Pet.java | 1 + .../main/java/org/openapitools/client/model/ReadOnlyFirst.java | 1 + .../java/org/openapitools/client/model/SpecialModelName.java | 1 + .../src/main/java/org/openapitools/client/model/Tag.java | 1 + .../java/org/openapitools/client/model/TypeHolderDefault.java | 1 + .../java/org/openapitools/client/model/TypeHolderExample.java | 1 + .../src/main/java/org/openapitools/client/model/User.java | 1 + .../src/main/java/org/openapitools/client/model/XmlItem.java | 1 + .../openapitools/client/model/AdditionalPropertiesAnyType.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesArray.java | 1 + .../openapitools/client/model/AdditionalPropertiesBoolean.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesClass.java | 1 + .../openapitools/client/model/AdditionalPropertiesInteger.java | 1 + .../openapitools/client/model/AdditionalPropertiesNumber.java | 1 + .../openapitools/client/model/AdditionalPropertiesObject.java | 1 + .../openapitools/client/model/AdditionalPropertiesString.java | 1 + .../src/main/java/org/openapitools/client/model/Animal.java | 1 + .../org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java | 1 + .../java/org/openapitools/client/model/ArrayOfNumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/ArrayTest.java | 1 + .../src/main/java/org/openapitools/client/model/BigCat.java | 1 + .../src/main/java/org/openapitools/client/model/BigCatAllOf.java | 1 + .../main/java/org/openapitools/client/model/Capitalization.java | 1 + .../src/main/java/org/openapitools/client/model/Cat.java | 1 + .../src/main/java/org/openapitools/client/model/CatAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/Category.java | 1 + .../src/main/java/org/openapitools/client/model/ClassModel.java | 1 + .../src/main/java/org/openapitools/client/model/Client.java | 1 + .../src/main/java/org/openapitools/client/model/Dog.java | 1 + .../src/main/java/org/openapitools/client/model/DogAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/EnumArrays.java | 1 + .../src/main/java/org/openapitools/client/model/EnumClass.java | 1 + .../src/main/java/org/openapitools/client/model/EnumTest.java | 1 + .../java/org/openapitools/client/model/FileSchemaTestClass.java | 1 + .../src/main/java/org/openapitools/client/model/FormatTest.java | 1 + .../main/java/org/openapitools/client/model/HasOnlyReadOnly.java | 1 + .../src/main/java/org/openapitools/client/model/MapTest.java | 1 + .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../java/org/openapitools/client/model/Model200Response.java | 1 + .../java/org/openapitools/client/model/ModelApiResponse.java | 1 + .../src/main/java/org/openapitools/client/model/ModelReturn.java | 1 + .../src/main/java/org/openapitools/client/model/Name.java | 1 + .../src/main/java/org/openapitools/client/model/NumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/Order.java | 1 + .../main/java/org/openapitools/client/model/OuterComposite.java | 1 + .../src/main/java/org/openapitools/client/model/OuterEnum.java | 1 + .../src/main/java/org/openapitools/client/model/Pet.java | 1 + .../main/java/org/openapitools/client/model/ReadOnlyFirst.java | 1 + .../java/org/openapitools/client/model/SpecialModelName.java | 1 + .../src/main/java/org/openapitools/client/model/Tag.java | 1 + .../java/org/openapitools/client/model/TypeHolderDefault.java | 1 + .../java/org/openapitools/client/model/TypeHolderExample.java | 1 + .../src/main/java/org/openapitools/client/model/User.java | 1 + .../src/main/java/org/openapitools/client/model/XmlItem.java | 1 + .../openapitools/client/model/AdditionalPropertiesAnyType.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesArray.java | 1 + .../openapitools/client/model/AdditionalPropertiesBoolean.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesClass.java | 1 + .../openapitools/client/model/AdditionalPropertiesInteger.java | 1 + .../openapitools/client/model/AdditionalPropertiesNumber.java | 1 + .../openapitools/client/model/AdditionalPropertiesObject.java | 1 + .../openapitools/client/model/AdditionalPropertiesString.java | 1 + .../src/main/java/org/openapitools/client/model/Animal.java | 1 + .../org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java | 1 + .../java/org/openapitools/client/model/ArrayOfNumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/ArrayTest.java | 1 + .../src/main/java/org/openapitools/client/model/BigCat.java | 1 + .../src/main/java/org/openapitools/client/model/BigCatAllOf.java | 1 + .../main/java/org/openapitools/client/model/Capitalization.java | 1 + .../vertx/src/main/java/org/openapitools/client/model/Cat.java | 1 + .../src/main/java/org/openapitools/client/model/CatAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/Category.java | 1 + .../src/main/java/org/openapitools/client/model/ClassModel.java | 1 + .../src/main/java/org/openapitools/client/model/Client.java | 1 + .../vertx/src/main/java/org/openapitools/client/model/Dog.java | 1 + .../src/main/java/org/openapitools/client/model/DogAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/EnumArrays.java | 1 + .../src/main/java/org/openapitools/client/model/EnumClass.java | 1 + .../src/main/java/org/openapitools/client/model/EnumTest.java | 1 + .../java/org/openapitools/client/model/FileSchemaTestClass.java | 1 + .../src/main/java/org/openapitools/client/model/FormatTest.java | 1 + .../main/java/org/openapitools/client/model/HasOnlyReadOnly.java | 1 + .../src/main/java/org/openapitools/client/model/MapTest.java | 1 + .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../java/org/openapitools/client/model/Model200Response.java | 1 + .../java/org/openapitools/client/model/ModelApiResponse.java | 1 + .../src/main/java/org/openapitools/client/model/ModelReturn.java | 1 + .../vertx/src/main/java/org/openapitools/client/model/Name.java | 1 + .../src/main/java/org/openapitools/client/model/NumberOnly.java | 1 + .../vertx/src/main/java/org/openapitools/client/model/Order.java | 1 + .../main/java/org/openapitools/client/model/OuterComposite.java | 1 + .../src/main/java/org/openapitools/client/model/OuterEnum.java | 1 + .../vertx/src/main/java/org/openapitools/client/model/Pet.java | 1 + .../main/java/org/openapitools/client/model/ReadOnlyFirst.java | 1 + .../java/org/openapitools/client/model/SpecialModelName.java | 1 + .../vertx/src/main/java/org/openapitools/client/model/Tag.java | 1 + .../java/org/openapitools/client/model/TypeHolderDefault.java | 1 + .../java/org/openapitools/client/model/TypeHolderExample.java | 1 + .../vertx/src/main/java/org/openapitools/client/model/User.java | 1 + .../src/main/java/org/openapitools/client/model/XmlItem.java | 1 + .../main/java/org/openapitools/client/model/ByteArrayObject.java | 1 + .../org/openapitools/client/model/AdditionalPropertiesClass.java | 1 + .../src/main/java/org/openapitools/client/model/Animal.java | 1 + .../org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java | 1 + .../java/org/openapitools/client/model/ArrayOfNumberOnly.java | 1 + .../src/main/java/org/openapitools/client/model/ArrayTest.java | 1 + .../main/java/org/openapitools/client/model/Capitalization.java | 1 + .../src/main/java/org/openapitools/client/model/Cat.java | 1 + .../src/main/java/org/openapitools/client/model/CatAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/Category.java | 1 + .../src/main/java/org/openapitools/client/model/ClassModel.java | 1 + .../src/main/java/org/openapitools/client/model/Client.java | 1 + .../java/org/openapitools/client/model/DeprecatedObject.java | 1 + .../src/main/java/org/openapitools/client/model/Dog.java | 1 + .../src/main/java/org/openapitools/client/model/DogAllOf.java | 1 + .../src/main/java/org/openapitools/client/model/EnumArrays.java | 1 + .../src/main/java/org/openapitools/client/model/EnumClass.java | 1 + .../src/main/java/org/openapitools/client/model/EnumTest.java | 1 + .../java/org/openapitools/client/model/FileSchemaTestClass.java | 1 + .../src/main/java/org/openapitools/client/model/Foo.java | 1 + .../src/main/java/org/openapitools/client/model/FormatTest.java | 1 + .../main/java/org/openapitools/client/model/HasOnlyReadOnly.java | 1 + .../java/org/openapitools/client/model/HealthCheckResult.java | 1 + .../org/openapitools/client/model/InlineResponseDefault.java | 1 + .../src/main/java/org/openapitools/client/model/MapTest.java | 1 + .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../java/org/openapitools/client/model/Model200Response.java | 1 + .../java/org/openapitools/client/model/ModelApiResponse.java | 1 + .../src/main/java/org/openapitools/client/model/ModelReturn.java | 1 + .../src/main/java/org/openapitools/client/model/Name.java | 1 + .../main/java/org/openapitools/client/model/NullableClass.java | 1 + .../src/main/java/org/openapitools/client/model/NumberOnly.java | 1 + .../openapitools/client/model/ObjectWithDeprecatedFields.java | 1 + .../src/main/java/org/openapitools/client/model/Order.java | 1 + .../main/java/org/openapitools/client/model/OuterComposite.java | 1 + .../src/main/java/org/openapitools/client/model/OuterEnum.java | 1 + .../org/openapitools/client/model/OuterEnumDefaultValue.java | 1 + .../java/org/openapitools/client/model/OuterEnumInteger.java | 1 + .../openapitools/client/model/OuterEnumIntegerDefaultValue.java | 1 + .../openapitools/client/model/OuterObjectWithEnumProperty.java | 1 + .../src/main/java/org/openapitools/client/model/Pet.java | 1 + .../main/java/org/openapitools/client/model/ReadOnlyFirst.java | 1 + .../java/org/openapitools/client/model/SpecialModelName.java | 1 + .../src/main/java/org/openapitools/client/model/Tag.java | 1 + .../src/main/java/org/openapitools/client/model/User.java | 1 + 595 files changed, 595 insertions(+) diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 12d050d984f..dca2873964f 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesAnyType diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index e49704ab978..44b66aea15f 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesArray diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 68a308a96f2..ec9e94fc8bf 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesBoolean diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 450b245ab2b..71c101d18c0 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -27,6 +27,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesClass diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index e1ac2518280..d7bf9ff106c 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesInteger diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index a12b774105f..34b272236ff 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesNumber diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 8091ce0d512..98c7a826084 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesObject diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 0b6866c4fd9..8d484682eae 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesString diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Animal.java index d0d552a67c3..4485050c8ef 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Animal.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.BigCat; import org.openapitools.client.model.Cat; import org.openapitools.client.model.Dog; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Animal diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 50ec3008bd6..70cca2e2a3c 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayOfArrayOfNumberOnly diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index e4bd3504968..ea42f683b60 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayOfNumberOnly diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ArrayTest.java index e2faf5ed423..f2e8b9b945e 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayTest diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/BigCat.java index 91ebb2a767a..ecc0f4a49b5 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/BigCat.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * BigCat diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/BigCatAllOf.java index 58588f53dcd..8ad59ef4000 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/BigCatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * BigCatAllOf diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Capitalization.java index db68e647294..ce40f914789 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Capitalization.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Capitalization diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Cat.java index 6ce1dff3829..60f69c5041a 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Cat.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.Animal; import org.openapitools.client.model.BigCat; import org.openapitools.client.model.CatAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Cat diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/CatAllOf.java index d8513f39fdf..ea0d8f78ef1 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * CatAllOf diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Category.java index 2ad7565657a..b4e06b7fa56 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Category.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Category diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ClassModel.java index 1872b8ad887..a695bc68f7d 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ClassModel.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model with \"_class\" property diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Client.java index 13c8982196c..f2902bfcbec 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Client.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Client diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Dog.java index 5820cea9ab4..74d8f9c0603 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Dog.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; import org.openapitools.client.model.DogAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Dog diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/DogAllOf.java index 26cd9000e38..1b671eab9e8 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * DogAllOf diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumArrays.java index 7cdb3158948..0bc1956f7db 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * EnumArrays diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumClass.java index e9102d97427..1190cf5abe3 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumClass.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumClass.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumTest.java index 9bc0f049548..2178182fe27 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumTest.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.OuterEnum; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * EnumTest diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 69eeeaea732..0c986e7b880 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * FileSchemaTestClass diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FormatTest.java index a9de30415e9..b7fe3006548 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FormatTest.java @@ -28,6 +28,7 @@ import java.util.UUID; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * FormatTest diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 4f7e8a75ca2..4c63faeaecc 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * HasOnlyReadOnly diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/MapTest.java index e795f5b836f..6fb8a3ca931 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * MapTest diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index b61d9919217..9800999e52d 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -29,6 +29,7 @@ import java.util.UUID; import org.openapitools.client.model.Animal; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * MixedPropertiesAndAdditionalPropertiesClass diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Model200Response.java index 21c275adfb5..baeaf1006e5 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Model200Response.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name starting with number diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 38002222241..f4cd57ec875 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ModelApiResponse diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ModelReturn.java index 42f2d7dbdd5..0608885dbc5 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing reserved words diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Name.java index 1008db032ee..0ca5dd29bdd 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Name.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name same as property name diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/NumberOnly.java index 872c450ee84..5b15bcaf320 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * NumberOnly diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Order.java index 05f4e2d0c4b..3555baa0726 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Order.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Order diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterComposite.java index 0e9854927f9..8d836a74bef 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * OuterComposite diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterEnum.java index 308646a320c..d2924eb9c29 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Pet.java index 02342da3137..e72a63d28fa 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Pet.java @@ -29,6 +29,7 @@ import java.util.Set; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Pet diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 64586deb1b2..7efe61604d8 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ReadOnlyFirst diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/SpecialModelName.java index 6116d1eed69..b55662453e8 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * SpecialModelName diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Tag.java index 33acaca34d3..6a94028f21f 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Tag.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Tag diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 8d33275e4c1..df7ebdaef30 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * TypeHolderDefault diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 035f6970f5a..9ff20dc37fe 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * TypeHolderExample diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/User.java index 337d1993067..953632044c4 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/User.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * User diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/XmlItem.java index 1090a5110a2..33a1e115a64 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/XmlItem.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * XmlItem diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 1fb67eca91c..1ab6e6f82f5 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesAnyType diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index da439d326aa..16a4f5f8f7c 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesArray diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 45d3872aae2..d60f186db90 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesBoolean diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index ed7d71f094e..e4cfeb48b7e 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -27,6 +27,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesClass diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index d75bb352497..003c31f2a05 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesInteger diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 3771e6293c7..57d461ec189 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesNumber diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 77d0510bd70..b9c0545c126 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesObject diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 1e84a60858d..cda3436cf40 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesString diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Animal.java index ebca3e354fa..6eaa7d0ed34 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Animal.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.BigCat; import org.openapitools.client.model.Cat; import org.openapitools.client.model.Dog; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Animal diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 952113e6037..b9d8a16c422 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayOfArrayOfNumberOnly diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 8362cd7b93c..240398a599b 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayOfNumberOnly diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayTest.java index 20b0ca4e9ea..468fbabce2d 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayTest diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java index 3d8c8d35a20..0d0ff4ebf7c 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * BigCat diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/BigCatAllOf.java index 2c6c96fd6b3..700fbcb2101 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/BigCatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * BigCatAllOf diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Capitalization.java index 3741d362639..f4c014f28d6 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Capitalization.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Capitalization diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Cat.java index aa0ee76220d..13cabfd8e11 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Cat.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.Animal; import org.openapitools.client.model.BigCat; import org.openapitools.client.model.CatAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Cat diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/CatAllOf.java index a6a43592d7c..e09e1a9e36c 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * CatAllOf diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Category.java index efd5ea13edf..7248edf4e05 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Category.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Category diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ClassModel.java index 0226adfa0aa..1716b7eb270 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ClassModel.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model with \"_class\" property diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Client.java index b47fbeed7fc..fe7f103c481 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Client.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Client diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Dog.java index 8482af9f8b5..198196cd1e1 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Dog.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; import org.openapitools.client.model.DogAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Dog diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/DogAllOf.java index 2e751ffc5df..abeb3573a62 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * DogAllOf diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumArrays.java index 2d64a10a29d..2174e45e590 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * EnumArrays diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumClass.java index e9102d97427..1190cf5abe3 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumClass.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumClass.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumTest.java index f76f3f6ed91..058d90a7d5c 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/EnumTest.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.OuterEnum; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * EnumTest diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index d844eaee229..85efa01c58b 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * FileSchemaTestClass diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/FormatTest.java index dd073c836bd..6e73bfbaae9 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/FormatTest.java @@ -28,6 +28,7 @@ import java.util.UUID; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * FormatTest diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 914a835ad26..78c2e3a6af8 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * HasOnlyReadOnly diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/MapTest.java index 6d9ccaa922f..b93fd49041f 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * MapTest diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 9ab35931485..e375e40c856 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -29,6 +29,7 @@ import java.util.UUID; import org.openapitools.client.model.Animal; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * MixedPropertiesAndAdditionalPropertiesClass diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Model200Response.java index 61afb2d6aea..9e2fdcc88a2 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Model200Response.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name starting with number diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ModelApiResponse.java index b321397acee..8392493414e 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ModelApiResponse diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ModelReturn.java index f7111ad51cd..6fac233ec4c 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing reserved words diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Name.java index 32accadf051..531efc60b4c 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Name.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name same as property name diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/NumberOnly.java index f1f18b83d8c..b1bfac878c3 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * NumberOnly diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Order.java index a10023b4655..58dafe0c194 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Order.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Order diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/OuterComposite.java index 2ff51847fae..af789b0521f 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * OuterComposite diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/OuterEnum.java index 308646a320c..d2924eb9c29 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Pet.java index 424810c32a5..4f9b4042738 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Pet.java @@ -29,6 +29,7 @@ import java.util.Set; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Pet diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index fda42111f60..daf3efb2c17 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ReadOnlyFirst diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/SpecialModelName.java index 865cb61d8f4..f95a6f08323 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * SpecialModelName diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Tag.java index 0f8bd9bbc13..9559020fd88 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/Tag.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Tag diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 3f58df79acc..41157b30ab7 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * TypeHolderDefault diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderExample.java index e47697f9083..8387092f47d 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * TypeHolderExample diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/User.java index 9a9fcc190a7..77b6e3dfece 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/User.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * User diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/XmlItem.java index 02b73cdca9c..3119578ba3d 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/XmlItem.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * XmlItem diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index ae545659226..a7043fae674 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesClass diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java index 028d31345db..f1c32090efd 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Cat; import org.openapitools.client.model.Dog; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Animal diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index e558e02ebe5..3f477a2a768 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayOfArrayOfNumberOnly diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index fd5f507f169..6e666fe3c7e 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayOfNumberOnly diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayTest.java index 281f50c3fb3..48b3d029ccd 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayTest diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Capitalization.java index db68e647294..ce40f914789 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Capitalization.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Capitalization diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java index fe6e7ae4050..8e15fb418ed 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; import org.openapitools.client.model.CatAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Cat diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java index 997f76d215b..69cfdbbd8e0 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * CatAllOf diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Category.java index 2ad7565657a..b4e06b7fa56 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Category.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Category diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ClassModel.java index 1872b8ad887..a695bc68f7d 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ClassModel.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model with \"_class\" property diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Client.java index 13c8982196c..f2902bfcbec 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Client.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Client diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DeprecatedObject.java index b442dc3dcff..7e40874a37e 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DeprecatedObject.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * DeprecatedObject diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java index 5820cea9ab4..74d8f9c0603 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; import org.openapitools.client.model.DogAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Dog diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java index 26cd9000e38..1b671eab9e8 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * DogAllOf diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumArrays.java index 6f8c2056318..5e6f93c6cfd 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * EnumArrays diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumClass.java index e9102d97427..1190cf5abe3 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumClass.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumClass.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java index 3ae56d3979a..b4de1289303 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java @@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import org.openapitools.jackson.nullable.JsonNullable; import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * EnumTest diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index fdc4c5a0920..f58670f41a5 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * FileSchemaTestClass diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Foo.java index 9de8c338a70..67e5208c76c 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Foo.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Foo diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java index 6fca91b9a07..9f5c915c38f 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java @@ -28,6 +28,7 @@ import java.util.UUID; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * FormatTest diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 4f7e8a75ca2..4c63faeaecc 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * HasOnlyReadOnly diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/HealthCheckResult.java index e9acad1a3f0..9cf29c66914 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/HealthCheckResult.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -27,6 +27,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import org.openapitools.jackson.nullable.JsonNullable; import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/InlineResponseDefault.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/InlineResponseDefault.java index f1ad740373e..16046669b22 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/InlineResponseDefault.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/InlineResponseDefault.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Foo; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * InlineResponseDefault diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java index 3561bb9ac0c..13d7c1b4410 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * MapTest diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index f8973bf9835..4ccffcf5965 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -29,6 +29,7 @@ import java.util.UUID; import org.openapitools.client.model.Animal; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * MixedPropertiesAndAdditionalPropertiesClass diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Model200Response.java index 21c275adfb5..baeaf1006e5 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Model200Response.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name starting with number diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 38002222241..f4cd57ec875 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ModelApiResponse diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelReturn.java index 42f2d7dbdd5..0608885dbc5 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing reserved words diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Name.java index 1008db032ee..0ca5dd29bdd 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Name.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name same as property name diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NullableClass.java index 37d9cc95440..5db5cbda3f3 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NullableClass.java @@ -34,6 +34,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import org.openapitools.jackson.nullable.JsonNullable; import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * NullableClass diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NumberOnly.java index 872c450ee84..5b15bcaf320 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * NumberOnly diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index 6948d8979e4..398567fe28b 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -27,6 +27,7 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.DeprecatedObject; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ObjectWithDeprecatedFields diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Order.java index 8fdfff301c9..322b7654542 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Order.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Order diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java index a3990c26ebe..109f7adc9f6 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * OuterComposite diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterEnum.java index d0c0bc3c9d2..4cd955b63dc 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java index 7f6c2c73aa2..73077cc8c31 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterEnumInteger.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterEnumInteger.java index c747a2e6dae..e6c2e38c2e7 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterEnumInteger.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterEnumInteger.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java index 4f5fcd1cd95..ef61373b187 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java index df0613b94a3..64d8bb8e20d 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.OuterEnumInteger; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * OuterObjectWithEnumProperty diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Pet.java index a4fc4172ab3..3069ad118ca 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Pet.java @@ -29,6 +29,7 @@ import java.util.Set; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Pet diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 64586deb1b2..7efe61604d8 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ReadOnlyFirst diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SpecialModelName.java index 6af38304715..d72baf59f4b 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * SpecialModelName diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Tag.java index 33acaca34d3..6a94028f21f 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Tag.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Tag diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/User.java index 337d1993067..953632044c4 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/User.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * User diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 12d050d984f..dca2873964f 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesAnyType diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index e49704ab978..44b66aea15f 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesArray diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 68a308a96f2..ec9e94fc8bf 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesBoolean diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 4e476cf79de..e10277c6a2f 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -27,6 +27,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesClass diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index e1ac2518280..d7bf9ff106c 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesInteger diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index a12b774105f..34b272236ff 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesNumber diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 8091ce0d512..98c7a826084 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesObject diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 0b6866c4fd9..8d484682eae 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesString diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java index d0d552a67c3..4485050c8ef 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.BigCat; import org.openapitools.client.model.Cat; import org.openapitools.client.model.Dog; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Animal diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index e558e02ebe5..3f477a2a768 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayOfArrayOfNumberOnly diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index fd5f507f169..6e666fe3c7e 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayOfNumberOnly diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayTest.java index 281f50c3fb3..48b3d029ccd 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayTest diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/BigCat.java index 91ebb2a767a..ecc0f4a49b5 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/BigCat.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * BigCat diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/BigCatAllOf.java index 58588f53dcd..8ad59ef4000 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/BigCatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * BigCatAllOf diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Capitalization.java index db68e647294..ce40f914789 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Capitalization.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Capitalization diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Cat.java index 6ce1dff3829..60f69c5041a 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Cat.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.Animal; import org.openapitools.client.model.BigCat; import org.openapitools.client.model.CatAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Cat diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/CatAllOf.java index d8513f39fdf..ea0d8f78ef1 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * CatAllOf diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Category.java index 2ad7565657a..b4e06b7fa56 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Category.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Category diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ClassModel.java index 1872b8ad887..a695bc68f7d 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ClassModel.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model with \"_class\" property diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Client.java index 13c8982196c..f2902bfcbec 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Client.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Client diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Dog.java index 5820cea9ab4..74d8f9c0603 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Dog.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; import org.openapitools.client.model.DogAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Dog diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/DogAllOf.java index 26cd9000e38..1b671eab9e8 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * DogAllOf diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumArrays.java index 6f8c2056318..5e6f93c6cfd 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * EnumArrays diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumClass.java index e9102d97427..1190cf5abe3 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumClass.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumClass.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumTest.java index 9bc0f049548..2178182fe27 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumTest.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.OuterEnum; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * EnumTest diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index fdc4c5a0920..f58670f41a5 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * FileSchemaTestClass diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FormatTest.java index a9de30415e9..b7fe3006548 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FormatTest.java @@ -28,6 +28,7 @@ import java.util.UUID; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * FormatTest diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 4f7e8a75ca2..4c63faeaecc 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * HasOnlyReadOnly diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java index 3561bb9ac0c..13d7c1b4410 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * MapTest diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index f8973bf9835..4ccffcf5965 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -29,6 +29,7 @@ import java.util.UUID; import org.openapitools.client.model.Animal; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * MixedPropertiesAndAdditionalPropertiesClass diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Model200Response.java index 21c275adfb5..baeaf1006e5 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Model200Response.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name starting with number diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 38002222241..f4cd57ec875 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ModelApiResponse diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelReturn.java index 42f2d7dbdd5..0608885dbc5 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing reserved words diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Name.java index 1008db032ee..0ca5dd29bdd 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Name.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name same as property name diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/NumberOnly.java index 872c450ee84..5b15bcaf320 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * NumberOnly diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Order.java index 05f4e2d0c4b..3555baa0726 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Order.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Order diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java index 0e9854927f9..8d836a74bef 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * OuterComposite diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterEnum.java index 308646a320c..d2924eb9c29 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Pet.java index a4fc4172ab3..3069ad118ca 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Pet.java @@ -29,6 +29,7 @@ import java.util.Set; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Pet diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 64586deb1b2..7efe61604d8 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ReadOnlyFirst diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/SpecialModelName.java index 6116d1eed69..b55662453e8 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * SpecialModelName diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Tag.java index 33acaca34d3..6a94028f21f 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Tag.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Tag diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 79ebf8ea845..44de66aed83 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * TypeHolderDefault diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 8e41bc2bee0..9a6645dc688 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * TypeHolderExample diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/User.java index 337d1993067..953632044c4 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/User.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * User diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/XmlItem.java index 0d54cd8ba26..a2ddbbeb7d8 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/XmlItem.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * XmlItem diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 12d050d984f..dca2873964f 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesAnyType diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index e49704ab978..44b66aea15f 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesArray diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 68a308a96f2..ec9e94fc8bf 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesBoolean diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 4e476cf79de..e10277c6a2f 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -27,6 +27,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesClass diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index e1ac2518280..d7bf9ff106c 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesInteger diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index a12b774105f..34b272236ff 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesNumber diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 8091ce0d512..98c7a826084 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesObject diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 0b6866c4fd9..8d484682eae 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesString diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Animal.java index d0d552a67c3..4485050c8ef 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Animal.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.BigCat; import org.openapitools.client.model.Cat; import org.openapitools.client.model.Dog; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Animal diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index e558e02ebe5..3f477a2a768 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayOfArrayOfNumberOnly diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index fd5f507f169..6e666fe3c7e 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayOfNumberOnly diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayTest.java index 281f50c3fb3..48b3d029ccd 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayTest diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/BigCat.java index 91ebb2a767a..ecc0f4a49b5 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/BigCat.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * BigCat diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/BigCatAllOf.java index 58588f53dcd..8ad59ef4000 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/BigCatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * BigCatAllOf diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Capitalization.java index db68e647294..ce40f914789 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Capitalization.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Capitalization diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Cat.java index 6ce1dff3829..60f69c5041a 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Cat.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.Animal; import org.openapitools.client.model.BigCat; import org.openapitools.client.model.CatAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Cat diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/CatAllOf.java index d8513f39fdf..ea0d8f78ef1 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * CatAllOf diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Category.java index 2ad7565657a..b4e06b7fa56 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Category.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Category diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ClassModel.java index 1872b8ad887..a695bc68f7d 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ClassModel.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model with \"_class\" property diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Client.java index 13c8982196c..f2902bfcbec 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Client.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Client diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Dog.java index 5820cea9ab4..74d8f9c0603 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Dog.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; import org.openapitools.client.model.DogAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Dog diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/DogAllOf.java index 26cd9000e38..1b671eab9e8 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * DogAllOf diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumArrays.java index 6f8c2056318..5e6f93c6cfd 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * EnumArrays diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumClass.java index e9102d97427..1190cf5abe3 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumClass.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumClass.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumTest.java index 9bc0f049548..2178182fe27 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumTest.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.OuterEnum; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * EnumTest diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index fdc4c5a0920..f58670f41a5 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * FileSchemaTestClass diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FormatTest.java index a9de30415e9..b7fe3006548 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FormatTest.java @@ -28,6 +28,7 @@ import java.util.UUID; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * FormatTest diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 4f7e8a75ca2..4c63faeaecc 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * HasOnlyReadOnly diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MapTest.java index 3561bb9ac0c..13d7c1b4410 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * MapTest diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index f8973bf9835..4ccffcf5965 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -29,6 +29,7 @@ import java.util.UUID; import org.openapitools.client.model.Animal; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * MixedPropertiesAndAdditionalPropertiesClass diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Model200Response.java index 21c275adfb5..baeaf1006e5 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Model200Response.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name starting with number diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 38002222241..f4cd57ec875 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ModelApiResponse diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelReturn.java index 42f2d7dbdd5..0608885dbc5 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing reserved words diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Name.java index 1008db032ee..0ca5dd29bdd 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Name.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name same as property name diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/NumberOnly.java index 872c450ee84..5b15bcaf320 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * NumberOnly diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Order.java index 05f4e2d0c4b..3555baa0726 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Order.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Order diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterComposite.java index 0e9854927f9..8d836a74bef 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * OuterComposite diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterEnum.java index 308646a320c..d2924eb9c29 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Pet.java index a4fc4172ab3..3069ad118ca 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Pet.java @@ -29,6 +29,7 @@ import java.util.Set; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Pet diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 64586deb1b2..7efe61604d8 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ReadOnlyFirst diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/SpecialModelName.java index 6116d1eed69..b55662453e8 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * SpecialModelName diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Tag.java index 33acaca34d3..6a94028f21f 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Tag.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Tag diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 79ebf8ea845..44de66aed83 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * TypeHolderDefault diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 8e41bc2bee0..9a6645dc688 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * TypeHolderExample diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/User.java index 337d1993067..953632044c4 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/User.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * User diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/XmlItem.java index 0d54cd8ba26..a2ddbbeb7d8 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/XmlItem.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * XmlItem diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 05c3fcb8581..ae3f39eee7e 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 1379543be67..3de7828f3c6 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 1e509bfbef6..8743aebff7f 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 649ccb77b23..08f3dbd8eda 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -27,6 +27,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 90fdb84b996..34ff567529f 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 91d969ef0d2..ef48b228b60 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 2e5ce57c533..45878377ff6 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 5db6e6c7ab4..f923e8e3858 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Animal.java index 904bc9003b9..c384a526cfb 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Animal.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.BigCat; import org.openapitools.client.model.Cat; import org.openapitools.client.model.Dog; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 477669fdbf2..a2796b36007 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index df8fe59a3fd..0280968ee97 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayTest.java index 25693ddefb3..5adcbddfb2f 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCat.java index 244430075d7..d6ee7b08ffb 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCat.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCatAllOf.java index fd07b1031d2..975b04a4e61 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Capitalization.java index c836cd28444..c4473760390 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Capitalization.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Cat.java index 58397080645..25b62faf367 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Cat.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.Animal; import org.openapitools.client.model.BigCat; import org.openapitools.client.model.CatAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/CatAllOf.java index 727d563dbe6..98b05e0b453 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Category.java index ab8f80fd076..5766fb273da 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Category.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ClassModel.java index 7f53a73d543..75a0bcf5366 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ClassModel.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Client.java index 93b0a62e207..b195964c25c 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Client.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Dog.java index 66bb15f509e..d0f9cba0dfb 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Dog.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; import org.openapitools.client.model.DogAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/DogAllOf.java index fc5bbf01789..5a0a758be94 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumArrays.java index 1317b9fc70e..6ec6d640040 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumClass.java index d015b74e06a..43ec2faf20c 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumClass.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumClass.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumTest.java index ce0c7c88d82..711a2b430ec 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/EnumTest.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.OuterEnum; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index fe4e4a86804..1b11024f3ed 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FormatTest.java index 56b94fdcb01..5b0b620ec7e 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FormatTest.java @@ -28,6 +28,7 @@ import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.UUID; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index b7d84a73afb..3a9230d9898 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MapTest.java index da5f67ace61..77751384b3e 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index b93ae211bdd..6d0df6c1456 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -29,6 +29,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.client.model.Animal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Model200Response.java index 2f94a2bec8a..d64b693d80a 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Model200Response.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 68a129460bf..e753c7bc100 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ModelReturn.java index 0e280f6f66a..4c2f7d6ebb5 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Name.java index 5b1e4e8a166..78ea835199c 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Name.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/NumberOnly.java index 4ee3d62e22b..94e8dcf5fda 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Order.java index c9a429127cf..7001777b107 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Order.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/OuterComposite.java index 4b7fe42bdc4..6ce212beff7 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/OuterEnum.java index 537a046fbed..386290bc652 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Pet.java index d16e9091865..fbd45da4012 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Pet.java @@ -29,6 +29,7 @@ import java.util.Set; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 6926a9e9424..afa3baa8069 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/SpecialModelName.java index 8af6abdbddc..b660e018d38 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Tag.java index 231012f61f4..83871ea03b9 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Tag.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index d5a5842e8f2..5cea541bdbc 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderExample.java index cf5f9fb0e27..959d28e5fa9 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/User.java index 7894560f251..1d14c68d04a 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/User.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/XmlItem.java index 13df57909bd..2c89cecab78 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/XmlItem.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; import org.hibernate.validator.constraints.*; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 12d050d984f..dca2873964f 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesAnyType diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index e49704ab978..44b66aea15f 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesArray diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 68a308a96f2..ec9e94fc8bf 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesBoolean diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 450b245ab2b..71c101d18c0 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -27,6 +27,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesClass diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index e1ac2518280..d7bf9ff106c 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesInteger diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index a12b774105f..34b272236ff 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesNumber diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 8091ce0d512..98c7a826084 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesObject diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 0b6866c4fd9..8d484682eae 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesString diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java index d0d552a67c3..4485050c8ef 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.BigCat; import org.openapitools.client.model.Cat; import org.openapitools.client.model.Dog; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Animal diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 50ec3008bd6..70cca2e2a3c 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayOfArrayOfNumberOnly diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index e4bd3504968..ea42f683b60 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayOfNumberOnly diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayTest.java index e2faf5ed423..f2e8b9b945e 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayTest diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/BigCat.java index 91ebb2a767a..ecc0f4a49b5 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/BigCat.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * BigCat diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/BigCatAllOf.java index 58588f53dcd..8ad59ef4000 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/BigCatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * BigCatAllOf diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Capitalization.java index db68e647294..ce40f914789 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Capitalization.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Capitalization diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Cat.java index 6ce1dff3829..60f69c5041a 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Cat.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.Animal; import org.openapitools.client.model.BigCat; import org.openapitools.client.model.CatAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Cat diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/CatAllOf.java index d8513f39fdf..ea0d8f78ef1 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * CatAllOf diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Category.java index 2ad7565657a..b4e06b7fa56 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Category.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Category diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ClassModel.java index 1872b8ad887..a695bc68f7d 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ClassModel.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model with \"_class\" property diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Client.java index 13c8982196c..f2902bfcbec 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Client.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Client diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Dog.java index 5820cea9ab4..74d8f9c0603 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Dog.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; import org.openapitools.client.model.DogAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Dog diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/DogAllOf.java index 26cd9000e38..1b671eab9e8 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * DogAllOf diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumArrays.java index 7cdb3158948..0bc1956f7db 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * EnumArrays diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumClass.java index e9102d97427..1190cf5abe3 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumClass.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumClass.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java index 9bc0f049548..2178182fe27 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.OuterEnum; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * EnumTest diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 69eeeaea732..0c986e7b880 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * FileSchemaTestClass diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FormatTest.java index a9de30415e9..b7fe3006548 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FormatTest.java @@ -28,6 +28,7 @@ import java.util.UUID; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * FormatTest diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 4f7e8a75ca2..4c63faeaecc 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * HasOnlyReadOnly diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MapTest.java index e795f5b836f..6fb8a3ca931 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * MapTest diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index b61d9919217..9800999e52d 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -29,6 +29,7 @@ import java.util.UUID; import org.openapitools.client.model.Animal; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * MixedPropertiesAndAdditionalPropertiesClass diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Model200Response.java index 21c275adfb5..baeaf1006e5 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Model200Response.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name starting with number diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 38002222241..f4cd57ec875 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ModelApiResponse diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ModelReturn.java index 42f2d7dbdd5..0608885dbc5 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing reserved words diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Name.java index 1008db032ee..0ca5dd29bdd 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Name.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name same as property name diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/NumberOnly.java index 872c450ee84..5b15bcaf320 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * NumberOnly diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Order.java index 05f4e2d0c4b..3555baa0726 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Order.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Order diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterComposite.java index 0e9854927f9..8d836a74bef 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * OuterComposite diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterEnum.java index 308646a320c..d2924eb9c29 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Pet.java index 02342da3137..e72a63d28fa 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Pet.java @@ -29,6 +29,7 @@ import java.util.Set; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Pet diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 64586deb1b2..7efe61604d8 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ReadOnlyFirst diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/SpecialModelName.java index 6116d1eed69..b55662453e8 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * SpecialModelName diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Tag.java index 33acaca34d3..6a94028f21f 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Tag.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Tag diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 8d33275e4c1..df7ebdaef30 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * TypeHolderDefault diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 035f6970f5a..9ff20dc37fe 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * TypeHolderExample diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/User.java index 337d1993067..953632044c4 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/User.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * User diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/XmlItem.java index 1090a5110a2..33a1e115a64 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/XmlItem.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * XmlItem diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 71ff82e9413..0c1a3b98fd1 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 8618b299a31..3775e05a159 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 33906c12ce8..0a66ce2fce4 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index fb74ffbdc0e..730d13094ca 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -27,6 +27,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 18458df1fb7..3b04202f74b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 4d8324b148f..2b2d665ca9b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 4c3b871cb50..061cee4560b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 7d035921efa..8b582c4dcab 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java index 4f673cd45b3..c7bfcde7b43 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.BigCat; import org.openapitools.client.model.Cat; import org.openapitools.client.model.Dog; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 0ce10ca6398..593b7849b81 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 810697e34f6..bdfde065539 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayTest.java index 050d7096802..b36953aa09e 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/BigCat.java index 579953364e1..c746c876767 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/BigCat.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/BigCatAllOf.java index f6b445c9aa6..eed55a9ec4f 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/BigCatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Capitalization.java index 6aeaf686f78..a56603e687a 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Capitalization.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Cat.java index 22b40dcefae..92c1f95fd41 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Cat.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.Animal; import org.openapitools.client.model.BigCat; import org.openapitools.client.model.CatAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/CatAllOf.java index 3c4b715269e..730d6c2b6bf 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Category.java index de58d4daace..0e9d0507d56 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Category.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ClassModel.java index 18d5248e4e3..cbef23dc6e7 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ClassModel.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Client.java index 616b642283c..8b3efb8b827 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Client.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Dog.java index 7eb321f5d0e..e4846d77e38 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Dog.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; import org.openapitools.client.model.DogAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/DogAllOf.java index 829ad14a799..dcf781ab549 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumArrays.java index dc5d9e18477..7eefc4df737 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumClass.java index 97bf1c8ed7e..5356a732d87 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumClass.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumClass.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java index 8a26faa394e..938acc8d16f 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.OuterEnum; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index cc0f60da66b..069518e6d8d 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java index 2c05c50d0d0..38e9a91ffc5 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java @@ -28,6 +28,7 @@ import java.util.UUID; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index e728ade4ee7..883d0faea8b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java index 0bb54f92f7c..9975f8ca2c9 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index eeb757b7a89..539584bde58 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -29,6 +29,7 @@ import java.util.UUID; import org.openapitools.client.model.Animal; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Model200Response.java index c5df690de80..06356c0dcd1 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Model200Response.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 81fb0f3125b..dc878c92542 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelReturn.java index 87d3a20895f..98bbef5af6d 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Name.java index 4b1e1f6c611..f1708029a71 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Name.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/NumberOnly.java index 79c8a867f5f..961b34a0015 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Order.java index aa1d0029235..2a24a6c5043 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Order.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java index 9b71b1782a3..83b4d247f1a 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterEnum.java index dc1839041f6..f9eb538c608 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Pet.java index a04e7945022..8100eed824b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Pet.java @@ -29,6 +29,7 @@ import java.util.Set; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index c9abbbe2a4e..df234d47915 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/SpecialModelName.java index 4382d19395b..b306d5b64ff 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Tag.java index 111dd8b5043..7947cd8d81e 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Tag.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index c4cc81a343d..624e6aa3ff1 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 325b8e9666b..57ca9a24842 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/User.java index 9d5ff4191ba..5c64d86c654 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/User.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/XmlItem.java index 5005c3490b0..ee00416d37b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/XmlItem.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 12d050d984f..dca2873964f 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesAnyType diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index e49704ab978..44b66aea15f 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesArray diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 68a308a96f2..ec9e94fc8bf 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesBoolean diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 450b245ab2b..71c101d18c0 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -27,6 +27,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesClass diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index e1ac2518280..d7bf9ff106c 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesInteger diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index a12b774105f..34b272236ff 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesNumber diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 8091ce0d512..98c7a826084 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesObject diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 0b6866c4fd9..8d484682eae 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesString diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java index d0d552a67c3..4485050c8ef 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.BigCat; import org.openapitools.client.model.Cat; import org.openapitools.client.model.Dog; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Animal diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 50ec3008bd6..70cca2e2a3c 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayOfArrayOfNumberOnly diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index e4bd3504968..ea42f683b60 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayOfNumberOnly diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayTest.java index e2faf5ed423..f2e8b9b945e 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayTest diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/BigCat.java index 91ebb2a767a..ecc0f4a49b5 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/BigCat.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * BigCat diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/BigCatAllOf.java index 58588f53dcd..8ad59ef4000 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/BigCatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * BigCatAllOf diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Capitalization.java index db68e647294..ce40f914789 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Capitalization.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Capitalization diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java index 6ce1dff3829..60f69c5041a 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.Animal; import org.openapitools.client.model.BigCat; import org.openapitools.client.model.CatAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Cat diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/CatAllOf.java index d8513f39fdf..ea0d8f78ef1 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * CatAllOf diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java index 2ad7565657a..b4e06b7fa56 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Category diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ClassModel.java index 1872b8ad887..a695bc68f7d 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ClassModel.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model with \"_class\" property diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Client.java index 13c8982196c..f2902bfcbec 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Client.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Client diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Dog.java index 5820cea9ab4..74d8f9c0603 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Dog.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; import org.openapitools.client.model.DogAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Dog diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DogAllOf.java index 26cd9000e38..1b671eab9e8 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * DogAllOf diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumArrays.java index 7cdb3158948..0bc1956f7db 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * EnumArrays diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumClass.java index e9102d97427..1190cf5abe3 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumClass.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java index 9bc0f049548..2178182fe27 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.OuterEnum; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * EnumTest diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 69eeeaea732..0c986e7b880 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * FileSchemaTestClass diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java index a9de30415e9..b7fe3006548 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java @@ -28,6 +28,7 @@ import java.util.UUID; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * FormatTest diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 4f7e8a75ca2..4c63faeaecc 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * HasOnlyReadOnly diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java index e795f5b836f..6fb8a3ca931 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * MapTest diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index b61d9919217..9800999e52d 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -29,6 +29,7 @@ import java.util.UUID; import org.openapitools.client.model.Animal; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * MixedPropertiesAndAdditionalPropertiesClass diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Model200Response.java index 21c275adfb5..baeaf1006e5 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Model200Response.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name starting with number diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 38002222241..f4cd57ec875 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ModelApiResponse diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelReturn.java index 42f2d7dbdd5..0608885dbc5 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing reserved words diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Name.java index 1008db032ee..0ca5dd29bdd 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Name.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name same as property name diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NumberOnly.java index 872c450ee84..5b15bcaf320 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * NumberOnly diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Order.java index 05f4e2d0c4b..3555baa0726 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Order.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Order diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java index 0e9854927f9..8d836a74bef 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * OuterComposite diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterEnum.java index 308646a320c..d2924eb9c29 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java index 02342da3137..e72a63d28fa 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java @@ -29,6 +29,7 @@ import java.util.Set; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Pet diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 64586deb1b2..7efe61604d8 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ReadOnlyFirst diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java index 6116d1eed69..b55662453e8 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * SpecialModelName diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java index 33acaca34d3..6a94028f21f 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Tag diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 8d33275e4c1..df7ebdaef30 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * TypeHolderDefault diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 035f6970f5a..9ff20dc37fe 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * TypeHolderExample diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/User.java index 337d1993067..953632044c4 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/User.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * User diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/XmlItem.java index 1090a5110a2..33a1e115a64 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/XmlItem.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * XmlItem diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 08a594e8b71..78f3e0fdb76 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 00b33e56f71..e3119403bd7 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index f16149233f1..af3d5ea9ee0 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 3364006115c..91df8b6ecb3 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -27,6 +27,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 54870443903..0170f0010d4 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index d9654430b0d..e20b0d69d14 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index ecd584bbbcb..ca4cb32b001 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index bde9d0e3225..b21fea22223 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Animal.java index 4bfa74c6070..c20a5e9a464 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Animal.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.BigCat; import org.openapitools.client.model.Cat; import org.openapitools.client.model.Dog; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 239aef2d464..1ecba9ed7b3 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 80cc3e6a0de..44818d498c4 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayTest.java index 1852f67c614..e596fe1035a 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/BigCat.java index df20fd71330..d22b4cc1976 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/BigCat.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/BigCatAllOf.java index 0691e940f1a..705bcbcbf0a 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/BigCatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Capitalization.java index 058ff135f0f..de2c02b916b 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Capitalization.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Cat.java index 1521a8a407a..f5d55dd282e 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Cat.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.Animal; import org.openapitools.client.model.BigCat; import org.openapitools.client.model.CatAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/CatAllOf.java index 7d2d495e9a7..5d6e28d6dbd 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Category.java index b8104a68620..6fe982ab35c 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Category.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ClassModel.java index 49467dfa9c3..3d1200fdcc7 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ClassModel.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Client.java index 0dad5802d67..17b2e308f32 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Client.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Dog.java index e24b6f0190e..5c0199e1aff 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Dog.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; import org.openapitools.client.model.DogAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/DogAllOf.java index d7a1d47c7e7..028dbeef834 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumArrays.java index 52cf16722ef..bb0d6e66296 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumClass.java index d78b71854be..0ad17857829 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumClass.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumClass.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumTest.java index 0598b6e359c..d9086d5f861 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/EnumTest.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.OuterEnum; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 8ef12b6dfff..e50ec5215e9 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FormatTest.java index aab3ba9968d..3a50d7dd516 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FormatTest.java @@ -28,6 +28,7 @@ import java.util.UUID; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 2b95c45be10..431396413ae 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MapTest.java index 5e4620e322d..0c9c17ba13d 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8cf0b3a1117..3f9bc7cba78 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -29,6 +29,7 @@ import java.util.UUID; import org.openapitools.client.model.Animal; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Model200Response.java index a755b09e162..4815a48e4e6 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Model200Response.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 2d1136ae376..5e8f1c2fb5d 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ModelReturn.java index de329bf5501..3c774358092 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Name.java index f0a82167e27..35ae2b29f64 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Name.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/NumberOnly.java index 09ec0b08b02..3dcafc33b8c 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Order.java index f4e5c1b983e..9b8cf2afacc 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Order.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/OuterComposite.java index 2d90dad97bf..6347f87be41 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/OuterEnum.java index 5591f09ff23..6986680d3c1 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Pet.java index e32086552af..63707cf2cc6 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Pet.java @@ -29,6 +29,7 @@ import java.util.Set; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index f2562150a65..e1c18697589 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/SpecialModelName.java index e32d7813dee..00f09fc6541 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Tag.java index 03d9a750d25..f3663a1b2c1 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Tag.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 6fc2f1a1d55..5cfb572e67a 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 43b303a590c..5f612fae672 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/User.java index c3f07d60548..1a87a5c92ef 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/User.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/XmlItem.java index 307893a3bec..a788eb758d9 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/XmlItem.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 12d050d984f..dca2873964f 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesAnyType diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index e49704ab978..44b66aea15f 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesArray diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 68a308a96f2..ec9e94fc8bf 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesBoolean diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 450b245ab2b..71c101d18c0 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -27,6 +27,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesClass diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index e1ac2518280..d7bf9ff106c 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesInteger diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index a12b774105f..34b272236ff 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesNumber diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 8091ce0d512..98c7a826084 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesObject diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 0b6866c4fd9..8d484682eae 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesString diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Animal.java index d0d552a67c3..4485050c8ef 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Animal.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.BigCat; import org.openapitools.client.model.Cat; import org.openapitools.client.model.Dog; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Animal diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 50ec3008bd6..70cca2e2a3c 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayOfArrayOfNumberOnly diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index e4bd3504968..ea42f683b60 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayOfNumberOnly diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ArrayTest.java index e2faf5ed423..f2e8b9b945e 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayTest diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java index 91ebb2a767a..ecc0f4a49b5 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * BigCat diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/BigCatAllOf.java index 58588f53dcd..8ad59ef4000 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/BigCatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * BigCatAllOf diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Capitalization.java index db68e647294..ce40f914789 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Capitalization.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Capitalization diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Cat.java index 6ce1dff3829..60f69c5041a 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Cat.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.Animal; import org.openapitools.client.model.BigCat; import org.openapitools.client.model.CatAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Cat diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/CatAllOf.java index d8513f39fdf..ea0d8f78ef1 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * CatAllOf diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Category.java index 2ad7565657a..b4e06b7fa56 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Category.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Category diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ClassModel.java index 1872b8ad887..a695bc68f7d 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ClassModel.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model with \"_class\" property diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Client.java index 13c8982196c..f2902bfcbec 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Client.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Client diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Dog.java index 5820cea9ab4..74d8f9c0603 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Dog.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; import org.openapitools.client.model.DogAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Dog diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/DogAllOf.java index 26cd9000e38..1b671eab9e8 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * DogAllOf diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/EnumArrays.java index 7cdb3158948..0bc1956f7db 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * EnumArrays diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/EnumClass.java index e9102d97427..1190cf5abe3 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/EnumClass.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/EnumClass.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/EnumTest.java index 9bc0f049548..2178182fe27 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/EnumTest.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.OuterEnum; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * EnumTest diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 69eeeaea732..0c986e7b880 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * FileSchemaTestClass diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/FormatTest.java index ce7329c644b..4b657c15d3f 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/FormatTest.java @@ -28,6 +28,7 @@ import java.util.UUID; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * FormatTest diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 4f7e8a75ca2..4c63faeaecc 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * HasOnlyReadOnly diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/MapTest.java index e795f5b836f..6fb8a3ca931 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * MapTest diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index b61d9919217..9800999e52d 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -29,6 +29,7 @@ import java.util.UUID; import org.openapitools.client.model.Animal; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * MixedPropertiesAndAdditionalPropertiesClass diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Model200Response.java index 21c275adfb5..baeaf1006e5 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Model200Response.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name starting with number diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 38002222241..f4cd57ec875 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ModelApiResponse diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ModelReturn.java index 42f2d7dbdd5..0608885dbc5 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing reserved words diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Name.java index 1008db032ee..0ca5dd29bdd 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Name.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name same as property name diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/NumberOnly.java index 872c450ee84..5b15bcaf320 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * NumberOnly diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Order.java index 05f4e2d0c4b..3555baa0726 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Order.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.threeten.bp.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Order diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/OuterComposite.java index 0e9854927f9..8d836a74bef 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * OuterComposite diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/OuterEnum.java index 308646a320c..d2924eb9c29 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Pet.java index 02342da3137..e72a63d28fa 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Pet.java @@ -29,6 +29,7 @@ import java.util.Set; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Pet diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 64586deb1b2..7efe61604d8 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ReadOnlyFirst diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/SpecialModelName.java index 6116d1eed69..b55662453e8 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * SpecialModelName diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Tag.java index 33acaca34d3..6a94028f21f 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/Tag.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Tag diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 8d33275e4c1..df7ebdaef30 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * TypeHolderDefault diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 035f6970f5a..9ff20dc37fe 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * TypeHolderExample diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/User.java index 337d1993067..953632044c4 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/User.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * User diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/XmlItem.java index 1090a5110a2..33a1e115a64 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/XmlItem.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * XmlItem diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 12d050d984f..dca2873964f 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesAnyType diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index e49704ab978..44b66aea15f 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesArray diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 68a308a96f2..ec9e94fc8bf 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesBoolean diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 450b245ab2b..71c101d18c0 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -27,6 +27,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesClass diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index e1ac2518280..d7bf9ff106c 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesInteger diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index a12b774105f..34b272236ff 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesNumber diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 8091ce0d512..98c7a826084 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesObject diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 0b6866c4fd9..8d484682eae 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesString diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java index d0d552a67c3..4485050c8ef 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.BigCat; import org.openapitools.client.model.Cat; import org.openapitools.client.model.Dog; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Animal diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 50ec3008bd6..70cca2e2a3c 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayOfArrayOfNumberOnly diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index e4bd3504968..ea42f683b60 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayOfNumberOnly diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayTest.java index e2faf5ed423..f2e8b9b945e 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayTest diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/BigCat.java index 91ebb2a767a..ecc0f4a49b5 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/BigCat.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * BigCat diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/BigCatAllOf.java index 58588f53dcd..8ad59ef4000 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/BigCatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * BigCatAllOf diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Capitalization.java index db68e647294..ce40f914789 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Capitalization.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Capitalization diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Cat.java index 6ce1dff3829..60f69c5041a 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Cat.java @@ -28,6 +28,7 @@ import org.openapitools.client.model.Animal; import org.openapitools.client.model.BigCat; import org.openapitools.client.model.CatAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Cat diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/CatAllOf.java index d8513f39fdf..ea0d8f78ef1 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * CatAllOf diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Category.java index 2ad7565657a..b4e06b7fa56 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Category.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Category diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ClassModel.java index 1872b8ad887..a695bc68f7d 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ClassModel.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model with \"_class\" property diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Client.java index 13c8982196c..f2902bfcbec 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Client.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Client diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Dog.java index 5820cea9ab4..74d8f9c0603 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Dog.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; import org.openapitools.client.model.DogAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Dog diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/DogAllOf.java index 26cd9000e38..1b671eab9e8 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * DogAllOf diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumArrays.java index 7cdb3158948..0bc1956f7db 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * EnumArrays diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumClass.java index e9102d97427..1190cf5abe3 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumClass.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumClass.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java index 9bc0f049548..2178182fe27 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.OuterEnum; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * EnumTest diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 69eeeaea732..0c986e7b880 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * FileSchemaTestClass diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FormatTest.java index 68caaef9307..72fb5c496d2 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FormatTest.java @@ -28,6 +28,7 @@ import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.UUID; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * FormatTest diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 4f7e8a75ca2..4c63faeaecc 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * HasOnlyReadOnly diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MapTest.java index e795f5b836f..6fb8a3ca931 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * MapTest diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index acc01171659..4b63ce34733 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -29,6 +29,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.client.model.Animal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * MixedPropertiesAndAdditionalPropertiesClass diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Model200Response.java index 21c275adfb5..baeaf1006e5 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Model200Response.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name starting with number diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 38002222241..f4cd57ec875 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ModelApiResponse diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ModelReturn.java index 42f2d7dbdd5..0608885dbc5 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing reserved words diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Name.java index 1008db032ee..0ca5dd29bdd 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Name.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name same as property name diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/NumberOnly.java index 872c450ee84..5b15bcaf320 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * NumberOnly diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Order.java index a4a01dcec78..cbbef0485bd 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Order.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Order diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterComposite.java index 0e9854927f9..8d836a74bef 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * OuterComposite diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterEnum.java index 308646a320c..d2924eb9c29 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Pet.java index 02342da3137..e72a63d28fa 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Pet.java @@ -29,6 +29,7 @@ import java.util.Set; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Pet diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 64586deb1b2..7efe61604d8 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ReadOnlyFirst diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/SpecialModelName.java index 6116d1eed69..b55662453e8 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * SpecialModelName diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Tag.java index 33acaca34d3..6a94028f21f 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Tag.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Tag diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 8d33275e4c1..df7ebdaef30 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * TypeHolderDefault diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/TypeHolderExample.java index 035f6970f5a..9ff20dc37fe 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * TypeHolderExample diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/User.java index 337d1993067..953632044c4 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/User.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * User diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/XmlItem.java index 1090a5110a2..33a1e115a64 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/XmlItem.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * XmlItem diff --git a/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/model/ByteArrayObject.java b/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/model/ByteArrayObject.java index a15edcb77f4..61c33e3256c 100644 --- a/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/model/ByteArrayObject.java +++ b/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/model/ByteArrayObject.java @@ -28,6 +28,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import org.openapitools.jackson.nullable.JsonNullable; import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ByteArrayObject diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 711d8aba8e2..5b8b75022df 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AdditionalPropertiesClass diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Animal.java index 028d31345db..f1c32090efd 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Animal.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Cat; import org.openapitools.client.model.Dog; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Animal diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 50ec3008bd6..70cca2e2a3c 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayOfArrayOfNumberOnly diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index e4bd3504968..ea42f683b60 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayOfNumberOnly diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayTest.java index e2faf5ed423..f2e8b9b945e 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ArrayTest diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Capitalization.java index db68e647294..ce40f914789 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Capitalization.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Capitalization diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Cat.java index aae2ca74caf..ccfe6d7ae2d 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Cat.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; import org.openapitools.client.model.CatAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Cat diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/CatAllOf.java index d8513f39fdf..ea0d8f78ef1 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * CatAllOf diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Category.java index 2ad7565657a..b4e06b7fa56 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Category.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Category diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ClassModel.java index 1872b8ad887..a695bc68f7d 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ClassModel.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model with \"_class\" property diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Client.java index 13c8982196c..f2902bfcbec 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Client.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Client diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/DeprecatedObject.java index b442dc3dcff..7e40874a37e 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/DeprecatedObject.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * DeprecatedObject diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Dog.java index 5820cea9ab4..74d8f9c0603 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Dog.java @@ -27,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; import org.openapitools.client.model.DogAllOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Dog diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/DogAllOf.java index 26cd9000e38..1b671eab9e8 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * DogAllOf diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumArrays.java index 7cdb3158948..0bc1956f7db 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * EnumArrays diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumClass.java index e9102d97427..1190cf5abe3 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumClass.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumClass.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumTest.java index 3ae56d3979a..b4de1289303 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumTest.java @@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import org.openapitools.jackson.nullable.JsonNullable; import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * EnumTest diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 69eeeaea732..0c986e7b880 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -25,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * FileSchemaTestClass diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Foo.java index 9de8c338a70..67e5208c76c 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Foo.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Foo diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FormatTest.java index 2cfdd2b7f47..c2a9a96f6ba 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/FormatTest.java @@ -28,6 +28,7 @@ import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.UUID; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * FormatTest diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 4f7e8a75ca2..4c63faeaecc 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * HasOnlyReadOnly diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/HealthCheckResult.java index e9acad1a3f0..9cf29c66914 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/HealthCheckResult.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -27,6 +27,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import org.openapitools.jackson.nullable.JsonNullable; import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/InlineResponseDefault.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/InlineResponseDefault.java index f1ad740373e..16046669b22 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/InlineResponseDefault.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/InlineResponseDefault.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Foo; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * InlineResponseDefault diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MapTest.java index e795f5b836f..6fb8a3ca931 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * MapTest diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index acc01171659..4b63ce34733 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -29,6 +29,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.client.model.Animal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * MixedPropertiesAndAdditionalPropertiesClass diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Model200Response.java index 21c275adfb5..baeaf1006e5 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Model200Response.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name starting with number diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 38002222241..f4cd57ec875 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ModelApiResponse diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ModelReturn.java index 42f2d7dbdd5..0608885dbc5 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing reserved words diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Name.java index 1008db032ee..0ca5dd29bdd 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Name.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name same as property name diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/NullableClass.java index d11a03e3e31..e2f3b54200b 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/NullableClass.java @@ -34,6 +34,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import org.openapitools.jackson.nullable.JsonNullable; import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * NullableClass diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/NumberOnly.java index 872c450ee84..5b15bcaf320 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * NumberOnly diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index d6da37886e8..00681d71b75 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -27,6 +27,7 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.DeprecatedObject; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ObjectWithDeprecatedFields diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Order.java index a4a01dcec78..cbbef0485bd 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Order.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Order diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterComposite.java index 0e9854927f9..8d836a74bef 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * OuterComposite diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterEnum.java index d0c0bc3c9d2..4cd955b63dc 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java index 7f6c2c73aa2..73077cc8c31 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterEnumInteger.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterEnumInteger.java index c747a2e6dae..e6c2e38c2e7 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterEnumInteger.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterEnumInteger.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java index 4f5fcd1cd95..ef61373b187 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java @@ -16,6 +16,7 @@ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java index df0613b94a3..64d8bb8e20d 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.OuterEnumInteger; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * OuterObjectWithEnumProperty diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Pet.java index 02342da3137..e72a63d28fa 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Pet.java @@ -29,6 +29,7 @@ import java.util.Set; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Pet diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 64586deb1b2..7efe61604d8 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * ReadOnlyFirst diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/SpecialModelName.java index 6af38304715..d72baf59f4b 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * SpecialModelName diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Tag.java index 33acaca34d3..6a94028f21f 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/Tag.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Tag diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/User.java index 337d1993067..953632044c4 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/User.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * User From 871b9ab5b65e4eab409edfa80c57ed3f0ffddada Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 25 Sep 2021 13:58:27 +0800 Subject: [PATCH 13/50] update phpunit xml to newer format (#10470) --- .../main/resources/php/phpunit.xml.mustache | 37 ++++++++----------- .../php/OpenAPIClient-php/phpunit.xml.dist | 37 ++++++++----------- 2 files changed, 32 insertions(+), 42 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/php/phpunit.xml.mustache b/modules/openapi-generator/src/main/resources/php/phpunit.xml.mustache index 66b2c40c983..b72fb7c6e77 100644 --- a/modules/openapi-generator/src/main/resources/php/phpunit.xml.mustache +++ b/modules/openapi-generator/src/main/resources/php/phpunit.xml.mustache @@ -1,23 +1,18 @@ - - - - {{apiTestPath}} - {{modelTestPath}} - - - - - {{apiSrcPath}} - {{modelSrcPath}} - - - - - + + + + {{apiSrcPath}} + {{modelSrcPath}} + + + + + {{apiTestPath}} + {{modelTestPath}} + + + + + diff --git a/samples/client/petstore/php/OpenAPIClient-php/phpunit.xml.dist b/samples/client/petstore/php/OpenAPIClient-php/phpunit.xml.dist index 3dd90bbe32c..485899aaf21 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/phpunit.xml.dist +++ b/samples/client/petstore/php/OpenAPIClient-php/phpunit.xml.dist @@ -1,23 +1,18 @@ - - - - ./test/Api - ./test/Model - - - - - ./lib/Api - ./lib/Model - - - - - + + + + ./lib/Api + ./lib/Model + + + + + ./test/Api + ./test/Model + + + + + From 622a9363585a295724392fc1cdf3758d58145010 Mon Sep 17 00:00:00 2001 From: romanblack1 <71103953+romanblack1@users.noreply.github.com> Date: Fri, 24 Sep 2021 23:53:58 -0700 Subject: [PATCH 14/50] Define content type if and only if the body is not empty (#9910) * rubypatch * moving change to api.must * fix content_type to content-type * added end to if --- .../main/resources/ruby-client/api.mustache | 5 +- .../resources/ruby-client/api_client.mustache | 4 +- .../lib/petstore/api/another_fake_api.rb | 5 +- .../ruby-faraday/lib/petstore/api/fake_api.rb | 70 +++++++++++++++---- .../api/fake_classname_tags123_api.rb | 5 +- .../ruby-faraday/lib/petstore/api/pet_api.rb | 25 +++++-- .../lib/petstore/api/store_api.rb | 5 +- .../ruby-faraday/lib/petstore/api/user_api.rb | 20 ++++-- .../ruby-faraday/lib/petstore/api_client.rb | 4 +- .../ruby/lib/petstore/api/another_fake_api.rb | 5 +- .../ruby/lib/petstore/api/fake_api.rb | 70 +++++++++++++++---- .../api/fake_classname_tags123_api.rb | 5 +- .../petstore/ruby/lib/petstore/api/pet_api.rb | 25 +++++-- .../ruby/lib/petstore/api/store_api.rb | 5 +- .../ruby/lib/petstore/api/user_api.rb | 20 ++++-- .../petstore/ruby/lib/petstore/api_client.rb | 4 +- .../lib/x_auth_id_alias/api_client.rb | 4 +- .../ruby/lib/dynamic_servers/api_client.rb | 4 +- .../ruby-client/lib/petstore/api/usage_api.rb | 10 ++- .../ruby-client/lib/petstore/api_client.rb | 4 +- 20 files changed, 232 insertions(+), 67 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api.mustache index 6075333062c..1212a35d473 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api.mustache @@ -146,7 +146,10 @@ module {{moduleName}} {{/hasProduces}} {{#hasConsumes}} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type([{{#consumes}}'{{{mediaType}}}'{{^-last}}, {{/-last}}{{/consumes}}]) + content_type = @api_client.select_header_content_type([{{#consumes}}'{{{mediaType}}}'{{^-last}}, {{/-last}}{{/consumes}}]) + if !content_type.nil? + header_params['Content-Type'] = content_type + end {{/hasConsumes}} {{#headerParams}} {{#required}} diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api_client.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_client.mustache index 8c6b54ae151..7e0568b95d7 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api_client.mustache @@ -209,8 +209,8 @@ module {{moduleName}} # @param [Array] content_types array for Content-Type # @return [String] the Content-Type header (e.g. application/json) def select_header_content_type(content_types) - # use application/json by default - return 'application/json' if content_types.nil? || content_types.empty? + # return nil by default + return if content_types.nil? || content_types.empty? # use JSON when present, otherwise use the first one json_content_type = content_types.find { |s| json_mime?(s) } json_content_type || content_types.first 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 d06e76c4a08..02228c35236 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 @@ -53,7 +53,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} 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 62809e843cc..50355c24777 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 @@ -109,7 +109,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml']) + content_type = @api_client.select_header_content_type(['application/json', 'application/xml']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end header_params[:'header_1'] = opts[:'header_1'] if !opts[:'header_1'].nil? # form parameters @@ -169,7 +172,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -228,7 +234,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -287,7 +296,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -346,7 +358,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -409,7 +424,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -466,7 +484,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['image/png']) + content_type = @api_client.select_header_content_type(['image/png']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -527,7 +548,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -593,7 +617,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -658,7 +685,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -813,7 +843,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) + content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -936,7 +969,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) + content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end header_params[:'enum_header_string_array'] = @api_client.build_collection_param(opts[:'enum_header_string_array'], :csv) if !opts[:'enum_header_string_array'].nil? header_params[:'enum_header_string'] = opts[:'enum_header_string'] if !opts[:'enum_header_string'].nil? @@ -1086,7 +1122,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -1153,7 +1192,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) + content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} 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 e2faaed5687..4aec65c79fa 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 @@ -53,7 +53,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} 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 caca60a361e..5597f0b6be7 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 @@ -49,7 +49,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml']) + content_type = @api_client.select_header_content_type(['application/json', 'application/xml']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -363,7 +366,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml']) + content_type = @api_client.select_header_content_type(['application/json', 'application/xml']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -428,7 +434,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) + content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -497,7 +506,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) + content_type = @api_client.select_header_content_type(['multipart/form-data']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -570,7 +582,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) + content_type = @api_client.select_header_content_type(['multipart/form-data']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} 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 4effc6df5e4..d9b26423717 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 @@ -240,7 +240,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/xml', 'application/json']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} 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 9efa91f7944..23f077d618e 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 @@ -51,7 +51,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -112,7 +115,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -173,7 +179,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -486,7 +495,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} 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 431764682be..c2e65aa104c 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb @@ -340,8 +340,8 @@ module Petstore # @param [Array] content_types array for Content-Type # @return [String] the Content-Type header (e.g. application/json) def select_header_content_type(content_types) - # use application/json by default - return 'application/json' if content_types.nil? || content_types.empty? + # return nil by default + return if content_types.nil? || content_types.empty? # use JSON when present, otherwise use the first one json_content_type = content_types.find { |s| json_mime?(s) } json_content_type || content_types.first 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 d06e76c4a08..02228c35236 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 @@ -53,7 +53,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} 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 62809e843cc..50355c24777 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -109,7 +109,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml']) + content_type = @api_client.select_header_content_type(['application/json', 'application/xml']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end header_params[:'header_1'] = opts[:'header_1'] if !opts[:'header_1'].nil? # form parameters @@ -169,7 +172,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -228,7 +234,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -287,7 +296,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -346,7 +358,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -409,7 +424,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -466,7 +484,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['image/png']) + content_type = @api_client.select_header_content_type(['image/png']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -527,7 +548,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -593,7 +617,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -658,7 +685,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -813,7 +843,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) + content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -936,7 +969,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) + content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end header_params[:'enum_header_string_array'] = @api_client.build_collection_param(opts[:'enum_header_string_array'], :csv) if !opts[:'enum_header_string_array'].nil? header_params[:'enum_header_string'] = opts[:'enum_header_string'] if !opts[:'enum_header_string'].nil? @@ -1086,7 +1122,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -1153,7 +1192,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) + content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} 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 e2faaed5687..4aec65c79fa 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 @@ -53,7 +53,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} 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 60622b40f0e..0add7717a2a 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb @@ -49,7 +49,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml']) + content_type = @api_client.select_header_content_type(['application/json', 'application/xml']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -363,7 +366,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml']) + content_type = @api_client.select_header_content_type(['application/json', 'application/xml']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -428,7 +434,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) + content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -497,7 +506,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) + content_type = @api_client.select_header_content_type(['multipart/form-data']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -570,7 +582,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) + content_type = @api_client.select_header_content_type(['multipart/form-data']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} 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 bba7581c174..d701ecdd325 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb @@ -240,7 +240,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/xml', 'application/json']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} 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 f7d5ab75ac1..845d95d3ec0 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb @@ -51,7 +51,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -112,7 +115,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -173,7 +179,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -486,7 +495,10 @@ module Petstore # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} diff --git a/samples/client/petstore/ruby/lib/petstore/api_client.rb b/samples/client/petstore/ruby/lib/petstore/api_client.rb index 0dcd50a4d1c..1f346ed7b03 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_client.rb @@ -335,8 +335,8 @@ module Petstore # @param [Array] content_types array for Content-Type # @return [String] the Content-Type header (e.g. application/json) def select_header_content_type(content_types) - # use application/json by default - return 'application/json' if content_types.nil? || content_types.empty? + # return nil by default + return if content_types.nil? || content_types.empty? # use JSON when present, otherwise use the first one json_content_type = content_types.find { |s| json_mime?(s) } json_content_type || content_types.first diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb index c3a4f3e117d..a8d9af09d3e 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb @@ -335,8 +335,8 @@ module XAuthIDAlias # @param [Array] content_types array for Content-Type # @return [String] the Content-Type header (e.g. application/json) def select_header_content_type(content_types) - # use application/json by default - return 'application/json' if content_types.nil? || content_types.empty? + # return nil by default + return if content_types.nil? || content_types.empty? # use JSON when present, otherwise use the first one json_content_type = content_types.find { |s| json_mime?(s) } json_content_type || content_types.first 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 2e879c75eec..52572fe70b0 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 @@ -334,8 +334,8 @@ module DynamicServers # @param [Array] content_types array for Content-Type # @return [String] the Content-Type header (e.g. application/json) def select_header_content_type(content_types) - # use application/json by default - return 'application/json' if content_types.nil? || content_types.empty? + # return nil by default + return if content_types.nil? || content_types.empty? # use JSON when present, otherwise use the first one json_content_type = content_types.find { |s| json_mime?(s) } json_content_type || content_types.first 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 28bd76342d0..eaa391d7d3b 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 @@ -49,7 +49,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -110,7 +113,10 @@ module Petstore # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} 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 7c33b9779cb..084335a2005 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 @@ -334,8 +334,8 @@ module Petstore # @param [Array] content_types array for Content-Type # @return [String] the Content-Type header (e.g. application/json) def select_header_content_type(content_types) - # use application/json by default - return 'application/json' if content_types.nil? || content_types.empty? + # return nil by default + return if content_types.nil? || content_types.empty? # use JSON when present, otherwise use the first one json_content_type = content_types.find { |s| json_mime?(s) } json_content_type || content_types.first From 00ea470e49dd989047b08026c9e751024e8a1097 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 25 Sep 2021 15:03:01 +0800 Subject: [PATCH 15/50] update ruby tests --- samples/client/petstore/ruby-faraday/spec/api_client_spec.rb | 4 ++-- samples/client/petstore/ruby/spec/api_client_spec.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 0f41c29b81b..723812b87f1 100644 --- a/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb @@ -159,8 +159,8 @@ describe Petstore::ApiClient do let(:api_client) { Petstore::ApiClient.new } it 'works' do - expect(api_client.select_header_content_type(nil)).to eq('application/json') - expect(api_client.select_header_content_type([])).to eq('application/json') + expect(api_client.select_header_content_type(nil)).to be_nil + expect(api_client.select_header_content_type([])).to be_nil expect(api_client.select_header_content_type(['application/json'])).to eq('application/json') expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8') diff --git a/samples/client/petstore/ruby/spec/api_client_spec.rb b/samples/client/petstore/ruby/spec/api_client_spec.rb index b91cd25d81f..1355cb28d68 100644 --- a/samples/client/petstore/ruby/spec/api_client_spec.rb +++ b/samples/client/petstore/ruby/spec/api_client_spec.rb @@ -197,8 +197,8 @@ describe Petstore::ApiClient do let(:api_client) { Petstore::ApiClient.new } it 'works' do - expect(api_client.select_header_content_type(nil)).to eq('application/json') - expect(api_client.select_header_content_type([])).to eq('application/json') + expect(api_client.select_header_content_type(nil)).to be_nil + expect(api_client.select_header_content_type([])).to be_nil expect(api_client.select_header_content_type(['application/json'])).to eq('application/json') expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8') From 7384a1e513d5bb6e1bb10dabb742216a0275a371 Mon Sep 17 00:00:00 2001 From: romanblack1 <71103953+romanblack1@users.noreply.github.com> Date: Sat, 25 Sep 2021 00:05:38 -0700 Subject: [PATCH 16/50] Define content type only if the body is not empty (#9766) * define content type iff the body is not empty * update samples --- .../src/main/resources/python/api_client.mustache | 7 ++++--- samples/client/petstore/python/petstore_api/api_client.py | 7 ++++--- .../petstore_api/api_client.py | 7 ++++--- .../x-auth-id-alias/python/x_auth_id_alias/api_client.py | 7 ++++--- .../dynamic-servers/python/dynamic_servers/api_client.py | 7 ++++--- .../client/petstore/python/petstore_api/api_client.py | 7 ++++--- 6 files changed, 24 insertions(+), 18 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/api_client.mustache b/modules/openapi-generator/src/main/resources/python/api_client.mustache index 3c1c5eb8911..91591e10cc5 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache @@ -847,9 +847,10 @@ class Endpoint(object): content_type_headers_list = self.headers_map['content_type'] if content_type_headers_list: - header_list = self.api_client.select_header_content_type( - content_type_headers_list) - params['header']['Content-Type'] = header_list + if params['body'] != "": + header_list = self.api_client.select_header_content_type( + content_type_headers_list) + params['header']['Content-Type'] = header_list return self.api_client.call_api( self.settings['endpoint_path'], self.settings['http_method'], diff --git a/samples/client/petstore/python/petstore_api/api_client.py b/samples/client/petstore/python/petstore_api/api_client.py index 558eded5596..9e6f1523497 100644 --- a/samples/client/petstore/python/petstore_api/api_client.py +++ b/samples/client/petstore/python/petstore_api/api_client.py @@ -826,9 +826,10 @@ class Endpoint(object): content_type_headers_list = self.headers_map['content_type'] if content_type_headers_list: - header_list = self.api_client.select_header_content_type( - content_type_headers_list) - params['header']['Content-Type'] = header_list + if params['body'] != "": + header_list = self.api_client.select_header_content_type( + content_type_headers_list) + params['header']['Content-Type'] = header_list return self.api_client.call_api( self.settings['endpoint_path'], self.settings['http_method'], diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py index 558eded5596..9e6f1523497 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py @@ -826,9 +826,10 @@ class Endpoint(object): content_type_headers_list = self.headers_map['content_type'] if content_type_headers_list: - header_list = self.api_client.select_header_content_type( - content_type_headers_list) - params['header']['Content-Type'] = header_list + if params['body'] != "": + header_list = self.api_client.select_header_content_type( + content_type_headers_list) + params['header']['Content-Type'] = header_list return self.api_client.call_api( self.settings['endpoint_path'], self.settings['http_method'], diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api_client.py b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api_client.py index b77f44a106b..a3407d97a84 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api_client.py +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/api_client.py @@ -826,9 +826,10 @@ class Endpoint(object): content_type_headers_list = self.headers_map['content_type'] if content_type_headers_list: - header_list = self.api_client.select_header_content_type( - content_type_headers_list) - params['header']['Content-Type'] = header_list + if params['body'] != "": + header_list = self.api_client.select_header_content_type( + content_type_headers_list) + params['header']['Content-Type'] = header_list return self.api_client.call_api( self.settings['endpoint_path'], self.settings['http_method'], diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py index cfc23c81c4a..a2dce8f7105 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py @@ -826,9 +826,10 @@ class Endpoint(object): content_type_headers_list = self.headers_map['content_type'] if content_type_headers_list: - header_list = self.api_client.select_header_content_type( - content_type_headers_list) - params['header']['Content-Type'] = header_list + if params['body'] != "": + header_list = self.api_client.select_header_content_type( + content_type_headers_list) + params['header']['Content-Type'] = header_list return self.api_client.call_api( self.settings['endpoint_path'], self.settings['http_method'], diff --git a/samples/openapi3/client/petstore/python/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/petstore_api/api_client.py index b83134b9b56..29ae24dd01d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -833,9 +833,10 @@ class Endpoint(object): content_type_headers_list = self.headers_map['content_type'] if content_type_headers_list: - header_list = self.api_client.select_header_content_type( - content_type_headers_list) - params['header']['Content-Type'] = header_list + if params['body'] != "": + header_list = self.api_client.select_header_content_type( + content_type_headers_list) + params['header']['Content-Type'] = header_list return self.api_client.call_api( self.settings['endpoint_path'], self.settings['http_method'], From 119370079a227186db399a653faedc80db2af630 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 25 Sep 2021 18:14:26 +0800 Subject: [PATCH 17/50] update spec template, samples --- .../src/main/resources/ruby-client/api_client_spec.mustache | 4 ++-- .../x-auth-id-alias/ruby-client/spec/api_client_spec.rb | 4 ++-- .../features/dynamic-servers/ruby/spec/api_client_spec.rb | 4 ++-- .../ruby-client/spec/api_client_spec.rb | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api_client_spec.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_client_spec.mustache index a079cc9fd35..86a7bd9bda8 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api_client_spec.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api_client_spec.mustache @@ -191,8 +191,8 @@ describe {{moduleName}}::ApiClient do let(:api_client) { {{moduleName}}::ApiClient.new } it 'works' do - expect(api_client.select_header_content_type(nil)).to eq('application/json') - expect(api_client.select_header_content_type([])).to eq('application/json') + expect(api_client.select_header_content_type(nil)).to be_nil + expect(api_client.select_header_content_type([])).to be_nil expect(api_client.select_header_content_type(['application/json'])).to eq('application/json') expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8') diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb index c8cc875c8a8..cd45058bc2e 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb @@ -197,8 +197,8 @@ describe XAuthIDAlias::ApiClient do let(:api_client) { XAuthIDAlias::ApiClient.new } it 'works' do - expect(api_client.select_header_content_type(nil)).to eq('application/json') - expect(api_client.select_header_content_type([])).to eq('application/json') + expect(api_client.select_header_content_type(nil)).to be_nil + expect(api_client.select_header_content_type([])).to be_nil expect(api_client.select_header_content_type(['application/json'])).to eq('application/json') expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8') 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 febf50772fe..3d77102a916 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 @@ -197,8 +197,8 @@ describe DynamicServers::ApiClient do let(:api_client) { DynamicServers::ApiClient.new } it 'works' do - expect(api_client.select_header_content_type(nil)).to eq('application/json') - expect(api_client.select_header_content_type([])).to eq('application/json') + expect(api_client.select_header_content_type(nil)).to be_nil + expect(api_client.select_header_content_type([])).to be_nil expect(api_client.select_header_content_type(['application/json'])).to eq('application/json') expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8') 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 13029f22c6d..9e882e3c33b 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 @@ -197,8 +197,8 @@ describe Petstore::ApiClient do let(:api_client) { Petstore::ApiClient.new } it 'works' do - expect(api_client.select_header_content_type(nil)).to eq('application/json') - expect(api_client.select_header_content_type([])).to eq('application/json') + expect(api_client.select_header_content_type(nil)).to be_nil + expect(api_client.select_header_content_type([])).to be_nil expect(api_client.select_header_content_type(['application/json'])).to eq('application/json') expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8') From 60b29e1f8e267e90d4d81f30d3fb3fe69161e59b Mon Sep 17 00:00:00 2001 From: Eugene Date: Sun, 26 Sep 2021 18:31:37 +0300 Subject: [PATCH 18/50] #10472 csharp-netcore client - allow to specify content-type for files (#10473) --- .../libraries/httpclient/ApiClient.mustache | 2 +- .../httpclient/FileParameter.mustache | 18 ++++++++++++++++++ .../src/Org.OpenAPITools/Client/ApiClient.cs | 2 +- .../Org.OpenAPITools/Client/FileParameter.cs | 18 ++++++++++++++++++ 4 files changed, 38 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/ApiClient.mustache index c94d7aaeae6..bd7663012f1 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/ApiClient.mustache @@ -279,7 +279,7 @@ namespace {{packageName}}.Client foreach (var fileParam in options.FileParameters) { var content = new StreamContent(fileParam.Value.Content); - content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream"); + content.Headers.ContentType = new MediaTypeHeaderValue(fileParam.Value.ContentType); multipartContent.Add(content, fileParam.Key, fileParam.Value.Name); } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/FileParameter.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/FileParameter.mustache index 3fa243ed54f..87e5fcdc9af 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/FileParameter.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/FileParameter.mustache @@ -15,6 +15,11 @@ namespace {{packageName}}.Client /// public string Name { get; set; } = "no_name_provided"; + /// + /// The content type of the file + /// + public string ContentType { get; set; } = "application/octet-stream"; + /// /// The content of the file /// @@ -44,6 +49,19 @@ namespace {{packageName}}.Client Content = content; } + /// + /// Construct a FileParameter from name and content + /// + /// The filename + /// The content type of the file + /// The file content + public FileParameter(string filename, string contentType, Stream content) + { + Name = filename; + ContentType = contentType; + Content = content; + } + /// /// Implicit conversion of stream to file parameter. Useful for backwards compatibility. /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/ApiClient.cs index 4ef5e9ead3b..b6d9195b3f6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/ApiClient.cs @@ -278,7 +278,7 @@ namespace Org.OpenAPITools.Client foreach (var fileParam in options.FileParameters) { var content = new StreamContent(fileParam.Value.Content); - content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream"); + content.Headers.ContentType = new MediaTypeHeaderValue(fileParam.Value.ContentType); multipartContent.Add(content, fileParam.Key, fileParam.Value.Name); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/FileParameter.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/FileParameter.cs index 4a83ada8588..6d173fe9b3b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/FileParameter.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/FileParameter.cs @@ -23,6 +23,11 @@ namespace Org.OpenAPITools.Client /// public string Name { get; set; } = "no_name_provided"; + /// + /// The content type of the file + /// + public string ContentType { get; set; } = "application/octet-stream"; + /// /// The content of the file /// @@ -52,6 +57,19 @@ namespace Org.OpenAPITools.Client Content = content; } + /// + /// Construct a FileParameter from name and content + /// + /// The filename + /// The content type of the file + /// The file content + public FileParameter(string filename, string contentType, Stream content) + { + Name = filename; + ContentType = contentType; + Content = content; + } + /// /// Implicit conversion of stream to file parameter. Useful for backwards compatibility. /// From d4b8ff60a13a33124468da42ff7aa6d32a92ddc9 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 27 Sep 2021 16:12:40 -0700 Subject: [PATCH 19/50] [Java] Fixes schema class type booleans for composed schemas (#10334) * Adds get/setIsString interface to IJsonSchemaValidationProperties * Adds get/set isNumber interface in IJsonSchemaValidationProperties * Adds get/set isAnyType in IJsonSchemaValidationProperties * Adds and uses ModelUtils.isAnyType, adds setTypeProperties * Adds missing descriptions of isAnyType parameters * Uses ModelUtils.isAnyType * Samples regenerated * Moves isArray handling higher up in fromProperty * Moves isAnyTypeSchema handling higher up in fromProperty * Moves isFreeFormObject handling higher up in fromProperty * Refactors fromProperties, updates tests * Fixes the fromProperty refactor, tests now pass * Uses setTypeProperties to set isNumber, isNull, isArray, and isUnboundedInteger * Sets isAnyType in setTypeProperties * Sets isMap in setTypeProperties * Sets property.isPrimitiveType in isFreeFormObject, tweaks if condition order * Adds fix for JavaClientCodegenTest.testJdkHttpClientWithAndWithoutDiscriminator * Refactors fromProperty * Adds updatePropertyForObject updatePropertyForAnyType * Sets binary and file types to not be strings * Updates samples * Adds updatePropertyForString * Adds testComposedPropertyTypes * Fixes python test * Samples updated * Switches all isAnyTypeSchema usages to ModelUtils.isAnyType * Refactors model enum handling higher up * Moves m.dataType assignent higher into fromModel * Moves m.isNullable setting higher into isModel * Adds updateModelForComposedSchema * Further fromModel refactoring, all schema checks are now at the same indentation level * Further refactors fromModel, adds isTypeObjectSchema block * Moves addVars into anyType or objectType blocks in fromModel * Turns off isNullable n isAnyType array * Fixes typescript CodegenParameers * Adds updatePropertyForAnyType to typescript-axios so property.isNullable will be false for AnyType * Adds testComposedModelTypes * Updates ComposedAnyType schema * Fixes tests for JavaJAXRSCXF by adding updateModelForObject method * Updates go and csharp to handle object model differently * Adds updateModelForAnyType * Fixes name reference * Adds testComposedResponseTypes * Refactoring fromResponse * Further refactoring of fromResponse * Uses setTypeProperties in fromResponse * Tests now pass for testComposedResponseTypes * Sets COdegenResponse dataType using getTypeDeclaration * Begins refactoring of fromRequestBody * Adds updateResponseBodyForPrimitiveType * Adds all needed type if else blocks in fromRequestBody * Fixes JavaJAXRSCXFExtServerCodegenTests * Fixes RubyClientCodegenTests * Adds fixes for clients that need custom isMap for body parameters * Ruby broken, samples regened, debugging * Adds updateRequestBodyForArray, renames updateRequest.. methods * Samples regenerated * Removes changes from Ruby generator * Reverts RubyClientCodegen.java * Reverts changes to GoClientCodegen.java * Reverts PowerShellClientCodegen.java * Reverts CrystalClientCodegen.java * Removes updateRequestBodyForObject from JavaCXFServerCodegen.java * Adds comment about refed models * Tweaks made to fromProperties to add an explanatory comment * Updates RustServer to have ByteArray request bodies not be strings * Sets types in fromFormProperty * Adds testComposedRequestBodyTypes * Fixes when validation syncing is done in syncValidationProperties * Removes redundant validation code from fromParameter * Moves parameter inX setting higher up before schema logic in fromParameter * More refactoring in fromParameter, uses early return to reduce levels of indentation * Removes setParameterBooleanFlagWithCodegenProperty from updateRequestBodyForArray * Removes setParameterBooleanFlagWithCodegenProperty from updateRequestBodyForObject * Removes setParameterBooleanFlagWithCodegenProperty from updateRequestBodyForPrimitiveType * Removes setParameterBooleanFlagWithCodegenProperty from updateRequestBodyForMap * Removes setParameterBooleanFlagWithCodegenProperty from addBodyModelSchema * Removes setParameterBooleanFlagWithCodegenProperty from fromFormProperty * Refactors parameter array handling code into fromFormProperty * Simplifies fromRequestBodyToFormParameters * Removes setParameterBooleanFlagWithCodegenProperty from fromParameter * Adds deprecated docstring to setParameterBooleanFlagWithCodegenProperty * Refactors ModelUtils.isFileSchema out of string schema check * Removes ModelUtils.isFileSchema from RustServer updateRequestBodyForString * Improves comment text * Fixes RustServer uuid type setting for CodegenParameter * Removes unneeded parens * Fixes array property examples * Removes unused code * Renames variable to itemsProperty * Adds testComposedRequestQueryParamTypes * Adds updatePropertyForAnyType to rustserver will not have changed model properties * Hoists arrayInnerProperty._enum into parameter for html2 generator * Moves turning string type off into the codegen files * Adds two more missing locations in rustserver * Moves addVarsRequiredVarsAdditionalProps into anytype and objecttype handling * More refactoring of where addVarsRequiredVarsAdditionalProps is used * Samples regenerated --- .../openapitools/codegen/CodegenModel.java | 30 +- .../codegen/CodegenParameter.java | 24 + .../openapitools/codegen/CodegenProperty.java | 24 + .../openapitools/codegen/CodegenResponse.java | 24 + .../openapitools/codegen/DefaultCodegen.java | 1931 +++++++++-------- .../IJsonSchemaValidationProperties.java | 77 + .../codegen/languages/AbstractGoCodegen.java | 2 +- .../languages/CSharpNetCoreClientCodegen.java | 25 + .../codegen/languages/GoServerCodegen.java | 27 + .../languages/JavaCXFServerCodegen.java | 29 +- .../languages/PythonClientCodegen.java | 4 +- .../codegen/languages/RustServerCodegen.java | 89 + .../TypeScriptAxiosClientCodegen.java | 17 + .../languages/TypeScriptClientCodegen.java | 2 +- .../codegen/utils/ModelUtils.java | 40 +- .../codegen/DefaultCodegenTest.java | 210 ++ .../codegen/java/JavaClientCodegenTest.java | 6 + .../codegen/python/PythonClientTest.java | 2 +- .../src/test/resources/3_0/issue_10330.yaml | 289 +++ .../3_0/issue_8052_recursive_model.yaml | 18 +- .../docs/FakeApi.md | 8 +- .../docs/PetApi.md | 4 +- .../OpenAPIClient-httpclient/docs/FakeApi.md | 8 +- .../OpenAPIClient-httpclient/docs/PetApi.md | 4 +- .../OpenAPIClient-net47/docs/FakeApi.md | 8 +- .../OpenAPIClient-net47/docs/PetApi.md | 4 +- .../OpenAPIClient-net5.0/docs/FakeApi.md | 8 +- .../OpenAPIClient-net5.0/docs/PetApi.md | 4 +- .../OpenAPIClient/docs/FakeApi.md | 8 +- .../OpenAPIClient/docs/PetApi.md | 4 +- .../OpenAPIClientCore/docs/FakeApi.md | 8 +- .../OpenAPIClientCore/docs/PetApi.md | 4 +- .../OpenAPIClientCoreAndNet47/docs/PetApi.md | 4 +- .../csharp/OpenAPIClient/docs/FakeApi.md | 8 +- .../csharp/OpenAPIClient/docs/PetApi.md | 4 +- .../java/apache-httpclient/docs/FakeApi.md | 2 +- .../java/google-api-client/docs/FakeApi.md | 2 +- .../petstore/java/jersey1/docs/FakeApi.md | 2 +- .../docs/FakeApi.md | 2 +- .../java/jersey2-java8/docs/FakeApi.md | 2 +- .../java/native-async/docs/FakeApi.md | 4 +- .../petstore/java/native/docs/FakeApi.md | 4 +- .../docs/FakeApi.md | 2 +- .../docs/FakeApi.md | 2 +- .../petstore/java/okhttp-gson/docs/FakeApi.md | 2 +- .../petstore/java/resteasy/docs/FakeApi.md | 2 +- .../java/resttemplate-withXml/docs/FakeApi.md | 2 +- .../java/resttemplate/docs/FakeApi.md | 2 +- .../java/retrofit2-play26/docs/FakeApi.md | 2 +- .../petstore/java/retrofit2/docs/FakeApi.md | 2 +- .../java/retrofit2rx2/docs/FakeApi.md | 2 +- .../java/retrofit2rx3/docs/FakeApi.md | 2 +- .../java/vertx-no-nullable/docs/FakeApi.md | 2 +- .../petstore/java/vertx/docs/FakeApi.md | 2 +- .../petstore/java/webclient/docs/FakeApi.md | 2 +- .../petstore/javascript-es6/docs/FakeApi.md | 2 +- .../javascript-promise-es6/docs/FakeApi.md | 2 +- .../php/OpenAPIClient-php/docs/Api/FakeApi.md | 2 +- .../client/petstore/python/docs/FakeApi.md | 4 +- samples/client/petstore/python/docs/PetApi.md | 4 +- .../docs/FakeApi.md | 4 +- .../docs/PetApi.md | 4 +- .../api.ts | 2 +- .../client/elm/src/Api/Request/Default.elm | 2 +- .../petstore_client_lib_fake/doc/FakeApi.md | 2 +- .../petstore_client_lib_fake/doc/FakeApi.md | 2 +- .../petstore_client_lib_fake/doc/FakeApi.md | 2 +- .../doc/FakeApi.md | 2 +- .../java/jersey2-java8/docs/FakeApi.md | 2 +- .../client/petstore/python/docs/FakeApi.md | 16 +- .../builds/composed-schemas/DefaultApi.md | 6 +- 71 files changed, 2090 insertions(+), 970 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/3_0/issue_10330.yaml diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java index feb8420a2c3..ab9f23fba67 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java @@ -161,6 +161,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties { private boolean isModel; private boolean hasRequiredVars; private boolean hasDiscriminatorWithNonEmptyMapping; + private boolean isAnyType; public String getAdditionalPropertiesType() { return additionalPropertiesType; @@ -785,6 +786,30 @@ public class CodegenModel implements IJsonSchemaValidationProperties { this.hasDiscriminatorWithNonEmptyMapping = hasDiscriminatorWithNonEmptyMapping; } + @Override + public boolean getIsString() { return isString; } + + @Override + public void setIsString(boolean isString) { + this.isString = isString; + } + + @Override + public boolean getIsNumber() { return isNumber; } + + @Override + public void setIsNumber(boolean isNumber) { + this.isNumber = isNumber; + } + + @Override + public boolean getIsAnyType() { return isAnyType; } + + @Override + public void setIsAnyType(boolean isAnyType) { + this.isAnyType = isAnyType; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -819,6 +844,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties { isNull == that.isNull && hasValidation == that.hasValidation && hasDiscriminatorWithNonEmptyMapping == that.getHasDiscriminatorWithNonEmptyMapping() && + getIsAnyType() == that.getIsAnyType() && getAdditionalPropertiesIsAnyType() == that.getAdditionalPropertiesIsAnyType() && getUniqueItems() == that.getUniqueItems() && getExclusiveMinimum() == that.getExclusiveMinimum() && @@ -895,7 +921,8 @@ public class CodegenModel implements IJsonSchemaValidationProperties { getAdditionalPropertiesType(), getMaxProperties(), getMinProperties(), getUniqueItems(), getMaxItems(), getMinItems(), getMaxLength(), getMinLength(), getExclusiveMinimum(), getExclusiveMaximum(), getMinimum(), getMaximum(), getPattern(), getMultipleOf(), getItems(), getAdditionalProperties(), getIsModel(), - getAdditionalPropertiesIsAnyType(), hasDiscriminatorWithNonEmptyMapping, anyOfProps, oneOfProps, allOfProps); + getAdditionalPropertiesIsAnyType(), hasDiscriminatorWithNonEmptyMapping, anyOfProps, oneOfProps, allOfProps, + isAnyType); } @Override @@ -989,6 +1016,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties { sb.append(", hasValidation='").append(hasValidation); sb.append(", getAdditionalPropertiesIsAnyType=").append(getAdditionalPropertiesIsAnyType()); sb.append(", getHasDiscriminatorWithNonEmptyMapping=").append(hasDiscriminatorWithNonEmptyMapping); + sb.append(", getIsAnyType=").append(getIsAnyType()); sb.append('}'); return sb.toString(); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java index 6c0aaf869da..ebd01afdfd2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java @@ -682,5 +682,29 @@ public class CodegenParameter implements IJsonSchemaValidationProperties { public void setHasDiscriminatorWithNonEmptyMapping(boolean hasDiscriminatorWithNonEmptyMapping) { this.hasDiscriminatorWithNonEmptyMapping = hasDiscriminatorWithNonEmptyMapping; } + + @Override + public boolean getIsString() { return isString; } + + @Override + public void setIsString(boolean isString) { + this.isString = isString; + } + + @Override + public boolean getIsNumber() { return isNumber; } + + @Override + public void setIsNumber(boolean isNumber) { + this.isNumber = isNumber; + } + + @Override + public boolean getIsAnyType() { return isAnyType; } + + @Override + public void setIsAnyType(boolean isAnyType) { + this.isAnyType = isAnyType; + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java index 8fe4c34ebb1..ed1636fc6d5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java @@ -763,6 +763,30 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti this.hasDiscriminatorWithNonEmptyMapping = hasDiscriminatorWithNonEmptyMapping; } + @Override + public boolean getIsString() { return isString; } + + @Override + public void setIsString(boolean isString) { + this.isString = isString; + } + + @Override + public boolean getIsNumber() { return isNumber; } + + @Override + public void setIsNumber(boolean isNumber) { + this.isNumber = isNumber; + } + + @Override + public boolean getIsAnyType() { return isAnyType; } + + @Override + public void setIsAnyType(boolean isAnyType) { + this.isAnyType = isAnyType; + } + @Override public String toString() { final StringBuilder sb = new StringBuilder("CodegenProperty{"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java index 022933ebe4c..1a99e774e59 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java @@ -546,4 +546,28 @@ public class CodegenResponse implements IJsonSchemaValidationProperties { public void setHasDiscriminatorWithNonEmptyMapping(boolean hasDiscriminatorWithNonEmptyMapping) { this.hasDiscriminatorWithNonEmptyMapping = hasDiscriminatorWithNonEmptyMapping; } + + @Override + public boolean getIsString() { return isString; } + + @Override + public void setIsString(boolean isString) { + this.isString = isString; + } + + @Override + public boolean getIsNumber() { return isNumber; } + + @Override + public void setIsNumber(boolean isNumber) { + this.isNumber = isNumber; + } + + @Override + public boolean getIsAnyType() { return isAnyType; } + + @Override + public void setIsAnyType(boolean isAnyType) { + this.isAnyType = isAnyType; + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 68f7412a550..65d34bdf664 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -2214,7 +2214,7 @@ public class DefaultCodegen implements CodegenConfig { return "object"; } else if (schema.getProperties() != null && !schema.getProperties().isEmpty()) { // having property implies it's a model return "object"; - } else if (isAnyTypeSchema(schema)) { + } else if (ModelUtils.isAnyType(schema)) { return "AnyType"; } else if (StringUtils.isNotEmpty(schema.getType())) { if (!importMapping.containsKey(schema.getType())) { @@ -2381,6 +2381,242 @@ public class DefaultCodegen implements CodegenConfig { Map schemaCodegenPropertyCache = new HashMap(); + private void updateModelForComposedSchema(CodegenModel m, Schema schema, Map allDefinitions) { + final ComposedSchema composed = (ComposedSchema) schema; + Map properties = new LinkedHashMap(); + List required = new ArrayList(); + Map allProperties = new LinkedHashMap(); + List allRequired = new ArrayList(); + + // if schema has properties outside of allOf/oneOf/anyOf also add them to m + if (composed.getProperties() != null && !composed.getProperties().isEmpty()) { + if (composed.getOneOf() != null && !composed.getOneOf().isEmpty()) { + LOGGER.warn("'oneOf' is intended to include only the additional optional OAS extension discriminator object. " + + "For more details, see https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.9.2.1.3 and the OAS section on 'Composition and Inheritance'."); + } + addVars(m, unaliasPropertySchema(composed.getProperties()), composed.getRequired(), null, null); + } + + // parent model + final String parentName = ModelUtils.getParentName(composed, allDefinitions); + final List allParents = ModelUtils.getAllParentsName(composed, allDefinitions, false); + final Schema parent = StringUtils.isBlank(parentName) || allDefinitions == null ? null : allDefinitions.get(parentName); + + // TODO revise the logic below to set discriminator, xml attributes + if (supportsInheritance || supportsMixins) { + m.allVars = new ArrayList(); + if (composed.getAllOf() != null) { + int modelImplCnt = 0; // only one inline object allowed in a ComposedModel + int modelDiscriminators = 0; // only one discriminator allowed in a ComposedModel + for (Schema innerSchema : composed.getAllOf()) { // TODO need to work with anyOf, oneOf as well + if (m.discriminator == null && innerSchema.getDiscriminator() != null) { + LOGGER.debug("discriminator is set to null (not correctly set earlier): {}", m.name); + m.setDiscriminator(createDiscriminator(m.name, innerSchema, this.openAPI)); + if (!this.getLegacyDiscriminatorBehavior()) { + m.addDiscriminatorMappedModelsImports(); + } + modelDiscriminators++; + } + + if (innerSchema.getXml() != null) { + m.xmlPrefix = innerSchema.getXml().getPrefix(); + m.xmlNamespace = innerSchema.getXml().getNamespace(); + m.xmlName = innerSchema.getXml().getName(); + } + if (modelDiscriminators > 1) { + LOGGER.error("Allof composed schema is inheriting >1 discriminator. Only use one discriminator: {}", composed); + } + + if (modelImplCnt++ > 1) { + LOGGER.warn("More than one inline schema specified in allOf:. Only the first one is recognized. All others are ignored."); + break; // only one schema with discriminator allowed in allOf + } + } + } + } + + // interfaces (schemas defined in allOf, anyOf, oneOf) + List interfaces = ModelUtils.getInterfaces(composed); + List anyOfProps = new ArrayList<>(); + List allOfProps = new ArrayList<>(); + List oneOfProps = new ArrayList<>(); + if (!interfaces.isEmpty()) { + // m.interfaces is for backward compatibility + if (m.interfaces == null) + m.interfaces = new ArrayList(); + + for (Schema interfaceSchema : interfaces) { + interfaceSchema = unaliasSchema(interfaceSchema, importMapping); + + if (StringUtils.isBlank(interfaceSchema.get$ref())) { + // primitive type + String languageType = getTypeDeclaration(interfaceSchema); + CodegenProperty interfaceProperty = fromProperty(languageType, interfaceSchema); + if (ModelUtils.isArraySchema(interfaceSchema) || ModelUtils.isMapSchema(interfaceSchema)) { + while (interfaceProperty != null) { + addImport(m, interfaceProperty.complexType); + interfaceProperty = interfaceProperty.items; + } + } + + if (composed.getAnyOf() != null) { + if (m.anyOf.contains(languageType)) { + LOGGER.warn("{} (anyOf schema) already has `{}` defined and therefore it's skipped.", m.name, languageType); + } else { + m.anyOf.add(languageType); + anyOfProps.add(interfaceProperty); + + } + } else if (composed.getOneOf() != null) { + if (m.oneOf.contains(languageType)) { + LOGGER.warn("{} (oneOf schema) already has `{}` defined and therefore it's skipped.", m.name, languageType); + } else { + m.oneOf.add(languageType); + oneOfProps.add(interfaceProperty); + } + } else if (composed.getAllOf() != null) { + // no need to add primitive type to allOf, which should comprise of schemas (models) only + } else { + LOGGER.error("Composed schema has incorrect anyOf, allOf, oneOf defined: {}", composed); + } + continue; + } + + // the rest of the section is for model + Schema refSchema = null; + String ref = ModelUtils.getSimpleRef(interfaceSchema.get$ref()); + if (allDefinitions != null) { + refSchema = allDefinitions.get(ref); + } + final String modelName = toModelName(ref); + CodegenProperty interfaceProperty = fromProperty(modelName, interfaceSchema); + m.interfaces.add(modelName); + addImport(m, modelName); + if (allDefinitions != null && refSchema != null) { + if (allParents.contains(ref) && supportsMultipleInheritance) { + // multiple inheritance + addProperties(allProperties, allRequired, refSchema); + } else if (parentName != null && parentName.equals(ref) && supportsInheritance) { + // single inheritance + addProperties(allProperties, allRequired, refSchema); + } else { + // composition + addProperties(properties, required, refSchema); + addProperties(allProperties, allRequired, refSchema); + } + } + + if (composed.getAnyOf() != null) { + m.anyOf.add(modelName); + anyOfProps.add(interfaceProperty); + } else if (composed.getOneOf() != null) { + m.oneOf.add(modelName); + oneOfProps.add(interfaceProperty); + } else if (composed.getAllOf() != null) { + m.allOf.add(modelName); + allOfProps.add(interfaceProperty); + } else { + LOGGER.error("Composed schema has incorrect anyOf, allOf, oneOf defined: {}", composed); + } + } + } + + m.oneOfProps = oneOfProps; + m.allOfProps = allOfProps; + m.anyOfProps = anyOfProps; + + if (parent != null && composed.getAllOf() != null) { // set parent for allOf only + m.parentSchema = parentName; + m.parent = toModelName(parentName); + + if (supportsMultipleInheritance) { + m.allParents = new ArrayList(); + for (String pname : allParents) { + String pModelName = toModelName(pname); + m.allParents.add(pModelName); + addImport(m, pModelName); + } + } else { // single inheritance + addImport(m, m.parent); + } + } + + // child schema (properties owned by the schema itself) + for (Schema component : interfaces) { + if (component.get$ref() == null) { + if (component != null) { + // component is the child schema + addProperties(properties, required, component); + + // includes child's properties (all, required) in allProperties, allRequired + addProperties(allProperties, allRequired, component); + } + break; // at most one child only + } + } + + if (composed.getRequired() != null) { + required.addAll(composed.getRequired()); + allRequired.addAll(composed.getRequired()); + } + + addVars(m, unaliasPropertySchema(properties), required, unaliasPropertySchema(allProperties), allRequired); + + // Per OAS specification, composed schemas may use the 'additionalProperties' keyword. + if (supportsAdditionalPropertiesWithComposedSchema) { + // Process the schema specified with the 'additionalProperties' keyword. + // This will set the 'CodegenModel.additionalPropertiesType' field + // and potentially 'Codegen.parent'. + // + // Note: it's not a good idea to use single class inheritance to implement + // the 'additionalProperties' keyword. Code generators that use single class + // inheritance sometimes use the 'Codegen.parent' field to implement the + // 'additionalProperties' keyword. However, that would be in conflict with + // 'allOf' composed schemas, because these code generators also want to set + // 'Codegen.parent' to the first child schema of the 'allOf' schema. + addAdditionPropertiesToCodeGenModel(m, schema); + } + + if (Boolean.TRUE.equals(schema.getNullable())) { + m.isNullable = Boolean.TRUE; + } + // end of code block for composed schema + } + + protected void updateModelForObject(CodegenModel m, Schema schema) { + if (schema.getProperties() != null || schema.getRequired() != null && !(schema instanceof ComposedSchema)) { + // passing null to allProperties and allRequired as there's no parent + addVars(m, unaliasPropertySchema(schema.getProperties()), schema.getRequired(), null, null); + } + if (ModelUtils.isMapSchema(schema)) { + // an object or anyType composed schema that has additionalProperties set + addAdditionPropertiesToCodeGenModel(m, schema); + } else if (ModelUtils.isFreeFormObject(openAPI, schema)) { + // non-composed object type with no properties + additionalProperties + // additionalProperties must be null, ObjectSchema, or empty Schema + addAdditionPropertiesToCodeGenModel(m, schema); + } + } + + protected void updateModelForAnyType(CodegenModel m, Schema schema) { + // The 'null' value is allowed when the OAS schema is 'any type'. + // See https://github.com/OAI/OpenAPI-Specification/issues/1389 + if (Boolean.FALSE.equals(schema.getNullable())) { + LOGGER.error("Schema '{}' is any type, which includes the 'null' value. 'nullable' cannot be set to 'false'", m.name); + } + // m.isNullable = true; + if (ModelUtils.isMapSchema(schema)) { + // an object or anyType composed schema that has additionalProperties set + addAdditionPropertiesToCodeGenModel(m, schema); + m.isMap = true; + } + if (schema.getProperties() != null || schema.getRequired() != null && !(schema instanceof ComposedSchema)) { + // passing null to allProperties and allRequired as there's no parent + addVars(m, unaliasPropertySchema(schema.getProperties()), schema.getRequired(), null, null); + } + } + + /** * Convert OAS Model object to Codegen Model object. * @@ -2438,278 +2674,70 @@ public class DefaultCodegen implements CodegenConfig { m.xmlNamespace = schema.getXml().getNamespace(); m.xmlName = schema.getXml().getName(); } - if (isAnyTypeSchema(schema)) { - // The 'null' value is allowed when the OAS schema is 'any type'. - // See https://github.com/OAI/OpenAPI-Specification/issues/1389 - if (Boolean.FALSE.equals(schema.getNullable())) { - LOGGER.error("Schema '{}' is any type, which includes the 'null' value. 'nullable' cannot be set to 'false'", name); - } - m.isNullable = true; + if (!ModelUtils.isAnyType(schema) && !ModelUtils.isTypeObjectSchema(schema) && !ModelUtils.isArraySchema(schema) && schema.get$ref() == null && schema.getEnum() != null && !schema.getEnum().isEmpty()) { + // TODO remove the anyType check here in the future ANyType models can have enums defined + m.isEnum = true; + // comment out below as allowableValues is not set in post processing model enum + m.allowableValues = new HashMap(); + m.allowableValues.put("values", schema.getEnum()); } + if (!ModelUtils.isArraySchema(schema)) { + m.dataType = getSchemaType(schema); + } + if (!ModelUtils.isAnyType(schema) && Boolean.TRUE.equals(schema.getNullable())) { + m.isNullable = Boolean.TRUE; + } + + m.setTypeProperties(schema); if (ModelUtils.isArraySchema(schema)) { - m.isArray = true; CodegenProperty arrayProperty = fromProperty(name, schema); m.setItems(arrayProperty.items); m.arrayModelType = arrayProperty.complexType; addParentContainer(m, name, schema); - } else if (ModelUtils.isNullType(schema)) { - m.isNull = true; - } else if (schema instanceof ComposedSchema) { - final ComposedSchema composed = (ComposedSchema) schema; - Map properties = new LinkedHashMap(); - List required = new ArrayList(); - Map allProperties = new LinkedHashMap(); - List allRequired = new ArrayList(); + } else if (ModelUtils.isIntegerSchema(schema)) { // integer type + // NOTE: Integral schemas as CodegenModel is a rare use case and may be removed at a later date. - // if schema has properties outside of allOf/oneOf/anyOf also add them to m - if (composed.getProperties() != null && !composed.getProperties().isEmpty()) { - if (composed.getOneOf() != null && !composed.getOneOf().isEmpty()) { - LOGGER.warn("'oneOf' is intended to include only the additional optional OAS extension discriminator object. " + - "For more details, see https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.9.2.1.3 and the OAS section on 'Composition and Inheritance'."); - } - addVars(m, unaliasPropertySchema(composed.getProperties()), composed.getRequired(), null, null); - } - - // parent model - final String parentName = ModelUtils.getParentName(composed, allDefinitions); - final List allParents = ModelUtils.getAllParentsName(composed, allDefinitions, false); - final Schema parent = StringUtils.isBlank(parentName) || allDefinitions == null ? null : allDefinitions.get(parentName); - - // TODO revise the logic below to set discriminator, xml attributes - if (supportsInheritance || supportsMixins) { - m.allVars = new ArrayList(); - if (composed.getAllOf() != null) { - int modelImplCnt = 0; // only one inline object allowed in a ComposedModel - int modelDiscriminators = 0; // only one discriminator allowed in a ComposedModel - for (Schema innerSchema : composed.getAllOf()) { // TODO need to work with anyOf, oneOf as well - if (m.discriminator == null && innerSchema.getDiscriminator() != null) { - LOGGER.debug("discriminator is set to null (not correctly set earlier): {}", name); - m.setDiscriminator(createDiscriminator(name, innerSchema, this.openAPI)); - if (!this.getLegacyDiscriminatorBehavior()) { - m.addDiscriminatorMappedModelsImports(); - } - modelDiscriminators++; - } - - if (innerSchema.getXml() != null) { - m.xmlPrefix = innerSchema.getXml().getPrefix(); - m.xmlNamespace = innerSchema.getXml().getNamespace(); - m.xmlName = innerSchema.getXml().getName(); - } - if (modelDiscriminators > 1) { - LOGGER.error("Allof composed schema is inheriting >1 discriminator. Only use one discriminator: {}", composed); - } - - if (modelImplCnt++ > 1) { - LOGGER.warn("More than one inline schema specified in allOf:. Only the first one is recognized. All others are ignored."); - break; // only one schema with discriminator allowed in allOf - } - } + m.isNumeric = Boolean.TRUE; + if (ModelUtils.isLongSchema(schema)) { // int64/long format + m.isLong = Boolean.TRUE; + } else { + m.isInteger = Boolean.TRUE; // older use case, int32 and unbounded int + if (ModelUtils.isShortSchema(schema)) { // int32 + m.setIsShort(Boolean.TRUE); } } - - // interfaces (schemas defined in allOf, anyOf, oneOf) - List interfaces = ModelUtils.getInterfaces(composed); - List anyOfProps = new ArrayList<>(); - List allOfProps = new ArrayList<>(); - List oneOfProps = new ArrayList<>(); - if (!interfaces.isEmpty()) { - // m.interfaces is for backward compatibility - if (m.interfaces == null) - m.interfaces = new ArrayList(); - - for (Schema interfaceSchema : interfaces) { - interfaceSchema = unaliasSchema(interfaceSchema, importMapping); - - if (StringUtils.isBlank(interfaceSchema.get$ref())) { - // primitive type - String languageType = getTypeDeclaration(interfaceSchema); - CodegenProperty interfaceProperty = fromProperty(languageType, interfaceSchema); - if (ModelUtils.isArraySchema(interfaceSchema) || ModelUtils.isMapSchema(interfaceSchema)) { - while (interfaceProperty != null) { - addImport(m, interfaceProperty.complexType); - interfaceProperty = interfaceProperty.items; - } - } - - if (composed.getAnyOf() != null) { - if (m.anyOf.contains(languageType)) { - LOGGER.warn("{} (anyOf schema) already has `{}` defined and therefore it's skipped.", m.name, languageType); - } else { - m.anyOf.add(languageType); - anyOfProps.add(interfaceProperty); - - } - } else if (composed.getOneOf() != null) { - if (m.oneOf.contains(languageType)) { - LOGGER.warn("{} (oneOf schema) already has `{}` defined and therefore it's skipped.", m.name, languageType); - } else { - m.oneOf.add(languageType); - oneOfProps.add(interfaceProperty); - } - } else if (composed.getAllOf() != null) { - // no need to add primitive type to allOf, which should comprise of schemas (models) only - } else { - LOGGER.error("Composed schema has incorrect anyOf, allOf, oneOf defined: {}", composed); - } - continue; - } - - // the rest of the section is for model - Schema refSchema = null; - String ref = ModelUtils.getSimpleRef(interfaceSchema.get$ref()); - if (allDefinitions != null) { - refSchema = allDefinitions.get(ref); - } - final String modelName = toModelName(ref); - CodegenProperty interfaceProperty = fromProperty(modelName, interfaceSchema); - m.interfaces.add(modelName); - addImport(m, modelName); - if (allDefinitions != null && refSchema != null) { - if (allParents.contains(ref) && supportsMultipleInheritance) { - // multiple inheritance - addProperties(allProperties, allRequired, refSchema); - } else if (parentName != null && parentName.equals(ref) && supportsInheritance) { - // single inheritance - addProperties(allProperties, allRequired, refSchema); - } else { - // composition - addProperties(properties, required, refSchema); - addProperties(allProperties, allRequired, refSchema); - } - } - - if (composed.getAnyOf() != null) { - m.anyOf.add(modelName); - anyOfProps.add(interfaceProperty); - } else if (composed.getOneOf() != null) { - m.oneOf.add(modelName); - oneOfProps.add(interfaceProperty); - } else if (composed.getAllOf() != null) { - m.allOf.add(modelName); - allOfProps.add(interfaceProperty); - } else { - LOGGER.error("Composed schema has incorrect anyOf, allOf, oneOf defined: {}", composed); - } - } - } - - m.oneOfProps = oneOfProps; - m.allOfProps = allOfProps; - m.anyOfProps = anyOfProps; - - if (parent != null && composed.getAllOf() != null) { // set parent for allOf only - m.parentSchema = parentName; - m.parent = toModelName(parentName); - - if (supportsMultipleInheritance) { - m.allParents = new ArrayList(); - for (String pname : allParents) { - String pModelName = toModelName(pname); - m.allParents.add(pModelName); - addImport(m, pModelName); - } - } else { // single inheritance - addImport(m, m.parent); - } - } - - // child schema (properties owned by the schema itself) - for (Schema component : interfaces) { - if (component.get$ref() == null) { - if (component != null) { - // component is the child schema - addProperties(properties, required, component); - - // includes child's properties (all, required) in allProperties, allRequired - addProperties(allProperties, allRequired, component); - } - break; // at most one child only - } - } - - if (composed.getRequired() != null) { - required.addAll(composed.getRequired()); - allRequired.addAll(composed.getRequired()); - } - - addVars(m, unaliasPropertySchema(properties), required, unaliasPropertySchema(allProperties), allRequired); - - // Per OAS specification, composed schemas may use the 'additionalProperties' keyword. - if (supportsAdditionalPropertiesWithComposedSchema) { - // Process the schema specified with the 'additionalProperties' keyword. - // This will set the 'CodegenModel.additionalPropertiesType' field - // and potentially 'Codegen.parent'. - // - // Note: it's not a good idea to use single class inheritance to implement - // the 'additionalProperties' keyword. Code generators that use single class - // inheritance sometimes use the 'Codegen.parent' field to implement the - // 'additionalProperties' keyword. However, that would be in conflict with - // 'allOf' composed schemas, because these code generators also want to set - // 'Codegen.parent' to the first child schema of the 'allOf' schema. - addAdditionPropertiesToCodeGenModel(m, schema); - } - - if (Boolean.TRUE.equals(schema.getNullable())) { - m.isNullable = Boolean.TRUE; - } - // end of code block for composed schema - } else { - m.dataType = getSchemaType(schema); - if (schema.getEnum() != null && !schema.getEnum().isEmpty()) { - m.isEnum = true; - // comment out below as allowableValues is not set in post processing model enum - m.allowableValues = new HashMap(); - m.allowableValues.put("values", schema.getEnum()); - } - if (ModelUtils.isMapSchema(schema)) { - addAdditionPropertiesToCodeGenModel(m, schema); - m.isMap = true; - } else if (ModelUtils.isIntegerSchema(schema)) { // integer type - // NOTE: Integral schemas as CodegenModel is a rare use case and may be removed at a later date. - - m.isNumeric = Boolean.TRUE; - if (ModelUtils.isLongSchema(schema)) { // int64/long format - m.isLong = Boolean.TRUE; - } else { - m.isInteger = Boolean.TRUE; // older use case, int32 and unbounded int - if (ModelUtils.isShortSchema(schema)) { // int32 - m.setIsShort(Boolean.TRUE); - } else { // unbounded integer - m.setIsUnboundedInteger(Boolean.TRUE); - } - } - } else if (ModelUtils.isDateTimeSchema(schema)) { + } else if (ModelUtils.isStringSchema(schema)) { + // NOTE: String schemas as CodegenModel is a rare use case and may be removed at a later date. + if (ModelUtils.isDateTimeSchema(schema)) { // NOTE: DateTime schemas as CodegenModel is a rare use case and may be removed at a later date. + m.setIsString(false); // for backward compatibility with 2.x m.isDateTime = Boolean.TRUE; } else if (ModelUtils.isDateSchema(schema)) { // NOTE: Date schemas as CodegenModel is a rare use case and may be removed at a later date. + m.setIsString(false); // for backward compatibility with 2.x m.isDate = Boolean.TRUE; - } else if (ModelUtils.isStringSchema(schema)) { - // NOTE: String schemas as CodegenModel is a rare use case and may be removed at a later date. - m.isString = Boolean.TRUE; - } else if (ModelUtils.isNumberSchema(schema)) { - // NOTE: Number schemas as CodegenModel is a rare use case and may be removed at a later date. - m.isNumeric = Boolean.TRUE; - if (ModelUtils.isFloatSchema(schema)) { // float - m.isFloat = Boolean.TRUE; - } else if (ModelUtils.isDoubleSchema(schema)) { // double - m.isDouble = Boolean.TRUE; - } else { // type is number and without format - m.isNumber = Boolean.TRUE; - } - } else if (ModelUtils.isBooleanSchema(schema)) { - m.isBoolean = Boolean.TRUE; - } else if (ModelUtils.isFreeFormObject(openAPI, schema)) { - addAdditionPropertiesToCodeGenModel(m, schema); } - - if (Boolean.TRUE.equals(schema.getNullable())) { - m.isNullable = Boolean.TRUE; + } else if (ModelUtils.isNumberSchema(schema)) { + // NOTE: Number schemas as CodegenModel is a rare use case and may be removed at a later date. + m.isNumeric = Boolean.TRUE; + if (ModelUtils.isFloatSchema(schema)) { // float + m.isFloat = Boolean.TRUE; + } else if (ModelUtils.isDoubleSchema(schema)) { // double + m.isDouble = Boolean.TRUE; } + } else if (ModelUtils.isAnyType(schema)) { + updateModelForAnyType(m, schema); + } else if (ModelUtils.isTypeObjectSchema(schema)) { + updateModelForObject(m, schema); + } else if (!ModelUtils.isNullType(schema)) { + // referenced models here, component that refs another component which is a model + // if a component references a schema which is not a generated model, the the refed schema will be loaded into + // schema by unaliasSchema and one of the above code paths will be taken + ; + } - // passing null to allProperties and allRequired as there's no parent - addVars(m, unaliasPropertySchema(schema.getProperties()), schema.getRequired(), null, null); + if (schema instanceof ComposedSchema) { + updateModelForComposedSchema(m, schema, allDefinitions); } // remove duplicated properties @@ -2792,7 +2820,7 @@ public class DefaultCodegen implements CodegenConfig { } } else { addPropProp = fromProperty("", (Schema) schema.getAdditionalProperties()); - if (isAnyTypeSchema((Schema) schema.getAdditionalProperties())) { + if (ModelUtils.isAnyType((Schema) schema.getAdditionalProperties())) { additionalPropertiesIsAnyType = true; } } @@ -3254,6 +3282,90 @@ public class DefaultCodegen implements CodegenConfig { return camelize(toVarName(name)); } + protected void updatePropertyForMap(CodegenProperty property, Schema p) { + property.isContainer = true; + property.containerType = "map"; + // TODO remove this hack in the future, code should use minProperties and maxProperties for object schemas + property.minItems = p.getMinProperties(); + property.maxItems = p.getMaxProperties(); + + // handle inner property + Schema innerSchema = unaliasSchema(getAdditionalProperties(p), importMapping); + if (innerSchema == null) { + LOGGER.error("Undefined map inner type for `{}`. Default to String.", p.getName()); + innerSchema = new StringSchema().description("//TODO automatically added by openapi-generator due to undefined type"); + p.setAdditionalProperties(innerSchema); + } + CodegenProperty cp = fromProperty("inner", innerSchema); + updatePropertyForMap(property, cp); + } + + protected void updatePropertyForObject(CodegenProperty property, Schema p) { + if (isFreeFormObject(p)) { + // non-composed object type with no properties + additionalProperties + // additionalProperties must be null, ObjectSchema, or empty Schema + property.isFreeFormObject = true; + if (languageSpecificPrimitives.contains(property.dataType)) { + property.isPrimitiveType = true; + } + if (ModelUtils.isMapSchema(p)) { + // an object or anyType composed schema that has additionalProperties set + updatePropertyForMap(property, p); + } else { + // ObjectSchema with additionalProperties = null, can be nullable + property.setIsMap(false); + } + } else if (ModelUtils.isMapSchema(p)) { + // an object or anyType composed schema that has additionalProperties set + updatePropertyForMap(property, p); + } + addVarsRequiredVarsAdditionalProps(p, property); + } + + protected void updatePropertyForAnyType(CodegenProperty property, Schema p) { + // The 'null' value is allowed when the OAS schema is 'any type'. + // See https://github.com/OAI/OpenAPI-Specification/issues/1389 + if (Boolean.FALSE.equals(p.getNullable())) { + LOGGER.warn("Schema '{}' is any type, which includes the 'null' value. 'nullable' cannot be set to 'false'", p.getName()); + } + property.isNullable = true; + if (languageSpecificPrimitives.contains(property.dataType)) { + property.isPrimitiveType = true; + } + if (ModelUtils.isMapSchema(p)) { + // an object or anyType composed schema that has additionalProperties set + // some of our code assumes that any type schema with properties defined will be a map + // even though it should allow in any type and have map constraints for properties + updatePropertyForMap(property, p); + } + addVarsRequiredVarsAdditionalProps(p, property); + } + + protected void updatePropertyForString(CodegenProperty property, Schema p) { + if (ModelUtils.isByteArraySchema(p)) { + property.isByteArray = true; + } else if (ModelUtils.isBinarySchema(p)) { + property.isBinary = true; + property.isFile = true; // file = binary in OAS3 + } else if (ModelUtils.isUUIDSchema(p)) { + property.isUuid = true; + } else if (ModelUtils.isURISchema(p)) { + property.isUri = true; + } else if (ModelUtils.isEmailSchema(p)) { + property.isEmail = true; + } else if (ModelUtils.isDateSchema(p)) { // date format + property.setIsString(false); // for backward compatibility with 2.x + property.isDate = true; + } else if (ModelUtils.isDateTimeSchema(p)) { // date-time format + property.setIsString(false); // for backward compatibility with 2.x + property.isDateTime = true; + } else if (ModelUtils.isDecimalSchema(p)) { // type: string, format: number + property.isDecimal = true; + property.setIsString(false); + } + property.pattern = toRegularExpression(p.getPattern()); + } + /** * Convert OAS Property object to Codegen Property object. * @@ -3352,89 +3464,6 @@ public class DefaultCodegen implements CodegenConfig { } } - String type = getSchemaType(p); - if (ModelUtils.isIntegerSchema(p)) { // integer type - property.isNumeric = Boolean.TRUE; - if (ModelUtils.isLongSchema(p)) { // int64/long format - property.isLong = Boolean.TRUE; - } else { - property.isInteger = Boolean.TRUE; // older use case, int32 and unbounded int - if (ModelUtils.isShortSchema(p)) { // int32 - property.setIsShort(Boolean.TRUE); - } else { // unbounded integer - property.setIsUnboundedInteger(Boolean.TRUE); - } - } - } else if (ModelUtils.isBooleanSchema(p)) { // boolean type - property.isBoolean = true; - property.getter = toBooleanGetter(name); - } else if (ModelUtils.isDateSchema(p)) { // date format - property.isString = false; // for backward compatibility with 2.x - property.isDate = true; - - } else if (ModelUtils.isDateTimeSchema(p)) { // date-time format - property.isString = false; // for backward compatibility with 2.x - property.isDateTime = true; - } else if (ModelUtils.isDecimalSchema(p)) { // type: string, format: number - property.isDecimal = true; - } else if (ModelUtils.isStringSchema(p)) { - if (ModelUtils.isByteArraySchema(p)) { - property.isByteArray = true; - } else if (ModelUtils.isBinarySchema(p)) { - property.isBinary = true; - property.isFile = true; // file = binary in OAS3 - } else if (ModelUtils.isFileSchema(p)) { - property.isFile = true; - } else if (ModelUtils.isUUIDSchema(p)) { - // keep isString to true to make it backward compatible - property.isString = true; - property.isUuid = true; - } else if (ModelUtils.isURISchema(p)) { - property.isString = true; // for backward compatibility - property.isUri = true; - } else if (ModelUtils.isEmailSchema(p)) { - property.isString = true; - property.isEmail = true; - } else { - property.isString = true; - } - property.pattern = toRegularExpression(p.getPattern()); - - } else if (ModelUtils.isNumberSchema(p)) { - property.isNumeric = Boolean.TRUE; - if (ModelUtils.isFloatSchema(p)) { // float - property.isFloat = Boolean.TRUE; - } else if (ModelUtils.isDoubleSchema(p)) { // double - property.isDouble = Boolean.TRUE; - } else { // type is number and without format - property.isNumber = Boolean.TRUE; - } - - } else if (isFreeFormObject(p)) { - property.isFreeFormObject = true; - } else if (isAnyTypeSchema(p)) { - // The 'null' value is allowed when the OAS schema is 'any type'. - // See https://github.com/OAI/OpenAPI-Specification/issues/1389 - if (Boolean.FALSE.equals(p.getNullable())) { - LOGGER.warn("Schema '{}' is any type, which includes the 'null' value. 'nullable' cannot be set to 'false'", p.getName()); - } - property.isNullable = true; - property.isAnyType = true; - } else if (ModelUtils.isArraySchema(p)) { - // default to string if inner item is undefined - ArraySchema arraySchema = (ArraySchema) p; - Schema innerSchema = unaliasSchema(getSchemaItems(arraySchema), importMapping); - } else if (ModelUtils.isMapSchema(p)) { - Schema innerSchema = unaliasSchema(getAdditionalProperties(p), importMapping); - if (innerSchema == null) { - LOGGER.error("Undefined map inner type for `{}`. Default to String.", p.getName()); - innerSchema = new StringSchema().description("//TODO automatically added by openapi-generator due to undefined type"); - p.setAdditionalProperties(innerSchema); - } - } else if (ModelUtils.isNullType(p)) { - property.isNull = true; - } - //Inline enum case: if (p.getEnum() != null && !p.getEnum().isEmpty()) { List _enum = p.getEnum(); @@ -3480,9 +3509,34 @@ public class DefaultCodegen implements CodegenConfig { property.datatypeWithEnum = property.dataType; } - if (ModelUtils.isArraySchema(p)) { + property.setTypeProperties(p); + if (ModelUtils.isIntegerSchema(p)) { // integer type + property.isNumeric = Boolean.TRUE; + if (ModelUtils.isLongSchema(p)) { // int64/long format + property.isLong = Boolean.TRUE; + } else { + property.isInteger = Boolean.TRUE; // older use case, int32 and unbounded int + if (ModelUtils.isShortSchema(p)) { // int32 + property.setIsShort(Boolean.TRUE); + } + } + } else if (ModelUtils.isBooleanSchema(p)) { // boolean type + property.getter = toBooleanGetter(name); + } else if (ModelUtils.isFileSchema(p) && !ModelUtils.isStringSchema(p)) { + // swagger v2 only, type file + property.isFile = true; + } else if (ModelUtils.isStringSchema(p)) { + updatePropertyForString(property, p); + } else if (ModelUtils.isNumberSchema(p)) { + property.isNumeric = Boolean.TRUE; + if (ModelUtils.isFloatSchema(p)) { // float + property.isFloat = Boolean.TRUE; + } else if (ModelUtils.isDoubleSchema(p)) { // double + property.isDouble = Boolean.TRUE; + } + } else if (ModelUtils.isArraySchema(p)) { + // default to string if inner item is undefined property.isContainer = true; - property.isArray = true; if (ModelUtils.isSet(p)) { property.containerType = "set"; } else { @@ -3508,43 +3562,29 @@ public class DefaultCodegen implements CodegenConfig { Schema innerSchema = unaliasSchema(getSchemaItems(arraySchema), importMapping); CodegenProperty cp = fromProperty(itemName, innerSchema); updatePropertyForArray(property, cp); - } else if (ModelUtils.isMapSchema(p)) { - property.isContainer = true; - property.isMap = true; - property.containerType = "map"; - property.baseType = getSchemaType(p); - // TODO remove this hack in the future, code should use minProperties and maxProperties for object schemas - property.minItems = p.getMinProperties(); - property.maxItems = p.getMaxProperties(); - - // handle inner property - Schema innerSchema = unaliasSchema(getAdditionalProperties(p), importMapping); - if (innerSchema == null) { - LOGGER.error("Undefined map inner type for `{}`. Default to String.", p.getName()); - innerSchema = new StringSchema().description("//TODO automatically added by openapi-generator due to undefined type"); - p.setAdditionalProperties(innerSchema); - } - CodegenProperty cp = fromProperty("inner", innerSchema); - updatePropertyForMap(property, cp); - } else if (isFreeFormObject(p)) { - property.isFreeFormObject = true; - property.baseType = getSchemaType(p); - if (languageSpecificPrimitives.contains(property.dataType)) { - property.isPrimitiveType = true; - } - } else if (isAnyTypeSchema(p)) { - property.isAnyType = true; - property.baseType = getSchemaType(p); - if (languageSpecificPrimitives.contains(property.dataType)) { - property.isPrimitiveType = true; - } - } else { // model - setNonArrayMapProperty(property, type); - Schema refOrCurrent = ModelUtils.getReferencedSchema(this.openAPI, p); - property.isModel = (ModelUtils.isComposedSchema(refOrCurrent) || ModelUtils.isObjectSchema(refOrCurrent)) && ModelUtils.isModel(refOrCurrent); + } else if (ModelUtils.isTypeObjectSchema(p)) { + updatePropertyForObject(property, p); + } else if (ModelUtils.isAnyType(p)) { + updatePropertyForAnyType(property, p); + } else if (!ModelUtils.isNullType(p)) { + // referenced model + ; + } + + Boolean isAnyTypeWithNothingElseSet = (ModelUtils.isAnyType(p) && + (p.getProperties() == null || p.getProperties().isEmpty()) && + !ModelUtils.isComposedSchema(p) && + p.getAdditionalProperties() == null && p.getNot() == null && p.getEnum() == null); + + if (!ModelUtils.isArraySchema(p) && !ModelUtils.isMapSchema(p) && !isFreeFormObject(p) && !isAnyTypeWithNothingElseSet) { + /** schemas that are not Array, not ModelUtils.isMapSchema, not isFreeFormObject, not AnyType with nothing else set + * so primitve schemas int, str, number, referenced schemas, AnyType schemas with properties, enums, or composition + */ + String type = getSchemaType(p); + setNonArrayMapProperty(property, type); + property.isModel = (ModelUtils.isComposedSchema(referencedSchema) || ModelUtils.isObjectSchema(referencedSchema)) && ModelUtils.isModel(referencedSchema); } - addVarsRequiredVarsAdditionalProps(p, property); LOGGER.debug("debugging from property return: {}", property); schemaCodegenPropertyCache.put(ns, property); return property; @@ -3603,6 +3643,7 @@ public class DefaultCodegen implements CodegenConfig { } else { property.isPrimitiveType = true; } + // TODO fix this, map should not be assigning properties to items property.items = innerProperty; property.mostInnerItems = getMostInnerItems(innerProperty); property.dataFormat = innerProperty.dataFormat; @@ -3635,7 +3676,7 @@ public class DefaultCodegen implements CodegenConfig { protected CodegenProperty getMostInnerItems(CodegenProperty property) { CodegenProperty currentProperty = property; while (currentProperty != null && (Boolean.TRUE.equals(currentProperty.isMap) - || Boolean.TRUE.equals(currentProperty.isArray))) { + || Boolean.TRUE.equals(currentProperty.isArray)) && currentProperty.items != null) { currentProperty = currentProperty.items; } return currentProperty; @@ -4179,12 +4220,6 @@ public class DefaultCodegen implements CodegenConfig { responseSchema = ModelUtils.getSchemaFromResponse(response); } r.schema = responseSchema; - if (responseSchema != null) { - ModelUtils.syncValidationProperties(responseSchema, r); - if (responseSchema.getPattern() != null) { - r.setPattern(toRegularExpression(responseSchema.getPattern())); - } - } r.message = escapeText(response.getDescription()); // TODO need to revise and test examples in responses @@ -4197,101 +4232,106 @@ public class DefaultCodegen implements CodegenConfig { addHeaders(response, r.headers); r.hasHeaders = !r.headers.isEmpty(); - if (r.schema != null) { - Map allSchemas = null; - CodegenProperty cp = fromProperty("response", responseSchema); - r.isNull = cp.isNull; + if (r.schema == null) { + r.primitiveType = true; + r.simpleType = true; + return r; + } - if (ModelUtils.isArraySchema(responseSchema)) { - ArraySchema as = (ArraySchema) responseSchema; - CodegenProperty items = fromProperty("response", getSchemaItems(as)); - r.setItems(items); - CodegenProperty innerCp = items; + ModelUtils.syncValidationProperties(responseSchema, r); + if (responseSchema.getPattern() != null) { + r.setPattern(toRegularExpression(responseSchema.getPattern())); + } - while (innerCp != null) { - r.baseType = innerCp.baseType; - innerCp = innerCp.items; - } - } else { - if (cp.complexType != null) { - if (cp.items != null) { - r.baseType = cp.items.complexType; - } else { - r.baseType = cp.complexType; - } - r.isModel = true; + CodegenProperty cp = fromProperty("response", responseSchema); + r.dataType = getTypeDeclaration(responseSchema); + + if (!ModelUtils.isArraySchema(responseSchema)) { + if (cp.complexType != null) { + if (cp.items != null) { + r.baseType = cp.items.complexType; } else { - r.baseType = cp.baseType; + r.baseType = cp.complexType; } + r.isModel = true; + } else { + r.baseType = cp.baseType; } + } - r.dataType = cp.dataType; - if (Boolean.TRUE.equals(cp.isString) && Boolean.TRUE.equals(cp.isEmail)) { + r.setTypeProperties(responseSchema); + if (ModelUtils.isArraySchema(responseSchema)) { + r.simpleType = false; + r.containerType = cp.containerType; + ArraySchema as = (ArraySchema) responseSchema; + CodegenProperty items = fromProperty("response", getSchemaItems(as)); + r.setItems(items); + CodegenProperty innerCp = items; + + while (innerCp != null) { + r.baseType = innerCp.baseType; + innerCp = innerCp.items; + } + } else if (ModelUtils.isFileSchema(responseSchema) && !ModelUtils.isStringSchema(responseSchema)) { + // swagger v2 only, type file + r.isFile = true; + } else if (ModelUtils.isStringSchema(responseSchema)) { + if (ModelUtils.isEmailSchema(responseSchema)) { r.isEmail = true; - } else if (Boolean.TRUE.equals(cp.isString) && Boolean.TRUE.equals(cp.isUuid)) { + } else if (ModelUtils.isUUIDSchema(responseSchema)) { r.isUuid = true; - } else if (Boolean.TRUE.equals(cp.isByteArray)) { + } else if (ModelUtils.isByteArraySchema(responseSchema)) { r.isByteArray = true; - } else if (Boolean.TRUE.equals(cp.isString)) { - r.isString = true; - } else if (Boolean.TRUE.equals(cp.isBoolean)) { - r.isBoolean = true; - } else if (Boolean.TRUE.equals(cp.isLong)) { - r.isLong = true; - r.isNumeric = true; - } else if (Boolean.TRUE.equals(cp.isInteger)) { - r.isInteger = true; - r.isNumeric = true; - if (Boolean.TRUE.equals(cp.isShort)) { - r.isShort = true; - } else if (Boolean.TRUE.equals(cp.isUnboundedInteger)) { - r.isUnboundedInteger = true; - } - } else if (Boolean.TRUE.equals(cp.isNumber)) { - r.isNumber = true; - r.isNumeric = true; - } else if (Boolean.TRUE.equals(cp.isDouble)) { - r.isDouble = true; - r.isNumeric = true; - } else if (Boolean.TRUE.equals(cp.isFloat)) { - r.isFloat = true; - r.isNumeric = true; - } else if (Boolean.TRUE.equals(cp.isDecimal)) { - r.isDecimal = true; - r.isNumeric = true; - } else if (Boolean.TRUE.equals(cp.isBinary)) { + } else if (ModelUtils.isBinarySchema(responseSchema)) { r.isFile = true; // file = binary in OAS3 r.isBinary = true; - } else if (Boolean.TRUE.equals(cp.isFile)) { - r.isFile = true; - } else if (Boolean.TRUE.equals(cp.isDate)) { + } else if (ModelUtils.isDateSchema(responseSchema)) { + r.setIsString(false); // for backward compatibility with 2.x r.isDate = true; - } else if (Boolean.TRUE.equals(cp.isDateTime)) { + } else if (ModelUtils.isDateTimeSchema(responseSchema)) { + r.setIsString(false); // for backward compatibility with 2.x r.isDateTime = true; - } else if (Boolean.TRUE.equals(cp.isFreeFormObject)) { + } else if (ModelUtils.isDecimalSchema(responseSchema)) { // type: string, format: number + r.isDecimal = true; + r.setIsString(false); + r.isNumeric = true; + } + } else if (ModelUtils.isIntegerSchema(responseSchema)) { // integer type + r.isNumeric = Boolean.TRUE; + if (ModelUtils.isLongSchema(responseSchema)) { // int64/long format + r.isLong = Boolean.TRUE; + } else { + r.isInteger = Boolean.TRUE; // older use case, int32 and unbounded int + if (ModelUtils.isShortSchema(responseSchema)) { // int32 + r.setIsShort(Boolean.TRUE); + } + } + } else if (ModelUtils.isNumberSchema(responseSchema)) { + r.isNumeric = Boolean.TRUE; + if (ModelUtils.isFloatSchema(responseSchema)) { // float + r.isFloat = Boolean.TRUE; + } else if (ModelUtils.isDoubleSchema(responseSchema)) { // double + r.isDouble = Boolean.TRUE; + } + } else if (ModelUtils.isTypeObjectSchema(responseSchema)) { + if (ModelUtils.isFreeFormObject(openAPI, responseSchema)) { r.isFreeFormObject = true; - } else if (Boolean.TRUE.equals(cp.isAnyType)) { - r.isAnyType = true; - } else { - LOGGER.debug("Property type is not primitive: {}", cp.dataType); } - - if (cp.isContainer) { - r.simpleType = false; - r.containerType = cp.containerType; - r.isMap = "map".equals(cp.containerType); - r.isArray = "list".equalsIgnoreCase(cp.containerType) || - "array".equalsIgnoreCase(cp.containerType) || - "set".equalsIgnoreCase(cp.containerType); - } else { - r.simpleType = true; - } - - r.primitiveType = (r.baseType == null || languageSpecificPrimitives().contains(r.baseType)); - + r.simpleType = false; + r.containerType = cp.containerType; addVarsRequiredVarsAdditionalProps(responseSchema, r); + } else if (ModelUtils.isAnyType(responseSchema)) { + addVarsRequiredVarsAdditionalProps(responseSchema, r); + } else if (!ModelUtils.isBooleanSchema(responseSchema)){ + // referenced schemas + LOGGER.debug("Property type is not primitive: {}", cp.dataType); } + if (!r.isMap && !r.isArray) { + r.simpleType = true; + } + r.primitiveType = (r.baseType == null || languageSpecificPrimitives().contains(r.baseType)); + if (r.baseType == null) { r.isMap = false; r.isArray = false; @@ -4366,6 +4406,68 @@ public class DefaultCodegen implements CodegenConfig { return c; } + private void finishUpdatingParameter(CodegenParameter codegenParameter, Parameter parameter) { + // default to UNKNOWN_PARAMETER_NAME if paramName is null + if (codegenParameter.paramName == null) { + LOGGER.warn("Parameter name not defined properly. Default to UNKNOWN_PARAMETER_NAME"); + codegenParameter.paramName = "UNKNOWN_PARAMETER_NAME"; + } + + // set the parameter example value + // should be overridden by lang codegen + setParameterExampleValue(codegenParameter, parameter); + + postProcessParameter(codegenParameter); + LOGGER.debug("debugging codegenParameter return: {}", codegenParameter); + } + + + private void updateParameterForMap(CodegenParameter codegenParameter, Schema parameterSchema, Set imports) { + CodegenProperty codegenProperty = fromProperty("inner", getAdditionalProperties(parameterSchema)); + codegenParameter.items = codegenProperty; + codegenParameter.mostInnerItems = codegenProperty.mostInnerItems; + codegenParameter.baseType = codegenProperty.dataType; + codegenParameter.isContainer = true; + codegenParameter.isMap = true; + + // recursively add import + while (codegenProperty != null) { + imports.add(codegenProperty.baseType); + codegenProperty = codegenProperty.items; + } + } + + protected void updateParameterForString(CodegenParameter codegenParameter, Schema parameterSchema){ + if (ModelUtils.isEmailSchema(parameterSchema)) { + codegenParameter.isEmail = true; + } else if (ModelUtils.isUUIDSchema(parameterSchema)) { + codegenParameter.isUuid = true; + } else if (ModelUtils.isByteArraySchema(parameterSchema)) { + codegenParameter.setIsString(false); + codegenParameter.isByteArray = true; + codegenParameter.isPrimitiveType = true; + } else if (ModelUtils.isBinarySchema(parameterSchema)) { + codegenParameter.isBinary = true; + codegenParameter.isFile = true; // file = binary in OAS3 + codegenParameter.isPrimitiveType = true; + } else if (ModelUtils.isDateSchema(parameterSchema)) { + codegenParameter.setIsString(false); // for backward compatibility with 2.x + codegenParameter.isDate = true; + codegenParameter.isPrimitiveType = true; + } else if (ModelUtils.isDateTimeSchema(parameterSchema)) { + codegenParameter.setIsString(false); // for backward compatibility with 2.x + codegenParameter.isDateTime = true; + codegenParameter.isPrimitiveType = true; + } else if (ModelUtils.isDecimalSchema(parameterSchema)) { // type: string, format: number + codegenParameter.setIsString(false); + codegenParameter.isDecimal = true; + codegenParameter.isPrimitiveType = true; + } + if (Boolean.TRUE.equals(codegenParameter.isString)) { + codegenParameter.isPrimitiveType = true; + } + } + /** * Convert OAS Parameter object to Codegen Parameter object * @@ -4411,165 +4513,6 @@ public class DefaultCodegen implements CodegenConfig { parameterSchema = null; } - if (parameterSchema != null) { - parameterSchema = unaliasSchema(parameterSchema, Collections.emptyMap()); - if (parameterSchema == null) { - LOGGER.warn("warning! Schema not found for parameter \" {} \", using String", parameter.getName()); - parameterSchema = new StringSchema().description("//TODO automatically added by openapi-generator due to missing type definition."); - } - ModelUtils.syncValidationProperties(parameterSchema, codegenParameter); - - if (Boolean.TRUE.equals(parameterSchema.getNullable())) { // use nullable defined in the spec - codegenParameter.isNullable = true; - } - - // set default value - codegenParameter.defaultValue = toDefaultParameterValue(parameterSchema); - - if (parameter.getStyle() != null) { - codegenParameter.style = parameter.getStyle().toString(); - codegenParameter.isDeepObject = Parameter.StyleEnum.DEEPOBJECT == parameter.getStyle(); - } - - // the default value is false - // https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#user-content-parameterexplode - codegenParameter.isExplode = parameter.getExplode() == null ? false : parameter.getExplode(); - - // TODO revise collectionFormat, default collection format in OAS 3 appears to multi at least for query parameters - // https://swagger.io/docs/specification/serialization/ - String collectionFormat = null; - if (ModelUtils.isArraySchema(parameterSchema)) { // for array parameter - final ArraySchema arraySchema = (ArraySchema) parameterSchema; - Schema inner = getSchemaItems(arraySchema); - - collectionFormat = getCollectionFormat(parameter); - // default to csv: - collectionFormat = StringUtils.isEmpty(collectionFormat) ? "csv" : collectionFormat; - CodegenProperty codegenProperty = fromProperty("inner", inner); - codegenParameter.items = codegenProperty; - codegenParameter.mostInnerItems = codegenProperty.mostInnerItems; - codegenParameter.baseType = codegenProperty.dataType; - codegenParameter.isContainer = true; - codegenParameter.isArray = true; - - // recursively add import - while (codegenProperty != null) { - imports.add(codegenProperty.baseType); - codegenProperty = codegenProperty.items; - } - - } else if (ModelUtils.isMapSchema(parameterSchema)) { // for map parameter - CodegenProperty codegenProperty = fromProperty("inner", getAdditionalProperties(parameterSchema)); - codegenParameter.items = codegenProperty; - codegenParameter.mostInnerItems = codegenProperty.mostInnerItems; - codegenParameter.baseType = codegenProperty.dataType; - codegenParameter.isContainer = true; - codegenParameter.isMap = true; - - // recursively add import - while (codegenProperty != null) { - imports.add(codegenProperty.baseType); - codegenProperty = codegenProperty.items; - } - } else if (ModelUtils.isNullType(parameterSchema)) { - codegenParameter.isNull = true; - } -/* TODO revise the logic below - } else { - Map args = new HashMap(); - String format = qp.getFormat(); - args.put(PropertyId.ENUM, qp.getEnum()); - property = PropertyBuilder.build(type, format, args); - } -*/ - - CodegenProperty codegenProperty = fromProperty(parameter.getName(), parameterSchema); - // TODO revise below which seems not working - //if (parameterSchema.getRequired() != null && !parameterSchema.getRequired().isEmpty() && parameterSchema.getRequired().contains(codegenProperty.baseName)) { - codegenProperty.required = Boolean.TRUE.equals(parameter.getRequired()) ? true : false; - //} - //codegenProperty.required = true; - - // set boolean flag (e.g. isString) - setParameterBooleanFlagWithCodegenProperty(codegenParameter, codegenProperty); - - String parameterDataType = this.getParameterDataType(parameter, parameterSchema); - if (parameterDataType != null) { - codegenParameter.dataType = parameterDataType; - } else { - codegenParameter.dataType = codegenProperty.dataType; - } - if (ModelUtils.isObjectSchema(parameterSchema)) { - codegenProperty.complexType = codegenParameter.dataType; - } - if (ModelUtils.isSet(parameterSchema)) { - imports.add(codegenProperty.baseType); - } - codegenParameter.dataFormat = codegenProperty.dataFormat; - codegenParameter.required = codegenProperty.required; - - if (codegenProperty.isEnum) { - codegenParameter.datatypeWithEnum = codegenProperty.datatypeWithEnum; - codegenParameter.enumName = codegenProperty.enumName; - } - - // enum - updateCodegenPropertyEnum(codegenProperty); - codegenParameter.isEnum = codegenProperty.isEnum; - codegenParameter._enum = codegenProperty._enum; - codegenParameter.allowableValues = codegenProperty.allowableValues; - - if (codegenProperty.items != null && codegenProperty.items.isEnum) { - codegenParameter.datatypeWithEnum = codegenProperty.datatypeWithEnum; - codegenParameter.enumName = codegenProperty.enumName; - codegenParameter.items = codegenProperty.items; - codegenParameter.mostInnerItems = codegenProperty.mostInnerItems; - } - - codegenParameter.collectionFormat = collectionFormat; - if ("multi".equals(collectionFormat)) { - codegenParameter.isCollectionFormatMulti = true; - } - codegenParameter.paramName = toParamName(parameter.getName()); - - // import - if (codegenProperty.complexType != null) { - imports.add(codegenProperty.complexType); - } - - // validation - // handle maximum, minimum properly for int/long by removing the trailing ".0" - if (ModelUtils.isIntegerSchema(parameterSchema)) { - codegenParameter.maximum = parameterSchema.getMaximum() == null ? null : String.valueOf(parameterSchema.getMaximum().longValue()); - codegenParameter.minimum = parameterSchema.getMinimum() == null ? null : String.valueOf(parameterSchema.getMinimum().longValue()); - } else { - codegenParameter.maximum = parameterSchema.getMaximum() == null ? null : String.valueOf(parameterSchema.getMaximum()); - codegenParameter.minimum = parameterSchema.getMinimum() == null ? null : String.valueOf(parameterSchema.getMinimum()); - } - - codegenParameter.exclusiveMaximum = parameterSchema.getExclusiveMaximum() == null ? false : parameterSchema.getExclusiveMaximum(); - codegenParameter.exclusiveMinimum = parameterSchema.getExclusiveMinimum() == null ? false : parameterSchema.getExclusiveMinimum(); - codegenParameter.maxLength = parameterSchema.getMaxLength(); - codegenParameter.minLength = parameterSchema.getMinLength(); - codegenParameter.pattern = toRegularExpression(parameterSchema.getPattern()); - codegenParameter.maxItems = parameterSchema.getMaxItems(); - codegenParameter.minItems = parameterSchema.getMinItems(); - codegenParameter.uniqueItems = parameterSchema.getUniqueItems() == null ? false : parameterSchema.getUniqueItems(); - codegenParameter.multipleOf = parameterSchema.getMultipleOf(); - - // exclusive* are noop without corresponding min/max - if (codegenParameter.maximum != null || codegenParameter.minimum != null || - codegenParameter.maxLength != null || codegenParameter.minLength != null || - codegenParameter.maxItems != null || codegenParameter.minItems != null || - codegenParameter.pattern != null || codegenParameter.multipleOf != null) { - codegenParameter.hasValidation = true; - } - addVarsRequiredVarsAdditionalProps(parameterSchema, codegenParameter); - - } else { - LOGGER.error("Not handling {} as Body Parameter at the moment", parameter); - } - if (parameter instanceof QueryParameter || "query".equalsIgnoreCase(parameter.getIn())) { codegenParameter.isQueryParam = true; codegenParameter.isAllowEmptyValue = parameter.getAllowEmptyValue() != null && parameter.getAllowEmptyValue(); @@ -4584,12 +4527,162 @@ public class DefaultCodegen implements CodegenConfig { LOGGER.warn("Unknown parameter type: {}", parameter.getName()); } - // default to UNKNOWN_PARAMETER_NAME if paramName is null - if (codegenParameter.paramName == null) { - LOGGER.warn("Parameter name not defined properly. Default to UNKNOWN_PARAMETER_NAME"); - codegenParameter.paramName = "UNKNOWN_PARAMETER_NAME"; + if (parameterSchema == null) { + LOGGER.error("Not handling {} as Body Parameter at the moment", parameter); + finishUpdatingParameter(codegenParameter, parameter); + return codegenParameter; } + parameterSchema = unaliasSchema(parameterSchema, Collections.emptyMap()); + if (parameterSchema == null) { + LOGGER.warn("warning! Schema not found for parameter \" {} \", using String", parameter.getName()); + parameterSchema = new StringSchema().description("//TODO automatically added by openapi-generator due to missing type definition."); + finishUpdatingParameter(codegenParameter, parameter); + return codegenParameter; + } + ModelUtils.syncValidationProperties(parameterSchema, codegenParameter); + codegenParameter.setTypeProperties(parameterSchema); + + if (Boolean.TRUE.equals(parameterSchema.getNullable())) { // use nullable defined in the spec + codegenParameter.isNullable = true; + } + + // set default value + codegenParameter.defaultValue = toDefaultParameterValue(parameterSchema); + + if (parameter.getStyle() != null) { + codegenParameter.style = parameter.getStyle().toString(); + codegenParameter.isDeepObject = Parameter.StyleEnum.DEEPOBJECT == parameter.getStyle(); + } + + // the default value is false + // https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#user-content-parameterexplode + codegenParameter.isExplode = parameter.getExplode() == null ? false : parameter.getExplode(); + + // TODO revise collectionFormat, default collection format in OAS 3 appears to multi at least for query parameters + // https://swagger.io/docs/specification/serialization/ + String collectionFormat = null; + + if (ModelUtils.isFileSchema(parameterSchema) && !ModelUtils.isStringSchema(parameterSchema)) { + // swagger v2 only, type file + codegenParameter.isFile = true; + } else if (ModelUtils.isStringSchema(parameterSchema)) { + updateParameterForString(codegenParameter, parameterSchema); + } else if (ModelUtils.isBooleanSchema(parameterSchema)) { + codegenParameter.isPrimitiveType = true; + } else if (ModelUtils.isNumberSchema(parameterSchema)) { + codegenParameter.isPrimitiveType = true; + if (ModelUtils.isFloatSchema(parameterSchema)) { // float + codegenParameter.isFloat = true; + } else if (ModelUtils.isDoubleSchema(parameterSchema)) { // double + codegenParameter.isDouble = true; + } + } else if (ModelUtils.isIntegerSchema(parameterSchema)) { // integer type + codegenParameter.isPrimitiveType = true; + if (ModelUtils.isLongSchema(parameterSchema)) { // int64/long format + codegenParameter.isLong = true; + } else { + codegenParameter.isInteger = true; + if (ModelUtils.isShortSchema(parameterSchema)) { // int32/short format + codegenParameter.isShort = true; + } else { // unbounded integer + ; + } + } + } else if (ModelUtils.isTypeObjectSchema(parameterSchema)) { + if (ModelUtils.isMapSchema(parameterSchema)) { // for map parameter + updateParameterForMap(codegenParameter, parameterSchema, imports); + } + if (ModelUtils.isFreeFormObject(openAPI, parameterSchema)) { + codegenParameter.isFreeFormObject = true; + } + addVarsRequiredVarsAdditionalProps(parameterSchema, codegenParameter); + } else if (ModelUtils.isNullType(parameterSchema)) { + ; + } else if (ModelUtils.isAnyType(parameterSchema)) { + // any schema with no type set, composed schemas often do this + if (ModelUtils.isMapSchema(parameterSchema)) { // for map parameter + updateParameterForMap(codegenParameter, parameterSchema, imports); + } + addVarsRequiredVarsAdditionalProps(parameterSchema, codegenParameter); + } else if (ModelUtils.isArraySchema(parameterSchema)) { + final ArraySchema arraySchema = (ArraySchema) parameterSchema; + Schema inner = getSchemaItems(arraySchema); + + collectionFormat = getCollectionFormat(parameter); + // default to csv: + collectionFormat = StringUtils.isEmpty(collectionFormat) ? "csv" : collectionFormat; + CodegenProperty itemsProperty = fromProperty("inner", inner); + codegenParameter.items = itemsProperty; + codegenParameter.mostInnerItems = itemsProperty.mostInnerItems; + codegenParameter.baseType = itemsProperty.dataType; + codegenParameter.isContainer = true; + + // recursively add import + while (itemsProperty != null) { + imports.add(itemsProperty.baseType); + itemsProperty = itemsProperty.items; + } + } else { + // referenced schemas + ; + } + + CodegenProperty codegenProperty = fromProperty(parameter.getName(), parameterSchema); + if (Boolean.TRUE.equals(codegenProperty.isModel)) { + codegenParameter.isModel = true; + } + // TODO revise below which seems not working + //if (parameterSchema.getRequired() != null && !parameterSchema.getRequired().isEmpty() && parameterSchema.getRequired().contains(codegenProperty.baseName)) { + codegenProperty.required = Boolean.TRUE.equals(parameter.getRequired()) ? true : false; + //} + //codegenProperty.required = true; + + String parameterDataType = this.getParameterDataType(parameter, parameterSchema); + if (parameterDataType != null) { + codegenParameter.dataType = parameterDataType; + } else { + codegenParameter.dataType = codegenProperty.dataType; + } + if (ModelUtils.isObjectSchema(parameterSchema)) { + codegenProperty.complexType = codegenParameter.dataType; + } + if (ModelUtils.isSet(parameterSchema)) { + imports.add(codegenProperty.baseType); + } + codegenParameter.dataFormat = codegenProperty.dataFormat; + codegenParameter.required = codegenProperty.required; + + if (codegenProperty.isEnum) { + codegenParameter.datatypeWithEnum = codegenProperty.datatypeWithEnum; + codegenParameter.enumName = codegenProperty.enumName; + } + + // enum + updateCodegenPropertyEnum(codegenProperty); + codegenParameter.isEnum = codegenProperty.isEnum; + codegenParameter._enum = codegenProperty._enum; + codegenParameter.allowableValues = codegenProperty.allowableValues; + + if (codegenProperty.items != null && codegenProperty.items.isEnum) { + codegenParameter.datatypeWithEnum = codegenProperty.datatypeWithEnum; + codegenParameter.enumName = codegenProperty.enumName; + codegenParameter.items = codegenProperty.items; + codegenParameter.mostInnerItems = codegenProperty.mostInnerItems; + } + + codegenParameter.collectionFormat = collectionFormat; + if ("multi".equals(collectionFormat)) { + codegenParameter.isCollectionFormatMulti = true; + } + codegenParameter.paramName = toParamName(parameter.getName()); + + // import + if (codegenProperty.complexType != null) { + imports.add(codegenProperty.complexType); + } + codegenParameter.pattern = toRegularExpression(parameterSchema.getPattern()); + if (codegenParameter.isQueryParam && codegenParameter.isDeepObject) { Schema schema = ModelUtils.getSchema(openAPI, codegenParameter.dataType); codegenParameter.items = fromProperty(codegenParameter.paramName, schema); @@ -4612,12 +4705,7 @@ public class DefaultCodegen implements CodegenConfig { } } - // set the parameter example value - // should be overridden by lang codegen - setParameterExampleValue(codegenParameter, parameter); - - postProcessParameter(codegenParameter); - LOGGER.debug("debugging codegenParameter return: {}", codegenParameter); + finishUpdatingParameter(codegenParameter, parameter); return codegenParameter; } @@ -4978,7 +5066,7 @@ public class DefaultCodegen implements CodegenConfig { * @param properties model properties (schemas) * @return model properties with direct reference to schemas */ - private Map unaliasPropertySchema(Map properties) { + protected Map unaliasPropertySchema(Map properties) { if (properties != null) { for (String key : properties.keySet()) { properties.put(key, unaliasSchema(properties.get(key), importMapping())); @@ -4989,7 +5077,7 @@ public class DefaultCodegen implements CodegenConfig { return properties; } - private void addVars(CodegenModel m, Map properties, List required, + protected void addVars(CodegenModel m, Map properties, List required, Map allProperties, List allRequired) { m.hasRequired = false; @@ -5581,6 +5669,9 @@ public class DefaultCodegen implements CodegenConfig { /** * Set CodegenParameter boolean flag using CodegenProperty. + * NOTE: This is deprecated and can be removed in 6.0.0 + * This logic has been folded into the original call sites and long term will be moved into + * IJsonSchemaValidationProperties.setTypeProperties and overrides like updateModelForObject * * @param parameter Codegen Parameter * @param property Codegen property @@ -6020,6 +6111,10 @@ public class DefaultCodegen implements CodegenConfig { schema = ModelUtils.getReferencedSchema(this.openAPI, schema); List allRequired = new ArrayList(); Map properties = new LinkedHashMap<>(); + // this traverses a composed schema and extracts all properties in each schema into properties + // TODO in the future have this return one codegenParameter of type object or composed which includes all definition + // that will be needed for complex composition use cases + // https://github.com/OpenAPITools/openapi-generator/issues/10415 addProperties(properties, allRequired, schema); if (!properties.isEmpty()) { @@ -6027,48 +6122,13 @@ public class DefaultCodegen implements CodegenConfig { CodegenParameter codegenParameter; // key => property name // value => property schema - Schema s = entry.getValue(); - // array of schema - if (ModelUtils.isArraySchema(s)) { - final ArraySchema arraySchema = (ArraySchema) s; - Schema inner = getSchemaItems(arraySchema); - - codegenParameter = fromFormProperty(entry.getKey(), inner, imports); - CodegenProperty codegenProperty = fromProperty("inner", inner); - codegenParameter.items = codegenProperty; - codegenParameter.mostInnerItems = codegenProperty.mostInnerItems; - codegenParameter.baseType = codegenProperty.dataType; - codegenParameter.isPrimitiveType = false; - codegenParameter.isContainer = true; - codegenParameter.isArray = true; - codegenParameter.description = escapeText(s.getDescription()); - codegenParameter.dataType = getTypeDeclaration(arraySchema); - if (codegenParameter.baseType != null && codegenParameter.enumName != null) { - codegenParameter.datatypeWithEnum = codegenParameter.dataType.replace(codegenParameter.baseType, codegenParameter.enumName); - } else { - LOGGER.warn("Could not compute datatypeWithEnum from {}, {}", codegenParameter.baseType, codegenParameter.enumName); - } - //TODO fix collectionFormat for form parameters - //collectionFormat = getCollectionFormat(s); - String collectionFormat = getCollectionFormat(codegenParameter); - // default to csv: - codegenParameter.collectionFormat = StringUtils.isEmpty(collectionFormat) ? "csv" : collectionFormat; - - // set nullable - setParameterNullable(codegenParameter, codegenProperty); - - // recursively add import - while (codegenProperty != null) { - imports.add(codegenProperty.baseType); - codegenProperty = codegenProperty.items; - } - - } else if (ModelUtils.isMapSchema(s)) { + String propertyName = entry.getKey(); + Schema propertySchema = entry.getValue(); + if (ModelUtils.isMapSchema(propertySchema)) { LOGGER.error("Map of form parameters not supported. Please report the issue to https://github.com/openapitools/openapi-generator if you need help."); continue; - } else { - codegenParameter = fromFormProperty(entry.getKey(), entry.getValue(), imports); } + codegenParameter = fromFormProperty(propertyName, propertySchema, imports); // Set 'required' flag defined in the schema element if (!codegenParameter.required && schema.getRequired() != null) { @@ -6088,18 +6148,135 @@ public class DefaultCodegen implements CodegenConfig { LOGGER.debug("Debugging fromFormProperty {}: {}", name, propertySchema); CodegenProperty codegenProperty = fromProperty(name, propertySchema); - ModelUtils.syncValidationProperties(propertySchema, codegenProperty); + Schema ps = unaliasSchema(propertySchema, importMapping); + ModelUtils.syncValidationProperties(ps, codegenParameter); + codegenParameter.setTypeProperties(ps); + if (ps.getPattern() != null) { + codegenParameter.pattern = toRegularExpression(ps.getPattern()); + } - codegenParameter.isFormParam = Boolean.TRUE; - codegenParameter.baseName = codegenProperty.baseName; - codegenParameter.paramName = toParamName((codegenParameter.baseName)); codegenParameter.baseType = codegenProperty.baseType; codegenParameter.dataType = codegenProperty.dataType; + codegenParameter.defaultValue = codegenProperty.getDefaultValue(); + codegenParameter.baseName = codegenProperty.baseName; + codegenParameter.paramName = toParamName(codegenParameter.baseName); codegenParameter.dataFormat = codegenProperty.dataFormat; + // non-array/map + updateCodegenPropertyEnum(codegenProperty); + codegenParameter.isEnum = codegenProperty.isEnum; + codegenParameter._enum = codegenProperty._enum; + codegenParameter.allowableValues = codegenProperty.allowableValues; + + if (ModelUtils.isFileSchema(ps) && !ModelUtils.isStringSchema(ps)) { + // swagger v2 only, type file + codegenParameter.isFile = true; + } else if (ModelUtils.isStringSchema(ps)) { + if (ModelUtils.isEmailSchema(ps)) { + codegenParameter.isEmail = true; + } else if (ModelUtils.isUUIDSchema(ps)) { + codegenParameter.isUuid = true; + } else if (ModelUtils.isByteArraySchema(ps)) { + codegenParameter.setIsString(false); + codegenParameter.isByteArray = true; + codegenParameter.isPrimitiveType = true; + } else if (ModelUtils.isBinarySchema(ps)) { + codegenParameter.isBinary = true; + codegenParameter.isFile = true; // file = binary in OAS3 + codegenParameter.isPrimitiveType = true; + } else if (ModelUtils.isDateSchema(ps)) { + codegenParameter.setIsString(false); // for backward compatibility with 2.x + codegenParameter.isDate = true; + codegenParameter.isPrimitiveType = true; + } else if (ModelUtils.isDateTimeSchema(ps)) { + codegenParameter.setIsString(false); // for backward compatibility with 2.x + codegenParameter.isDateTime = true; + codegenParameter.isPrimitiveType = true; + } else if (ModelUtils.isDecimalSchema(ps)) { // type: string, format: number + codegenParameter.setIsString(false); + codegenParameter.isDecimal = true; + codegenParameter.isPrimitiveType = true; + } + if (Boolean.TRUE.equals(codegenParameter.isString)) { + codegenParameter.isPrimitiveType = true; + } + } else if (ModelUtils.isBooleanSchema(ps)) { + codegenParameter.isPrimitiveType = true; + } else if (ModelUtils.isNumberSchema(ps)) { + codegenParameter.isPrimitiveType = true; + if (ModelUtils.isFloatSchema(ps)) { // float + codegenParameter.isFloat = true; + } else if (ModelUtils.isDoubleSchema(ps)) { // double + codegenParameter.isDouble = true; + } + } else if (ModelUtils.isIntegerSchema(ps)) { // integer type + codegenParameter.isPrimitiveType = true; + if (ModelUtils.isLongSchema(ps)) { // int64/long format + codegenParameter.isLong = true; + } else { + codegenParameter.isInteger = true; + if (ModelUtils.isShortSchema(ps)) { // int32/short format + codegenParameter.isShort = true; + } else { // unbounded integer + ; + } + } + } else if (ModelUtils.isTypeObjectSchema(ps)) { + if (ModelUtils.isFreeFormObject(openAPI, ps)) { + codegenParameter.isFreeFormObject = true; + } + } else if (ModelUtils.isNullType(ps)) { + ; + } else if (ModelUtils.isAnyType(ps)) { + // any schema with no type set, composed schemas often do this + ; + } else if (ModelUtils.isArraySchema(ps)) { + Schema inner = getSchemaItems((ArraySchema) ps); + CodegenProperty arrayInnerProperty = fromProperty("inner", inner); + codegenParameter.items = arrayInnerProperty; + codegenParameter.mostInnerItems = arrayInnerProperty.mostInnerItems; + codegenParameter.isPrimitiveType = false; + codegenParameter.isContainer = true; + // hoist items data into the array property + // TODO this hoisting code is generator specific and should be isolated into updateFormPropertyForArray + codegenParameter.baseType = arrayInnerProperty.dataType; + codegenParameter.defaultValue = arrayInnerProperty.getDefaultValue(); + if (codegenParameter.items.isFile) { + codegenParameter.isFile = true; + codegenParameter.dataFormat = codegenParameter.items.dataFormat; + } + if (arrayInnerProperty._enum != null) { + codegenParameter._enum = arrayInnerProperty._enum; + } + if (arrayInnerProperty.baseType != null && arrayInnerProperty.enumName != null) { + codegenParameter.datatypeWithEnum = codegenParameter.dataType.replace(arrayInnerProperty.baseType, arrayInnerProperty.enumName); + } else { + LOGGER.warn("Could not compute datatypeWithEnum from {}, {}", arrayInnerProperty.baseType, arrayInnerProperty.enumName); + } + // end of hoisting + //TODO fix collectionFormat for form parameters + //collectionFormat = getCollectionFormat(s); + String collectionFormat = getCollectionFormat(codegenParameter); + // default to csv: + codegenParameter.collectionFormat = StringUtils.isEmpty(collectionFormat) ? "csv" : collectionFormat; + + // recursively add import + while (arrayInnerProperty != null) { + imports.add(arrayInnerProperty.baseType); + arrayInnerProperty = arrayInnerProperty.items; + } + } else { + // referenced schemas + ; + } + + if (Boolean.TRUE.equals(codegenProperty.isModel)) { + codegenParameter.isModel = true; + } + + codegenParameter.isFormParam = Boolean.TRUE; codegenParameter.description = escapeText(codegenProperty.description); codegenParameter.unescapedDescription = codegenProperty.getDescription(); codegenParameter.jsonSchema = Json.pretty(propertySchema); - codegenParameter.defaultValue = codegenProperty.getDefaultValue(); if (codegenProperty.getVendorExtensions() != null && !codegenProperty.getVendorExtensions().isEmpty()) { codegenParameter.vendorExtensions = codegenProperty.getVendorExtensions(); @@ -6108,56 +6285,16 @@ public class DefaultCodegen implements CodegenConfig { codegenParameter.required = Boolean.TRUE; } - // non-array/map - updateCodegenPropertyEnum(codegenProperty); - codegenParameter.isEnum = codegenProperty.isEnum; - codegenParameter._enum = codegenProperty._enum; - codegenParameter.allowableValues = codegenProperty.allowableValues; - if (codegenProperty.isEnum) { codegenParameter.datatypeWithEnum = codegenProperty.datatypeWithEnum; codegenParameter.enumName = codegenProperty.enumName; } - - if (codegenProperty.items != null && codegenProperty.items.isEnum) { - codegenParameter.items = codegenProperty.items; - codegenParameter.mostInnerItems = codegenProperty.mostInnerItems; - } - + // import if (codegenProperty.complexType != null) { imports.add(codegenProperty.complexType); } - // validation - // handle maximum, minimum properly for int/long by removing the trailing ".0" - if (ModelUtils.isIntegerSchema(propertySchema)) { - codegenParameter.maximum = propertySchema.getMaximum() == null ? null : String.valueOf(propertySchema.getMaximum().longValue()); - codegenParameter.minimum = propertySchema.getMinimum() == null ? null : String.valueOf(propertySchema.getMinimum().longValue()); - } else { - codegenParameter.maximum = propertySchema.getMaximum() == null ? null : String.valueOf(propertySchema.getMaximum()); - codegenParameter.minimum = propertySchema.getMinimum() == null ? null : String.valueOf(propertySchema.getMinimum()); - } - - codegenParameter.exclusiveMaximum = propertySchema.getExclusiveMaximum() == null ? false : propertySchema.getExclusiveMaximum(); - codegenParameter.exclusiveMinimum = propertySchema.getExclusiveMinimum() == null ? false : propertySchema.getExclusiveMinimum(); - codegenParameter.maxLength = propertySchema.getMaxLength(); - codegenParameter.minLength = propertySchema.getMinLength(); - codegenParameter.pattern = toRegularExpression(propertySchema.getPattern()); - codegenParameter.maxItems = propertySchema.getMaxItems(); - codegenParameter.minItems = propertySchema.getMinItems(); - codegenParameter.uniqueItems = propertySchema.getUniqueItems() == null ? false : propertySchema.getUniqueItems(); - codegenParameter.multipleOf = propertySchema.getMultipleOf(); - - // exclusive* are noop without corresponding min/max - if (codegenParameter.maximum != null || codegenParameter.minimum != null || - codegenParameter.maxLength != null || codegenParameter.minLength != null || - codegenParameter.maxItems != null || codegenParameter.minItems != null || - codegenParameter.pattern != null || codegenParameter.multipleOf != null) { - codegenParameter.hasValidation = true; - } - - setParameterBooleanFlagWithCodegenProperty(codegenParameter, codegenProperty); setParameterExampleValue(codegenParameter); // set nullable setParameterNullable(codegenParameter, codegenProperty); @@ -6240,12 +6377,183 @@ public class DefaultCodegen implements CodegenConfig { } } - setParameterBooleanFlagWithCodegenProperty(codegenParameter, codegenProperty); // set nullable setParameterNullable(codegenParameter, codegenProperty); } } + protected void updateRequestBodyForMap(CodegenParameter codegenParameter, Schema schema, String name, Set imports, String bodyParameterName) { + if (ModelUtils.isGenerateAliasAsModel(schema) && StringUtils.isNotBlank(name)) { + this.addBodyModelSchema(codegenParameter, name, schema, imports, bodyParameterName, true); + } else { + Schema inner = getAdditionalProperties(schema); + if (inner == null) { + LOGGER.error("No inner type supplied for map parameter `{}`. Default to type:string", schema.getName()); + inner = new StringSchema().description("//TODO automatically added by openapi-generator"); + schema.setAdditionalProperties(inner); + } + CodegenProperty codegenProperty = fromProperty("property", schema); + + imports.add(codegenProperty.baseType); + + CodegenProperty innerCp = codegenProperty; + while (innerCp != null) { + if (innerCp.complexType != null) { + imports.add(innerCp.complexType); + } + innerCp = innerCp.items; + } + + if (StringUtils.isEmpty(bodyParameterName)) { + codegenParameter.baseName = "request_body"; + } else { + codegenParameter.baseName = bodyParameterName; + } + codegenParameter.paramName = toParamName(codegenParameter.baseName); + codegenParameter.items = codegenProperty.items; + codegenParameter.mostInnerItems = codegenProperty.mostInnerItems; + codegenParameter.dataType = getTypeDeclaration(schema); + codegenParameter.baseType = getSchemaType(inner); + codegenParameter.isContainer = Boolean.TRUE; + codegenParameter.isMap = Boolean.TRUE; + codegenParameter.isNullable = codegenProperty.isNullable; + + // set nullable + setParameterNullable(codegenParameter, codegenProperty); + } + } + + protected void updateRequestBodyForPrimitiveType(CodegenParameter codegenParameter, Schema schema, String bodyParameterName, Set imports) { + CodegenProperty codegenProperty = fromProperty("PRIMITIVE_REQUEST_BODY", schema); + if (codegenProperty != null) { + if (StringUtils.isEmpty(bodyParameterName)) { + codegenParameter.baseName = "body"; // default to body + } else { + codegenParameter.baseName = bodyParameterName; + } + codegenParameter.isPrimitiveType = true; + codegenParameter.baseType = codegenProperty.baseType; + codegenParameter.dataType = codegenProperty.dataType; + codegenParameter.description = codegenProperty.description; + codegenParameter.paramName = toParamName(codegenParameter.baseName); + codegenParameter.pattern = codegenProperty.pattern; + codegenParameter.isNullable = codegenProperty.isNullable; + + if (codegenProperty.complexType != null) { + imports.add(codegenProperty.complexType); + } + + } + // set nullable + setParameterNullable(codegenParameter, codegenProperty); + } + + protected void updateRequestBodyForObject(CodegenParameter codegenParameter, Schema schema, String name, Set imports, String bodyParameterName) { + if (ModelUtils.isMapSchema(schema)) { + // Schema with additionalproperties: true (including composed schemas with additionalproperties: true) + updateRequestBodyForMap(codegenParameter, schema, name, imports, bodyParameterName); + } else if (isFreeFormObject(schema)) { + // non-composed object type with no properties + additionalProperties + // additionalProperties must be null, ObjectSchema, or empty Schema + codegenParameter.isFreeFormObject = true; + + // HTTP request body is free form object + CodegenProperty codegenProperty = fromProperty("FREE_FORM_REQUEST_BODY", schema); + if (codegenProperty != null) { + if (StringUtils.isEmpty(bodyParameterName)) { + codegenParameter.baseName = "body"; // default to body + } else { + codegenParameter.baseName = bodyParameterName; + } + codegenParameter.isPrimitiveType = true; + codegenParameter.baseType = codegenProperty.baseType; + codegenParameter.dataType = codegenProperty.dataType; + codegenParameter.description = codegenProperty.description; + codegenParameter.isNullable = codegenProperty.isNullable; + codegenParameter.paramName = toParamName(codegenParameter.baseName); + } + // set nullable + setParameterNullable(codegenParameter, codegenProperty); + } else if (ModelUtils.isObjectSchema(schema)) { + // object type schema or composed schema with properties defined + this.addBodyModelSchema(codegenParameter, name, schema, imports, bodyParameterName, false); + } + addVarsRequiredVarsAdditionalProps(schema, codegenParameter); + } + + protected void updateRequestBodyForArray(CodegenParameter codegenParameter, Schema schema, String name, Set imports, String bodyParameterName) { + if (ModelUtils.isGenerateAliasAsModel(schema) && StringUtils.isNotBlank(name)) { + this.addBodyModelSchema(codegenParameter, name, schema, imports, bodyParameterName, true); + } else { + final ArraySchema arraySchema = (ArraySchema) schema; + Schema inner = getSchemaItems(arraySchema); + CodegenProperty codegenProperty = fromProperty("property", arraySchema); + imports.add(codegenProperty.baseType); + CodegenProperty innerCp = codegenProperty; + CodegenProperty mostInnerItem = innerCp; + // loop through multidimensional array to add proper import + // also find the most inner item + while (innerCp != null) { + if (innerCp.complexType != null) { + imports.add(innerCp.complexType); + } + mostInnerItem = innerCp; + innerCp = innerCp.items; + } + + if (StringUtils.isEmpty(bodyParameterName)) { + if (StringUtils.isEmpty(mostInnerItem.complexType)) { + codegenParameter.baseName = "request_body"; + } else { + codegenParameter.baseName = mostInnerItem.complexType; + } + } else { + codegenParameter.baseName = bodyParameterName; + } + codegenParameter.paramName = toArrayModelParamName(codegenParameter.baseName); + codegenParameter.items = codegenProperty.items; + codegenParameter.mostInnerItems = codegenProperty.mostInnerItems; + codegenParameter.dataType = getTypeDeclaration(arraySchema); + codegenParameter.baseType = getSchemaType(inner); + codegenParameter.isContainer = Boolean.TRUE; + codegenParameter.isNullable = codegenProperty.isNullable; + + // set nullable + setParameterNullable(codegenParameter, codegenProperty); + + while (codegenProperty != null) { + imports.add(codegenProperty.baseType); + codegenProperty = codegenProperty.items; + } + } + } + + protected void updateRequestBodyForString(CodegenParameter codegenParameter, Schema schema, Set imports, String bodyParameterName) { + updateRequestBodyForPrimitiveType(codegenParameter, schema, bodyParameterName, imports); + if (ModelUtils.isByteArraySchema(schema)) { + codegenParameter.isByteArray = true; + } else if (ModelUtils.isBinarySchema(schema)) { + codegenParameter.isBinary = true; + codegenParameter.isFile = true; // file = binary in OAS3 + } else if (ModelUtils.isUUIDSchema(schema)) { + codegenParameter.isUuid = true; + } else if (ModelUtils.isURISchema(schema)) { + codegenParameter.isUri = true; + } else if (ModelUtils.isEmailSchema(schema)) { + codegenParameter.isEmail = true; + } else if (ModelUtils.isDateSchema(schema)) { // date format + codegenParameter.setIsString(false); // for backward compatibility with 2.x + codegenParameter.isDate = true; + } else if (ModelUtils.isDateTimeSchema(schema)) { // date-time format + codegenParameter.setIsString(false); // for backward compatibility with 2.x + codegenParameter.isDateTime = true; + } else if (ModelUtils.isDecimalSchema(schema)) { // type: string, format: number + codegenParameter.isDecimal = true; + codegenParameter.setIsString(false); + } + codegenParameter.pattern = toRegularExpression(schema.getPattern()); + } + public CodegenParameter fromRequestBody(RequestBody body, Set imports, String bodyParameterName) { if (body == null) { LOGGER.error("body in fromRequestBody cannot be null!"); @@ -6271,151 +6579,62 @@ public class DefaultCodegen implements CodegenConfig { if (StringUtils.isNotBlank(schema.get$ref())) { name = ModelUtils.getSimpleRef(schema.get$ref()); } - Schema validationSchema = unaliasSchema(schema, importMapping); + + Schema unaliasedSchema = unaliasSchema(schema, importMapping); schema = ModelUtils.getReferencedSchema(this.openAPI, schema); - ModelUtils.syncValidationProperties(validationSchema, codegenParameter); - - if (ModelUtils.isMapSchema(schema)) { - // Schema with additionalproperties: true (including composed schemas with additionalproperties: true) - if (ModelUtils.isGenerateAliasAsModel(schema) && StringUtils.isNotBlank(name)) { - this.addBodyModelSchema(codegenParameter, name, schema, imports, bodyParameterName, true); + ModelUtils.syncValidationProperties(unaliasedSchema, codegenParameter); + codegenParameter.setTypeProperties(unaliasedSchema); + // TODO in the future switch al the below schema usages to unaliasedSchema + // because it keeps models as refs and will not get their referenced schemas + if (ModelUtils.isArraySchema(schema)) { + updateRequestBodyForArray(codegenParameter, schema, name, imports, bodyParameterName); + } else if (ModelUtils.isTypeObjectSchema(schema)) { + updateRequestBodyForObject(codegenParameter, schema, name, imports, bodyParameterName); + } else if (ModelUtils.isIntegerSchema(schema)) { // integer type + updateRequestBodyForPrimitiveType(codegenParameter, schema, bodyParameterName, imports); + codegenParameter.isNumeric = Boolean.TRUE; + if (ModelUtils.isLongSchema(schema)) { // int64/long format + codegenParameter.isLong = Boolean.TRUE; } else { - Schema inner = getAdditionalProperties(schema); - if (inner == null) { - LOGGER.error("No inner type supplied for map parameter `{}`. Default to type:string", schema.getName()); - inner = new StringSchema().description("//TODO automatically added by openapi-generator"); - schema.setAdditionalProperties(inner); - } - CodegenProperty codegenProperty = fromProperty("property", schema); - - imports.add(codegenProperty.baseType); - - CodegenProperty innerCp = codegenProperty; - while (innerCp != null) { - if (innerCp.complexType != null) { - imports.add(innerCp.complexType); - } - innerCp = innerCp.items; - } - - if (StringUtils.isEmpty(bodyParameterName)) { - codegenParameter.baseName = "request_body"; - } else { - codegenParameter.baseName = bodyParameterName; - } - codegenParameter.paramName = toParamName(codegenParameter.baseName); - codegenParameter.items = codegenProperty.items; - codegenParameter.mostInnerItems = codegenProperty.mostInnerItems; - codegenParameter.dataType = getTypeDeclaration(schema); - codegenParameter.baseType = getSchemaType(inner); - codegenParameter.isContainer = Boolean.TRUE; - codegenParameter.isMap = Boolean.TRUE; - codegenParameter.isNullable = codegenProperty.isNullable; - - setParameterBooleanFlagWithCodegenProperty(codegenParameter, codegenProperty); - - // set nullable - setParameterNullable(codegenParameter, codegenProperty); - } - } else if (ModelUtils.isArraySchema(schema)) { - if (ModelUtils.isGenerateAliasAsModel(schema) && StringUtils.isNotBlank(name)) { - this.addBodyModelSchema(codegenParameter, name, schema, imports, bodyParameterName, true); - } else { - final ArraySchema arraySchema = (ArraySchema) schema; - Schema inner = getSchemaItems(arraySchema); - CodegenProperty codegenProperty = fromProperty("property", arraySchema); - imports.add(codegenProperty.baseType); - CodegenProperty innerCp = codegenProperty; - CodegenProperty mostInnerItem = innerCp; - // loop through multidimensional array to add proper import - // also find the most inner item - while (innerCp != null) { - if (innerCp.complexType != null) { - imports.add(innerCp.complexType); - } - mostInnerItem = innerCp; - innerCp = innerCp.items; - } - - if (StringUtils.isEmpty(bodyParameterName)) { - if (StringUtils.isEmpty(mostInnerItem.complexType)) { - codegenParameter.baseName = "request_body"; - } else { - codegenParameter.baseName = mostInnerItem.complexType; - } - } else { - codegenParameter.baseName = bodyParameterName; - } - codegenParameter.paramName = toArrayModelParamName(codegenParameter.baseName); - codegenParameter.items = codegenProperty.items; - codegenParameter.mostInnerItems = codegenProperty.mostInnerItems; - codegenParameter.dataType = getTypeDeclaration(arraySchema); - codegenParameter.baseType = getSchemaType(inner); - codegenParameter.isContainer = Boolean.TRUE; - codegenParameter.isArray = Boolean.TRUE; - codegenParameter.isNullable = codegenProperty.isNullable; - - setParameterBooleanFlagWithCodegenProperty(codegenParameter, codegenProperty); - // set nullable - setParameterNullable(codegenParameter, codegenProperty); - - while (codegenProperty != null) { - imports.add(codegenProperty.baseType); - codegenProperty = codegenProperty.items; + codegenParameter.isInteger = Boolean.TRUE; // older use case, int32 and unbounded int + if (ModelUtils.isShortSchema(schema)) { // int32 + codegenParameter.setIsShort(Boolean.TRUE); } } - } else if (isFreeFormObject(schema)) { - // HTTP request body is free form object - CodegenProperty codegenProperty = fromProperty("FREE_FORM_REQUEST_BODY", schema); - if (codegenProperty != null) { - if (StringUtils.isEmpty(bodyParameterName)) { - codegenParameter.baseName = "body"; // default to body - } else { - codegenParameter.baseName = bodyParameterName; - } - codegenParameter.isPrimitiveType = true; - codegenParameter.baseType = codegenProperty.baseType; - codegenParameter.dataType = codegenProperty.dataType; - codegenParameter.description = codegenProperty.description; - codegenParameter.isNullable = codegenProperty.isNullable; - codegenParameter.paramName = toParamName(codegenParameter.baseName); + } else if (ModelUtils.isBooleanSchema(schema)) { // boolean type + updateRequestBodyForPrimitiveType(codegenParameter, schema, bodyParameterName, imports); + } else if (ModelUtils.isFileSchema(schema) && !ModelUtils.isStringSchema(schema)) { + // swagger v2 only, type file + codegenParameter.isFile = true; + } else if (ModelUtils.isStringSchema(schema)) { + updateRequestBodyForString(codegenParameter, schema, imports, bodyParameterName); + } else if (ModelUtils.isNumberSchema(schema)) { + updateRequestBodyForPrimitiveType(codegenParameter, schema, bodyParameterName, imports); + codegenParameter.isNumeric = Boolean.TRUE; + if (ModelUtils.isFloatSchema(schema)) { // float + codegenParameter.isFloat = Boolean.TRUE; + } else if (ModelUtils.isDoubleSchema(schema)) { // double + codegenParameter.isDouble = Boolean.TRUE; } - setParameterBooleanFlagWithCodegenProperty(codegenParameter, codegenProperty); - // set nullable - setParameterNullable(codegenParameter, codegenProperty); - - } else if (ModelUtils.isObjectSchema(schema) || ModelUtils.isComposedSchema(schema)) { - this.addBodyModelSchema(codegenParameter, name, schema, imports, bodyParameterName, false); + } else if (ModelUtils.isNullType(schema)) { + updateRequestBodyForPrimitiveType(codegenParameter, schema, bodyParameterName, imports); + } else if (ModelUtils.isAnyType(schema)) { + if (ModelUtils.isMapSchema(schema)) { + // Schema with additionalproperties: true (including composed schemas with additionalproperties: true) + updateRequestBodyForMap(codegenParameter, schema, name, imports, bodyParameterName); + } else if (ModelUtils.isComposedSchema(schema)) { + this.addBodyModelSchema(codegenParameter, name, schema, imports, bodyParameterName, false); + } else if (ModelUtils.isObjectSchema(schema)) { + // object type schema OR (AnyType schema with properties defined) + this.addBodyModelSchema(codegenParameter, name, schema, imports, bodyParameterName, false); + } + addVarsRequiredVarsAdditionalProps(schema, codegenParameter); } else { - // HTTP request body is primitive type (e.g. integer, string, etc) - CodegenProperty codegenProperty = fromProperty("PRIMITIVE_REQUEST_BODY", schema); - if (codegenProperty != null) { - if (StringUtils.isEmpty(bodyParameterName)) { - codegenParameter.baseName = "body"; // default to body - } else { - codegenParameter.baseName = bodyParameterName; - } - codegenParameter.isNull = codegenProperty.isNull; - codegenParameter.isPrimitiveType = true; - codegenParameter.baseType = codegenProperty.baseType; - codegenParameter.dataType = codegenProperty.dataType; - codegenParameter.description = codegenProperty.description; - codegenParameter.paramName = toParamName(codegenParameter.baseName); - codegenParameter.pattern = codegenProperty.pattern; - codegenParameter.isNullable = codegenProperty.isNullable; - - if (codegenProperty.complexType != null) { - imports.add(codegenProperty.complexType); - } - - } - setParameterBooleanFlagWithCodegenProperty(codegenParameter, codegenProperty); - // set nullable - setParameterNullable(codegenParameter, codegenProperty); + // referenced schemas + updateRequestBodyForPrimitiveType(codegenParameter, schema, bodyParameterName, imports); } - addVarsRequiredVarsAdditionalProps(schema, codegenParameter); addJsonSchemaForBodyRequestInCaseItsNotPresent(codegenParameter, body); // set the parameter's example value @@ -6795,6 +7014,9 @@ public class DefaultCodegen implements CodegenConfig { } /** + * This method has been kept to keep the introduction of ModelUtils.isAnyType as a non-breaking change + * this way, existing forks of our generator can continue to use this method + * TODO in 6.0.0 replace this method with ModelUtils.isAnyType * Return true if the schema value can be any type, i.e. it can be * the null value, integer, number, string, object or array. * One use case is when the "type" attribute in the OAS schema is unspecified. @@ -6867,6 +7089,7 @@ public class DefaultCodegen implements CodegenConfig { * @return true if it's a free-form object */ protected boolean isFreeFormObject(Schema schema) { + // TODO remove this method and replace all usages with ModelUtils.isFreeFormObject return ModelUtils.isFreeFormObject(this.openAPI, schema); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java index ffb195c4a5b..b3833e47f6f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java @@ -2,6 +2,9 @@ package org.openapitools.codegen; import java.util.List; +import io.swagger.v3.oas.models.media.Schema; +import org.openapitools.codegen.utils.ModelUtils; + public interface IJsonSchemaValidationProperties { String getPattern(); @@ -71,6 +74,7 @@ public interface IJsonSchemaValidationProperties { void setIsDateTime(boolean isDateTime); + // true when the schema type is object boolean getIsMap(); void setIsMap(boolean isMap); @@ -128,4 +132,77 @@ public interface IJsonSchemaValidationProperties { // discriminators are only supported in request bodies and response payloads per OpenApi void setHasDiscriminatorWithNonEmptyMapping(boolean hasDiscriminatorWithNonEmptyMapping); + + boolean getIsString(); + + void setIsString(boolean isNumber); + + boolean getIsNumber(); + + void setIsNumber(boolean isNumber); + + boolean getIsAnyType(); + + void setIsAnyType(boolean isAnyType); + + /** + * Syncs all the schema's type properties into the IJsonSchemaValidationProperties instance + * for now this only supports types without format information + * TODO: in the future move the format handling in here too + * @param p the schema which contains the type info + */ + default void setTypeProperties(Schema p) { + if (ModelUtils.isTypeObjectSchema(p)) { + setIsMap(true); + } else if (ModelUtils.isArraySchema(p)) { + setIsArray(true); + } else if (ModelUtils.isFileSchema(p) && !ModelUtils.isStringSchema(p)) { + // swagger v2 only, type file + ; + } else if (ModelUtils.isStringSchema(p)) { + setIsString(true); + if (ModelUtils.isByteArraySchema(p)) { + ; + } else if (ModelUtils.isBinarySchema(p)) { + // openapi v3 way of representing binary + file data + // for backward compatibility with 2.x file type + setIsString(false); + } else if (ModelUtils.isUUIDSchema(p)) { + // keep isString to true to make it backward compatible + ; + } else if (ModelUtils.isURISchema(p)) { + ; + } else if (ModelUtils.isEmailSchema(p)) { + ; + } else if (ModelUtils.isDateSchema(p)) { + ; + } else if (ModelUtils.isDateTimeSchema(p)) { + ; + } else if (ModelUtils.isDecimalSchema(p)) { // type: string, format: number + ; + } + } else if (ModelUtils.isNumberSchema(p)) { + if (ModelUtils.isFloatSchema(p)) { // float + ; + } else if (ModelUtils.isDoubleSchema(p)) { // double + ; + } else { // type is number and without format + setIsNumber(true); + } + } else if (ModelUtils.isIntegerSchema(p)) { // integer type + if (ModelUtils.isLongSchema(p)) { // int64/long format + ; + } else if (ModelUtils.isShortSchema(p)) { // int32/short format + ; + } else { // unbounded integer + setIsUnboundedInteger(true); + } + } else if (ModelUtils.isBooleanSchema(p)) { // boolean type + setIsBoolean(true); + } else if (ModelUtils.isNullType(p)) { + setIsNull(true); + } else if (ModelUtils.isAnyType(p)) { + setIsAnyType(true); + } + } } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java index 20d5bbe6e26..3c3f002b187 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java @@ -401,7 +401,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege if (ref != null && !ref.isEmpty()) { type = toModelName(openAPIType); - } else if ("object".equals(openAPIType) && isAnyTypeSchema(p)) { + } else if ("object".equals(openAPIType) && ModelUtils.isAnyType(p)) { // Arbitrary type. Note this is not the same thing as free-form object. type = "interface{}"; } else if (typeMapping.containsKey(openAPIType)) { 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 9a86368bb39..66718bdaf7f 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 @@ -19,6 +19,7 @@ package org.openapitools.codegen.languages; import com.google.common.collect.ImmutableMap; import com.samskivert.mustache.Mustache; import io.swagger.v3.oas.models.media.ArraySchema; +import io.swagger.v3.oas.models.media.ComposedSchema; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; @@ -1128,4 +1129,28 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { System.out.println("# Please support his work directly via https://patreon.com/jimschubert \uD83D\uDE4F #"); System.out.println("################################################################################"); } + + @Override + protected void updateModelForObject(CodegenModel m, Schema schema) { + /** + * we have a custom version of this function so we only set isMap to true if + * ModelUtils.isMapSchema + * In other generators, isMap is true for all type object schemas + */ + if (schema.getProperties() != null || schema.getRequired() != null && !(schema instanceof ComposedSchema)) { + // passing null to allProperties and allRequired as there's no parent + addVars(m, unaliasPropertySchema(schema.getProperties()), schema.getRequired(), null, null); + } + if (ModelUtils.isMapSchema(schema)) { + // an object or anyType composed schema that has additionalProperties set + addAdditionPropertiesToCodeGenModel(m, schema); + } else { + m.setIsMap(false); + if (ModelUtils.isFreeFormObject(openAPI, schema)) { + // non-composed object type with no properties + additionalProperties + // additionalProperties must be null, ObjectSchema, or empty Schema + addAdditionPropertiesToCodeGenModel(m, schema); + } + } + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java index 5f9734460f8..ab4f7b37cf7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java @@ -17,8 +17,11 @@ package org.openapitools.codegen.languages; +import io.swagger.v3.oas.models.media.ComposedSchema; +import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -359,4 +362,28 @@ public class GoServerCodegen extends AbstractGoCodegen { public void setAddResponseHeaders(Boolean addResponseHeaders) { this.addResponseHeaders = addResponseHeaders; } + + @Override + protected void updateModelForObject(CodegenModel m, Schema schema) { + /** + * we have a custom version of this function so we only set isMap to true if + * ModelUtils.isMapSchema + * In other generators, isMap is true for all type object schemas + */ + if (schema.getProperties() != null || schema.getRequired() != null && !(schema instanceof ComposedSchema)) { + // passing null to allProperties and allRequired as there's no parent + addVars(m, unaliasPropertySchema(schema.getProperties()), schema.getRequired(), null, null); + } + if (ModelUtils.isMapSchema(schema)) { + // an object or anyType composed schema that has additionalProperties set + addAdditionPropertiesToCodeGenModel(m, schema); + } else { + m.setIsMap(false); + if (ModelUtils.isFreeFormObject(openAPI, schema)) { + // non-composed object type with no properties + additionalProperties + // additionalProperties must be null, ObjectSchema, or empty Schema + addAdditionPropertiesToCodeGenModel(m, schema); + } + } + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFServerCodegen.java index ae0c006cabd..f406050ea68 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFServerCodegen.java @@ -17,15 +17,20 @@ package org.openapitools.codegen.languages; +import io.swagger.v3.oas.models.media.ComposedSchema; +import io.swagger.v3.oas.models.media.Schema; +import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.CXFServerFeatures; import org.openapitools.codegen.languages.features.GzipTestFeatures; import org.openapitools.codegen.languages.features.LoggingTestFeatures; import org.openapitools.codegen.languages.features.UseGenericResponseFeatures; +import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; +import java.util.Set; public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen implements CXFServerFeatures, GzipTestFeatures, LoggingTestFeatures, UseGenericResponseFeatures { @@ -124,7 +129,6 @@ public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen } - @Override public void processOpts() { super.processOpts(); @@ -328,4 +332,27 @@ public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen this.useGenericResponse = useGenericResponse; } + @Override + protected void updateModelForObject(CodegenModel m, Schema schema) { + /** + * we have a custom version of this function so we only set isMap to true if + * ModelUtils.isMapSchema + * In other generators, isMap is true for all type object schemas + */ + if (schema.getProperties() != null || schema.getRequired() != null && !(schema instanceof ComposedSchema)) { + // passing null to allProperties and allRequired as there's no parent + addVars(m, unaliasPropertySchema(schema.getProperties()), schema.getRequired(), null, null); + } + if (ModelUtils.isMapSchema(schema)) { + // an object or anyType composed schema that has additionalProperties set + addAdditionPropertiesToCodeGenModel(m, schema); + } else { + m.setIsMap(false); + if (ModelUtils.isFreeFormObject(openAPI, schema)) { + // non-composed object type with no properties + additionalProperties + // additionalProperties must be null, ObjectSchema, or empty Schema + addAdditionPropertiesToCodeGenModel(m, schema); + } + } + } } 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 f545e758334..7b66ec98a39 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 @@ -849,7 +849,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen { return prefix + modelName + fullSuffix; } } - if (isAnyTypeSchema(p)) { + if (ModelUtils.isAnyType(p)) { // for v2 specs only, swagger-parser never generates an AnyType schemas even though it should generate them // https://github.com/swagger-api/swagger-parser/issues/1378 // switch to v3 if you need AnyType to work @@ -1115,7 +1115,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen { } String refModelName = getModelName(schema); return toExampleValueRecursive(refModelName, refSchema, objExample, indentationLevel, prefix, exampleLine, seenSchemas); - } else if (ModelUtils.isNullType(schema) || isAnyTypeSchema(schema)) { + } else if (ModelUtils.isNullType(schema) || ModelUtils.isAnyType(schema)) { // The 'null' type is allowed in OAS 3.1 and above. It is not supported by OAS 3.0.x, // though this tooling supports it. return fullPrefix + "None" + closeChars; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java index ad6014054cc..9d6546d2ae5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java @@ -1681,4 +1681,93 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { } } } + + @Override + protected void updateRequestBodyForString(CodegenParameter codegenParameter, Schema schema, Set imports, String bodyParameterName) { + /** + * we have a custom version of this function to set isString to false for isByteArray + */ + updateRequestBodyForPrimitiveType(codegenParameter, schema, bodyParameterName, imports); + if (ModelUtils.isByteArraySchema(schema)) { + codegenParameter.isByteArray = true; + // custom code + codegenParameter.setIsString(false); + } else if (ModelUtils.isBinarySchema(schema)) { + codegenParameter.isBinary = true; + codegenParameter.isFile = true; // file = binary in OAS3 + } else if (ModelUtils.isUUIDSchema(schema)) { + codegenParameter.isUuid = true; + } else if (ModelUtils.isURISchema(schema)) { + codegenParameter.isUri = true; + } else if (ModelUtils.isEmailSchema(schema)) { + codegenParameter.isEmail = true; + } else if (ModelUtils.isDateSchema(schema)) { // date format + codegenParameter.setIsString(false); // for backward compatibility with 2.x + codegenParameter.isDate = true; + } else if (ModelUtils.isDateTimeSchema(schema)) { // date-time format + codegenParameter.setIsString(false); // for backward compatibility with 2.x + codegenParameter.isDateTime = true; + } else if (ModelUtils.isDecimalSchema(schema)) { // type: string, format: number + codegenParameter.isDecimal = true; + codegenParameter.setIsString(false); + } + codegenParameter.pattern = toRegularExpression(schema.getPattern()); + } + + @Override + protected void updateParameterForString(CodegenParameter codegenParameter, Schema parameterSchema){ + /** + * we have a custom version of this function to set isString to false for uuid + */ + if (ModelUtils.isEmailSchema(parameterSchema)) { + codegenParameter.isEmail = true; + } else if (ModelUtils.isUUIDSchema(parameterSchema)) { + codegenParameter.setIsString(false); + codegenParameter.isUuid = true; + } else if (ModelUtils.isByteArraySchema(parameterSchema)) { + codegenParameter.setIsString(false); + codegenParameter.isByteArray = true; + codegenParameter.isPrimitiveType = true; + } else if (ModelUtils.isBinarySchema(parameterSchema)) { + codegenParameter.isBinary = true; + codegenParameter.isFile = true; // file = binary in OAS3 + codegenParameter.isPrimitiveType = true; + } else if (ModelUtils.isDateSchema(parameterSchema)) { + codegenParameter.setIsString(false); // for backward compatibility with 2.x + codegenParameter.isDate = true; + codegenParameter.isPrimitiveType = true; + } else if (ModelUtils.isDateTimeSchema(parameterSchema)) { + codegenParameter.setIsString(false); // for backward compatibility with 2.x + codegenParameter.isDateTime = true; + codegenParameter.isPrimitiveType = true; + } else if (ModelUtils.isDecimalSchema(parameterSchema)) { // type: string, format: number + codegenParameter.setIsString(false); + codegenParameter.isDecimal = true; + codegenParameter.isPrimitiveType = true; + } + if (Boolean.TRUE.equals(codegenParameter.isString)) { + codegenParameter.isPrimitiveType = true; + } + } + + @Override + protected void updatePropertyForAnyType(CodegenProperty property, Schema p) { + /** + * we have a custom version of this function to not set isNullable to true + */ + // The 'null' value is allowed when the OAS schema is 'any type'. + // See https://github.com/OAI/OpenAPI-Specification/issues/1389 + if (Boolean.FALSE.equals(p.getNullable())) { + LOGGER.warn("Schema '{}' is any type, which includes the 'null' value. 'nullable' cannot be set to 'false'", p.getName()); + } + if (languageSpecificPrimitives.contains(property.dataType)) { + property.isPrimitiveType = true; + } + if (ModelUtils.isMapSchema(p)) { + // an object or anyType composed schema that has additionalProperties set + // some of our code assumes that any type schema with properties defined will be a map + // even though it should allow in any type and have map constraints for properties + updatePropertyForMap(property, p); + } + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java index b0a38d96c6d..243b6e10db1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java @@ -22,6 +22,8 @@ import io.swagger.v3.parser.util.SchemaTypeUtil; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.utils.ModelUtils; + import java.util.*; public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodegen { @@ -255,4 +257,19 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege supportingFiles.add(new SupportingFile("tsconfig.mustache", "", "tsconfig.json")); } + @Override + protected void updatePropertyForAnyType(CodegenProperty property, Schema p) { + // The 'null' value is allowed when the OAS schema is 'any type'. + // See https://github.com/OAI/OpenAPI-Specification/issues/1389 + // custom line here, do not set property.isNullable = true + if (languageSpecificPrimitives.contains(property.dataType)) { + property.isPrimitiveType = true; + } + if (ModelUtils.isMapSchema(p)) { + // an object or anyType composed schema that has additionalProperties set + // some of our code assumes that any type schema with properties defined will be a map + // even though it should allow in any type and have map constraints for properties + updatePropertyForMap(property, p); + } + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptClientCodegen.java index 3cf310de3d9..b7233be4cb6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptClientCodegen.java @@ -1100,7 +1100,7 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo } String refModelName = getModelName(schema); return toExampleValueRecursive(refModelName, refSchema, objExample, indentationLevel, prefix, exampleLine, seenSchemas); - } else if (ModelUtils.isNullType(schema) || isAnyTypeSchema(schema)) { + } else if (ModelUtils.isNullType(schema) || ModelUtils.isAnyType(schema)) { // The 'null' type is allowed in OAS 3.1 and above. It is not supported by OAS 3.0.x, // though this tooling supports it. return fullPrefix + "null" + closeChars; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java index a4bc0147c65..e26bbcaa458 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java @@ -407,6 +407,21 @@ public class ModelUtils { return ref; } + /** + * Return true if the specified schema is type object + * We can't use isObjectSchema because it requires properties to exist which is not required + * We can't use isMap because it is true for AnyType use cases + * + * @param schema the OAS schema + * @return true if the specified schema is an Object schema. + */ + public static boolean isTypeObjectSchema(Schema schema) { + if (SchemaTypeUtil.OBJECT_TYPE.equals(schema.getType())) { + return true; + } + return false; + } + /** * Return true if the specified schema is an object with a fixed number of properties. * @@ -1487,18 +1502,23 @@ public class ModelUtils { return false; } + /** + * For when a type is not defined on a schema + * Note: properties, additionalProperties, enums, validations, items, and composed schemas (oneOf/anyOf/allOf) + * can be defined or omitted on these any type schemas + * @param schema the schema that we are checking + * @return boolean + */ + public static boolean isAnyType(Schema schema) { + return (schema.get$ref() == null && schema.getType() == null); + } + public static void syncValidationProperties(Schema schema, IJsonSchemaValidationProperties target) { + // TODO move this method to IJsonSchemaValidationProperties if (schema != null && target != null) { if (isNullType(schema) || schema.get$ref() != null || isBooleanSchema(schema)) { return; } - boolean isAnyType = (schema.getClass().equals(Schema.class) && schema.get$ref() == null && schema.getType() == null && - (schema.getProperties() == null || schema.getProperties().isEmpty()) && - schema.getAdditionalProperties() == null && schema.getNot() == null && - schema.getEnum() == null); - if (isAnyType) { - return; - } Integer minItems = schema.getMinItems(); Integer maxItems = schema.getMaxItems(); Boolean uniqueItems = schema.getUniqueItems(); @@ -1515,7 +1535,7 @@ public class ModelUtils { if (isArraySchema(schema)) { setArrayValidations(minItems, maxItems, uniqueItems, target); - } else if (isMapSchema(schema) || isObjectSchema(schema)) { + } else if (isTypeObjectSchema(schema)) { setObjectValidations(minProperties, maxProperties, target); } else if (isStringSchema(schema)) { setStringValidations(minLength, maxLength, pattern, target); @@ -1524,8 +1544,8 @@ public class ModelUtils { } } else if (isNumberSchema(schema) || isIntegerSchema(schema)) { setNumericValidations(schema, multipleOf, minimum, maximum, exclusiveMinimum, exclusiveMaximum, target); - } else if (isComposedSchema(schema)) { - // this could be composed out of anything so set all validations here + } else if (isAnyType(schema)) { + // anyType can have any validations set on it setArrayValidations(minItems, maxItems, uniqueItems, target); setObjectValidations(minProperties, maxProperties, target); setStringValidations(minLength, maxLength, pattern, target); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index 6d74693c21a..83917da4eba 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -3636,4 +3636,214 @@ public class DefaultCodegenTest { co = codegen.fromOperation(path, "GET", operation, null); assertEquals(co.operationId, "getAll"); } + + @Test + public void testComposedPropertyTypes() { + DefaultCodegen codegen = new DefaultCodegen(); + final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue_10330.yaml"); + codegen.setOpenAPI(openAPI); + String modelName; + + modelName = "ObjectWithComposedProperties"; + CodegenModel m = codegen.fromModel(modelName, openAPI.getComponents().getSchemas().get(modelName)); + assertTrue(m.vars.get(0).getIsMap()); + assertTrue(m.vars.get(1).getIsNumber()); + assertTrue(m.vars.get(2).getIsUnboundedInteger()); + assertTrue(m.vars.get(3).getIsString()); + assertTrue(m.vars.get(4).getIsBoolean()); + assertTrue(m.vars.get(5).getIsArray()); + assertTrue(m.vars.get(6).getIsNull()); + assertTrue(m.vars.get(7).getIsAnyType()); + } + + @Test + public void testComposedModelTypes() { + DefaultCodegen codegen = new DefaultCodegen(); + final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue_10330.yaml"); + codegen.setOpenAPI(openAPI); + String modelName; + CodegenModel m; + + modelName = "ComposedObject"; + m = codegen.fromModel(modelName, openAPI.getComponents().getSchemas().get(modelName)); + assertTrue(m.getIsMap()); + + modelName = "ComposedNumber"; + m = codegen.fromModel(modelName, openAPI.getComponents().getSchemas().get(modelName)); + assertTrue(m.getIsNumber()); + + modelName = "ComposedInteger"; + m = codegen.fromModel(modelName, openAPI.getComponents().getSchemas().get(modelName)); + assertTrue(m.getIsUnboundedInteger()); + + modelName = "ComposedString"; + m = codegen.fromModel(modelName, openAPI.getComponents().getSchemas().get(modelName)); + assertTrue(m.getIsString()); + + modelName = "ComposedBool"; + m = codegen.fromModel(modelName, openAPI.getComponents().getSchemas().get(modelName)); + assertTrue(m.getIsBoolean()); + + modelName = "ComposedArray"; + m = codegen.fromModel(modelName, openAPI.getComponents().getSchemas().get(modelName)); + assertTrue(m.getIsArray()); + + modelName = "ComposedNone"; + m = codegen.fromModel(modelName, openAPI.getComponents().getSchemas().get(modelName)); + assertTrue(m.getIsNull()); + + modelName = "ComposedAnyType"; + m = codegen.fromModel(modelName, openAPI.getComponents().getSchemas().get(modelName)); + assertTrue(m.getIsAnyType()); + } + + @Test + public void testComposedResponseTypes() { + DefaultCodegen codegen = new DefaultCodegen(); + final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue_10330.yaml"); + codegen.setOpenAPI(openAPI); + String path; + CodegenOperation co; + CodegenResponse cr; + + path = "/ComposedObject"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cr = co.responses.get(0); + assertTrue(cr.getIsMap()); + + path = "/ComposedNumber"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cr = co.responses.get(0); + assertTrue(cr.getIsNumber()); + + path = "/ComposedInteger"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cr = co.responses.get(0); + assertTrue(cr.getIsUnboundedInteger()); + + path = "/ComposedString"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cr = co.responses.get(0); + assertTrue(cr.getIsString()); + + path = "/ComposedBool"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cr = co.responses.get(0); + assertTrue(cr.getIsBoolean()); + + path = "/ComposedArray"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cr = co.responses.get(0); + assertTrue(cr.getIsArray()); + + path = "/ComposedNone"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cr = co.responses.get(0); + assertTrue(cr.getIsNull()); + + path = "/ComposedAnyType"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cr = co.responses.get(0); + assertTrue(cr.getIsAnyType()); + } + + @Test + public void testComposedRequestBodyTypes() { + DefaultCodegen codegen = new DefaultCodegen(); + final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue_10330.yaml"); + codegen.setOpenAPI(openAPI); + String path; + CodegenOperation co; + CodegenParameter cp; + + path = "/ComposedObject"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cp = co.bodyParam; + assertTrue(cp.getIsMap()); + + path = "/ComposedNumber"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cp = co.bodyParam; + assertTrue(cp.getIsNumber()); + + path = "/ComposedInteger"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cp = co.bodyParam; + assertTrue(cp.getIsUnboundedInteger()); + + path = "/ComposedString"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cp = co.bodyParam; + assertTrue(cp.getIsString()); + + path = "/ComposedBool"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cp = co.bodyParam; + assertTrue(cp.getIsBoolean()); + + path = "/ComposedArray"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cp = co.bodyParam; + assertTrue(cp.getIsArray()); + + path = "/ComposedNone"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cp = co.bodyParam; + assertTrue(cp.getIsNull()); + + path = "/ComposedAnyType"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cp = co.bodyParam; + assertTrue(cp.getIsAnyType()); + } + + @Test + public void testComposedRequestQueryParamTypes() { + DefaultCodegen codegen = new DefaultCodegen(); + final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue_10330.yaml"); + codegen.setOpenAPI(openAPI); + String path; + CodegenOperation co; + CodegenParameter cp; + + path = "/ComposedObject"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cp = co.queryParams.get(0); + assertTrue(cp.getIsMap()); + + path = "/ComposedNumber"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cp = co.queryParams.get(0); + assertTrue(cp.getIsNumber()); + + path = "/ComposedInteger"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cp = co.queryParams.get(0); + assertTrue(cp.getIsUnboundedInteger()); + + path = "/ComposedString"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cp = co.queryParams.get(0); + assertTrue(cp.getIsString()); + + path = "/ComposedBool"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cp = co.queryParams.get(0); + assertTrue(cp.getIsBoolean()); + + path = "/ComposedArray"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cp = co.queryParams.get(0); + assertTrue(cp.getIsArray()); + + path = "/ComposedNone"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cp = co.queryParams.get(0); + assertTrue(cp.getIsNull()); + + path = "/ComposedAnyType"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + cp = co.queryParams.get(0); + assertTrue(cp.getIsAnyType()); + } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java index f034760ea96..c9d4090b050 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java @@ -820,6 +820,7 @@ public class JavaClientCodegenTest { Assert.assertTrue(cp3.isAnyType); // map + // Should allow in any type including map, https://github.com/swagger-api/swagger-parser/issues/1603 final CodegenProperty cp4 = cm2.vars.get(3); Assert.assertEquals(cp4.baseName, "map_any_value"); Assert.assertEquals(cp4.dataType, "Map"); @@ -830,6 +831,7 @@ public class JavaClientCodegenTest { Assert.assertTrue(cp4.isFreeFormObject); Assert.assertFalse(cp4.isAnyType); + // Should allow in any type including map, https://github.com/swagger-api/swagger-parser/issues/1603 final CodegenProperty cp5 = cm2.vars.get(4); Assert.assertEquals(cp5.baseName, "map_any_value_with_desc"); Assert.assertEquals(cp5.dataType, "Map"); @@ -840,6 +842,7 @@ public class JavaClientCodegenTest { Assert.assertTrue(cp5.isFreeFormObject); Assert.assertFalse(cp5.isAnyType); + // Should allow in any type including map, https://github.com/swagger-api/swagger-parser/issues/1603 final CodegenProperty cp6 = cm2.vars.get(5); Assert.assertEquals(cp6.baseName, "map_any_value_nullable"); Assert.assertEquals(cp6.dataType, "Map"); @@ -851,6 +854,7 @@ public class JavaClientCodegenTest { Assert.assertFalse(cp6.isAnyType); // array + // Should allow in any type including array, https://github.com/swagger-api/swagger-parser/issues/1603 final CodegenProperty cp7 = cm2.vars.get(6); Assert.assertEquals(cp7.baseName, "array_any_value"); Assert.assertEquals(cp7.dataType, "List"); @@ -861,6 +865,7 @@ public class JavaClientCodegenTest { Assert.assertFalse(cp7.isFreeFormObject); Assert.assertFalse(cp7.isAnyType); + // Should allow in any type including array, https://github.com/swagger-api/swagger-parser/issues/1603 final CodegenProperty cp8 = cm2.vars.get(7); Assert.assertEquals(cp8.baseName, "array_any_value_with_desc"); Assert.assertEquals(cp8.dataType, "List"); @@ -871,6 +876,7 @@ public class JavaClientCodegenTest { Assert.assertFalse(cp8.isFreeFormObject); Assert.assertFalse(cp8.isAnyType); + // Should allow in any type including array, https://github.com/swagger-api/swagger-parser/issues/1603 final CodegenProperty cp9 = cm2.vars.get(8); Assert.assertEquals(cp9.baseName, "array_any_value_nullable"); Assert.assertEquals(cp9.dataType, "List"); 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 842d6a2851a..2ba80266215 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 @@ -360,7 +360,7 @@ public class PythonClientTest { final PythonClientCodegen codegen = new PythonClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPI(); - final Schema noDefault = new ArraySchema() + final Schema noDefault = new Schema() .type("number") .minimum(new BigDecimal("10")); final Schema hasDefault = new Schema() diff --git a/modules/openapi-generator/src/test/resources/3_0/issue_10330.yaml b/modules/openapi-generator/src/test/resources/3_0/issue_10330.yaml new file mode 100644 index 00000000000..2de767a061f --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/issue_10330.yaml @@ -0,0 +1,289 @@ +openapi: 3.0.1 +info: + title: OpenAPI Petstore + description: "composed schema isX type checks" + license: + name: Apache-2.0 + url: https://www.apache.org/licenses/LICENSE-2.0.html + version: 1.0.0 +servers: + - url: http://petstore.swagger.io:80/v2 +tags: [] +paths: + /ComposedObject: + get: + parameters: + - in: query + name: ComposedObject + schema: + type: object + allOf: + - {} + requestBody: + required: true + content: + application/json: + schema: + type: object + allOf: + - {} + responses: + '200': + description: ComposedObject + content: + application/json: + schema: + type: object + allOf: + - {} + /ComposedNumber: + get: + parameters: + - in: query + name: ComposedNumber + schema: + type: number + allOf: + - {} + requestBody: + required: true + content: + application/json: + schema: + type: number + allOf: + - {} + responses: + '200': + description: ComposedNumber + content: + application/json: + schema: + type: number + allOf: + - {} + /ComposedInteger: + get: + parameters: + - in: query + name: ComposedInteger + schema: + type: integer + allOf: + - {} + requestBody: + required: true + content: + application/json: + schema: + type: integer + allOf: + - {} + responses: + '200': + description: ComposedInteger + content: + application/json: + schema: + type: integer + allOf: + - {} + /ComposedString: + get: + parameters: + - in: query + name: ComposedString + schema: + type: string + allOf: + - {} + requestBody: + required: true + content: + application/json: + schema: + type: string + allOf: + - {} + responses: + '200': + description: ComposedString + content: + application/json: + schema: + type: string + allOf: + - {} + /ComposedBool: + get: + parameters: + - in: query + name: ComposedBool + schema: + type: boolean + allOf: + - {} + requestBody: + required: true + content: + application/json: + schema: + type: boolean + allOf: + - {} + responses: + '200': + description: ComposedBool + content: + application/json: + schema: + type: boolean + allOf: + - {} + /ComposedArray: + get: + parameters: + - in: query + name: ComposedArray + schema: + type: array + items: {} + allOf: + - {} + requestBody: + required: true + content: + application/json: + schema: + type: array + items: {} + allOf: + - {} + responses: + '200': + description: ComposedArray + content: + application/json: + schema: + type: array + items: {} + allOf: + - {} + /ComposedNone: + get: + parameters: + - in: query + name: ComposedNone + schema: + type: 'null' + allOf: + - {} + requestBody: + required: true + content: + application/json: + schema: + type: 'null' + allOf: + - {} + responses: + '200': + description: ComposedNone + content: + application/json: + schema: + type: 'null' + allOf: + - {} + /ComposedAnyType: + get: + parameters: + - in: query + name: ComposedAnyType + schema: + allOf: + - {} + requestBody: + required: true + content: + application/json: + schema: + allOf: + - {} + responses: + '200': + description: ComposedAnyType + content: + application/json: + schema: + allOf: + - {} +components: + schemas: + ObjectWithComposedProperties: + type: object + properties: + ComposedObject: + type: object + allOf: + - {} + ComposedNumber: + type: number + allOf: + - {} + ComposedInteger: + type: integer + allOf: + - {} + ComposedString: + type: string + allOf: + - {} + ComposedBool: + type: boolean + allOf: + - {} + ComposedArray: + type: array + items: {} + allOf: + - {} + ComposedNone: + type: 'null' + allOf: + - {} + ComposedAnyType: + allOf: + - {} + ComposedObject: + type: object + allOf: + - {} + ComposedNumber: + type: number + allOf: + - {} + ComposedInteger: + type: integer + allOf: + - {} + ComposedString: + type: string + allOf: + - {} + ComposedBool: + type: boolean + allOf: + - {} + ComposedArray: + type: array + items: {} + allOf: + - {} + ComposedNone: + type: 'null' + allOf: + - {} + ComposedAnyType: + allOf: + - {} 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 index 6d833b29211..61236123942 100644 --- 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 @@ -31,14 +31,16 @@ components: 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' + type: object + properties: + type: + type: string + enum: + - GeometryCollection + geometries: + type: array + items: + $ref: '#/components/schemas/GeoJsonGeometry' externalDocs: url: http://geojson.org/geojson-spec.html#geometry-objects Point: diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/FakeApi.md index da4826633d3..87c4c957148 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/FakeApi.md @@ -766,9 +766,9 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var enumHeaderStringArray = enumHeaderStringArray_example; // List | Header parameter enum test (string array) (optional) + var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) + var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) @@ -795,9 +795,9 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | **List<string>**| Header parameter enum test (string array) | [optional] + **enumHeaderStringArray** | [**List<string>**](string.md)| Header parameter enum test (string array) | [optional] **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] - **enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional] + **enumQueryStringArray** | [**List<string>**](string.md)| Query parameter enum test (string array) | [optional] **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/PetApi.md index 47820f406dd..aa5cd9f497b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/PetApi.md @@ -187,7 +187,7 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var status = status_example; // List | Status values that need to be considered for filter + var status = new List(); // List | Status values that need to be considered for filter try { @@ -210,7 +210,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **List<string>**| Status values that need to be considered for filter | + **status** | [**List<string>**](string.md)| Status values that need to be considered for filter | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/FakeApi.md index e1431af8135..635f38544d5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/FakeApi.md @@ -810,9 +810,9 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new FakeApi(httpClient, config, httpClientHandler); - var enumHeaderStringArray = enumHeaderStringArray_example; // List | Header parameter enum test (string array) (optional) + var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) + var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) @@ -839,9 +839,9 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | **List<string>**| Header parameter enum test (string array) | [optional] + **enumHeaderStringArray** | [**List<string>**](string.md)| Header parameter enum test (string array) | [optional] **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] - **enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional] + **enumQueryStringArray** | [**List<string>**](string.md)| Query parameter enum test (string array) | [optional] **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/PetApi.md index 02d0e8e111a..43033c45b59 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/PetApi.md @@ -199,7 +199,7 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new PetApi(httpClient, config, httpClientHandler); - var status = status_example; // List | Status values that need to be considered for filter + var status = new List(); // List | Status values that need to be considered for filter try { @@ -222,7 +222,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **List<string>**| Status values that need to be considered for filter | + **status** | [**List<string>**](string.md)| Status values that need to be considered for filter | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FakeApi.md index da4826633d3..87c4c957148 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FakeApi.md @@ -766,9 +766,9 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var enumHeaderStringArray = enumHeaderStringArray_example; // List | Header parameter enum test (string array) (optional) + var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) + var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) @@ -795,9 +795,9 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | **List<string>**| Header parameter enum test (string array) | [optional] + **enumHeaderStringArray** | [**List<string>**](string.md)| Header parameter enum test (string array) | [optional] **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] - **enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional] + **enumQueryStringArray** | [**List<string>**](string.md)| Query parameter enum test (string array) | [optional] **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/PetApi.md index 47820f406dd..aa5cd9f497b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/PetApi.md @@ -187,7 +187,7 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var status = status_example; // List | Status values that need to be considered for filter + var status = new List(); // List | Status values that need to be considered for filter try { @@ -210,7 +210,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **List<string>**| Status values that need to be considered for filter | + **status** | [**List<string>**](string.md)| Status values that need to be considered for filter | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md index da4826633d3..87c4c957148 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md @@ -766,9 +766,9 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var enumHeaderStringArray = enumHeaderStringArray_example; // List | Header parameter enum test (string array) (optional) + var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) + var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) @@ -795,9 +795,9 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | **List<string>**| Header parameter enum test (string array) | [optional] + **enumHeaderStringArray** | [**List<string>**](string.md)| Header parameter enum test (string array) | [optional] **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] - **enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional] + **enumQueryStringArray** | [**List<string>**](string.md)| Query parameter enum test (string array) | [optional] **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PetApi.md index 47820f406dd..aa5cd9f497b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PetApi.md @@ -187,7 +187,7 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var status = status_example; // List | Status values that need to be considered for filter + var status = new List(); // List | Status values that need to be considered for filter try { @@ -210,7 +210,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **List<string>**| Status values that need to be considered for filter | + **status** | [**List<string>**](string.md)| Status values that need to be considered for filter | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md index da4826633d3..87c4c957148 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md @@ -766,9 +766,9 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var enumHeaderStringArray = enumHeaderStringArray_example; // List | Header parameter enum test (string array) (optional) + var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) + var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) @@ -795,9 +795,9 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | **List<string>**| Header parameter enum test (string array) | [optional] + **enumHeaderStringArray** | [**List<string>**](string.md)| Header parameter enum test (string array) | [optional] **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] - **enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional] + **enumQueryStringArray** | [**List<string>**](string.md)| Query parameter enum test (string array) | [optional] **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md index 47820f406dd..aa5cd9f497b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md @@ -187,7 +187,7 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var status = status_example; // List | Status values that need to be considered for filter + var status = new List(); // List | Status values that need to be considered for filter try { @@ -210,7 +210,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **List<string>**| Status values that need to be considered for filter | + **status** | [**List<string>**](string.md)| Status values that need to be considered for filter | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md index da4826633d3..87c4c957148 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md @@ -766,9 +766,9 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var enumHeaderStringArray = enumHeaderStringArray_example; // List | Header parameter enum test (string array) (optional) + var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) + var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) @@ -795,9 +795,9 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | **List<string>**| Header parameter enum test (string array) | [optional] + **enumHeaderStringArray** | [**List<string>**](string.md)| Header parameter enum test (string array) | [optional] **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] - **enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional] + **enumQueryStringArray** | [**List<string>**](string.md)| Query parameter enum test (string array) | [optional] **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md index 47820f406dd..aa5cd9f497b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md @@ -187,7 +187,7 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var status = status_example; // List | Status values that need to be considered for filter + var status = new List(); // List | Status values that need to be considered for filter try { @@ -210,7 +210,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **List<string>**| Status values that need to be considered for filter | + **status** | [**List<string>**](string.md)| Status values that need to be considered for filter | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/PetApi.md index 5c589fb2d9a..4baa360aa75 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/PetApi.md @@ -188,7 +188,7 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var status = status_example; // List | Status values that need to be considered for filter + var status = new List(); // List | Status values that need to be considered for filter try { @@ -211,7 +211,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **List<string>**| Status values that need to be considered for filter | + **status** | [**List<string>**](string.md)| Status values that need to be considered for filter | ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md index f138a6abd27..b38dea5dd37 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md @@ -976,9 +976,9 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var enumHeaderStringArray = enumHeaderStringArray_example; // List | Header parameter enum test (string array) (optional) + var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) + var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) @@ -1006,9 +1006,9 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | **List<string>**| Header parameter enum test (string array) | [optional] + **enumHeaderStringArray** | [**List<string>**](string.md)| Header parameter enum test (string array) | [optional] **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] - **enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional] + **enumQueryStringArray** | [**List<string>**](string.md)| Query parameter enum test (string array) | [optional] **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md index 7f8dd7f0fb8..8675820ce21 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md @@ -200,7 +200,7 @@ namespace Example Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(Configuration.Default); - var status = status_example; // List | Status values that need to be considered for filter + var status = new List(); // List | Status values that need to be considered for filter try { @@ -224,7 +224,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **List<string>**| Status values that need to be considered for filter | + **status** | [**List<string>**](string.md)| Status values that need to be considered for filter | ### Return type diff --git a/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md b/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md index c76fd80c324..6ced5f29b12 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md +++ b/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md @@ -674,7 +674,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/google-api-client/docs/FakeApi.md b/samples/client/petstore/java/google-api-client/docs/FakeApi.md index c76fd80c324..6ced5f29b12 100644 --- a/samples/client/petstore/java/google-api-client/docs/FakeApi.md +++ b/samples/client/petstore/java/google-api-client/docs/FakeApi.md @@ -674,7 +674,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/jersey1/docs/FakeApi.md b/samples/client/petstore/java/jersey1/docs/FakeApi.md index c76fd80c324..6ced5f29b12 100644 --- a/samples/client/petstore/java/jersey1/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey1/docs/FakeApi.md @@ -674,7 +674,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md index c538fd7fcd4..5537ee8e911 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md @@ -673,7 +673,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md index 29f79920394..dea5e70e5cc 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -673,7 +673,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/native-async/docs/FakeApi.md b/samples/client/petstore/java/native-async/docs/FakeApi.md index fd327749d6c..c71305325f7 100644 --- a/samples/client/petstore/java/native-async/docs/FakeApi.md +++ b/samples/client/petstore/java/native-async/docs/FakeApi.md @@ -1411,7 +1411,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { CompletableFuture result = apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); @@ -1492,7 +1492,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { CompletableFuture> response = apiInstance.testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/native/docs/FakeApi.md b/samples/client/petstore/java/native/docs/FakeApi.md index 1d0e8ca9ebb..54ffb0467a3 100644 --- a/samples/client/petstore/java/native/docs/FakeApi.md +++ b/samples/client/petstore/java/native/docs/FakeApi.md @@ -1329,7 +1329,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); @@ -1409,7 +1409,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { ApiResponse response = apiInstance.testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md index 5a20b8b1911..ed2724757ee 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md @@ -636,7 +636,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md index 5a20b8b1911..ed2724757ee 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md @@ -636,7 +636,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md index 5a20b8b1911..ed2724757ee 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md @@ -636,7 +636,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/resteasy/docs/FakeApi.md b/samples/client/petstore/java/resteasy/docs/FakeApi.md index c76fd80c324..6ced5f29b12 100644 --- a/samples/client/petstore/java/resteasy/docs/FakeApi.md +++ b/samples/client/petstore/java/resteasy/docs/FakeApi.md @@ -674,7 +674,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md index c76fd80c324..6ced5f29b12 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md @@ -674,7 +674,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/resttemplate/docs/FakeApi.md b/samples/client/petstore/java/resttemplate/docs/FakeApi.md index c76fd80c324..6ced5f29b12 100644 --- a/samples/client/petstore/java/resttemplate/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate/docs/FakeApi.md @@ -674,7 +674,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md b/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md index d0080643e4b..45cf7beb069 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md @@ -674,7 +674,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/retrofit2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2/docs/FakeApi.md index d0080643e4b..45cf7beb069 100644 --- a/samples/client/petstore/java/retrofit2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2/docs/FakeApi.md @@ -674,7 +674,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md index d0080643e4b..45cf7beb069 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md @@ -674,7 +674,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md index d0080643e4b..45cf7beb069 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md @@ -674,7 +674,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md b/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md index 99c87b67656..a676a4353fd 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md @@ -674,7 +674,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/vertx/docs/FakeApi.md b/samples/client/petstore/java/vertx/docs/FakeApi.md index 99c87b67656..a676a4353fd 100644 --- a/samples/client/petstore/java/vertx/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx/docs/FakeApi.md @@ -674,7 +674,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/java/webclient/docs/FakeApi.md b/samples/client/petstore/java/webclient/docs/FakeApi.md index c3ed83515d1..3a9198107b9 100644 --- a/samples/client/petstore/java/webclient/docs/FakeApi.md +++ b/samples/client/petstore/java/webclient/docs/FakeApi.md @@ -872,7 +872,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/client/petstore/javascript-es6/docs/FakeApi.md b/samples/client/petstore/javascript-es6/docs/FakeApi.md index aa1af642c66..9e35bf405c8 100644 --- a/samples/client/petstore/javascript-es6/docs/FakeApi.md +++ b/samples/client/petstore/javascript-es6/docs/FakeApi.md @@ -625,7 +625,7 @@ let opts = { 'enumQueryString': "'-efg'", // String | Query parameter enum test (string) 'enumQueryInteger': 56, // Number | Query parameter enum test (double) 'enumQueryDouble': 3.4, // Number | Query parameter enum test (double) - 'enumFormStringArray': "'$'", // [String] | Form parameter enum test (string array) + 'enumFormStringArray': ["'$'"], // [String] | Form parameter enum test (string array) 'enumFormString': "'-efg'" // String | Form parameter enum test (string) }; apiInstance.testEnumParameters(opts, (error, data, response) => { diff --git a/samples/client/petstore/javascript-promise-es6/docs/FakeApi.md b/samples/client/petstore/javascript-promise-es6/docs/FakeApi.md index ed68b81f16e..9f1d7e3e721 100644 --- a/samples/client/petstore/javascript-promise-es6/docs/FakeApi.md +++ b/samples/client/petstore/javascript-promise-es6/docs/FakeApi.md @@ -613,7 +613,7 @@ let opts = { 'enumQueryString': "'-efg'", // String | Query parameter enum test (string) 'enumQueryInteger': 56, // Number | Query parameter enum test (double) 'enumQueryDouble': 3.4, // Number | Query parameter enum test (double) - 'enumFormStringArray': "'$'", // [String] | Form parameter enum test (string array) + 'enumFormStringArray': ["'$'"], // [String] | Form parameter enum test (string array) 'enumFormString': "'-efg'" // String | Form parameter enum test (string) }; apiInstance.testEnumParameters(opts).then(() => { diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md index 840d51e0678..3f3d9d9bc39 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md @@ -750,7 +750,7 @@ $enum_query_string_array = array('enum_query_string_array_example'); // string[] $enum_query_string = '-efg'; // string | Query parameter enum test (string) $enum_query_integer = 56; // int | Query parameter enum test (double) $enum_query_double = 3.4; // double | Query parameter enum test (double) -$enum_form_string_array = '$'; // string[] | Form parameter enum test (string array) +$enum_form_string_array = array('$'); // string[] | Form parameter enum test (string array) $enum_form_string = '-efg'; // string | Form parameter enum test (string) try { diff --git a/samples/client/petstore/python/docs/FakeApi.md b/samples/client/petstore/python/docs/FakeApi.md index 62754a474ed..c52fe144aba 100644 --- a/samples/client/petstore/python/docs/FakeApi.md +++ b/samples/client/petstore/python/docs/FakeApi.md @@ -973,7 +973,9 @@ with petstore_api.ApiClient() as api_client: enum_query_string = "-efg" # str | Query parameter enum test (string) (optional) if omitted the server will use the default value of "-efg" enum_query_integer = 1 # int | Query parameter enum test (double) (optional) enum_query_double = 1.1 # float | Query parameter enum test (double) (optional) - enum_form_string_array = "$" # [str] | Form parameter enum test (string array) (optional) if omitted the server will use the default value of "$" + enum_form_string_array = [ + "$", + ] # [str] | Form parameter enum test (string array) (optional) if omitted the server will use the default value of "$" enum_form_string = "-efg" # str | Form parameter enum test (string) (optional) if omitted the server will use the default value of "-efg" # example passing only required values which don't have defaults set diff --git a/samples/client/petstore/python/docs/PetApi.md b/samples/client/petstore/python/docs/PetApi.md index a3fc6a60673..70252451912 100644 --- a/samples/client/petstore/python/docs/PetApi.md +++ b/samples/client/petstore/python/docs/PetApi.md @@ -657,7 +657,9 @@ with petstore_api.ApiClient(configuration) as api_client: pet_id = 1 # int | ID of pet to update additional_metadata = "additional_metadata_example" # str | Additional data to pass to server (optional) file = open('/path/to/file', 'rb') # file_type | file to upload (optional) - files = # [file_type] | files to upload (optional) + files = [ +null, + ] # [file_type] | files to upload (optional) # example passing only required values which don't have defaults set try: diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/FakeApi.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/FakeApi.md index 62754a474ed..c52fe144aba 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/FakeApi.md +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/FakeApi.md @@ -973,7 +973,9 @@ with petstore_api.ApiClient() as api_client: enum_query_string = "-efg" # str | Query parameter enum test (string) (optional) if omitted the server will use the default value of "-efg" enum_query_integer = 1 # int | Query parameter enum test (double) (optional) enum_query_double = 1.1 # float | Query parameter enum test (double) (optional) - enum_form_string_array = "$" # [str] | Form parameter enum test (string array) (optional) if omitted the server will use the default value of "$" + enum_form_string_array = [ + "$", + ] # [str] | Form parameter enum test (string array) (optional) if omitted the server will use the default value of "$" enum_form_string = "-efg" # str | Form parameter enum test (string) (optional) if omitted the server will use the default value of "-efg" # example passing only required values which don't have defaults set diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/PetApi.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/PetApi.md index a3fc6a60673..70252451912 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/PetApi.md +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/PetApi.md @@ -657,7 +657,9 @@ with petstore_api.ApiClient(configuration) as api_client: pet_id = 1 # int | ID of pet to update additional_metadata = "additional_metadata_example" # str | Additional data to pass to server (optional) file = open('/path/to/file', 'rb') # file_type | file to upload (optional) - files = # [file_type] | files to upload (optional) + files = [ +null, + ] # [file_type] | files to upload (optional) # example passing only required values which don't have defaults set try: diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts index e4cb9ef5c32..431d6261ab3 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts @@ -1300,7 +1300,7 @@ export interface User { * @type {any} * @memberof User */ - arbitraryTypeValue?: any | null; + arbitraryTypeValue?: any; /** * test code generation for any type Value can be any type - string, number, boolean, array, object or the \'null\' value. * @type {any} diff --git a/samples/openapi3/client/elm/src/Api/Request/Default.elm b/samples/openapi3/client/elm/src/Api/Request/Default.elm index 23e998284eb..43812738072 100644 --- a/samples/openapi3/client/elm/src/Api/Request/Default.elm +++ b/samples/openapi3/client/elm/src/Api/Request/Default.elm @@ -186,7 +186,7 @@ uuidGet value_query = "GET" "/uuid" [] - [ ( "value", Maybe.map Uuid.toString value_query ) ] + [ ( "value", Maybe.map identityUuid.toString value_query ) ] [] Nothing Uuid.decoder diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/FakeApi.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/FakeApi.md index 544b6e316c3..740e5ee6683 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/FakeApi.md @@ -585,7 +585,7 @@ final BuiltList enumQueryStringArray = ; // BuiltList | Query pa final String enumQueryString = enumQueryString_example; // String | Query parameter enum test (string) final int enumQueryInteger = 56; // int | Query parameter enum test (double) final double enumQueryDouble = 1.2; // double | Query parameter enum test (double) -final BuiltList enumFormStringArray = enumFormStringArray_example; // BuiltList | Form parameter enum test (string array) +final BuiltList enumFormStringArray = ; // BuiltList | Form parameter enum test (string array) final String enumFormString = enumFormString_example; // String | Form parameter enum test (string) try { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md index ddd5068fa40..46b337cdc18 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md @@ -585,7 +585,7 @@ var enumQueryStringArray = []; // BuiltList | Query parameter enum test var enumQueryString = enumQueryString_example; // String | Query parameter enum test (string) var enumQueryInteger = 56; // int | Query parameter enum test (double) var enumQueryDouble = 1.2; // double | Query parameter enum test (double) -var enumFormStringArray = [enumFormStringArray_example]; // BuiltList | Form parameter enum test (string array) +var enumFormStringArray = []; // BuiltList | Form parameter enum test (string array) var enumFormString = enumFormString_example; // String | Form parameter enum test (string) try { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md index 3f4460fa623..869c513b1f2 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md @@ -582,7 +582,7 @@ final enumQueryStringArray = []; // List | Query parameter enum test (st final enumQueryString = enumQueryString_example; // String | Query parameter enum test (string) final enumQueryInteger = 56; // int | Query parameter enum test (double) final enumQueryDouble = 1.2; // double | Query parameter enum test (double) -final enumFormStringArray = [enumFormStringArray_example]; // List | Form parameter enum test (string array) +final enumFormStringArray = []; // List | Form parameter enum test (string array) final enumFormString = enumFormString_example; // String | Form parameter enum test (string) try { diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/FakeApi.md b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/FakeApi.md index 3f4460fa623..869c513b1f2 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/FakeApi.md @@ -582,7 +582,7 @@ final enumQueryStringArray = []; // List | Query parameter enum test (st final enumQueryString = enumQueryString_example; // String | Query parameter enum test (string) final enumQueryInteger = 56; // int | Query parameter enum test (double) final enumQueryDouble = 1.2; // double | Query parameter enum test (double) -final enumFormStringArray = [enumFormStringArray_example]; // List | Form parameter enum test (string array) +final enumFormStringArray = []; // List | Form parameter enum test (string array) final enumFormString = enumFormString_example; // String | Form parameter enum test (string) try { diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md index 32a66fa54dc..def65c4c88e 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -729,7 +729,7 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); diff --git a/samples/openapi3/client/petstore/python/docs/FakeApi.md b/samples/openapi3/client/petstore/python/docs/FakeApi.md index 779400df320..6ee1a7c20a7 100644 --- a/samples/openapi3/client/petstore/python/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/FakeApi.md @@ -333,7 +333,7 @@ configuration = petstore_api.Configuration( with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) - composed_one_of_number_with_validations = ComposedOneOfNumberWithValidations() # ComposedOneOfNumberWithValidations | Input model (optional) + composed_one_of_number_with_validations = ComposedOneOfNumberWithValidations(None) # ComposedOneOfNumberWithValidations | Input model (optional) # example passing only required values which don't have defaults set # and optional values @@ -609,11 +609,7 @@ configuration = petstore_api.Configuration( with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) - mammal = Mammal( - has_baleen=True, - has_teeth=True, - class_name="whale", - ) # Mammal | Input mammal + mammal = Mammal(None) # Mammal | Input mammal # example passing only required values which don't have defaults set try: @@ -1437,7 +1433,9 @@ with petstore_api.ApiClient() as api_client: enum_query_string = "-efg" # str | Query parameter enum test (string) (optional) if omitted the server will use the default value of "-efg" enum_query_integer = 1 # int | Query parameter enum test (double) (optional) enum_query_double = 1.1 # float | Query parameter enum test (double) (optional) - enum_form_string_array = "$" # [str] | Form parameter enum test (string array) (optional) if omitted the server will use the default value of "$" + enum_form_string_array = [ + "$", + ] # [str] | Form parameter enum test (string array) (optional) if omitted the server will use the default value of "$" enum_form_string = "-efg" # str | Form parameter enum test (string) (optional) if omitted the server will use the default value of "-efg" # example passing only required values which don't have defaults set @@ -1956,7 +1954,9 @@ configuration = petstore_api.Configuration( with petstore_api.ApiClient() as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) - files = open('/path/to/file', 'rb') # [file_type] | (optional) + files = [ + open('/path/to/file', 'rb'), + ] # [file_type] | (optional) # example passing only required values which don't have defaults set # and optional values diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/DefaultApi.md b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/DefaultApi.md index a9df332ad47..d0c51705905 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/DefaultApi.md +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/DefaultApi.md @@ -26,7 +26,7 @@ const apiInstance = new .DefaultApi(configuration); let body:.DefaultApiFilePostRequest = { // InlineObject (optional) inlineObject: { - file: , + file: null, }, }; @@ -80,7 +80,7 @@ const apiInstance = new .DefaultApi(configuration); let body:.DefaultApiPetsFilteredPatchRequest = { // PetByAge | PetByType (optional) - petByAgePetByType: , + petByAgePetByType: null, }; apiInstance.petsFilteredPatch(body).then((data:any) => { @@ -133,7 +133,7 @@ const apiInstance = new .DefaultApi(configuration); let body:.DefaultApiPetsPatchRequest = { // Cat | Dog (optional) - catDog: , + catDog: null, }; apiInstance.petsPatch(body).then((data:any) => { From 1a50f1f493ad0031be0cdfe439b4bac0697a419e Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 28 Sep 2021 10:10:59 +0800 Subject: [PATCH 20/50] [PHP] fix numeric value in model enum (#10474) * fix number value :win model enum * fix tests --- .../codegen/languages/AbstractPhpCodegen.java | 5 +++++ .../src/main/resources/php/model_enum.mustache | 17 +++++++++++++---- .../codegen/php/AbstractPhpCodegenTest.java | 2 +- .../openapitools/codegen/php/PhpModelTest.java | 4 ++-- .../OpenAPIClient-php/lib/Model/EnumClass.php | 6 ++++-- .../OpenAPIClient-php/lib/Model/OuterEnum.php | 6 ++++-- .../lib/Model/OuterEnumDefaultValue.php | 6 ++++-- .../lib/Model/OuterEnumInteger.php | 16 +++++++++------- .../lib/Model/OuterEnumIntegerDefaultValue.php | 16 +++++++++------- 9 files changed, 51 insertions(+), 27 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java index 077555a5743..db208bb9829 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java @@ -804,4 +804,9 @@ public abstract class AbstractPhpCodegen extends DefaultCodegen implements Codeg return packageName; } + + @Override + public boolean isDataTypeString(String dataType) { + return "string".equals(dataType); + } } diff --git a/modules/openapi-generator/src/main/resources/php/model_enum.mustache b/modules/openapi-generator/src/main/resources/php/model_enum.mustache index 5e6b2aea215..88036f76ffc 100644 --- a/modules/openapi-generator/src/main/resources/php/model_enum.mustache +++ b/modules/openapi-generator/src/main/resources/php/model_enum.mustache @@ -3,8 +3,12 @@ class {{classname}} /** * Possible values of this enum */ - {{#allowableValues}}{{#enumVars}}const {{{name}}} = {{{value}}}; - {{/enumVars}}{{/allowableValues}} + {{#allowableValues}} + {{#enumVars}} + const {{^isString}}NUMBER_{{/isString}}{{{name}}} = {{{value}}}; + + {{/enumVars}} + {{/allowableValues}} /** * Gets allowable values of the enum * @return string[] @@ -12,8 +16,13 @@ class {{classname}} public static function getAllowableEnumValues() { return [ - {{#allowableValues}}{{#enumVars}}self::{{{name}}},{{^-last}} - {{/-last}}{{/enumVars}}{{/allowableValues}} + {{#allowableValues}} + {{#enumVars}} + self::{{^isString}}NUMBER_{{/isString}}{{{name}}}{{^-last}}, + {{/-last}} + {{/enumVars}} + {{/allowableValues}} + ]; } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/AbstractPhpCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/AbstractPhpCodegenTest.java index 44661e7498c..ea7ef67bfcf 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/AbstractPhpCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/AbstractPhpCodegenTest.java @@ -164,7 +164,7 @@ public class AbstractPhpCodegenTest { // Assert the enum default value is properly generated CodegenProperty cp1 = cm1.vars.get(0); - Assert.assertEquals(cp1.getDefaultValue(), "self::PROPERTY_NAME_VALUE"); + Assert.assertEquals(cp1.getDefaultValue(), "'VALUE'"); } private static class P_AbstractPhpCodegen extends AbstractPhpCodegen { diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/PhpModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/PhpModelTest.java index 926d90732b7..db989db8dc1 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/PhpModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/PhpModelTest.java @@ -314,11 +314,11 @@ public class PhpModelTest { HashMap fish= new HashMap(); fish.put("name", "FISH"); fish.put("value", "\'fish\'"); - fish.put("isString", false); + fish.put("isString", true); HashMap crab= new HashMap(); crab.put("name", "CRAB"); crab.put("value", "\'crab\'"); - crab.put("isString", false); + crab.put("isString", true); Assert.assertEquals(prope.allowableValues.get("enumVars"), Arrays.asList(fish, crab)); // assert inner items 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 be8e78f5b46..ef992a75935 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php @@ -43,9 +43,11 @@ class EnumClass * Possible values of this enum */ const ABC = '_abc'; + const EFG = '-efg'; + const XYZ = '(xyz)'; - + /** * Gets allowable values of the enum * @return string[] @@ -55,7 +57,7 @@ class EnumClass return [ self::ABC, self::EFG, - self::XYZ, + self::XYZ ]; } } 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 dc0482fe0cb..e805f708127 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php @@ -43,9 +43,11 @@ class OuterEnum * Possible values of this enum */ const PLACED = 'placed'; + const APPROVED = 'approved'; + const DELIVERED = 'delivered'; - + /** * Gets allowable values of the enum * @return string[] @@ -55,7 +57,7 @@ class OuterEnum return [ self::PLACED, self::APPROVED, - self::DELIVERED, + self::DELIVERED ]; } } 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 c58c1d87ae0..36238b6a124 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php @@ -43,9 +43,11 @@ class OuterEnumDefaultValue * Possible values of this enum */ const PLACED = 'placed'; + const APPROVED = 'approved'; + const DELIVERED = 'delivered'; - + /** * Gets allowable values of the enum * @return string[] @@ -55,7 +57,7 @@ class OuterEnumDefaultValue return [ self::PLACED, self::APPROVED, - self::DELIVERED, + self::DELIVERED ]; } } 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 84f97fa5879..f10af37956f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php @@ -42,10 +42,12 @@ class OuterEnumInteger /** * Possible values of this enum */ - const 0 = 0; - const 1 = 1; - const 2 = 2; - + const NUMBER_0 = 0; + + const NUMBER_1 = 1; + + const NUMBER_2 = 2; + /** * Gets allowable values of the enum * @return string[] @@ -53,9 +55,9 @@ class OuterEnumInteger public static function getAllowableEnumValues() { return [ - self::0, - self::1, - self::2, + self::NUMBER_0, + self::NUMBER_1, + self::NUMBER_2 ]; } } 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 0157fafed4b..967cab62a1a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php @@ -42,10 +42,12 @@ class OuterEnumIntegerDefaultValue /** * Possible values of this enum */ - const 0 = 0; - const 1 = 1; - const 2 = 2; - + const NUMBER_0 = 0; + + const NUMBER_1 = 1; + + const NUMBER_2 = 2; + /** * Gets allowable values of the enum * @return string[] @@ -53,9 +55,9 @@ class OuterEnumIntegerDefaultValue public static function getAllowableEnumValues() { return [ - self::0, - self::1, - self::2, + self::NUMBER_0, + self::NUMBER_1, + self::NUMBER_2 ]; } } From bfce822c34144500eb573ab105502c3616d79dc3 Mon Sep 17 00:00:00 2001 From: Derek Strickland <1111455+DerekStrickland@users.noreply.github.com> Date: Mon, 27 Sep 2021 22:12:34 -0400 Subject: [PATCH 21/50] Use packageName in all of install instructions (#10480) Thanks for fixing the issue with the non-templatized package name in the install instructions. I'm submitting this slight improvement to - instruct the user to name the folder after the packageName - set the path to that new folder name --- .../openapi-generator/src/main/resources/rust/README.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/rust/README.mustache b/modules/openapi-generator/src/main/resources/rust/README.mustache index b948eb10d5c..bc3e2e403b4 100644 --- a/modules/openapi-generator/src/main/resources/rust/README.mustache +++ b/modules/openapi-generator/src/main/resources/rust/README.mustache @@ -21,10 +21,10 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Installation -Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`: +Put the package under your project folder in a directory named `{{packageName}}` and add the following to `Cargo.toml` under `[dependencies]`: ``` -{{{packageName}}} = { path = "./generated" } +{{{packageName}}} = { path = "./{{{packageName}}}" } ``` ## Documentation for API Endpoints From d22e9fb1c1a9c6d643f7602c183e1a90ebfdc395 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 28 Sep 2021 11:34:07 +0800 Subject: [PATCH 22/50] update rust samples --- samples/client/petstore/rust/hyper/petstore/README.md | 4 ++-- samples/client/petstore/rust/reqwest/petstore-async/README.md | 4 ++-- samples/client/petstore/rust/reqwest/petstore/README.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/samples/client/petstore/rust/hyper/petstore/README.md b/samples/client/petstore/rust/hyper/petstore/README.md index b7971071b7d..3e4d0401e5e 100644 --- a/samples/client/petstore/rust/hyper/petstore/README.md +++ b/samples/client/petstore/rust/hyper/petstore/README.md @@ -13,10 +13,10 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Installation -Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`: +Put the package under your project folder in a directory named `petstore-hyper` and add the following to `Cargo.toml` under `[dependencies]`: ``` -petstore-hyper = { path = "./generated" } +petstore-hyper = { path = "./petstore-hyper" } ``` ## Documentation for API Endpoints diff --git a/samples/client/petstore/rust/reqwest/petstore-async/README.md b/samples/client/petstore/rust/reqwest/petstore-async/README.md index 8b0301dbbfc..a26b68bd333 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/README.md +++ b/samples/client/petstore/rust/reqwest/petstore-async/README.md @@ -13,10 +13,10 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Installation -Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`: +Put the package under your project folder in a directory named `petstore-reqwest-async` and add the following to `Cargo.toml` under `[dependencies]`: ``` -petstore-reqwest-async = { path = "./generated" } +petstore-reqwest-async = { path = "./petstore-reqwest-async" } ``` ## Documentation for API Endpoints diff --git a/samples/client/petstore/rust/reqwest/petstore/README.md b/samples/client/petstore/rust/reqwest/petstore/README.md index 57cd46f384b..42df328ab66 100644 --- a/samples/client/petstore/rust/reqwest/petstore/README.md +++ b/samples/client/petstore/rust/reqwest/petstore/README.md @@ -13,10 +13,10 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Installation -Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`: +Put the package under your project folder in a directory named `petstore-reqwest` and add the following to `Cargo.toml` under `[dependencies]`: ``` -petstore-reqwest = { path = "./generated" } +petstore-reqwest = { path = "./petstore-reqwest" } ``` ## Documentation for API Endpoints From 51d468e2f6cb68829cf215098b7819e9bcafd7cf Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 28 Sep 2021 11:38:19 +0800 Subject: [PATCH 23/50] add decimal support to ruby generators (#10484) --- .../org/openapitools/codegen/languages/AbstractRubyCodegen.java | 1 + samples/client/petstore/ruby-faraday/docs/FormatTest.md | 2 +- .../petstore/ruby-faraday/lib/petstore/models/format_test.rb | 2 +- samples/client/petstore/ruby/docs/FormatTest.md | 2 +- samples/client/petstore/ruby/lib/petstore/models/format_test.rb | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java index 39b340d61d5..70dfb8b3c96 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java @@ -78,6 +78,7 @@ abstract public class AbstractRubyCodegen extends DefaultCodegen implements Code typeMapping.put("float", "Float"); typeMapping.put("double", "Float"); typeMapping.put("number", "Float"); + typeMapping.put("decimal", "Float"); typeMapping.put("date", "Date"); typeMapping.put("DateTime", "Time"); typeMapping.put("array", "Array"); diff --git a/samples/client/petstore/ruby-faraday/docs/FormatTest.md b/samples/client/petstore/ruby-faraday/docs/FormatTest.md index 06fa286ab7b..a790ce44835 100644 --- a/samples/client/petstore/ruby-faraday/docs/FormatTest.md +++ b/samples/client/petstore/ruby-faraday/docs/FormatTest.md @@ -10,7 +10,7 @@ | **number** | **Float** | | | | **float** | **Float** | | [optional] | | **double** | **Float** | | [optional] | -| **decimal** | [**Decimal**](Decimal.md) | | [optional] | +| **decimal** | **Float** | | [optional] | | **string** | **String** | | [optional] | | **byte** | **String** | | | | **binary** | **File** | | [optional] | 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 92af39f9d49..877c9352851 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 @@ -85,7 +85,7 @@ module Petstore :'number' => :'Float', :'float' => :'Float', :'double' => :'Float', - :'decimal' => :'Decimal', + :'decimal' => :'Float', :'string' => :'String', :'byte' => :'String', :'binary' => :'File', diff --git a/samples/client/petstore/ruby/docs/FormatTest.md b/samples/client/petstore/ruby/docs/FormatTest.md index 06fa286ab7b..a790ce44835 100644 --- a/samples/client/petstore/ruby/docs/FormatTest.md +++ b/samples/client/petstore/ruby/docs/FormatTest.md @@ -10,7 +10,7 @@ | **number** | **Float** | | | | **float** | **Float** | | [optional] | | **double** | **Float** | | [optional] | -| **decimal** | [**Decimal**](Decimal.md) | | [optional] | +| **decimal** | **Float** | | [optional] | | **string** | **String** | | [optional] | | **byte** | **String** | | | | **binary** | **File** | | [optional] | 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 92af39f9d49..877c9352851 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb @@ -85,7 +85,7 @@ module Petstore :'number' => :'Float', :'float' => :'Float', :'double' => :'Float', - :'decimal' => :'Decimal', + :'decimal' => :'Float', :'string' => :'String', :'byte' => :'String', :'binary' => :'File', From 334b18ae24894404c50f5502872812aec23aa70a Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 28 Sep 2021 11:38:36 +0800 Subject: [PATCH 24/50] add decimal support to powershell (#10486) --- .../openapitools/codegen/languages/PowerShellClientCodegen.java | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java index ac4c8a01b19..58e12fff701 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java @@ -515,6 +515,7 @@ public class PowerShellClientCodegen extends DefaultCodegen implements CodegenCo typeMapping.put("long", "Int64"); typeMapping.put("double", "Double"); typeMapping.put("number", "Decimal"); + typeMapping.put("decimal", "Decimal"); typeMapping.put("object", "System.Collections.Hashtable"); typeMapping.put("file", "System.IO.FileInfo"); typeMapping.put("ByteArray", "System.Byte[]"); From 26ffab184f9e1b2d0d63797a036cf50cd6d53f84 Mon Sep 17 00:00:00 2001 From: Ben Zvan Date: Mon, 27 Sep 2021 22:46:58 -0500 Subject: [PATCH 25/50] update to handlebars.java 4.2.1 (#10483) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8bf0f19b74c..3250c8bdf97 100644 --- a/pom.xml +++ b/pom.xml @@ -1614,7 +1614,7 @@ 1.7.29 4.3.1 1.14 - 4.1.2 + 4.2.1 7.1.0 3.0.0-M3 0.9.10 From 5dcd76d9cb2826491b5a5938ab7d3cfebf09d55a Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 28 Sep 2021 11:47:43 +0800 Subject: [PATCH 26/50] add decimal support to R client generator (#10487) --- .../java/org/openapitools/codegen/languages/RClientCodegen.java | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java index 41cd2fea381..04fea6b122d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java @@ -133,6 +133,7 @@ public class RClientCodegen extends DefaultCodegen implements CodegenConfig { typeMapping.put("number", "numeric"); typeMapping.put("float", "numeric"); typeMapping.put("double", "numeric"); + typeMapping.put("decimal", "numeric"); typeMapping.put("boolean", "character"); typeMapping.put("string", "character"); typeMapping.put("UUID", "character"); From c09c6261ebb1fb5295d46f6ef65b332e53d87269 Mon Sep 17 00:00:00 2001 From: xiedaxia1hao Date: Mon, 27 Sep 2021 22:55:35 -0500 Subject: [PATCH 27/50] [Java] Fix Potential Flaky Tests (#10485) * fixed flaky test * fix flaky test * update import to the original * recover indent * fix format * finalize --- .../codegen/java/AbstractJavaCodegenTest.java | 42 +++++++++++++++---- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java index 65fc547fc23..21950902f87 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java @@ -35,6 +35,7 @@ import java.time.ZoneId; import java.util.ArrayList; import java.util.Date; import java.util.List; +import java.util.Collections; public class AbstractJavaCodegenTest { @@ -211,12 +212,17 @@ public class AbstractJavaCodegenTest { codegen.processOpts(); codegen.preprocessOpenAPI(openAPI); - + final List additionalModelTypeAnnotations = new ArrayList(); additionalModelTypeAnnotations.add("@Foo"); additionalModelTypeAnnotations.add("@Bar"); - Assert.assertEquals(codegen.getAdditionalModelTypeAnnotations(), additionalModelTypeAnnotations); + final List sortedCodegenAdditionalModelTypeAnnotations = new ArrayList<>(codegen.getAdditionalModelTypeAnnotations()); + final List sortedAdditionalModelTypeAnnotations = new ArrayList<>(codegen.getAdditionalModelTypeAnnotations()); + + Collections.sort(sortedCodegenAdditionalModelTypeAnnotations); + Collections.sort(sortedAdditionalModelTypeAnnotations); + Assert.assertEquals(sortedCodegenAdditionalModelTypeAnnotations, sortedAdditionalModelTypeAnnotations); } @Test @@ -228,12 +234,17 @@ public class AbstractJavaCodegenTest { codegen.processOpts(); codegen.preprocessOpenAPI(openAPI); - + final List additionalModelTypeAnnotations = new ArrayList(); additionalModelTypeAnnotations.add("@Foo"); additionalModelTypeAnnotations.add("@Bar"); - Assert.assertEquals(codegen.getAdditionalModelTypeAnnotations(), additionalModelTypeAnnotations); + final List sortedCodegenAdditionalModelTypeAnnotations = new ArrayList<>(codegen.getAdditionalModelTypeAnnotations()); + final List sortedAdditionalModelTypeAnnotations = new ArrayList<>(codegen.getAdditionalModelTypeAnnotations()); + + Collections.sort(sortedCodegenAdditionalModelTypeAnnotations); + Collections.sort(sortedAdditionalModelTypeAnnotations); + Assert.assertEquals(sortedCodegenAdditionalModelTypeAnnotations, sortedAdditionalModelTypeAnnotations); } @Test @@ -245,12 +256,17 @@ public class AbstractJavaCodegenTest { codegen.processOpts(); codegen.preprocessOpenAPI(openAPI); - + final List additionalModelTypeAnnotations = new ArrayList(); additionalModelTypeAnnotations.add("@Foo"); additionalModelTypeAnnotations.add("@Bar"); - Assert.assertEquals(codegen.getAdditionalModelTypeAnnotations(), additionalModelTypeAnnotations); + final List sortedCodegenAdditionalModelTypeAnnotations = new ArrayList<>(codegen.getAdditionalModelTypeAnnotations()); + final List sortedAdditionalModelTypeAnnotations = new ArrayList<>(codegen.getAdditionalModelTypeAnnotations()); + + Collections.sort(sortedCodegenAdditionalModelTypeAnnotations); + Collections.sort(sortedAdditionalModelTypeAnnotations); + Assert.assertEquals(sortedCodegenAdditionalModelTypeAnnotations, sortedAdditionalModelTypeAnnotations); } @Test @@ -268,7 +284,12 @@ public class AbstractJavaCodegenTest { additionalModelTypeAnnotations.add("@Bar"); additionalModelTypeAnnotations.add("@Foobar"); - Assert.assertEquals(codegen.getAdditionalModelTypeAnnotations(), additionalModelTypeAnnotations); + final List sortedCodegenAdditionalModelTypeAnnotations = new ArrayList<>(codegen.getAdditionalModelTypeAnnotations()); + final List sortedAdditionalModelTypeAnnotations = new ArrayList<>(codegen.getAdditionalModelTypeAnnotations()); + + Collections.sort(sortedCodegenAdditionalModelTypeAnnotations); + Collections.sort(sortedAdditionalModelTypeAnnotations); + Assert.assertEquals(sortedCodegenAdditionalModelTypeAnnotations, sortedAdditionalModelTypeAnnotations); } @Test @@ -285,7 +306,12 @@ public class AbstractJavaCodegenTest { additionalModelTypeAnnotations.add("@Foo"); additionalModelTypeAnnotations.add("@Bar"); - Assert.assertEquals(codegen.getAdditionalModelTypeAnnotations(), additionalModelTypeAnnotations); + final List sortedCodegenAdditionalModelTypeAnnotations = new ArrayList<>(codegen.getAdditionalModelTypeAnnotations()); + final List sortedAdditionalModelTypeAnnotations = new ArrayList<>(codegen.getAdditionalModelTypeAnnotations()); + + Collections.sort(sortedCodegenAdditionalModelTypeAnnotations); + Collections.sort(sortedAdditionalModelTypeAnnotations); + Assert.assertEquals(sortedCodegenAdditionalModelTypeAnnotations, sortedAdditionalModelTypeAnnotations); } @Test From 8c059a8663337ba4c3c9120789d37ee5cd5e99b5 Mon Sep 17 00:00:00 2001 From: Richard Kolkovich Date: Wed, 29 Sep 2021 23:43:16 -0600 Subject: [PATCH 28/50] [typescript-node] Set model default values (#10262) * fix: add default value, if present, for model properties (closes #10261) * update samples * fix: set default to null to allow #defaultValue to work in templates * fix: escape the string default value, leverage super rather than copy-pasta * update samples again --- .../languages/AbstractTypeScriptClientCodegen.java | 2 +- .../languages/TypeScriptNodeClientCodegen.java | 11 ++++++++++- .../main/resources/typescript-node/model.mustache | 2 +- .../typescriptnode/TypeScriptNodeModelTest.java | 12 ++++++------ .../petstore/typescript-node/default/model/order.ts | 2 +- .../petstore/typescript-node/npm/model/order.ts | 2 +- 6 files changed, 20 insertions(+), 11 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java index 3d0c4ccf69f..7c788c9316b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java @@ -546,7 +546,7 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp return UNDEFINED_VALUE; } else if (ModelUtils.isStringSchema(p)) { if (p.getDefault() != null) { - return "'" + (String) p.getDefault() + "'"; + return "'" + escapeText((String) p.getDefault()) + "'"; } return UNDEFINED_VALUE; } else { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java index 613b9da70f2..93fefc8403a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java @@ -309,7 +309,7 @@ public class TypeScriptNodeClientCodegen extends AbstractTypeScriptClientCodegen return toApiFilename(name); } -@Override + @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { super.addAdditionPropertiesToCodeGenModel(codegenModel, schema); Schema additionalProperties = getAdditionalProperties(schema); @@ -319,4 +319,13 @@ public class TypeScriptNodeClientCodegen extends AbstractTypeScriptClientCodegen } addImport(codegenModel, codegenModel.additionalPropertiesType); } + + @Override + public String toDefaultValue(Schema p) { + String def = super.toDefaultValue(p); + if ("undefined".equals(def)) { + return null; + } + return def; + } } diff --git a/modules/openapi-generator/src/main/resources/typescript-node/model.mustache b/modules/openapi-generator/src/main/resources/typescript-node/model.mustache index 2f981689c28..6c1498b1643 100644 --- a/modules/openapi-generator/src/main/resources/typescript-node/model.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-node/model.mustache @@ -19,7 +19,7 @@ export class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{ * {{{.}}} */ {{/description}} - '{{name}}'{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}; + '{{name}}'{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/vars}} {{#discriminator}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypeScriptNodeModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypeScriptNodeModelTest.java index c1e35ee4022..efacb8b5ff9 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypeScriptNodeModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypeScriptNodeModelTest.java @@ -68,7 +68,7 @@ public class TypeScriptNodeModelTest { Assert.assertEquals(property1.baseName, "id"); Assert.assertEquals(property1.dataType, "number"); Assert.assertEquals(property1.name, "id"); - Assert.assertEquals(property1.defaultValue, "undefined"); + Assert.assertEquals(property1.defaultValue, null); Assert.assertEquals(property1.baseType, "number"); Assert.assertTrue(property1.required); @@ -76,7 +76,7 @@ public class TypeScriptNodeModelTest { Assert.assertEquals(property2.baseName, "name"); Assert.assertEquals(property2.dataType, "string"); Assert.assertEquals(property2.name, "name"); - Assert.assertEquals(property2.defaultValue, "undefined"); + Assert.assertEquals(property2.defaultValue, null); Assert.assertEquals(property2.baseType, "string"); Assert.assertTrue(property2.required); @@ -85,7 +85,7 @@ public class TypeScriptNodeModelTest { Assert.assertEquals(property3.complexType, null); Assert.assertEquals(property3.dataType, "Date"); Assert.assertEquals(property3.name, "createdAt"); - Assert.assertEquals(property3.defaultValue, "undefined"); + Assert.assertEquals(property3.defaultValue, null); Assert.assertFalse(property3.required); final CodegenProperty property4 = cm.vars.get(3); @@ -93,7 +93,7 @@ public class TypeScriptNodeModelTest { Assert.assertEquals(property4.complexType, null); Assert.assertEquals(property4.dataType, "string"); Assert.assertEquals(property4.name, "birthDate"); - Assert.assertEquals(property4.defaultValue, "undefined"); + Assert.assertEquals(property4.defaultValue, null); Assert.assertFalse(property4.required); final CodegenProperty property5 = cm.vars.get(4); @@ -101,7 +101,7 @@ public class TypeScriptNodeModelTest { Assert.assertEquals(property5.complexType, null); Assert.assertEquals(property5.dataType, "boolean"); Assert.assertEquals(property5.name, "active"); - Assert.assertEquals(property5.defaultValue, "undefined"); + Assert.assertEquals(property5.defaultValue, null); Assert.assertFalse(property5.required); Assert.assertFalse(property5.isContainer); } @@ -187,7 +187,7 @@ public class TypeScriptNodeModelTest { Assert.assertEquals(property1.baseName, "id"); Assert.assertEquals(property1.dataType, "number"); Assert.assertEquals(property1.name, "id"); - Assert.assertEquals(property1.defaultValue, "undefined"); + Assert.assertEquals(property1.defaultValue, null); Assert.assertEquals(property1.baseType, "number"); Assert.assertTrue(property1.required); diff --git a/samples/client/petstore/typescript-node/default/model/order.ts b/samples/client/petstore/typescript-node/default/model/order.ts index 18d5a8f2e86..f3af391f88d 100644 --- a/samples/client/petstore/typescript-node/default/model/order.ts +++ b/samples/client/petstore/typescript-node/default/model/order.ts @@ -24,7 +24,7 @@ export class Order { * Order Status */ 'status'?: Order.StatusEnum; - 'complete'?: boolean; + 'complete'?: boolean = false; static discriminator: string | undefined = undefined; diff --git a/samples/client/petstore/typescript-node/npm/model/order.ts b/samples/client/petstore/typescript-node/npm/model/order.ts index 18d5a8f2e86..f3af391f88d 100644 --- a/samples/client/petstore/typescript-node/npm/model/order.ts +++ b/samples/client/petstore/typescript-node/npm/model/order.ts @@ -24,7 +24,7 @@ export class Order { * Order Status */ 'status'?: Order.StatusEnum; - 'complete'?: boolean; + 'complete'?: boolean = false; static discriminator: string | undefined = undefined; From 638a2faa3d17bcff0156aa1ba5c578514cd8c4e2 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 1 Oct 2021 13:09:32 -0700 Subject: [PATCH 29/50] Updated model generation, addProps handling moved into type object and anyType handling (#10505) * Updates fromModel helpers * Samples regenerated * updateModelForComposedSchema made protected so it can be overridden --- .../java/org/openapitools/codegen/DefaultCodegen.java | 11 ++++++----- .../codegen/languages/CSharpNetCoreClientCodegen.java | 2 ++ .../codegen/languages/GoServerCodegen.java | 2 ++ .../codegen/languages/JavaCXFServerCodegen.java | 2 ++ samples/client/petstore/python/docs/AnimalFarm.md | 1 - samples/client/petstore/python/docs/EnumClass.md | 1 - .../petstore/python/docs/NumberWithValidations.md | 1 - samples/client/petstore/python/docs/StringEnum.md | 1 - .../petstore/python/petstore_api/model/animal_farm.py | 9 +-------- .../petstore/python/petstore_api/model/enum_class.py | 8 +------- .../petstore_api/model/number_with_validations.py | 8 +------- .../petstore/python/petstore_api/model/string_enum.py | 8 +------- .../client/petstore/python/docs/AnimalFarm.md | 1 - .../client/petstore/python/docs/ArrayOfEnums.md | 1 - .../client/petstore/python/docs/BooleanEnum.md | 1 - .../openapi3/client/petstore/python/docs/EnumClass.md | 1 - .../client/petstore/python/docs/IntegerEnum.md | 1 - .../petstore/python/docs/IntegerEnumOneValue.md | 1 - .../python/docs/IntegerEnumWithDefaultValue.md | 1 - .../petstore/python/docs/NumberWithValidations.md | 1 - .../client/petstore/python/docs/StringEnum.md | 1 - .../python/docs/StringEnumWithDefaultValue.md | 1 - .../petstore/python/petstore_api/model/animal_farm.py | 9 +-------- .../python/petstore_api/model/array_of_enums.py | 9 +-------- .../python/petstore_api/model/boolean_enum.py | 8 +------- .../petstore/python/petstore_api/model/enum_class.py | 8 +------- .../python/petstore_api/model/integer_enum.py | 8 +------- .../petstore_api/model/integer_enum_one_value.py | 8 +------- .../model/integer_enum_with_default_value.py | 8 +------- .../petstore_api/model/number_with_validations.py | 8 +------- .../petstore/python/petstore_api/model/string_enum.py | 8 +------- .../model/string_enum_with_default_value.py | 8 +------- 32 files changed, 26 insertions(+), 120 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 65d34bdf664..689af8f5267 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -2381,7 +2381,7 @@ public class DefaultCodegen implements CodegenConfig { Map schemaCodegenPropertyCache = new HashMap(); - private void updateModelForComposedSchema(CodegenModel m, Schema schema, Map allDefinitions) { + protected void updateModelForComposedSchema(CodegenModel m, Schema schema, Map allDefinitions) { final ComposedSchema composed = (ComposedSchema) schema; Map properties = new LinkedHashMap(); List required = new ArrayList(); @@ -2596,6 +2596,8 @@ public class DefaultCodegen implements CodegenConfig { // additionalProperties must be null, ObjectSchema, or empty Schema addAdditionPropertiesToCodeGenModel(m, schema); } + // process 'additionalProperties' + setAddProps(schema, m); } protected void updateModelForAnyType(CodegenModel m, Schema schema) { @@ -2614,6 +2616,8 @@ public class DefaultCodegen implements CodegenConfig { // passing null to allProperties and allRequired as there's no parent addVars(m, unaliasPropertySchema(schema.getProperties()), schema.getRequired(), null, null); } + // process 'additionalProperties' + setAddProps(schema, m); } @@ -2776,9 +2780,6 @@ public class DefaultCodegen implements CodegenConfig { Collections.sort(m.allVars, comparator); } - // process 'additionalProperties' - setAddProps(schema, m); - // post process model properties if (m.vars != null) { for (CodegenProperty prop : m.vars) { @@ -2794,7 +2795,7 @@ public class DefaultCodegen implements CodegenConfig { return m; } - private void setAddProps(Schema schema, IJsonSchemaValidationProperties property){ + protected void setAddProps(Schema schema, IJsonSchemaValidationProperties property){ if (schema.equals(new Schema())) { // if we are trying to set additionalProperties on an empty schema stop recursing return; 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 66718bdaf7f..604fa336e38 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 @@ -1152,5 +1152,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { addAdditionPropertiesToCodeGenModel(m, schema); } } + // process 'additionalProperties' + setAddProps(schema, m); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java index ab4f7b37cf7..0983ad705b9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java @@ -385,5 +385,7 @@ public class GoServerCodegen extends AbstractGoCodegen { addAdditionPropertiesToCodeGenModel(m, schema); } } + // process 'additionalProperties' + setAddProps(schema, m); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFServerCodegen.java index f406050ea68..54c1c0e6c0b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFServerCodegen.java @@ -354,5 +354,7 @@ public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen addAdditionPropertiesToCodeGenModel(m, schema); } } + // process 'additionalProperties' + setAddProps(schema, m); } } diff --git a/samples/client/petstore/python/docs/AnimalFarm.md b/samples/client/petstore/python/docs/AnimalFarm.md index fb3b33c9c9c..fc299cf27d3 100644 --- a/samples/client/petstore/python/docs/AnimalFarm.md +++ b/samples/client/petstore/python/docs/AnimalFarm.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | [**[Animal]**](Animal.md) | | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python/docs/EnumClass.md b/samples/client/petstore/python/docs/EnumClass.md index 39bb0e1644c..a1f9aae5819 100644 --- a/samples/client/petstore/python/docs/EnumClass.md +++ b/samples/client/petstore/python/docs/EnumClass.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **str** | | defaults to "-efg", must be one of ["_abc", "-efg", "(xyz)", ] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python/docs/NumberWithValidations.md b/samples/client/petstore/python/docs/NumberWithValidations.md index cc6f77c152c..119e0f67823 100644 --- a/samples/client/petstore/python/docs/NumberWithValidations.md +++ b/samples/client/petstore/python/docs/NumberWithValidations.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **float** | | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python/docs/StringEnum.md b/samples/client/petstore/python/docs/StringEnum.md index 1ac6df2fb79..bb195ec0e45 100644 --- a/samples/client/petstore/python/docs/StringEnum.md +++ b/samples/client/petstore/python/docs/StringEnum.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **str** | | must be one of ["placed", "approved", "delivered", ] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/python/petstore_api/model/animal_farm.py b/samples/client/petstore/python/petstore_api/model/animal_farm.py index 59bde51a290..042a8274ee7 100644 --- a/samples/client/petstore/python/petstore_api/model/animal_farm.py +++ b/samples/client/petstore/python/petstore_api/model/animal_farm.py @@ -60,14 +60,7 @@ class AnimalFarm(ModelSimple): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/samples/client/petstore/python/petstore_api/model/enum_class.py b/samples/client/petstore/python/petstore_api/model/enum_class.py index a9e7723b255..b0ed3d8966d 100644 --- a/samples/client/petstore/python/petstore_api/model/enum_class.py +++ b/samples/client/petstore/python/petstore_api/model/enum_class.py @@ -61,13 +61,7 @@ class EnumClass(ModelSimple): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/samples/client/petstore/python/petstore_api/model/number_with_validations.py b/samples/client/petstore/python/petstore_api/model/number_with_validations.py index 27bc46dbe44..5d66fec5ec6 100644 --- a/samples/client/petstore/python/petstore_api/model/number_with_validations.py +++ b/samples/client/petstore/python/petstore_api/model/number_with_validations.py @@ -60,13 +60,7 @@ class NumberWithValidations(ModelSimple): }, } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/samples/client/petstore/python/petstore_api/model/string_enum.py b/samples/client/petstore/python/petstore_api/model/string_enum.py index 5bd1e28942e..2397dd59fc9 100644 --- a/samples/client/petstore/python/petstore_api/model/string_enum.py +++ b/samples/client/petstore/python/petstore_api/model/string_enum.py @@ -61,13 +61,7 @@ class StringEnum(ModelSimple): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/samples/openapi3/client/petstore/python/docs/AnimalFarm.md b/samples/openapi3/client/petstore/python/docs/AnimalFarm.md index fb3b33c9c9c..fc299cf27d3 100644 --- a/samples/openapi3/client/petstore/python/docs/AnimalFarm.md +++ b/samples/openapi3/client/petstore/python/docs/AnimalFarm.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | [**[Animal]**](Animal.md) | | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/ArrayOfEnums.md b/samples/openapi3/client/petstore/python/docs/ArrayOfEnums.md index f1593c10afd..d2f8ea80a3d 100644 --- a/samples/openapi3/client/petstore/python/docs/ArrayOfEnums.md +++ b/samples/openapi3/client/petstore/python/docs/ArrayOfEnums.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | [**[StringEnum]**](StringEnum.md) | | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/BooleanEnum.md b/samples/openapi3/client/petstore/python/docs/BooleanEnum.md index 592645544c5..ab7bdfff426 100644 --- a/samples/openapi3/client/petstore/python/docs/BooleanEnum.md +++ b/samples/openapi3/client/petstore/python/docs/BooleanEnum.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **bool** | | defaults to True, must be one of [True, ] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/EnumClass.md b/samples/openapi3/client/petstore/python/docs/EnumClass.md index 39bb0e1644c..a1f9aae5819 100644 --- a/samples/openapi3/client/petstore/python/docs/EnumClass.md +++ b/samples/openapi3/client/petstore/python/docs/EnumClass.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **str** | | defaults to "-efg", must be one of ["_abc", "-efg", "(xyz)", ] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/IntegerEnum.md b/samples/openapi3/client/petstore/python/docs/IntegerEnum.md index a5b38556bf8..9567a76cc2e 100644 --- a/samples/openapi3/client/petstore/python/docs/IntegerEnum.md +++ b/samples/openapi3/client/petstore/python/docs/IntegerEnum.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **int** | | must be one of [0, 1, 2, ] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/IntegerEnumOneValue.md b/samples/openapi3/client/petstore/python/docs/IntegerEnumOneValue.md index d92f3080973..99dcaa7a4ec 100644 --- a/samples/openapi3/client/petstore/python/docs/IntegerEnumOneValue.md +++ b/samples/openapi3/client/petstore/python/docs/IntegerEnumOneValue.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **int** | | defaults to 0, must be one of [0, ] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/IntegerEnumWithDefaultValue.md b/samples/openapi3/client/petstore/python/docs/IntegerEnumWithDefaultValue.md index 2fd432edc69..4b8e39d9cad 100644 --- a/samples/openapi3/client/petstore/python/docs/IntegerEnumWithDefaultValue.md +++ b/samples/openapi3/client/petstore/python/docs/IntegerEnumWithDefaultValue.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **int** | | defaults to 0, must be one of [0, 1, 2, ] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/NumberWithValidations.md b/samples/openapi3/client/petstore/python/docs/NumberWithValidations.md index cc6f77c152c..119e0f67823 100644 --- a/samples/openapi3/client/petstore/python/docs/NumberWithValidations.md +++ b/samples/openapi3/client/petstore/python/docs/NumberWithValidations.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **float** | | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/StringEnum.md b/samples/openapi3/client/petstore/python/docs/StringEnum.md index 29e160a9b07..b03f3b1e6c6 100644 --- a/samples/openapi3/client/petstore/python/docs/StringEnum.md +++ b/samples/openapi3/client/petstore/python/docs/StringEnum.md @@ -7,7 +7,6 @@ Name | Type | Description | Notes **value** | **str** | | must be one of ["placed", "approved", "delivered", "single quoted", '''multiple lines''', '''double quote with newline''', ] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/docs/StringEnumWithDefaultValue.md b/samples/openapi3/client/petstore/python/docs/StringEnumWithDefaultValue.md index 700a2caf3b8..7799b93d822 100644 --- a/samples/openapi3/client/petstore/python/docs/StringEnumWithDefaultValue.md +++ b/samples/openapi3/client/petstore/python/docs/StringEnumWithDefaultValue.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **str** | | defaults to "placed", must be one of ["placed", "approved", "delivered", ] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py b/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py index 59bde51a290..042a8274ee7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py @@ -60,14 +60,7 @@ class AnimalFarm(ModelSimple): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py index 1a4166a6e67..d83a7f15709 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py @@ -60,14 +60,7 @@ class ArrayOfEnums(ModelSimple): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/boolean_enum.py b/samples/openapi3/client/petstore/python/petstore_api/model/boolean_enum.py index 6b5a2f7d65e..af104c19c78 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/boolean_enum.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/boolean_enum.py @@ -59,13 +59,7 @@ class BooleanEnum(ModelSimple): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.py index a9e7723b255..b0ed3d8966d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.py @@ -61,13 +61,7 @@ class EnumClass(ModelSimple): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.py b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.py index 2d3d1293cd3..aa397a09ebd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.py @@ -61,13 +61,7 @@ class IntegerEnum(ModelSimple): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.py b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.py index 63c1a0b9a7b..0ed72fe14cd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.py @@ -59,13 +59,7 @@ class IntegerEnumOneValue(ModelSimple): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.py b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.py index 008f954a0f1..2c479332983 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.py @@ -61,13 +61,7 @@ class IntegerEnumWithDefaultValue(ModelSimple): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py b/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py index afcbf8463ea..9a8a82b4821 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py @@ -60,13 +60,7 @@ class NumberWithValidations(ModelSimple): }, } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py index 890e25eeddc..3563698aacb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py @@ -67,13 +67,7 @@ lines''', validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = True diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.py b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.py index 3861e56a08c..b6432cdbd1b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.py @@ -61,13 +61,7 @@ class StringEnumWithDefaultValue(ModelSimple): validations = { } - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = None _nullable = False From a57ab19d90818799b39ee52ba51f2b25a65de08f Mon Sep 17 00:00:00 2001 From: Mustafa Arif Date: Sat, 2 Oct 2021 04:45:19 +0100 Subject: [PATCH 30/50] Add Aqovia & clients as using OpenAPITool (#10493) Added our company (Aqovia) as well as our spin-out (NeuerEnergy) and client (Interxion) all of whom are using the OpenAPI-generator as part of build toolchains. --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 5739a689ac3..5805509e444 100644 --- a/README.md +++ b/README.md @@ -571,6 +571,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [Agoda](https://www.agoda.com/) - [Allianz](https://www.allianz.com) - [Angular.Schule](https://angular.schule/) +- [Aqovia](https://aqovia.com/) - [Australia and New Zealand Banking Group (ANZ)](http://www.anz.com/) - [ASKUL](https://www.askul.co.jp) - [Arduino](https://www.arduino.cc/) @@ -611,6 +612,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [Here](https://developer.here.com/) - [IBM](https://www.ibm.com/) - [Instana](https://www.instana.com) +- [Interxion](https://www.interxion.com) - [Inquisico](https://inquisico.com) - [JustStar](https://www.juststarinfo.com) - [k6.io](https://k6.io/) @@ -628,6 +630,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [Myworkout](https://myworkout.com) - [NamSor](https://www.namsor.com/) - [Neverfail](https://www.neverfail.com/) +- [NeuerEnergy](https://neuerenergy.com) - [Nokia](https://www.nokia.com/) - [Options Clearing Corporation (OCC)](https://www.theocc.com/) - [Openet](https://www.openet.com/) From 1224283c8435b275c0f9507287fe91735194f6ea Mon Sep 17 00:00:00 2001 From: NouemanKHAL Date: Sat, 2 Oct 2021 05:46:15 +0200 Subject: [PATCH 31/50] use array examples in ruby (#10500) --- .../openapitools/codegen/languages/RubyClientCodegen.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java index 95e874ca03f..f7d5a20e079 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java @@ -672,6 +672,12 @@ public class RubyClientCodegen extends AbstractRubyCodegen { private String constructExampleCode(CodegenProperty codegenProperty, HashMap modelMaps, HashMap processedModelMap) { if (codegenProperty.isArray) { // array + if (!StringUtils.isEmpty(codegenProperty.example) && !"null".equals(codegenProperty.example)) { + String value = codegenProperty.example; + value = value.replaceAll(",", ", "); + value = value.replaceAll(":", ": "); + return value; + } return "[" + constructExampleCode(codegenProperty.items, modelMaps, processedModelMap) + "]"; } else if (codegenProperty.isMap) { return "{ key: " + constructExampleCode(codegenProperty.items, modelMaps, processedModelMap) + "}"; From 68285bcd0ac13fb99b26c61bcce3c043a2dac6a6 Mon Sep 17 00:00:00 2001 From: Surya Asriadie Date: Sat, 2 Oct 2021 12:48:34 +0900 Subject: [PATCH 32/50] [Kotlin] Fix prevent string default value to be escaped (#10501) --- .../main/resources/kotlin-client/data_class_opt_var.mustache | 2 +- .../kotlin-server-deprecated/data_class_opt_var.mustache | 2 +- .../main/resources/kotlin-server/data_class_opt_var.mustache | 2 +- .../src/main/resources/kotlin-spring/interfaceOptVar.mustache | 2 +- .../resources/kotlin-vertx-server/data_class_opt_var.mustache | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache index b1d925af613..a86c202f4e6 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache @@ -18,4 +18,4 @@ {{#deprecated}} @Deprecated(message = "This property is deprecated.") {{/deprecated}} - {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}{{#uniqueItems}}kotlin.collections.Set{{/uniqueItems}}{{^uniqueItems}}kotlin.collections.List{{/uniqueItems}}{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}? = {{defaultValue}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file + {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}{{#uniqueItems}}kotlin.collections.Set{{/uniqueItems}}{{^uniqueItems}}kotlin.collections.List{{/uniqueItems}}{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}? = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/data_class_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/data_class_opt_var.mustache index a8595b2b7f3..df50e9867aa 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/data_class_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/data_class_opt_var.mustache @@ -1,4 +1,4 @@ {{#description}} /* {{{.}}} */ {{/description}} - {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{defaultValue}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file + {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/data_class_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/data_class_opt_var.mustache index a8595b2b7f3..df50e9867aa 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/data_class_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/data_class_opt_var.mustache @@ -1,4 +1,4 @@ {{#description}} /* {{{.}}} */ {{/description}} - {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{defaultValue}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file + {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceOptVar.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceOptVar.mustache index 354922c426f..2011f366408 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceOptVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceOptVar.mustache @@ -1,3 +1,3 @@ {{#swaggerAnnotations}} @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}} - {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? {{^discriminator}}= {{defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/discriminator}} \ No newline at end of file + {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? {{^discriminator}}= {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}}{{/discriminator}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class_opt_var.mustache index a8595b2b7f3..df50e9867aa 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class_opt_var.mustache @@ -1,4 +1,4 @@ {{#description}} /* {{{.}}} */ {{/description}} - {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{defaultValue}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file + {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file From 0eb7189faea45cd83384119cbfd7180909066ead Mon Sep 17 00:00:00 2001 From: NivathaSV8 <70672404+NivathaSV8@users.noreply.github.com> Date: Sat, 2 Oct 2021 14:05:41 +0900 Subject: [PATCH 33/50] [Ruby][Faraday][#10137] Fix config request options and timeout (#10405) * Update default timeout of Faraday request to 60 seconds * Fix request options of Ruby Faraday client --- .../ruby-client/api_client_faraday_partial.mustache | 5 +---- .../src/main/resources/ruby-client/configuration.mustache | 3 ++- .../client/petstore/ruby-faraday/lib/petstore/api_client.rb | 5 +---- .../petstore/ruby-faraday/lib/petstore/configuration.rb | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api_client_faraday_partial.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_client_faraday_partial.mustache index 96e1e1142ad..0b35bbbc7c6 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api_client_faraday_partial.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api_client_faraday_partial.mustache @@ -73,9 +73,6 @@ update_params_for_auth! header_params, query_params, opts[:auth_names] req_opts = { - :method => http_method, - :headers => header_params, - :params => query_params, :params_encoding => @config.params_encoding, :timeout => @config.timeout, :verbose => @config.debugging @@ -83,13 +80,13 @@ if [:post, :patch, :put, :delete].include?(http_method) req_body = build_request_body(header_params, form_params, opts[:body]) - req_opts.update :body => req_body if @config.debugging @config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n" end end request.headers = header_params request.body = req_body + request.options = OpenStruct.new(req_opts) request.url url request.params = query_params download_file(request) if opts[:return_type] == 'File' diff --git a/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache b/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache index 26d324489b9..2d779e04790 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache @@ -110,7 +110,6 @@ module {{moduleName}} @server_operation_variables = {} @api_key = {} @api_key_prefix = {} - @timeout = 0 @client_side_validation = true {{#isFaraday}} @ssl_verify = true @@ -118,6 +117,7 @@ module {{moduleName}} @ssl_ca_file = nil @ssl_client_cert = nil @ssl_client_key = nil + @timeout = 60 {{/isFaraday}} {{^isFaraday}} @verify_ssl = true @@ -125,6 +125,7 @@ module {{moduleName}} @params_encoding = nil @cert_file = nil @key_file = nil + @timeout = 0 {{/isFaraday}} @debugging = false @inject_format = false 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 c2e65aa104c..0faad1f7022 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb @@ -117,9 +117,6 @@ module Petstore update_params_for_auth! header_params, query_params, opts[:auth_names] req_opts = { - :method => http_method, - :headers => header_params, - :params => query_params, :params_encoding => @config.params_encoding, :timeout => @config.timeout, :verbose => @config.debugging @@ -127,13 +124,13 @@ module Petstore if [:post, :patch, :put, :delete].include?(http_method) req_body = build_request_body(header_params, form_params, opts[:body]) - req_opts.update :body => req_body if @config.debugging @config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n" end end request.headers = header_params request.body = req_body + request.options = OpenStruct.new(req_opts) request.url url request.params = query_params download_file(request) if opts[:return_type] == 'File' diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb index a8f4570e56e..27a6c4270da 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb @@ -142,13 +142,13 @@ module Petstore @server_operation_variables = {} @api_key = {} @api_key_prefix = {} - @timeout = 0 @client_side_validation = true @ssl_verify = true @ssl_verify_mode = nil @ssl_ca_file = nil @ssl_client_cert = nil @ssl_client_key = nil + @timeout = 60 @debugging = false @inject_format = false @force_ending_format = false From 8602fbc87cd575461c2ad72c8a2a52bf0c7300b8 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 2 Oct 2021 13:10:13 +0800 Subject: [PATCH 34/50] update ruby samples --- samples/client/petstore/ruby/lib/petstore/configuration.rb | 2 +- .../ruby-client/lib/x_auth_id_alias/configuration.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/configuration.rb | 2 +- .../ruby-client/lib/petstore/configuration.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index 12a52ebd2c5..f99968892f3 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -147,13 +147,13 @@ module Petstore @server_operation_variables = {} @api_key = {} @api_key_prefix = {} - @timeout = 0 @client_side_validation = true @verify_ssl = true @verify_ssl_host = true @params_encoding = nil @cert_file = nil @key_file = nil + @timeout = 0 @debugging = false @inject_format = false @force_ending_format = false diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb index 615cfc8f10c..2eaaa31535f 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb @@ -147,13 +147,13 @@ module XAuthIDAlias @server_operation_variables = {} @api_key = {} @api_key_prefix = {} - @timeout = 0 @client_side_validation = true @verify_ssl = true @verify_ssl_host = true @params_encoding = nil @cert_file = nil @key_file = nil + @timeout = 0 @debugging = false @inject_format = false @force_ending_format = false 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 ef4d3ada5db..09196ad1f81 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 @@ -147,13 +147,13 @@ module DynamicServers @server_operation_variables = {} @api_key = {} @api_key_prefix = {} - @timeout = 0 @client_side_validation = true @verify_ssl = true @verify_ssl_host = true @params_encoding = nil @cert_file = nil @key_file = nil + @timeout = 0 @debugging = false @inject_format = false @force_ending_format = false 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 f8557cbb519..8d5d2824ceb 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 @@ -147,13 +147,13 @@ module Petstore @server_operation_variables = {} @api_key = {} @api_key_prefix = {} - @timeout = 0 @client_side_validation = true @verify_ssl = true @verify_ssl_host = true @params_encoding = nil @cert_file = nil @key_file = nil + @timeout = 0 @debugging = false @inject_format = false @force_ending_format = false From bcf12b36e6b1f1733779cc2a88a46548d105d90d Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 2 Oct 2021 13:51:05 +0800 Subject: [PATCH 35/50] skip crystal tests (#10509) --- .travis.yml | 11 ++++++----- pom.xml | 3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5761227d0a7..bd73fe21c67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -75,12 +75,13 @@ before_install: - 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 + # comment out crystal installation as the tests will run on circleci or github action instead # install crystal - - echo 'deb http://download.opensuse.org/repositories/devel:/languages:/crystal/xUbuntu_16.04/ /' | sudo tee /etc/apt/sources.list.d/devel:languages:crystal.list - - curl -fsSL https://download.opensuse.org/repositories/devel:languages:crystal/xUbuntu_16.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_languages_crystal.gpg > /dev/null - - sudo apt update - - sudo apt install crystal - - crystal --version + #- echo 'deb http://download.opensuse.org/repositories/devel:/languages:/crystal/xUbuntu_16.04/ /' | sudo tee /etc/apt/sources.list.d/devel:languages:crystal.list + #- curl -fsSL https://download.opensuse.org/repositories/devel:languages:crystal/xUbuntu_16.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_languages_crystal.gpg > /dev/null + #- sudo apt update + #- sudo apt install crystal + #- crystal --version - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.22.0 - export PATH="$HOME/.yarn/bin:$PATH" # install rust diff --git a/pom.xml b/pom.xml index 3250c8bdf97..eeb086592fc 100644 --- a/pom.xml +++ b/pom.xml @@ -1195,7 +1195,8 @@ samples/client/petstore/typescript-axios/builds/with-npm-version samples/client/petstore/typescript-axios/tests/default - samples/client/petstore/crystal + samples/server/petstore/python-aiohttp samples/server/petstore/python-aiohttp-srclayout From 755359c031cadd5995e5e22fdb13938f3024c540 Mon Sep 17 00:00:00 2001 From: Heikki Haapala <79839823+aiven-hh@users.noreply.github.com> Date: Sat, 2 Oct 2021 09:06:29 +0300 Subject: [PATCH 36/50] [typescript-axios] Fix model property naming (#10447) * fix: typescript-axios property names Disables MODEL_PROPERTY_NAMING for typescript-axios generator as this was never supported (templates have no mapping between original property names and formatted names). Wraps all properties in model interfaces with '' to support most characters except ' for now. Also fixes missing options typing that was any before. * chore: add new sample, generate samples * chore: update generator docs --- .../typescript-axios-test-petstore.yaml | 4 + docs/generators/typescript-axios.md | 1 - .../TypeScriptAxiosClientCodegen.java | 2 + .../resources/typescript-axios/api.mustache | 2 +- .../typescript-axios/apiInner.mustache | 12 +- .../typescript-axios/baseApi.mustache | 4 +- .../typescript-axios/modelGeneric.mustache | 2 +- .../builds/composed-schemas/api.ts | 46 +- .../builds/composed-schemas/base.ts | 4 +- .../typescript-axios/builds/default/api.ts | 176 +- .../typescript-axios/builds/default/base.ts | 4 +- .../typescript-axios/builds/es6-target/api.ts | 176 +- .../builds/es6-target/base.ts | 4 +- .../builds/test-petstore/.gitignore | 4 + .../builds/test-petstore/.npmignore | 1 + .../test-petstore/.openapi-generator-ignore | 23 + .../test-petstore/.openapi-generator/FILES | 8 + .../test-petstore/.openapi-generator/VERSION | 1 + .../builds/test-petstore/api.ts | 5035 +++++++++++++++++ .../builds/test-petstore/base.ts | 71 + .../builds/test-petstore/common.ts | 138 + .../builds/test-petstore/configuration.ts | 101 + .../builds/test-petstore/git_push.sh | 57 + .../builds/test-petstore/index.ts | 18 + .../builds/with-complex-headers/api.ts | 176 +- .../builds/with-complex-headers/base.ts | 4 +- .../api.ts | 516 +- .../base.ts | 4 +- .../builds/with-interfaces/api.ts | 216 +- .../builds/with-interfaces/base.ts | 4 +- .../api/another/level/pet-api.ts | 50 +- .../api/another/level/store-api.ts | 26 +- .../api/another/level/user-api.ts | 50 +- .../base.ts | 4 +- .../model/some/levels/deep/api-response.ts | 6 +- .../model/some/levels/deep/category.ts | 4 +- .../model/some/levels/deep/order.ts | 12 +- .../model/some/levels/deep/pet.ts | 12 +- .../model/some/levels/deep/tag.ts | 4 +- .../model/some/levels/deep/user.ts | 16 +- .../builds/with-npm-version/api.ts | 176 +- .../builds/with-npm-version/base.ts | 4 +- .../with-single-request-parameters/api.ts | 176 +- .../with-single-request-parameters/base.ts | 4 +- .../tests/default/package-lock.json | 2909 +--------- 45 files changed, 6442 insertions(+), 3825 deletions(-) create mode 100644 bin/configs/typescript-axios-test-petstore.yaml create mode 100644 samples/client/petstore/typescript-axios/builds/test-petstore/.gitignore create mode 100644 samples/client/petstore/typescript-axios/builds/test-petstore/.npmignore create mode 100644 samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator-ignore create mode 100644 samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/FILES create mode 100644 samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION create mode 100644 samples/client/petstore/typescript-axios/builds/test-petstore/api.ts create mode 100644 samples/client/petstore/typescript-axios/builds/test-petstore/base.ts create mode 100644 samples/client/petstore/typescript-axios/builds/test-petstore/common.ts create mode 100644 samples/client/petstore/typescript-axios/builds/test-petstore/configuration.ts create mode 100644 samples/client/petstore/typescript-axios/builds/test-petstore/git_push.sh create mode 100644 samples/client/petstore/typescript-axios/builds/test-petstore/index.ts diff --git a/bin/configs/typescript-axios-test-petstore.yaml b/bin/configs/typescript-axios-test-petstore.yaml new file mode 100644 index 00000000000..7873b2854fe --- /dev/null +++ b/bin/configs/typescript-axios-test-petstore.yaml @@ -0,0 +1,4 @@ +generatorName: typescript-axios +outputDir: samples/client/petstore/typescript-axios/builds/test-petstore +inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +templateDir: modules/openapi-generator/src/main/resources/typescript-axios \ No newline at end of file diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index 3e9f31aed5f..8dfc77b52df 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -13,7 +13,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
                  **true**
                  The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
                  **false**
                  The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
                  |true| -|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| |npmRepository|Use this property to set an url of your private npmRepo in the package.json| |null| |npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java index 243b6e10db1..171b0e254e0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java @@ -55,6 +55,8 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege this.cliOptions.add(new CliOption(SEPARATE_MODELS_AND_API, "Put the model and api in separate folders and in separate classes", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); this.cliOptions.add(new CliOption(WITHOUT_PREFIX_ENUMS, "Don't prefix enum names with class names", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); this.cliOptions.add(new CliOption(USE_SINGLE_REQUEST_PARAMETER, "Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); + // Templates have no mapping between formatted property names and original base names so use only "original" and remove this option + removeOption(CodegenConstants.MODEL_PROPERTY_NAMING); } @Override diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache index da873845d8a..140801103b7 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache @@ -4,7 +4,7 @@ {{^withSeparateModelsAndApi}} import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache index c265be5b3d7..3b974480c81 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache @@ -3,7 +3,7 @@ /* eslint-disable */ {{>licenseInfo}} -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import { Configuration } from '{{apiRelativeToRoot}}configuration'; // Some imports not used depending on template conditions // @ts-ignore @@ -38,7 +38,7 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur * @deprecated{{/isDeprecated}} * @throws {RequiredError} */ - {{nickname}}: async ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options: any = {}): Promise => { + {{nickname}}: async ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options: AxiosRequestConfig = {}): Promise => { {{#allParams}} {{#required}} // verify required parameter '{{paramName}}' is not null or undefined @@ -222,7 +222,7 @@ export const {{classname}}Fp = function(configuration?: Configuration) { * @deprecated{{/isDeprecated}} * @throws {RequiredError} */ - async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>> { + async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>> { const localVarAxiosArgs = await localVarAxiosParamCreator.{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -280,7 +280,7 @@ export interface {{classname}}Interface { * @throws {RequiredError} * @memberof {{classname}}Interface */ - {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>; + {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: AxiosRequestConfig): AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>; {{/operation}} } @@ -346,12 +346,12 @@ export class {{classname}} extends BaseAPI { * @memberof {{classname}} */ {{#useSingleRequestParameter}} - public {{nickname}}({{#allParams.0}}requestParameters: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, {{/allParams.0}}options?: any) { + public {{nickname}}({{#allParams.0}}requestParameters: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, {{/allParams.0}}options?: AxiosRequestConfig) { return {{classname}}Fp(this.configuration).{{nickname}}({{#allParams.0}}{{#allParams}}requestParameters.{{paramName}}, {{/allParams}}{{/allParams.0}}options).then((request) => request(this.axios, this.basePath)); } {{/useSingleRequestParameter}} {{^useSingleRequestParameter}} - public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any) { + public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: AxiosRequestConfig) { return {{classname}}Fp(this.configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options).then((request) => request(this.axios, this.basePath)); } {{/useSingleRequestParameter}} diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache index 519b7c7d948..94fcf213f3d 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache @@ -5,7 +5,7 @@ import { Configuration } from "./configuration"; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; export const BASE_PATH = "{{{basePath}}}".replace(/\/+$/, ""); @@ -27,7 +27,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: any; + options: AxiosRequestConfig; } /** diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache index ea299c07d96..b64c34e2cc9 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache @@ -17,7 +17,7 @@ export interface {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{ * @deprecated {{/deprecated}} */ - {{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}; + '{{baseName}}'{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}; {{/vars}} }{{#hasEnums}} diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts b/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts index 0de89784bd0..2962f7c498d 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts @@ -14,7 +14,7 @@ import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; @@ -32,13 +32,13 @@ export interface Cat { * @type {boolean} * @memberof Cat */ - hunts?: boolean; + 'hunts'?: boolean; /** * * @type {number} * @memberof Cat */ - age?: number; + 'age'?: number; } /** * @@ -51,13 +51,13 @@ export interface CatAllOf { * @type {boolean} * @memberof CatAllOf */ - hunts?: boolean; + 'hunts'?: boolean; /** * * @type {number} * @memberof CatAllOf */ - age?: number; + 'age'?: number; } /** * @@ -70,13 +70,13 @@ export interface Dog { * @type {boolean} * @memberof Dog */ - bark?: boolean; + 'bark'?: boolean; /** * * @type {string} * @memberof Dog */ - breed?: DogBreedEnum; + 'breed'?: DogBreedEnum; } /** @@ -101,13 +101,13 @@ export interface DogAllOf { * @type {boolean} * @memberof DogAllOf */ - bark?: boolean; + 'bark'?: boolean; /** * * @type {string} * @memberof DogAllOf */ - breed?: DogAllOfBreedEnum; + 'breed'?: DogAllOfBreedEnum; } /** @@ -132,7 +132,7 @@ export interface InlineObject { * @type {any} * @memberof InlineObject */ - file?: any; + 'file'?: any; } /** * @@ -145,13 +145,13 @@ export interface PetByAge { * @type {number} * @memberof PetByAge */ - age: number; + 'age': number; /** * * @type {string} * @memberof PetByAge */ - nickname?: string; + 'nickname'?: string; } /** * @@ -164,13 +164,13 @@ export interface PetByType { * @type {string} * @memberof PetByType */ - pet_type: PetByTypePetTypeEnum; + 'pet_type': PetByTypePetTypeEnum; /** * * @type {boolean} * @memberof PetByType */ - hunts?: boolean; + 'hunts'?: boolean; } /** @@ -195,7 +195,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - filePost: async (inlineObject?: InlineObject, options: any = {}): Promise => { + filePost: async (inlineObject?: InlineObject, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/file`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -228,7 +228,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - petsFilteredPatch: async (petByAgePetByType?: PetByAge | PetByType, options: any = {}): Promise => { + petsFilteredPatch: async (petByAgePetByType?: PetByAge | PetByType, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/pets-filtered`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -261,7 +261,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - petsPatch: async (catDog?: Cat | Dog, options: any = {}): Promise => { + petsPatch: async (catDog?: Cat | Dog, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/pets`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -304,7 +304,7 @@ export const DefaultApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async filePost(inlineObject?: InlineObject, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async filePost(inlineObject?: InlineObject, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.filePost(inlineObject, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -314,7 +314,7 @@ export const DefaultApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async petsFilteredPatch(petByAgePetByType?: PetByAge | PetByType, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async petsFilteredPatch(petByAgePetByType?: PetByAge | PetByType, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.petsFilteredPatch(petByAgePetByType, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -324,7 +324,7 @@ export const DefaultApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async petsPatch(catDog?: Cat | Dog, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async petsPatch(catDog?: Cat | Dog, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.petsPatch(catDog, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -382,7 +382,7 @@ export class DefaultApi extends BaseAPI { * @throws {RequiredError} * @memberof DefaultApi */ - public filePost(inlineObject?: InlineObject, options?: any) { + public filePost(inlineObject?: InlineObject, options?: AxiosRequestConfig) { return DefaultApiFp(this.configuration).filePost(inlineObject, options).then((request) => request(this.axios, this.basePath)); } @@ -393,7 +393,7 @@ export class DefaultApi extends BaseAPI { * @throws {RequiredError} * @memberof DefaultApi */ - public petsFilteredPatch(petByAgePetByType?: PetByAge | PetByType, options?: any) { + public petsFilteredPatch(petByAgePetByType?: PetByAge | PetByType, options?: AxiosRequestConfig) { return DefaultApiFp(this.configuration).petsFilteredPatch(petByAgePetByType, options).then((request) => request(this.axios, this.basePath)); } @@ -404,7 +404,7 @@ export class DefaultApi extends BaseAPI { * @throws {RequiredError} * @memberof DefaultApi */ - public petsPatch(catDog?: Cat | Dog, options?: any) { + public petsPatch(catDog?: Cat | Dog, options?: AxiosRequestConfig) { return DefaultApiFp(this.configuration).petsPatch(catDog, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts b/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts index ce4043f006b..316a0beeecf 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts @@ -16,7 +16,7 @@ import { Configuration } from "./configuration"; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; export const BASE_PATH = "http://api.example.xyz/v1".replace(/\/+$/, ""); @@ -38,7 +38,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: any; + options: AxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/default/api.ts b/samples/client/petstore/typescript-axios/builds/default/api.ts index 0ce81cf1174..094dfebb9fc 100644 --- a/samples/client/petstore/typescript-axios/builds/default/api.ts +++ b/samples/client/petstore/typescript-axios/builds/default/api.ts @@ -14,7 +14,7 @@ import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; @@ -32,19 +32,19 @@ export interface ApiResponse { * @type {number} * @memberof ApiResponse */ - code?: number; + 'code'?: number; /** * * @type {string} * @memberof ApiResponse */ - type?: string; + 'type'?: string; /** * * @type {string} * @memberof ApiResponse */ - message?: string; + 'message'?: string; } /** * A category for a pet @@ -57,13 +57,13 @@ export interface Category { * @type {number} * @memberof Category */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof Category */ - name?: string; + 'name'?: string; } /** * An order for a pets from the pet store @@ -76,37 +76,37 @@ export interface Order { * @type {number} * @memberof Order */ - id?: number; + 'id'?: number; /** * * @type {number} * @memberof Order */ - petId?: number; + 'petId'?: number; /** * * @type {number} * @memberof Order */ - quantity?: number; + 'quantity'?: number; /** * * @type {string} * @memberof Order */ - shipDate?: string; + 'shipDate'?: string; /** * Order Status * @type {string} * @memberof Order */ - status?: OrderStatusEnum; + 'status'?: OrderStatusEnum; /** * * @type {boolean} * @memberof Order */ - complete?: boolean; + 'complete'?: boolean; } /** @@ -130,37 +130,37 @@ export interface Pet { * @type {number} * @memberof Pet */ - id?: number; + 'id'?: number; /** * * @type {Category} * @memberof Pet */ - category?: Category; + 'category'?: Category; /** * * @type {string} * @memberof Pet */ - name: string; + 'name': string; /** * * @type {Array} * @memberof Pet */ - photoUrls: Array; + 'photoUrls': Array; /** * * @type {Array} * @memberof Pet */ - tags?: Array; + 'tags'?: Array; /** * pet status in the store * @type {string} * @memberof Pet */ - status?: PetStatusEnum; + 'status'?: PetStatusEnum; } /** @@ -184,13 +184,13 @@ export interface Tag { * @type {number} * @memberof Tag */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof Tag */ - name?: string; + 'name'?: string; } /** * A User who is purchasing from the pet store @@ -203,49 +203,49 @@ export interface User { * @type {number} * @memberof User */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof User */ - username?: string; + 'username'?: string; /** * * @type {string} * @memberof User */ - firstName?: string; + 'firstName'?: string; /** * * @type {string} * @memberof User */ - lastName?: string; + 'lastName'?: string; /** * * @type {string} * @memberof User */ - email?: string; + 'email'?: string; /** * * @type {string} * @memberof User */ - password?: string; + 'password'?: string; /** * * @type {string} * @memberof User */ - phone?: string; + 'phone'?: string; /** * User Status * @type {number} * @memberof User */ - userStatus?: number; + 'userStatus'?: number; } /** @@ -261,7 +261,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: any = {}): Promise => { + addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -302,7 +302,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -344,7 +344,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise => { + findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -386,7 +386,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: any = {}): Promise => { + findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -427,7 +427,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: any = {}): Promise => { + getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -464,7 +464,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: any = {}): Promise => { + updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -506,7 +506,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -558,7 +558,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -618,7 +618,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -630,7 +630,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -641,7 +641,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -653,7 +653,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -664,7 +664,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -675,7 +675,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -688,7 +688,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -701,7 +701,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -819,7 +819,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(body: Pet, options?: any) { + public addPet(body: Pet, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -832,7 +832,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: any) { + public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -844,7 +844,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) { + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -857,7 +857,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: any) { + public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -869,7 +869,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: any) { + public getPetById(petId: number, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -881,7 +881,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(body: Pet, options?: any) { + public updatePet(body: Pet, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -895,7 +895,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -909,7 +909,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) { + public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } @@ -928,7 +928,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: any = {}): Promise => { + deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -961,7 +961,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: any = {}): Promise => { + getInventory: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -995,7 +995,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: any = {}): Promise => { + getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1029,7 +1029,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body: Order, options: any = {}): Promise => { + placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('placeOrder', 'body', body) const localVarPath = `/store/order`; @@ -1075,7 +1075,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1085,7 +1085,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1096,7 +1096,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1107,7 +1107,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1178,7 +1178,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: any) { + public deleteOrder(orderId: string, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1189,7 +1189,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: any) { + public getInventory(options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1201,7 +1201,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: any) { + public getOrderById(orderId: number, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1213,7 +1213,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(body: Order, options?: any) { + public placeOrder(body: Order, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } } @@ -1232,7 +1232,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: any = {}): Promise => { + createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -1268,7 +1268,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: any = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -1304,7 +1304,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: any = {}): Promise => { + createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -1340,7 +1340,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: any = {}): Promise => { + deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1374,7 +1374,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: any = {}): Promise => { + getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1409,7 +1409,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: any = {}): Promise => { + loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1451,7 +1451,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: any = {}): Promise => { + logoutUser: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1483,7 +1483,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: any = {}): Promise => { + updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -1532,7 +1532,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1543,7 +1543,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1554,7 +1554,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1565,7 +1565,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1576,7 +1576,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1588,7 +1588,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1598,7 +1598,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1610,7 +1610,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1723,7 +1723,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(body: User, options?: any) { + public createUser(body: User, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1735,7 +1735,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(body: Array, options?: any) { + public createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1747,7 +1747,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(body: Array, options?: any) { + public createUsersWithListInput(body: Array, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1759,7 +1759,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: any) { + public deleteUser(username: string, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1771,7 +1771,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: any) { + public getUserByName(username: string, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1784,7 +1784,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: any) { + public loginUser(username: string, password: string, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -1795,7 +1795,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: any) { + public logoutUser(options?: AxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -1808,7 +1808,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, body: User, options?: any) { + public updateUser(username: string, body: User, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/default/base.ts b/samples/client/petstore/typescript-axios/builds/default/base.ts index c7eaf57bf47..e23d972eeb0 100644 --- a/samples/client/petstore/typescript-axios/builds/default/base.ts +++ b/samples/client/petstore/typescript-axios/builds/default/base.ts @@ -16,7 +16,7 @@ import { Configuration } from "./configuration"; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -38,7 +38,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: any; + options: AxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/api.ts b/samples/client/petstore/typescript-axios/builds/es6-target/api.ts index 0ce81cf1174..094dfebb9fc 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/api.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/api.ts @@ -14,7 +14,7 @@ import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; @@ -32,19 +32,19 @@ export interface ApiResponse { * @type {number} * @memberof ApiResponse */ - code?: number; + 'code'?: number; /** * * @type {string} * @memberof ApiResponse */ - type?: string; + 'type'?: string; /** * * @type {string} * @memberof ApiResponse */ - message?: string; + 'message'?: string; } /** * A category for a pet @@ -57,13 +57,13 @@ export interface Category { * @type {number} * @memberof Category */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof Category */ - name?: string; + 'name'?: string; } /** * An order for a pets from the pet store @@ -76,37 +76,37 @@ export interface Order { * @type {number} * @memberof Order */ - id?: number; + 'id'?: number; /** * * @type {number} * @memberof Order */ - petId?: number; + 'petId'?: number; /** * * @type {number} * @memberof Order */ - quantity?: number; + 'quantity'?: number; /** * * @type {string} * @memberof Order */ - shipDate?: string; + 'shipDate'?: string; /** * Order Status * @type {string} * @memberof Order */ - status?: OrderStatusEnum; + 'status'?: OrderStatusEnum; /** * * @type {boolean} * @memberof Order */ - complete?: boolean; + 'complete'?: boolean; } /** @@ -130,37 +130,37 @@ export interface Pet { * @type {number} * @memberof Pet */ - id?: number; + 'id'?: number; /** * * @type {Category} * @memberof Pet */ - category?: Category; + 'category'?: Category; /** * * @type {string} * @memberof Pet */ - name: string; + 'name': string; /** * * @type {Array} * @memberof Pet */ - photoUrls: Array; + 'photoUrls': Array; /** * * @type {Array} * @memberof Pet */ - tags?: Array; + 'tags'?: Array; /** * pet status in the store * @type {string} * @memberof Pet */ - status?: PetStatusEnum; + 'status'?: PetStatusEnum; } /** @@ -184,13 +184,13 @@ export interface Tag { * @type {number} * @memberof Tag */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof Tag */ - name?: string; + 'name'?: string; } /** * A User who is purchasing from the pet store @@ -203,49 +203,49 @@ export interface User { * @type {number} * @memberof User */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof User */ - username?: string; + 'username'?: string; /** * * @type {string} * @memberof User */ - firstName?: string; + 'firstName'?: string; /** * * @type {string} * @memberof User */ - lastName?: string; + 'lastName'?: string; /** * * @type {string} * @memberof User */ - email?: string; + 'email'?: string; /** * * @type {string} * @memberof User */ - password?: string; + 'password'?: string; /** * * @type {string} * @memberof User */ - phone?: string; + 'phone'?: string; /** * User Status * @type {number} * @memberof User */ - userStatus?: number; + 'userStatus'?: number; } /** @@ -261,7 +261,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: any = {}): Promise => { + addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -302,7 +302,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -344,7 +344,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise => { + findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -386,7 +386,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: any = {}): Promise => { + findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -427,7 +427,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: any = {}): Promise => { + getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -464,7 +464,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: any = {}): Promise => { + updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -506,7 +506,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -558,7 +558,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -618,7 +618,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -630,7 +630,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -641,7 +641,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -653,7 +653,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -664,7 +664,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -675,7 +675,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -688,7 +688,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -701,7 +701,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -819,7 +819,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(body: Pet, options?: any) { + public addPet(body: Pet, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -832,7 +832,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: any) { + public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -844,7 +844,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) { + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -857,7 +857,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: any) { + public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -869,7 +869,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: any) { + public getPetById(petId: number, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -881,7 +881,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(body: Pet, options?: any) { + public updatePet(body: Pet, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -895,7 +895,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -909,7 +909,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) { + public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } @@ -928,7 +928,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: any = {}): Promise => { + deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -961,7 +961,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: any = {}): Promise => { + getInventory: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -995,7 +995,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: any = {}): Promise => { + getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1029,7 +1029,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body: Order, options: any = {}): Promise => { + placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('placeOrder', 'body', body) const localVarPath = `/store/order`; @@ -1075,7 +1075,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1085,7 +1085,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1096,7 +1096,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1107,7 +1107,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1178,7 +1178,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: any) { + public deleteOrder(orderId: string, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1189,7 +1189,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: any) { + public getInventory(options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1201,7 +1201,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: any) { + public getOrderById(orderId: number, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1213,7 +1213,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(body: Order, options?: any) { + public placeOrder(body: Order, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } } @@ -1232,7 +1232,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: any = {}): Promise => { + createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -1268,7 +1268,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: any = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -1304,7 +1304,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: any = {}): Promise => { + createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -1340,7 +1340,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: any = {}): Promise => { + deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1374,7 +1374,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: any = {}): Promise => { + getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1409,7 +1409,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: any = {}): Promise => { + loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1451,7 +1451,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: any = {}): Promise => { + logoutUser: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1483,7 +1483,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: any = {}): Promise => { + updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -1532,7 +1532,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1543,7 +1543,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1554,7 +1554,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1565,7 +1565,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1576,7 +1576,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1588,7 +1588,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1598,7 +1598,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1610,7 +1610,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1723,7 +1723,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(body: User, options?: any) { + public createUser(body: User, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1735,7 +1735,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(body: Array, options?: any) { + public createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1747,7 +1747,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(body: Array, options?: any) { + public createUsersWithListInput(body: Array, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1759,7 +1759,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: any) { + public deleteUser(username: string, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1771,7 +1771,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: any) { + public getUserByName(username: string, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1784,7 +1784,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: any) { + public loginUser(username: string, password: string, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -1795,7 +1795,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: any) { + public logoutUser(options?: AxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -1808,7 +1808,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, body: User, options?: any) { + public updateUser(username: string, body: User, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/base.ts b/samples/client/petstore/typescript-axios/builds/es6-target/base.ts index c7eaf57bf47..e23d972eeb0 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/base.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/base.ts @@ -16,7 +16,7 @@ import { Configuration } from "./configuration"; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -38,7 +38,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: any; + options: AxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/.gitignore b/samples/client/petstore/typescript-axios/builds/test-petstore/.gitignore new file mode 100644 index 00000000000..149b5765472 --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/.npmignore b/samples/client/petstore/typescript-axios/builds/test-petstore/.npmignore new file mode 100644 index 00000000000..999d88df693 --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator-ignore b/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator-ignore new file mode 100644 index 00000000000..7484ee590a3 --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/FILES b/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/FILES new file mode 100644 index 00000000000..a80cd4f07b0 --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/FILES @@ -0,0 +1,8 @@ +.gitignore +.npmignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION new file mode 100644 index 00000000000..4b448de535c --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts new file mode 100644 index 00000000000..5a6a0ea393c --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts @@ -0,0 +1,5035 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * + * @export + * @interface AdditionalPropertiesClass + */ +export interface AdditionalPropertiesClass { + /** + * + * @type {{ [key: string]: string; }} + * @memberof AdditionalPropertiesClass + */ + 'map_property'?: { [key: string]: string; }; + /** + * + * @type {{ [key: string]: { [key: string]: string; }; }} + * @memberof AdditionalPropertiesClass + */ + 'map_of_map_property'?: { [key: string]: { [key: string]: string; }; }; + /** + * + * @type {any} + * @memberof AdditionalPropertiesClass + */ + 'anytype_1'?: any; + /** + * + * @type {object} + * @memberof AdditionalPropertiesClass + */ + 'map_with_undeclared_properties_anytype_1'?: object; + /** + * + * @type {object} + * @memberof AdditionalPropertiesClass + */ + 'map_with_undeclared_properties_anytype_2'?: object; + /** + * + * @type {{ [key: string]: object; }} + * @memberof AdditionalPropertiesClass + */ + 'map_with_undeclared_properties_anytype_3'?: { [key: string]: object; }; + /** + * an object with no declared properties and no undeclared properties, hence it\'s an empty map. + * @type {object} + * @memberof AdditionalPropertiesClass + */ + 'empty_map'?: object; + /** + * + * @type {{ [key: string]: string; }} + * @memberof AdditionalPropertiesClass + */ + 'map_with_undeclared_properties_string'?: { [key: string]: string; }; +} +/** + * + * @export + * @interface Animal + */ +export interface Animal { + /** + * + * @type {string} + * @memberof Animal + */ + 'className': string; + /** + * + * @type {string} + * @memberof Animal + */ + 'color'?: string; +} +/** + * + * @export + * @interface ApiResponse + */ +export interface ApiResponse { + /** + * + * @type {number} + * @memberof ApiResponse + */ + 'code'?: number; + /** + * + * @type {string} + * @memberof ApiResponse + */ + 'type'?: string; + /** + * + * @type {string} + * @memberof ApiResponse + */ + 'message'?: string; +} +/** + * + * @export + * @interface Apple + */ +export interface Apple { + /** + * + * @type {string} + * @memberof Apple + */ + 'cultivar'?: string; + /** + * + * @type {string} + * @memberof Apple + */ + 'origin'?: string; +} +/** + * + * @export + * @interface AppleReq + */ +export interface AppleReq { + /** + * + * @type {string} + * @memberof AppleReq + */ + 'cultivar': string; + /** + * + * @type {boolean} + * @memberof AppleReq + */ + 'mealy'?: boolean; +} +/** + * + * @export + * @interface ArrayOfArrayOfNumberOnly + */ +export interface ArrayOfArrayOfNumberOnly { + /** + * + * @type {Array>} + * @memberof ArrayOfArrayOfNumberOnly + */ + 'ArrayArrayNumber'?: Array>; +} +/** + * + * @export + * @interface ArrayOfNumberOnly + */ +export interface ArrayOfNumberOnly { + /** + * + * @type {Array} + * @memberof ArrayOfNumberOnly + */ + 'ArrayNumber'?: Array; +} +/** + * + * @export + * @interface ArrayTest + */ +export interface ArrayTest { + /** + * + * @type {Array} + * @memberof ArrayTest + */ + 'array_of_string'?: Array; + /** + * + * @type {Array>} + * @memberof ArrayTest + */ + 'array_array_of_integer'?: Array>; + /** + * + * @type {Array>} + * @memberof ArrayTest + */ + 'array_array_of_model'?: Array>; +} +/** + * + * @export + * @interface Banana + */ +export interface Banana { + /** + * + * @type {number} + * @memberof Banana + */ + 'lengthCm'?: number; +} +/** + * + * @export + * @interface BananaReq + */ +export interface BananaReq { + /** + * + * @type {number} + * @memberof BananaReq + */ + 'lengthCm': number; + /** + * + * @type {boolean} + * @memberof BananaReq + */ + 'sweet'?: boolean; +} +/** + * + * @export + * @interface BasquePig + */ +export interface BasquePig { + /** + * + * @type {string} + * @memberof BasquePig + */ + 'className': string; +} +/** + * + * @export + * @interface Capitalization + */ +export interface Capitalization { + /** + * + * @type {string} + * @memberof Capitalization + */ + 'smallCamel'?: string; + /** + * + * @type {string} + * @memberof Capitalization + */ + 'CapitalCamel'?: string; + /** + * + * @type {string} + * @memberof Capitalization + */ + 'small_Snake'?: string; + /** + * + * @type {string} + * @memberof Capitalization + */ + 'Capital_Snake'?: string; + /** + * + * @type {string} + * @memberof Capitalization + */ + 'SCA_ETH_Flow_Points'?: string; + /** + * Name of the pet + * @type {string} + * @memberof Capitalization + */ + 'ATT_NAME'?: string; +} +/** + * + * @export + * @interface Cat + */ +export interface Cat extends Animal { + /** + * + * @type {boolean} + * @memberof Cat + */ + 'declawed'?: boolean; +} +/** + * + * @export + * @interface CatAllOf + */ +export interface CatAllOf { + /** + * + * @type {boolean} + * @memberof CatAllOf + */ + 'declawed'?: boolean; +} +/** + * + * @export + * @interface Category + */ +export interface Category { + /** + * + * @type {number} + * @memberof Category + */ + 'id'?: number; + /** + * + * @type {string} + * @memberof Category + */ + 'name': string; +} +/** + * + * @export + * @interface ChildCat + */ +export interface ChildCat extends ParentPet { + /** + * + * @type {string} + * @memberof ChildCat + */ + 'name'?: string; + /** + * + * @type {string} + * @memberof ChildCat + */ + 'pet_type': ChildCatPetTypeEnum; +} + +/** + * @export + * @enum {string} + */ +export enum ChildCatPetTypeEnum { + ChildCat = 'ChildCat' +} + +/** + * + * @export + * @interface ChildCatAllOf + */ +export interface ChildCatAllOf { + /** + * + * @type {string} + * @memberof ChildCatAllOf + */ + 'name'?: string; + /** + * + * @type {string} + * @memberof ChildCatAllOf + */ + 'pet_type'?: ChildCatAllOfPetTypeEnum; +} + +/** + * @export + * @enum {string} + */ +export enum ChildCatAllOfPetTypeEnum { + ChildCat = 'ChildCat' +} + +/** + * Model for testing model with \"_class\" property + * @export + * @interface ClassModel + */ +export interface ClassModel { + /** + * + * @type {string} + * @memberof ClassModel + */ + '_class'?: string; +} +/** + * + * @export + * @interface Client + */ +export interface Client { + /** + * + * @type {string} + * @memberof Client + */ + 'client'?: string; +} +/** + * + * @export + * @interface ComplexQuadrilateral + */ +export interface ComplexQuadrilateral { + /** + * + * @type {string} + * @memberof ComplexQuadrilateral + */ + 'shapeType': string; + /** + * + * @type {string} + * @memberof ComplexQuadrilateral + */ + 'quadrilateralType': string; +} +/** + * + * @export + * @interface DanishPig + */ +export interface DanishPig { + /** + * + * @type {string} + * @memberof DanishPig + */ + 'className': string; +} +/** + * + * @export + * @interface DeprecatedObject + */ +export interface DeprecatedObject { + /** + * + * @type {string} + * @memberof DeprecatedObject + */ + 'name'?: string; +} +/** + * + * @export + * @interface Dog + */ +export interface Dog extends Animal { + /** + * + * @type {string} + * @memberof Dog + */ + 'breed'?: string; +} +/** + * + * @export + * @interface DogAllOf + */ +export interface DogAllOf { + /** + * + * @type {string} + * @memberof DogAllOf + */ + 'breed'?: string; +} +/** + * + * @export + * @interface Drawing + */ +export interface Drawing { + [key: string]: Fruit | any; + + /** + * + * @type {Shape} + * @memberof Drawing + */ + 'mainShape'?: Shape; + /** + * + * @type {ShapeOrNull} + * @memberof Drawing + */ + 'shapeOrNull'?: ShapeOrNull; + /** + * + * @type {NullableShape} + * @memberof Drawing + */ + 'nullableShape'?: NullableShape | null; + /** + * + * @type {Array} + * @memberof Drawing + */ + 'shapes'?: Array; +} +/** + * + * @export + * @interface EnumArrays + */ +export interface EnumArrays { + /** + * + * @type {string} + * @memberof EnumArrays + */ + 'just_symbol'?: EnumArraysJustSymbolEnum; + /** + * + * @type {Array} + * @memberof EnumArrays + */ + 'array_enum'?: Array; +} + +/** + * @export + * @enum {string} + */ +export enum EnumArraysJustSymbolEnum { + GreaterThanOrEqualTo = '>=', + Dollar = '$' +} +/** + * @export + * @enum {string} + */ +export enum EnumArraysArrayEnumEnum { + Fish = 'fish', + Crab = 'crab' +} + +/** + * + * @export + * @enum {string} + */ + +export enum EnumClass { + Abc = '_abc', + Efg = '-efg', + Xyz = '(xyz)' +} + +/** + * + * @export + * @interface EnumTest + */ +export interface EnumTest { + /** + * + * @type {string} + * @memberof EnumTest + */ + 'enum_string'?: EnumTestEnumStringEnum; + /** + * + * @type {string} + * @memberof EnumTest + */ + 'enum_string_required': EnumTestEnumStringRequiredEnum; + /** + * + * @type {number} + * @memberof EnumTest + */ + 'enum_integer'?: EnumTestEnumIntegerEnum; + /** + * + * @type {number} + * @memberof EnumTest + */ + 'enum_integer_only'?: EnumTestEnumIntegerOnlyEnum; + /** + * + * @type {number} + * @memberof EnumTest + */ + 'enum_number'?: EnumTestEnumNumberEnum; + /** + * + * @type {OuterEnum} + * @memberof EnumTest + */ + 'outerEnum'?: OuterEnum | null; + /** + * + * @type {OuterEnumInteger} + * @memberof EnumTest + */ + 'outerEnumInteger'?: OuterEnumInteger; + /** + * + * @type {OuterEnumDefaultValue} + * @memberof EnumTest + */ + 'outerEnumDefaultValue'?: OuterEnumDefaultValue; + /** + * + * @type {OuterEnumIntegerDefaultValue} + * @memberof EnumTest + */ + 'outerEnumIntegerDefaultValue'?: OuterEnumIntegerDefaultValue; +} + +/** + * @export + * @enum {string} + */ +export enum EnumTestEnumStringEnum { + Upper = 'UPPER', + Lower = 'lower', + Empty = '' +} +/** + * @export + * @enum {string} + */ +export enum EnumTestEnumStringRequiredEnum { + Upper = 'UPPER', + Lower = 'lower', + Empty = '' +} +/** + * @export + * @enum {string} + */ +export enum EnumTestEnumIntegerEnum { + NUMBER_1 = 1, + NUMBER_MINUS_1 = -1 +} +/** + * @export + * @enum {string} + */ +export enum EnumTestEnumIntegerOnlyEnum { + NUMBER_2 = 2, + NUMBER_MINUS_2 = -2 +} +/** + * @export + * @enum {string} + */ +export enum EnumTestEnumNumberEnum { + NUMBER_1_DOT_1 = 1.1, + NUMBER_MINUS_1_DOT_2 = -1.2 +} + +/** + * + * @export + * @interface EquilateralTriangle + */ +export interface EquilateralTriangle { + /** + * + * @type {string} + * @memberof EquilateralTriangle + */ + 'shapeType': string; + /** + * + * @type {string} + * @memberof EquilateralTriangle + */ + 'triangleType': string; +} +/** + * + * @export + * @interface FileSchemaTestClass + */ +export interface FileSchemaTestClass { + /** + * + * @type {any} + * @memberof FileSchemaTestClass + */ + 'file'?: any; + /** + * + * @type {Array} + * @memberof FileSchemaTestClass + */ + 'files'?: Array; +} +/** + * + * @export + * @interface Foo + */ +export interface Foo { + /** + * + * @type {string} + * @memberof Foo + */ + 'bar'?: string; +} +/** + * + * @export + * @interface FormatTest + */ +export interface FormatTest { + /** + * + * @type {number} + * @memberof FormatTest + */ + 'integer'?: number; + /** + * + * @type {number} + * @memberof FormatTest + */ + 'int32'?: number; + /** + * + * @type {number} + * @memberof FormatTest + */ + 'int64'?: number; + /** + * + * @type {number} + * @memberof FormatTest + */ + 'number': number; + /** + * + * @type {number} + * @memberof FormatTest + */ + 'float'?: number; + /** + * + * @type {number} + * @memberof FormatTest + */ + 'double'?: number; + /** + * + * @type {Decimal} + * @memberof FormatTest + */ + 'decimal'?: Decimal; + /** + * + * @type {string} + * @memberof FormatTest + */ + 'string'?: string; + /** + * + * @type {string} + * @memberof FormatTest + */ + 'byte': string; + /** + * + * @type {any} + * @memberof FormatTest + */ + 'binary'?: any; + /** + * + * @type {string} + * @memberof FormatTest + */ + 'date': string; + /** + * + * @type {string} + * @memberof FormatTest + */ + 'dateTime'?: string; + /** + * + * @type {string} + * @memberof FormatTest + */ + 'uuid'?: string; + /** + * + * @type {string} + * @memberof FormatTest + */ + 'password': string; + /** + * A string that is a 10 digit number. Can have leading zeros. + * @type {string} + * @memberof FormatTest + */ + 'pattern_with_digits'?: string; + /** + * A string starting with \'image_\' (case insensitive) and one to three digits following i.e. Image_01. + * @type {string} + * @memberof FormatTest + */ + 'pattern_with_digits_and_delimiter'?: string; +} +/** + * @type Fruit + * @export + */ +export type Fruit = Apple | Banana; + +/** + * @type FruitReq + * @export + */ +export type FruitReq = AppleReq | BananaReq | Null; + +/** + * + * @export + * @interface GmFruit + */ +export interface GmFruit { + /** + * + * @type {string} + * @memberof GmFruit + */ + 'color'?: string; + /** + * + * @type {string} + * @memberof GmFruit + */ + 'cultivar'?: string; + /** + * + * @type {string} + * @memberof GmFruit + */ + 'origin'?: string; + /** + * + * @type {number} + * @memberof GmFruit + */ + 'lengthCm'?: number; +} +/** + * + * @export + * @interface GrandparentAnimal + */ +export interface GrandparentAnimal { + /** + * + * @type {string} + * @memberof GrandparentAnimal + */ + 'pet_type': string; +} +/** + * + * @export + * @interface HasOnlyReadOnly + */ +export interface HasOnlyReadOnly { + /** + * + * @type {string} + * @memberof HasOnlyReadOnly + */ + 'bar'?: string; + /** + * + * @type {string} + * @memberof HasOnlyReadOnly + */ + 'foo'?: string; +} +/** + * Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + * @export + * @interface HealthCheckResult + */ +export interface HealthCheckResult { + /** + * + * @type {string} + * @memberof HealthCheckResult + */ + 'NullableMessage'?: string | null; +} +/** + * + * @export + * @interface InlineResponseDefault + */ +export interface InlineResponseDefault { + /** + * + * @type {Foo} + * @memberof InlineResponseDefault + */ + 'string'?: Foo; +} +/** + * + * @export + * @interface IsoscelesTriangle + */ +export interface IsoscelesTriangle { + /** + * + * @type {string} + * @memberof IsoscelesTriangle + */ + 'shapeType': string; + /** + * + * @type {string} + * @memberof IsoscelesTriangle + */ + 'triangleType': string; +} +/** + * + * @export + * @interface List + */ +export interface List { + /** + * + * @type {string} + * @memberof List + */ + '123-list'?: string; +} +/** + * @type Mammal + * @export + */ +export type Mammal = Pig | Whale | Zebra; + +/** + * + * @export + * @interface MapTest + */ +export interface MapTest { + /** + * + * @type {{ [key: string]: { [key: string]: string; }; }} + * @memberof MapTest + */ + 'map_map_of_string'?: { [key: string]: { [key: string]: string; }; }; + /** + * + * @type {{ [key: string]: string; }} + * @memberof MapTest + */ + 'map_of_enum_string'?: { [key: string]: string; }; + /** + * + * @type {{ [key: string]: boolean; }} + * @memberof MapTest + */ + 'direct_map'?: { [key: string]: boolean; }; + /** + * + * @type {{ [key: string]: boolean; }} + * @memberof MapTest + */ + 'indirect_map'?: { [key: string]: boolean; }; +} + +/** + * @export + * @enum {string} + */ +export enum MapTestMapOfEnumStringEnum { + Upper = 'UPPER', + Lower = 'lower' +} + +/** + * + * @export + * @interface MixedPropertiesAndAdditionalPropertiesClass + */ +export interface MixedPropertiesAndAdditionalPropertiesClass { + /** + * + * @type {string} + * @memberof MixedPropertiesAndAdditionalPropertiesClass + */ + 'uuid'?: string; + /** + * + * @type {string} + * @memberof MixedPropertiesAndAdditionalPropertiesClass + */ + 'dateTime'?: string; + /** + * + * @type {{ [key: string]: Animal; }} + * @memberof MixedPropertiesAndAdditionalPropertiesClass + */ + 'map'?: { [key: string]: Animal; }; +} +/** + * Model for testing model name starting with number + * @export + * @interface Model200Response + */ +export interface Model200Response { + /** + * + * @type {number} + * @memberof Model200Response + */ + 'name'?: number; + /** + * + * @type {string} + * @memberof Model200Response + */ + 'class'?: string; +} +/** + * Must be named `File` for test. + * @export + * @interface ModelFile + */ +export interface ModelFile { + /** + * Test capitalization + * @type {string} + * @memberof ModelFile + */ + 'sourceURI'?: string; +} +/** + * Model for testing model name same as property name + * @export + * @interface Name + */ +export interface Name { + /** + * + * @type {number} + * @memberof Name + */ + 'name': number; + /** + * + * @type {number} + * @memberof Name + */ + 'snake_case'?: number; + /** + * + * @type {string} + * @memberof Name + */ + 'property'?: string; + /** + * + * @type {number} + * @memberof Name + */ + '123Number'?: number; +} +/** + * + * @export + * @interface NullableClass + */ +export interface NullableClass { + [key: string]: object | any; + + /** + * + * @type {number} + * @memberof NullableClass + */ + 'integer_prop'?: number | null; + /** + * + * @type {number} + * @memberof NullableClass + */ + 'number_prop'?: number | null; + /** + * + * @type {boolean} + * @memberof NullableClass + */ + 'boolean_prop'?: boolean | null; + /** + * + * @type {string} + * @memberof NullableClass + */ + 'string_prop'?: string | null; + /** + * + * @type {string} + * @memberof NullableClass + */ + 'date_prop'?: string | null; + /** + * + * @type {string} + * @memberof NullableClass + */ + 'datetime_prop'?: string | null; + /** + * + * @type {Array} + * @memberof NullableClass + */ + 'array_nullable_prop'?: Array | null; + /** + * + * @type {Array} + * @memberof NullableClass + */ + 'array_and_items_nullable_prop'?: Array | null; + /** + * + * @type {Array} + * @memberof NullableClass + */ + 'array_items_nullable'?: Array; + /** + * + * @type {{ [key: string]: object; }} + * @memberof NullableClass + */ + 'object_nullable_prop'?: { [key: string]: object; } | null; + /** + * + * @type {{ [key: string]: object; }} + * @memberof NullableClass + */ + 'object_and_items_nullable_prop'?: { [key: string]: object; } | null; + /** + * + * @type {{ [key: string]: object; }} + * @memberof NullableClass + */ + 'object_items_nullable'?: { [key: string]: object; }; +} +/** + * @type NullableShape + * The value may be a shape or the \'null\' value. The \'nullable\' attribute was introduced in OAS schema >= 3.0 and has been deprecated in OAS schema >= 3.1. + * @export + */ +export type NullableShape = Quadrilateral | Triangle; + +/** + * + * @export + * @interface NumberOnly + */ +export interface NumberOnly { + /** + * + * @type {number} + * @memberof NumberOnly + */ + 'JustNumber'?: number; +} +/** + * + * @export + * @interface ObjectWithDeprecatedFields + */ +export interface ObjectWithDeprecatedFields { + /** + * + * @type {string} + * @memberof ObjectWithDeprecatedFields + */ + 'uuid'?: string; + /** + * + * @type {number} + * @memberof ObjectWithDeprecatedFields + * @deprecated + */ + 'id'?: number; + /** + * + * @type {DeprecatedObject} + * @memberof ObjectWithDeprecatedFields + * @deprecated + */ + 'deprecatedRef'?: DeprecatedObject; + /** + * + * @type {Array} + * @memberof ObjectWithDeprecatedFields + * @deprecated + */ + 'bars'?: Array; +} +/** + * + * @export + * @interface Order + */ +export interface Order { + /** + * + * @type {number} + * @memberof Order + */ + 'id'?: number; + /** + * + * @type {number} + * @memberof Order + */ + 'petId'?: number; + /** + * + * @type {number} + * @memberof Order + */ + 'quantity'?: number; + /** + * + * @type {string} + * @memberof Order + */ + 'shipDate'?: string; + /** + * Order Status + * @type {string} + * @memberof Order + */ + 'status'?: OrderStatusEnum; + /** + * + * @type {boolean} + * @memberof Order + */ + 'complete'?: boolean; +} + +/** + * @export + * @enum {string} + */ +export enum OrderStatusEnum { + Placed = 'placed', + Approved = 'approved', + Delivered = 'delivered' +} + +/** + * + * @export + * @interface OuterComposite + */ +export interface OuterComposite { + /** + * + * @type {number} + * @memberof OuterComposite + */ + 'my_number'?: number; + /** + * + * @type {string} + * @memberof OuterComposite + */ + 'my_string'?: string; + /** + * + * @type {boolean} + * @memberof OuterComposite + */ + 'my_boolean'?: boolean; +} +/** + * + * @export + * @enum {string} + */ + +export enum OuterEnum { + Placed = 'placed', + Approved = 'approved', + Delivered = 'delivered' +} + +/** + * + * @export + * @enum {string} + */ + +export enum OuterEnumDefaultValue { + Placed = 'placed', + Approved = 'approved', + Delivered = 'delivered' +} + +/** + * + * @export + * @enum {string} + */ + +export enum OuterEnumInteger { + NUMBER_0 = 0, + NUMBER_1 = 1, + NUMBER_2 = 2 +} + +/** + * + * @export + * @enum {string} + */ + +export enum OuterEnumIntegerDefaultValue { + NUMBER_0 = 0, + NUMBER_1 = 1, + NUMBER_2 = 2 +} + +/** + * + * @export + * @interface ParentPet + */ +export interface ParentPet extends GrandparentAnimal { +} +/** + * + * @export + * @interface Pet + */ +export interface Pet { + /** + * + * @type {number} + * @memberof Pet + */ + 'id'?: number; + /** + * + * @type {Category} + * @memberof Pet + */ + 'category'?: Category; + /** + * + * @type {string} + * @memberof Pet + */ + 'name': string; + /** + * + * @type {Array} + * @memberof Pet + */ + 'photoUrls': Array; + /** + * + * @type {Array} + * @memberof Pet + */ + 'tags'?: Array; + /** + * pet status in the store + * @type {string} + * @memberof Pet + */ + 'status'?: PetStatusEnum; +} + +/** + * @export + * @enum {string} + */ +export enum PetStatusEnum { + Available = 'available', + Pending = 'pending', + Sold = 'sold' +} + +/** + * @type Pig + * @export + */ +export type Pig = BasquePig | DanishPig; + +/** + * @type Quadrilateral + * @export + */ +export type Quadrilateral = ComplexQuadrilateral | SimpleQuadrilateral; + +/** + * + * @export + * @interface QuadrilateralInterface + */ +export interface QuadrilateralInterface { + /** + * + * @type {string} + * @memberof QuadrilateralInterface + */ + 'quadrilateralType': string; +} +/** + * + * @export + * @interface ReadOnlyFirst + */ +export interface ReadOnlyFirst { + /** + * + * @type {string} + * @memberof ReadOnlyFirst + */ + 'bar'?: string; + /** + * + * @type {string} + * @memberof ReadOnlyFirst + */ + 'baz'?: string; +} +/** + * Model for testing reserved words + * @export + * @interface Return + */ +export interface Return { + /** + * + * @type {number} + * @memberof Return + */ + 'return'?: number; +} +/** + * + * @export + * @interface ScaleneTriangle + */ +export interface ScaleneTriangle { + /** + * + * @type {string} + * @memberof ScaleneTriangle + */ + 'shapeType': string; + /** + * + * @type {string} + * @memberof ScaleneTriangle + */ + 'triangleType': string; +} +/** + * @type Shape + * @export + */ +export type Shape = Quadrilateral | Triangle; + +/** + * + * @export + * @interface ShapeInterface + */ +export interface ShapeInterface { + /** + * + * @type {string} + * @memberof ShapeInterface + */ + 'shapeType': string; +} +/** + * @type ShapeOrNull + * The value may be a shape or the \'null\' value. This is introduced in OAS schema >= 3.1. + * @export + */ +export type ShapeOrNull = Null | Quadrilateral | Triangle; + +/** + * + * @export + * @interface SimpleQuadrilateral + */ +export interface SimpleQuadrilateral { + /** + * + * @type {string} + * @memberof SimpleQuadrilateral + */ + 'shapeType': string; + /** + * + * @type {string} + * @memberof SimpleQuadrilateral + */ + 'quadrilateralType': string; +} +/** + * + * @export + * @interface SpecialModelName + */ +export interface SpecialModelName { + /** + * + * @type {number} + * @memberof SpecialModelName + */ + '$special[property.name]'?: number; + /** + * + * @type {string} + * @memberof SpecialModelName + */ + '_special_model.name_'?: string; +} +/** + * + * @export + * @interface Tag + */ +export interface Tag { + /** + * + * @type {number} + * @memberof Tag + */ + 'id'?: number; + /** + * + * @type {string} + * @memberof Tag + */ + 'name'?: string; +} +/** + * @type Triangle + * @export + */ +export type Triangle = EquilateralTriangle | IsoscelesTriangle | ScaleneTriangle; + +/** + * + * @export + * @interface TriangleInterface + */ +export interface TriangleInterface { + /** + * + * @type {string} + * @memberof TriangleInterface + */ + 'triangleType': string; +} +/** + * + * @export + * @interface User + */ +export interface User { + /** + * + * @type {number} + * @memberof User + */ + 'id'?: number; + /** + * + * @type {string} + * @memberof User + */ + 'username'?: string; + /** + * + * @type {string} + * @memberof User + */ + 'firstName'?: string; + /** + * + * @type {string} + * @memberof User + */ + 'lastName'?: string; + /** + * + * @type {string} + * @memberof User + */ + 'email'?: string; + /** + * + * @type {string} + * @memberof User + */ + 'password'?: string; + /** + * + * @type {string} + * @memberof User + */ + 'phone'?: string; + /** + * User Status + * @type {number} + * @memberof User + */ + 'userStatus'?: number; + /** + * test code generation for objects Value must be a map of strings to values. It cannot be the \'null\' value. + * @type {object} + * @memberof User + */ + 'objectWithNoDeclaredProps'?: object; + /** + * test code generation for nullable objects. Value must be a map of strings to values or the \'null\' value. + * @type {object} + * @memberof User + */ + 'objectWithNoDeclaredPropsNullable'?: object | null; + /** + * test code generation for any type Here the \'type\' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 + * @type {any} + * @memberof User + */ + 'anyTypeProp'?: any; + /** + * test code generation for any type Here the \'type\' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The \'nullable\' attribute does not change the allowed values. + * @type {any} + * @memberof User + */ + 'anyTypePropNullable'?: any | null; +} +/** + * + * @export + * @interface Whale + */ +export interface Whale { + /** + * + * @type {boolean} + * @memberof Whale + */ + 'hasBaleen'?: boolean; + /** + * + * @type {boolean} + * @memberof Whale + */ + 'hasTeeth'?: boolean; + /** + * + * @type {string} + * @memberof Whale + */ + 'className': string; +} +/** + * + * @export + * @interface Zebra + */ +export interface Zebra { + [key: string]: object | any; + + /** + * + * @type {string} + * @memberof Zebra + */ + 'type'?: ZebraTypeEnum; + /** + * + * @type {string} + * @memberof Zebra + */ + 'className': string; +} + +/** + * @export + * @enum {string} + */ +export enum ZebraTypeEnum { + Plains = 'plains', + Mountain = 'mountain', + Grevys = 'grevys' +} + + +/** + * AnotherFakeApi - axios parameter creator + * @export + */ +export const AnotherFakeApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * To test special tags and operation ID starting with number + * @summary To test special tags + * @param {Client} client client model + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + _123testSpecialTags: async (client: Client, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'client' is not null or undefined + assertParamExists('_123testSpecialTags', 'client', client) + const localVarPath = `/another-fake/dummy`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(client, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AnotherFakeApi - functional programming interface + * @export + */ +export const AnotherFakeApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AnotherFakeApiAxiosParamCreator(configuration) + return { + /** + * To test special tags and operation ID starting with number + * @summary To test special tags + * @param {Client} client client model + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async _123testSpecialTags(client: Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator._123testSpecialTags(client, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * AnotherFakeApi - factory interface + * @export + */ +export const AnotherFakeApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AnotherFakeApiFp(configuration) + return { + /** + * To test special tags and operation ID starting with number + * @summary To test special tags + * @param {Client} client client model + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + _123testSpecialTags(client: Client, options?: any): AxiosPromise { + return localVarFp._123testSpecialTags(client, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AnotherFakeApi - object-oriented interface + * @export + * @class AnotherFakeApi + * @extends {BaseAPI} + */ +export class AnotherFakeApi extends BaseAPI { + /** + * To test special tags and operation ID starting with number + * @summary To test special tags + * @param {Client} client client model + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AnotherFakeApi + */ + public _123testSpecialTags(client: Client, options?: AxiosRequestConfig) { + return AnotherFakeApiFp(this.configuration)._123testSpecialTags(client, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * DefaultApi - axios parameter creator + * @export + */ +export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fooGet: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/foo`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * DefaultApi - functional programming interface + * @export + */ +export const DefaultApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fooGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fooGet(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * DefaultApi - factory interface + * @export + */ +export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = DefaultApiFp(configuration) + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fooGet(options?: any): AxiosPromise { + return localVarFp.fooGet(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * DefaultApi - object-oriented interface + * @export + * @class DefaultApi + * @extends {BaseAPI} + */ +export class DefaultApi extends BaseAPI { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public fooGet(options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).fooGet(options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * FakeApi - axios parameter creator + * @export + */ +export const FakeApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Health check endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fakeHealthGet: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/fake/health`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Test serialization of outer boolean types + * @param {boolean} [body] Input boolean as post body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fakeOuterBooleanSerialize: async (body?: boolean, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/fake/outer/boolean`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Test serialization of object with outer number type + * @param {OuterComposite} [outerComposite] Input composite as post body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fakeOuterCompositeSerialize: async (outerComposite?: OuterComposite, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/fake/outer/composite`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(outerComposite, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Test serialization of outer number types + * @param {number} [body] Input number as post body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fakeOuterNumberSerialize: async (body?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/fake/outer/number`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Test serialization of outer string types + * @param {string} [body] Input string as post body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fakeOuterStringSerialize: async (body?: string, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/fake/outer/string`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Array of Enums + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getArrayOfEnums: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/fake/array-of-enums`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * For this test, the body for this request much reference a schema named `File`. + * @param {FileSchemaTestClass} fileSchemaTestClass + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testBodyWithFileSchema: async (fileSchemaTestClass: FileSchemaTestClass, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'fileSchemaTestClass' is not null or undefined + assertParamExists('testBodyWithFileSchema', 'fileSchemaTestClass', fileSchemaTestClass) + const localVarPath = `/fake/body-with-file-schema`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(fileSchemaTestClass, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {string} query + * @param {User} user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testBodyWithQueryParams: async (query: string, user: User, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'query' is not null or undefined + assertParamExists('testBodyWithQueryParams', 'query', query) + // verify required parameter 'user' is not null or undefined + assertParamExists('testBodyWithQueryParams', 'user', user) + const localVarPath = `/fake/body-with-query-params`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (query !== undefined) { + localVarQueryParameter['query'] = query; + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * To test \"client\" model + * @summary To test \"client\" model + * @param {Client} client client model + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testClientModel: async (client: Client, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'client' is not null or undefined + assertParamExists('testClientModel', 'client', client) + const localVarPath = `/fake`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(client, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * @summary Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * @param {number} number None + * @param {number} _double None + * @param {string} patternWithoutDelimiter None + * @param {string} _byte None + * @param {number} [integer] None + * @param {number} [int32] None + * @param {number} [int64] None + * @param {number} [_float] None + * @param {string} [string] None + * @param {any} [binary] None + * @param {string} [date] None + * @param {string} [dateTime] None + * @param {string} [password] None + * @param {string} [callback] None + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testEndpointParameters: async (number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: any, date?: string, dateTime?: string, password?: string, callback?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'number' is not null or undefined + assertParamExists('testEndpointParameters', 'number', number) + // verify required parameter '_double' is not null or undefined + assertParamExists('testEndpointParameters', '_double', _double) + // verify required parameter 'patternWithoutDelimiter' is not null or undefined + assertParamExists('testEndpointParameters', 'patternWithoutDelimiter', patternWithoutDelimiter) + // verify required parameter '_byte' is not null or undefined + assertParamExists('testEndpointParameters', '_byte', _byte) + const localVarPath = `/fake`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + const localVarFormParams = new URLSearchParams(); + + // authentication http_basic_test required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + + if (integer !== undefined) { + localVarFormParams.set('integer', integer as any); + } + + if (int32 !== undefined) { + localVarFormParams.set('int32', int32 as any); + } + + if (int64 !== undefined) { + localVarFormParams.set('int64', int64 as any); + } + + if (number !== undefined) { + localVarFormParams.set('number', number as any); + } + + if (_float !== undefined) { + localVarFormParams.set('float', _float as any); + } + + if (_double !== undefined) { + localVarFormParams.set('double', _double as any); + } + + if (string !== undefined) { + localVarFormParams.set('string', string as any); + } + + if (patternWithoutDelimiter !== undefined) { + localVarFormParams.set('pattern_without_delimiter', patternWithoutDelimiter as any); + } + + if (_byte !== undefined) { + localVarFormParams.set('byte', _byte as any); + } + + if (binary !== undefined) { + localVarFormParams.set('binary', binary as any); + } + + if (date !== undefined) { + localVarFormParams.set('date', date as any); + } + + if (dateTime !== undefined) { + localVarFormParams.set('dateTime', dateTime as any); + } + + if (password !== undefined) { + localVarFormParams.set('password', password as any); + } + + if (callback !== undefined) { + localVarFormParams.set('callback', callback as any); + } + + + localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = localVarFormParams.toString(); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * To test enum parameters + * @summary To test enum parameters + * @param {Array<'>' | '$'>} [enumHeaderStringArray] Header parameter enum test (string array) + * @param {'_abc' | '-efg' | '(xyz)'} [enumHeaderString] Header parameter enum test (string) + * @param {Array<'>' | '$'>} [enumQueryStringArray] Query parameter enum test (string array) + * @param {'_abc' | '-efg' | '(xyz)'} [enumQueryString] Query parameter enum test (string) + * @param {1 | -2} [enumQueryInteger] Query parameter enum test (double) + * @param {1.1 | -1.2} [enumQueryDouble] Query parameter enum test (double) + * @param {Array} [enumFormStringArray] Form parameter enum test (string array) + * @param {string} [enumFormString] Form parameter enum test (string) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testEnumParameters: async (enumHeaderStringArray?: Array<'>' | '$'>, enumHeaderString?: '_abc' | '-efg' | '(xyz)', enumQueryStringArray?: Array<'>' | '$'>, enumQueryString?: '_abc' | '-efg' | '(xyz)', enumQueryInteger?: 1 | -2, enumQueryDouble?: 1.1 | -1.2, enumFormStringArray?: Array, enumFormString?: string, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/fake`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + const localVarFormParams = new URLSearchParams(); + + if (enumQueryStringArray) { + localVarQueryParameter['enum_query_string_array'] = enumQueryStringArray; + } + + if (enumQueryString !== undefined) { + localVarQueryParameter['enum_query_string'] = enumQueryString; + } + + if (enumQueryInteger !== undefined) { + localVarQueryParameter['enum_query_integer'] = enumQueryInteger; + } + + if (enumQueryDouble !== undefined) { + localVarQueryParameter['enum_query_double'] = enumQueryDouble; + } + + if (enumHeaderStringArray) { + let mapped = enumHeaderStringArray.map(value => ("Array<'>' | '$'>" !== "Array") ? JSON.stringify(value) : (value || "")); + localVarHeaderParameter['enum_header_string_array'] = mapped.join(COLLECTION_FORMATS["csv"]); + } + + if (enumHeaderString !== undefined && enumHeaderString !== null) { + localVarHeaderParameter['enum_header_string'] = String(enumHeaderString); + } + + if (enumFormStringArray) { + localVarFormParams.set('enum_form_string_array', enumFormStringArray.join(COLLECTION_FORMATS.csv)); + } + + + if (enumFormString !== undefined) { + localVarFormParams.set('enum_form_string', enumFormString as any); + } + + + localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = localVarFormParams.toString(); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fake endpoint to test group parameters (optional) + * @summary Fake endpoint to test group parameters (optional) + * @param {number} requiredStringGroup Required String in group parameters + * @param {boolean} requiredBooleanGroup Required Boolean in group parameters + * @param {number} requiredInt64Group Required Integer in group parameters + * @param {number} [stringGroup] String in group parameters + * @param {boolean} [booleanGroup] Boolean in group parameters + * @param {number} [int64Group] Integer in group parameters + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testGroupParameters: async (requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'requiredStringGroup' is not null or undefined + assertParamExists('testGroupParameters', 'requiredStringGroup', requiredStringGroup) + // verify required parameter 'requiredBooleanGroup' is not null or undefined + assertParamExists('testGroupParameters', 'requiredBooleanGroup', requiredBooleanGroup) + // verify required parameter 'requiredInt64Group' is not null or undefined + assertParamExists('testGroupParameters', 'requiredInt64Group', requiredInt64Group) + const localVarPath = `/fake`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer_test required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (requiredStringGroup !== undefined) { + localVarQueryParameter['required_string_group'] = requiredStringGroup; + } + + if (requiredInt64Group !== undefined) { + localVarQueryParameter['required_int64_group'] = requiredInt64Group; + } + + if (stringGroup !== undefined) { + localVarQueryParameter['string_group'] = stringGroup; + } + + if (int64Group !== undefined) { + localVarQueryParameter['int64_group'] = int64Group; + } + + if (requiredBooleanGroup !== undefined && requiredBooleanGroup !== null) { + localVarHeaderParameter['required_boolean_group'] = String(JSON.stringify(requiredBooleanGroup)); + } + + if (booleanGroup !== undefined && booleanGroup !== null) { + localVarHeaderParameter['boolean_group'] = String(JSON.stringify(booleanGroup)); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary test inline additionalProperties + * @param {{ [key: string]: string; }} requestBody request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testInlineAdditionalProperties: async (requestBody: { [key: string]: string; }, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'requestBody' is not null or undefined + assertParamExists('testInlineAdditionalProperties', 'requestBody', requestBody) + const localVarPath = `/fake/inline-additionalProperties`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(requestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary test json serialization of form data + * @param {string} param field1 + * @param {string} param2 field2 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testJsonFormData: async (param: string, param2: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'param' is not null or undefined + assertParamExists('testJsonFormData', 'param', param) + // verify required parameter 'param2' is not null or undefined + assertParamExists('testJsonFormData', 'param2', param2) + const localVarPath = `/fake/jsonFormData`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + const localVarFormParams = new URLSearchParams(); + + + if (param !== undefined) { + localVarFormParams.set('param', param as any); + } + + if (param2 !== undefined) { + localVarFormParams.set('param2', param2 as any); + } + + + localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = localVarFormParams.toString(); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * To test the collection format in query parameters + * @param {Array} pipe + * @param {Array} ioutil + * @param {Array} http + * @param {Array} url + * @param {Array} context + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testQueryParameterCollectionFormat: async (pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'pipe' is not null or undefined + assertParamExists('testQueryParameterCollectionFormat', 'pipe', pipe) + // verify required parameter 'ioutil' is not null or undefined + assertParamExists('testQueryParameterCollectionFormat', 'ioutil', ioutil) + // verify required parameter 'http' is not null or undefined + assertParamExists('testQueryParameterCollectionFormat', 'http', http) + // verify required parameter 'url' is not null or undefined + assertParamExists('testQueryParameterCollectionFormat', 'url', url) + // verify required parameter 'context' is not null or undefined + assertParamExists('testQueryParameterCollectionFormat', 'context', context) + const localVarPath = `/fake/test-query-parameters`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (pipe) { + localVarQueryParameter['pipe'] = pipe; + } + + if (ioutil) { + localVarQueryParameter['ioutil'] = ioutil.join(COLLECTION_FORMATS.csv); + } + + if (http) { + localVarQueryParameter['http'] = http.join(COLLECTION_FORMATS.ssv); + } + + if (url) { + localVarQueryParameter['url'] = url.join(COLLECTION_FORMATS.csv); + } + + if (context) { + localVarQueryParameter['context'] = context; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * FakeApi - functional programming interface + * @export + */ +export const FakeApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = FakeApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Health check endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fakeHealthGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fakeHealthGet(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Test serialization of outer boolean types + * @param {boolean} [body] Input boolean as post body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fakeOuterBooleanSerialize(body?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterBooleanSerialize(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Test serialization of object with outer number type + * @param {OuterComposite} [outerComposite] Input composite as post body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterCompositeSerialize(outerComposite, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Test serialization of outer number types + * @param {number} [body] Input number as post body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fakeOuterNumberSerialize(body?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterNumberSerialize(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Test serialization of outer string types + * @param {string} [body] Input string as post body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fakeOuterStringSerialize(body?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterStringSerialize(body, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Array of Enums + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getArrayOfEnums(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getArrayOfEnums(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * For this test, the body for this request much reference a schema named `File`. + * @param {FileSchemaTestClass} fileSchemaTestClass + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.testBodyWithFileSchema(fileSchemaTestClass, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @param {string} query + * @param {User} user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async testBodyWithQueryParams(query: string, user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.testBodyWithQueryParams(query, user, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * To test \"client\" model + * @summary To test \"client\" model + * @param {Client} client client model + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async testClientModel(client: Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.testClientModel(client, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * @summary Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * @param {number} number None + * @param {number} _double None + * @param {string} patternWithoutDelimiter None + * @param {string} _byte None + * @param {number} [integer] None + * @param {number} [int32] None + * @param {number} [int64] None + * @param {number} [_float] None + * @param {string} [string] None + * @param {any} [binary] None + * @param {string} [date] None + * @param {string} [dateTime] None + * @param {string} [password] None + * @param {string} [callback] None + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: any, date?: string, dateTime?: string, password?: string, callback?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, callback, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * To test enum parameters + * @summary To test enum parameters + * @param {Array<'>' | '$'>} [enumHeaderStringArray] Header parameter enum test (string array) + * @param {'_abc' | '-efg' | '(xyz)'} [enumHeaderString] Header parameter enum test (string) + * @param {Array<'>' | '$'>} [enumQueryStringArray] Query parameter enum test (string array) + * @param {'_abc' | '-efg' | '(xyz)'} [enumQueryString] Query parameter enum test (string) + * @param {1 | -2} [enumQueryInteger] Query parameter enum test (double) + * @param {1.1 | -1.2} [enumQueryDouble] Query parameter enum test (double) + * @param {Array} [enumFormStringArray] Form parameter enum test (string array) + * @param {string} [enumFormString] Form parameter enum test (string) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async testEnumParameters(enumHeaderStringArray?: Array<'>' | '$'>, enumHeaderString?: '_abc' | '-efg' | '(xyz)', enumQueryStringArray?: Array<'>' | '$'>, enumQueryString?: '_abc' | '-efg' | '(xyz)', enumQueryInteger?: 1 | -2, enumQueryDouble?: 1.1 | -1.2, enumFormStringArray?: Array, enumFormString?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Fake endpoint to test group parameters (optional) + * @summary Fake endpoint to test group parameters (optional) + * @param {number} requiredStringGroup Required String in group parameters + * @param {boolean} requiredBooleanGroup Required Boolean in group parameters + * @param {number} requiredInt64Group Required Integer in group parameters + * @param {number} [stringGroup] String in group parameters + * @param {boolean} [booleanGroup] Boolean in group parameters + * @param {number} [int64Group] Integer in group parameters + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary test inline additionalProperties + * @param {{ [key: string]: string; }} requestBody request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.testInlineAdditionalProperties(requestBody, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary test json serialization of form data + * @param {string} param field1 + * @param {string} param2 field2 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async testJsonFormData(param: string, param2: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.testJsonFormData(param, param2, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * To test the collection format in query parameters + * @param {Array} pipe + * @param {Array} ioutil + * @param {Array} http + * @param {Array} url + * @param {Array} context + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * FakeApi - factory interface + * @export + */ +export const FakeApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = FakeApiFp(configuration) + return { + /** + * + * @summary Health check endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fakeHealthGet(options?: any): AxiosPromise { + return localVarFp.fakeHealthGet(options).then((request) => request(axios, basePath)); + }, + /** + * Test serialization of outer boolean types + * @param {boolean} [body] Input boolean as post body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fakeOuterBooleanSerialize(body?: boolean, options?: any): AxiosPromise { + return localVarFp.fakeOuterBooleanSerialize(body, options).then((request) => request(axios, basePath)); + }, + /** + * Test serialization of object with outer number type + * @param {OuterComposite} [outerComposite] Input composite as post body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: any): AxiosPromise { + return localVarFp.fakeOuterCompositeSerialize(outerComposite, options).then((request) => request(axios, basePath)); + }, + /** + * Test serialization of outer number types + * @param {number} [body] Input number as post body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fakeOuterNumberSerialize(body?: number, options?: any): AxiosPromise { + return localVarFp.fakeOuterNumberSerialize(body, options).then((request) => request(axios, basePath)); + }, + /** + * Test serialization of outer string types + * @param {string} [body] Input string as post body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fakeOuterStringSerialize(body?: string, options?: any): AxiosPromise { + return localVarFp.fakeOuterStringSerialize(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Array of Enums + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getArrayOfEnums(options?: any): AxiosPromise> { + return localVarFp.getArrayOfEnums(options).then((request) => request(axios, basePath)); + }, + /** + * For this test, the body for this request much reference a schema named `File`. + * @param {FileSchemaTestClass} fileSchemaTestClass + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: any): AxiosPromise { + return localVarFp.testBodyWithFileSchema(fileSchemaTestClass, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {string} query + * @param {User} user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testBodyWithQueryParams(query: string, user: User, options?: any): AxiosPromise { + return localVarFp.testBodyWithQueryParams(query, user, options).then((request) => request(axios, basePath)); + }, + /** + * To test \"client\" model + * @summary To test \"client\" model + * @param {Client} client client model + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testClientModel(client: Client, options?: any): AxiosPromise { + return localVarFp.testClientModel(client, options).then((request) => request(axios, basePath)); + }, + /** + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * @summary Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * @param {number} number None + * @param {number} _double None + * @param {string} patternWithoutDelimiter None + * @param {string} _byte None + * @param {number} [integer] None + * @param {number} [int32] None + * @param {number} [int64] None + * @param {number} [_float] None + * @param {string} [string] None + * @param {any} [binary] None + * @param {string} [date] None + * @param {string} [dateTime] None + * @param {string} [password] None + * @param {string} [callback] None + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: any, date?: string, dateTime?: string, password?: string, callback?: string, options?: any): AxiosPromise { + return localVarFp.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, callback, options).then((request) => request(axios, basePath)); + }, + /** + * To test enum parameters + * @summary To test enum parameters + * @param {Array<'>' | '$'>} [enumHeaderStringArray] Header parameter enum test (string array) + * @param {'_abc' | '-efg' | '(xyz)'} [enumHeaderString] Header parameter enum test (string) + * @param {Array<'>' | '$'>} [enumQueryStringArray] Query parameter enum test (string array) + * @param {'_abc' | '-efg' | '(xyz)'} [enumQueryString] Query parameter enum test (string) + * @param {1 | -2} [enumQueryInteger] Query parameter enum test (double) + * @param {1.1 | -1.2} [enumQueryDouble] Query parameter enum test (double) + * @param {Array} [enumFormStringArray] Form parameter enum test (string array) + * @param {string} [enumFormString] Form parameter enum test (string) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testEnumParameters(enumHeaderStringArray?: Array<'>' | '$'>, enumHeaderString?: '_abc' | '-efg' | '(xyz)', enumQueryStringArray?: Array<'>' | '$'>, enumQueryString?: '_abc' | '-efg' | '(xyz)', enumQueryInteger?: 1 | -2, enumQueryDouble?: 1.1 | -1.2, enumFormStringArray?: Array, enumFormString?: string, options?: any): AxiosPromise { + return localVarFp.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, options).then((request) => request(axios, basePath)); + }, + /** + * Fake endpoint to test group parameters (optional) + * @summary Fake endpoint to test group parameters (optional) + * @param {number} requiredStringGroup Required String in group parameters + * @param {boolean} requiredBooleanGroup Required Boolean in group parameters + * @param {number} requiredInt64Group Required Integer in group parameters + * @param {number} [stringGroup] String in group parameters + * @param {boolean} [booleanGroup] Boolean in group parameters + * @param {number} [int64Group] Integer in group parameters + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: any): AxiosPromise { + return localVarFp.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary test inline additionalProperties + * @param {{ [key: string]: string; }} requestBody request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: any): AxiosPromise { + return localVarFp.testInlineAdditionalProperties(requestBody, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary test json serialization of form data + * @param {string} param field1 + * @param {string} param2 field2 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testJsonFormData(param: string, param2: string, options?: any): AxiosPromise { + return localVarFp.testJsonFormData(param, param2, options).then((request) => request(axios, basePath)); + }, + /** + * To test the collection format in query parameters + * @param {Array} pipe + * @param {Array} ioutil + * @param {Array} http + * @param {Array} url + * @param {Array} context + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: any): AxiosPromise { + return localVarFp.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * FakeApi - object-oriented interface + * @export + * @class FakeApi + * @extends {BaseAPI} + */ +export class FakeApi extends BaseAPI { + /** + * + * @summary Health check endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FakeApi + */ + public fakeHealthGet(options?: AxiosRequestConfig) { + return FakeApiFp(this.configuration).fakeHealthGet(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Test serialization of outer boolean types + * @param {boolean} [body] Input boolean as post body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FakeApi + */ + public fakeOuterBooleanSerialize(body?: boolean, options?: AxiosRequestConfig) { + return FakeApiFp(this.configuration).fakeOuterBooleanSerialize(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Test serialization of object with outer number type + * @param {OuterComposite} [outerComposite] Input composite as post body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FakeApi + */ + public fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: AxiosRequestConfig) { + return FakeApiFp(this.configuration).fakeOuterCompositeSerialize(outerComposite, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Test serialization of outer number types + * @param {number} [body] Input number as post body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FakeApi + */ + public fakeOuterNumberSerialize(body?: number, options?: AxiosRequestConfig) { + return FakeApiFp(this.configuration).fakeOuterNumberSerialize(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Test serialization of outer string types + * @param {string} [body] Input string as post body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FakeApi + */ + public fakeOuterStringSerialize(body?: string, options?: AxiosRequestConfig) { + return FakeApiFp(this.configuration).fakeOuterStringSerialize(body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Array of Enums + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FakeApi + */ + public getArrayOfEnums(options?: AxiosRequestConfig) { + return FakeApiFp(this.configuration).getArrayOfEnums(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * For this test, the body for this request much reference a schema named `File`. + * @param {FileSchemaTestClass} fileSchemaTestClass + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FakeApi + */ + public testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: AxiosRequestConfig) { + return FakeApiFp(this.configuration).testBodyWithFileSchema(fileSchemaTestClass, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {string} query + * @param {User} user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FakeApi + */ + public testBodyWithQueryParams(query: string, user: User, options?: AxiosRequestConfig) { + return FakeApiFp(this.configuration).testBodyWithQueryParams(query, user, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * To test \"client\" model + * @summary To test \"client\" model + * @param {Client} client client model + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FakeApi + */ + public testClientModel(client: Client, options?: AxiosRequestConfig) { + return FakeApiFp(this.configuration).testClientModel(client, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * @summary Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * @param {number} number None + * @param {number} _double None + * @param {string} patternWithoutDelimiter None + * @param {string} _byte None + * @param {number} [integer] None + * @param {number} [int32] None + * @param {number} [int64] None + * @param {number} [_float] None + * @param {string} [string] None + * @param {any} [binary] None + * @param {string} [date] None + * @param {string} [dateTime] None + * @param {string} [password] None + * @param {string} [callback] None + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FakeApi + */ + public testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: any, date?: string, dateTime?: string, password?: string, callback?: string, options?: AxiosRequestConfig) { + return FakeApiFp(this.configuration).testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, callback, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * To test enum parameters + * @summary To test enum parameters + * @param {Array<'>' | '$'>} [enumHeaderStringArray] Header parameter enum test (string array) + * @param {'_abc' | '-efg' | '(xyz)'} [enumHeaderString] Header parameter enum test (string) + * @param {Array<'>' | '$'>} [enumQueryStringArray] Query parameter enum test (string array) + * @param {'_abc' | '-efg' | '(xyz)'} [enumQueryString] Query parameter enum test (string) + * @param {1 | -2} [enumQueryInteger] Query parameter enum test (double) + * @param {1.1 | -1.2} [enumQueryDouble] Query parameter enum test (double) + * @param {Array} [enumFormStringArray] Form parameter enum test (string array) + * @param {string} [enumFormString] Form parameter enum test (string) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FakeApi + */ + public testEnumParameters(enumHeaderStringArray?: Array<'>' | '$'>, enumHeaderString?: '_abc' | '-efg' | '(xyz)', enumQueryStringArray?: Array<'>' | '$'>, enumQueryString?: '_abc' | '-efg' | '(xyz)', enumQueryInteger?: 1 | -2, enumQueryDouble?: 1.1 | -1.2, enumFormStringArray?: Array, enumFormString?: string, options?: AxiosRequestConfig) { + return FakeApiFp(this.configuration).testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fake endpoint to test group parameters (optional) + * @summary Fake endpoint to test group parameters (optional) + * @param {number} requiredStringGroup Required String in group parameters + * @param {boolean} requiredBooleanGroup Required Boolean in group parameters + * @param {number} requiredInt64Group Required Integer in group parameters + * @param {number} [stringGroup] String in group parameters + * @param {boolean} [booleanGroup] Boolean in group parameters + * @param {number} [int64Group] Integer in group parameters + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FakeApi + */ + public testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: AxiosRequestConfig) { + return FakeApiFp(this.configuration).testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary test inline additionalProperties + * @param {{ [key: string]: string; }} requestBody request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FakeApi + */ + public testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: AxiosRequestConfig) { + return FakeApiFp(this.configuration).testInlineAdditionalProperties(requestBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary test json serialization of form data + * @param {string} param field1 + * @param {string} param2 field2 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FakeApi + */ + public testJsonFormData(param: string, param2: string, options?: AxiosRequestConfig) { + return FakeApiFp(this.configuration).testJsonFormData(param, param2, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * To test the collection format in query parameters + * @param {Array} pipe + * @param {Array} ioutil + * @param {Array} http + * @param {Array} url + * @param {Array} context + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FakeApi + */ + public testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: AxiosRequestConfig) { + return FakeApiFp(this.configuration).testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * FakeClassnameTags123Api - axios parameter creator + * @export + */ +export const FakeClassnameTags123ApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * To test class name in snake case + * @summary To test class name in snake case + * @param {Client} client client model + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testClassname: async (client: Client, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'client' is not null or undefined + assertParamExists('testClassname', 'client', client) + const localVarPath = `/fake_classname_test`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication api_key_query required + await setApiKeyToObject(localVarQueryParameter, "api_key_query", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(client, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * FakeClassnameTags123Api - functional programming interface + * @export + */ +export const FakeClassnameTags123ApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = FakeClassnameTags123ApiAxiosParamCreator(configuration) + return { + /** + * To test class name in snake case + * @summary To test class name in snake case + * @param {Client} client client model + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async testClassname(client: Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.testClassname(client, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * FakeClassnameTags123Api - factory interface + * @export + */ +export const FakeClassnameTags123ApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = FakeClassnameTags123ApiFp(configuration) + return { + /** + * To test class name in snake case + * @summary To test class name in snake case + * @param {Client} client client model + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testClassname(client: Client, options?: any): AxiosPromise { + return localVarFp.testClassname(client, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * FakeClassnameTags123Api - object-oriented interface + * @export + * @class FakeClassnameTags123Api + * @extends {BaseAPI} + */ +export class FakeClassnameTags123Api extends BaseAPI { + /** + * To test class name in snake case + * @summary To test class name in snake case + * @param {Client} client client model + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FakeClassnameTags123Api + */ + public testClassname(client: Client, options?: AxiosRequestConfig) { + return FakeClassnameTags123ApiFp(this.configuration).testClassname(client, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * PetApi - axios parameter creator + * @export + */ +export const PetApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Add a new pet to the store + * @param {Pet} pet Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + addPet: async (pet: Pet, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'pet' is not null or undefined + assertParamExists('addPet', 'pet', pet) + const localVarPath = `/pet`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication http_signature_test required + + // authentication petstore_auth required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "petstore_auth", ["write:pets", "read:pets"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(pet, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Deletes a pet + * @param {number} petId Pet id to delete + * @param {string} [apiKey] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'petId' is not null or undefined + assertParamExists('deletePet', 'petId', petId) + const localVarPath = `/pet/{petId}` + .replace(`{${"petId"}}`, encodeURIComponent(String(petId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication petstore_auth required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "petstore_auth", ["write:pets", "read:pets"], configuration) + + if (apiKey !== undefined && apiKey !== null) { + localVarHeaderParameter['api_key'] = String(apiKey); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status + * @param {Array<'available' | 'pending' | 'sold'>} status Status values that need to be considered for filter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'status' is not null or undefined + assertParamExists('findPetsByStatus', 'status', status) + const localVarPath = `/pet/findByStatus`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication http_signature_test required + + // authentication petstore_auth required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "petstore_auth", ["write:pets", "read:pets"], configuration) + + if (status) { + localVarQueryParameter['status'] = status.join(COLLECTION_FORMATS.csv); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags + * @param {Array} tags Tags to filter by + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'tags' is not null or undefined + assertParamExists('findPetsByTags', 'tags', tags) + const localVarPath = `/pet/findByTags`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication http_signature_test required + + // authentication petstore_auth required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "petstore_auth", ["write:pets", "read:pets"], configuration) + + if (tags) { + localVarQueryParameter['tags'] = tags.join(COLLECTION_FORMATS.csv); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a single pet + * @summary Find pet by ID + * @param {number} petId ID of pet to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'petId' is not null or undefined + assertParamExists('getPetById', 'petId', petId) + const localVarPath = `/pet/{petId}` + .replace(`{${"petId"}}`, encodeURIComponent(String(petId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication api_key required + await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Update an existing pet + * @param {Pet} pet Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePet: async (pet: Pet, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'pet' is not null or undefined + assertParamExists('updatePet', 'pet', pet) + const localVarPath = `/pet`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication http_signature_test required + + // authentication petstore_auth required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "petstore_auth", ["write:pets", "read:pets"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(pet, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Updates a pet in the store with form data + * @param {number} petId ID of pet that needs to be updated + * @param {string} [name] Updated name of the pet + * @param {string} [status] Updated status of the pet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'petId' is not null or undefined + assertParamExists('updatePetWithForm', 'petId', petId) + const localVarPath = `/pet/{petId}` + .replace(`{${"petId"}}`, encodeURIComponent(String(petId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + const localVarFormParams = new URLSearchParams(); + + // authentication petstore_auth required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "petstore_auth", ["write:pets", "read:pets"], configuration) + + + if (name !== undefined) { + localVarFormParams.set('name', name as any); + } + + if (status !== undefined) { + localVarFormParams.set('status', status as any); + } + + + localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = localVarFormParams.toString(); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary uploads an image + * @param {number} petId ID of pet to update + * @param {string} [additionalMetadata] Additional data to pass to server + * @param {any} [file] file to upload + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'petId' is not null or undefined + assertParamExists('uploadFile', 'petId', petId) + const localVarPath = `/pet/{petId}/uploadImage` + .replace(`{${"petId"}}`, encodeURIComponent(String(petId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)(); + + // authentication petstore_auth required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "petstore_auth", ["write:pets", "read:pets"], configuration) + + + if (additionalMetadata !== undefined) { + localVarFormParams.append('additionalMetadata', additionalMetadata as any); + } + + if (file !== undefined) { + localVarFormParams.append('file', file as any); + } + + + localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = localVarFormParams; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary uploads an image (required) + * @param {number} petId ID of pet to update + * @param {any} requiredFile file to upload + * @param {string} [additionalMetadata] Additional data to pass to server + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + uploadFileWithRequiredFile: async (petId: number, requiredFile: any, additionalMetadata?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'petId' is not null or undefined + assertParamExists('uploadFileWithRequiredFile', 'petId', petId) + // verify required parameter 'requiredFile' is not null or undefined + assertParamExists('uploadFileWithRequiredFile', 'requiredFile', requiredFile) + const localVarPath = `/fake/{petId}/uploadImageWithRequiredFile` + .replace(`{${"petId"}}`, encodeURIComponent(String(petId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)(); + + // authentication petstore_auth required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "petstore_auth", ["write:pets", "read:pets"], configuration) + + + if (additionalMetadata !== undefined) { + localVarFormParams.append('additionalMetadata', additionalMetadata as any); + } + + if (requiredFile !== undefined) { + localVarFormParams.append('requiredFile', requiredFile as any); + } + + + localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = localVarFormParams; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * PetApi - functional programming interface + * @export + */ +export const PetApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = PetApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Add a new pet to the store + * @param {Pet} pet Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async addPet(pet: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(pet, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Deletes a pet + * @param {number} petId Pet id to delete + * @param {string} [apiKey] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status + * @param {Array<'available' | 'pending' | 'sold'>} status Status values that need to be considered for filter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags + * @param {Array} tags Tags to filter by + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a single pet + * @summary Find pet by ID + * @param {number} petId ID of pet to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Update an existing pet + * @param {Pet} pet Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatePet(pet: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(pet, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Updates a pet in the store with form data + * @param {number} petId ID of pet that needs to be updated + * @param {string} [name] Updated name of the pet + * @param {string} [status] Updated status of the pet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary uploads an image + * @param {number} petId ID of pet to update + * @param {string} [additionalMetadata] Additional data to pass to server + * @param {any} [file] file to upload + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary uploads an image (required) + * @param {number} petId ID of pet to update + * @param {any} requiredFile file to upload + * @param {string} [additionalMetadata] Additional data to pass to server + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async uploadFileWithRequiredFile(petId: number, requiredFile: any, additionalMetadata?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * PetApi - factory interface + * @export + */ +export const PetApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = PetApiFp(configuration) + return { + /** + * + * @summary Add a new pet to the store + * @param {Pet} pet Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + addPet(pet: Pet, options?: any): AxiosPromise { + return localVarFp.addPet(pet, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Deletes a pet + * @param {number} petId Pet id to delete + * @param {string} [apiKey] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletePet(petId: number, apiKey?: string, options?: any): AxiosPromise { + return localVarFp.deletePet(petId, apiKey, options).then((request) => request(axios, basePath)); + }, + /** + * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status + * @param {Array<'available' | 'pending' | 'sold'>} status Status values that need to be considered for filter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): AxiosPromise> { + return localVarFp.findPetsByStatus(status, options).then((request) => request(axios, basePath)); + }, + /** + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags + * @param {Array} tags Tags to filter by + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + findPetsByTags(tags: Array, options?: any): AxiosPromise> { + return localVarFp.findPetsByTags(tags, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a single pet + * @summary Find pet by ID + * @param {number} petId ID of pet to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPetById(petId: number, options?: any): AxiosPromise { + return localVarFp.getPetById(petId, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Update an existing pet + * @param {Pet} pet Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePet(pet: Pet, options?: any): AxiosPromise { + return localVarFp.updatePet(pet, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Updates a pet in the store with form data + * @param {number} petId ID of pet that needs to be updated + * @param {string} [name] Updated name of the pet + * @param {string} [status] Updated status of the pet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePetWithForm(petId: number, name?: string, status?: string, options?: any): AxiosPromise { + return localVarFp.updatePetWithForm(petId, name, status, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary uploads an image + * @param {number} petId ID of pet to update + * @param {string} [additionalMetadata] Additional data to pass to server + * @param {any} [file] file to upload + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): AxiosPromise { + return localVarFp.uploadFile(petId, additionalMetadata, file, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary uploads an image (required) + * @param {number} petId ID of pet to update + * @param {any} requiredFile file to upload + * @param {string} [additionalMetadata] Additional data to pass to server + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + uploadFileWithRequiredFile(petId: number, requiredFile: any, additionalMetadata?: string, options?: any): AxiosPromise { + return localVarFp.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * PetApi - object-oriented interface + * @export + * @class PetApi + * @extends {BaseAPI} + */ +export class PetApi extends BaseAPI { + /** + * + * @summary Add a new pet to the store + * @param {Pet} pet Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public addPet(pet: Pet, options?: AxiosRequestConfig) { + return PetApiFp(this.configuration).addPet(pet, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Deletes a pet + * @param {number} petId Pet id to delete + * @param {string} [apiKey] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status + * @param {Array<'available' | 'pending' | 'sold'>} status Status values that need to be considered for filter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig) { + return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags + * @param {Array} tags Tags to filter by + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + * @memberof PetApi + */ + public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a single pet + * @summary Find pet by ID + * @param {number} petId ID of pet to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public getPetById(petId: number, options?: AxiosRequestConfig) { + return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Update an existing pet + * @param {Pet} pet Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public updatePet(pet: Pet, options?: AxiosRequestConfig) { + return PetApiFp(this.configuration).updatePet(pet, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Updates a pet in the store with form data + * @param {number} petId ID of pet that needs to be updated + * @param {string} [name] Updated name of the pet + * @param {string} [status] Updated status of the pet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary uploads an image + * @param {number} petId ID of pet to update + * @param {string} [additionalMetadata] Additional data to pass to server + * @param {any} [file] file to upload + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig) { + return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary uploads an image (required) + * @param {number} petId ID of pet to update + * @param {any} requiredFile file to upload + * @param {string} [additionalMetadata] Additional data to pass to server + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public uploadFileWithRequiredFile(petId: number, requiredFile: any, additionalMetadata?: string, options?: AxiosRequestConfig) { + return PetApiFp(this.configuration).uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * StoreApi - axios parameter creator + * @export + */ +export const StoreApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID + * @param {string} orderId ID of the order that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'orderId' is not null or undefined + assertParamExists('deleteOrder', 'orderId', orderId) + const localVarPath = `/store/order/{order_id}` + .replace(`{${"order_id"}}`, encodeURIComponent(String(orderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a map of status codes to quantities + * @summary Returns pet inventories by status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInventory: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/store/inventory`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication api_key required + await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID + * @param {number} orderId ID of pet that needs to be fetched + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'orderId' is not null or undefined + assertParamExists('getOrderById', 'orderId', orderId) + const localVarPath = `/store/order/{order_id}` + .replace(`{${"order_id"}}`, encodeURIComponent(String(orderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Place an order for a pet + * @param {Order} order order placed for purchasing the pet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + placeOrder: async (order: Order, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'order' is not null or undefined + assertParamExists('placeOrder', 'order', order) + const localVarPath = `/store/order`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(order, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * StoreApi - functional programming interface + * @export + */ +export const StoreApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = StoreApiAxiosParamCreator(configuration) + return { + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID + * @param {string} orderId ID of the order that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a map of status codes to quantities + * @summary Returns pet inventories by status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID + * @param {number} orderId ID of pet that needs to be fetched + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Place an order for a pet + * @param {Order} order order placed for purchasing the pet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async placeOrder(order: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(order, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * StoreApi - factory interface + * @export + */ +export const StoreApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = StoreApiFp(configuration) + return { + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID + * @param {string} orderId ID of the order that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteOrder(orderId: string, options?: any): AxiosPromise { + return localVarFp.deleteOrder(orderId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a map of status codes to quantities + * @summary Returns pet inventories by status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInventory(options?: any): AxiosPromise<{ [key: string]: number; }> { + return localVarFp.getInventory(options).then((request) => request(axios, basePath)); + }, + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID + * @param {number} orderId ID of pet that needs to be fetched + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrderById(orderId: number, options?: any): AxiosPromise { + return localVarFp.getOrderById(orderId, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Place an order for a pet + * @param {Order} order order placed for purchasing the pet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + placeOrder(order: Order, options?: any): AxiosPromise { + return localVarFp.placeOrder(order, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * StoreApi - object-oriented interface + * @export + * @class StoreApi + * @extends {BaseAPI} + */ +export class StoreApi extends BaseAPI { + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID + * @param {string} orderId ID of the order that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StoreApi + */ + public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a map of status codes to quantities + * @summary Returns pet inventories by status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StoreApi + */ + public getInventory(options?: AxiosRequestConfig) { + return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID + * @param {number} orderId ID of pet that needs to be fetched + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StoreApi + */ + public getOrderById(orderId: number, options?: AxiosRequestConfig) { + return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Place an order for a pet + * @param {Order} order order placed for purchasing the pet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StoreApi + */ + public placeOrder(order: Order, options?: AxiosRequestConfig) { + return StoreApiFp(this.configuration).placeOrder(order, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * UserApi - axios parameter creator + * @export + */ +export const UserApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * This can only be done by the logged in user. + * @summary Create user + * @param {User} user Created user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUser: async (user: User, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'user' is not null or undefined + assertParamExists('createUser', 'user', user) + const localVarPath = `/user`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Creates list of users with given input array + * @param {Array} user List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUsersWithArrayInput: async (user: Array, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'user' is not null or undefined + assertParamExists('createUsersWithArrayInput', 'user', user) + const localVarPath = `/user/createWithArray`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Creates list of users with given input array + * @param {Array} user List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUsersWithListInput: async (user: Array, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'user' is not null or undefined + assertParamExists('createUsersWithListInput', 'user', user) + const localVarPath = `/user/createWithList`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * This can only be done by the logged in user. + * @summary Delete user + * @param {string} username The name that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'username' is not null or undefined + assertParamExists('deleteUser', 'username', username) + const localVarPath = `/user/{username}` + .replace(`{${"username"}}`, encodeURIComponent(String(username))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get user by user name + * @param {string} username The name that needs to be fetched. Use user1 for testing. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'username' is not null or undefined + assertParamExists('getUserByName', 'username', username) + const localVarPath = `/user/{username}` + .replace(`{${"username"}}`, encodeURIComponent(String(username))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Logs user into the system + * @param {string} username The user name for login + * @param {string} password The password for login in clear text + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'username' is not null or undefined + assertParamExists('loginUser', 'username', username) + // verify required parameter 'password' is not null or undefined + assertParamExists('loginUser', 'password', password) + const localVarPath = `/user/login`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (username !== undefined) { + localVarQueryParameter['username'] = username; + } + + if (password !== undefined) { + localVarQueryParameter['password'] = password; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Logs out current logged in user session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/user/logout`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * This can only be done by the logged in user. + * @summary Updated user + * @param {string} username name that need to be deleted + * @param {User} user Updated user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateUser: async (username: string, user: User, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'username' is not null or undefined + assertParamExists('updateUser', 'username', username) + // verify required parameter 'user' is not null or undefined + assertParamExists('updateUser', 'user', user) + const localVarPath = `/user/{username}` + .replace(`{${"username"}}`, encodeURIComponent(String(username))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * UserApi - functional programming interface + * @export + */ +export const UserApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = UserApiAxiosParamCreator(configuration) + return { + /** + * This can only be done by the logged in user. + * @summary Create user + * @param {User} user Created user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createUser(user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(user, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Creates list of users with given input array + * @param {Array} user List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createUsersWithArrayInput(user: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(user, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Creates list of users with given input array + * @param {Array} user List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createUsersWithListInput(user: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(user, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This can only be done by the logged in user. + * @summary Delete user + * @param {string} username The name that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Get user by user name + * @param {string} username The name that needs to be fetched. Use user1 for testing. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Logs user into the system + * @param {string} username The user name for login + * @param {string} password The password for login in clear text + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary Logs out current logged in user session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * This can only be done by the logged in user. + * @summary Updated user + * @param {string} username name that need to be deleted + * @param {User} user Updated user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateUser(username: string, user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, user, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * UserApi - factory interface + * @export + */ +export const UserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = UserApiFp(configuration) + return { + /** + * This can only be done by the logged in user. + * @summary Create user + * @param {User} user Created user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUser(user: User, options?: any): AxiosPromise { + return localVarFp.createUser(user, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Creates list of users with given input array + * @param {Array} user List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUsersWithArrayInput(user: Array, options?: any): AxiosPromise { + return localVarFp.createUsersWithArrayInput(user, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Creates list of users with given input array + * @param {Array} user List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUsersWithListInput(user: Array, options?: any): AxiosPromise { + return localVarFp.createUsersWithListInput(user, options).then((request) => request(axios, basePath)); + }, + /** + * This can only be done by the logged in user. + * @summary Delete user + * @param {string} username The name that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteUser(username: string, options?: any): AxiosPromise { + return localVarFp.deleteUser(username, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get user by user name + * @param {string} username The name that needs to be fetched. Use user1 for testing. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserByName(username: string, options?: any): AxiosPromise { + return localVarFp.getUserByName(username, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Logs user into the system + * @param {string} username The user name for login + * @param {string} password The password for login in clear text + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + loginUser(username: string, password: string, options?: any): AxiosPromise { + return localVarFp.loginUser(username, password, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Logs out current logged in user session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + logoutUser(options?: any): AxiosPromise { + return localVarFp.logoutUser(options).then((request) => request(axios, basePath)); + }, + /** + * This can only be done by the logged in user. + * @summary Updated user + * @param {string} username name that need to be deleted + * @param {User} user Updated user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateUser(username: string, user: User, options?: any): AxiosPromise { + return localVarFp.updateUser(username, user, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * UserApi - object-oriented interface + * @export + * @class UserApi + * @extends {BaseAPI} + */ +export class UserApi extends BaseAPI { + /** + * This can only be done by the logged in user. + * @summary Create user + * @param {User} user Created user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public createUser(user: User, options?: AxiosRequestConfig) { + return UserApiFp(this.configuration).createUser(user, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Creates list of users with given input array + * @param {Array} user List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public createUsersWithArrayInput(user: Array, options?: AxiosRequestConfig) { + return UserApiFp(this.configuration).createUsersWithArrayInput(user, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Creates list of users with given input array + * @param {Array} user List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public createUsersWithListInput(user: Array, options?: AxiosRequestConfig) { + return UserApiFp(this.configuration).createUsersWithListInput(user, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This can only be done by the logged in user. + * @summary Delete user + * @param {string} username The name that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public deleteUser(username: string, options?: AxiosRequestConfig) { + return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get user by user name + * @param {string} username The name that needs to be fetched. Use user1 for testing. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public getUserByName(username: string, options?: AxiosRequestConfig) { + return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Logs user into the system + * @param {string} username The user name for login + * @param {string} password The password for login in clear text + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Logs out current logged in user session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public logoutUser(options?: AxiosRequestConfig) { + return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This can only be done by the logged in user. + * @summary Updated user + * @param {string} username name that need to be deleted + * @param {User} user Updated user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public updateUser(username: string, user: User, options?: AxiosRequestConfig) { + return UserApiFp(this.configuration).updateUser(username, user, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts new file mode 100644 index 00000000000..87d8fc9127f --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; + +export const BASE_PATH = "http://petstore.swagger.io:80/v2".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: AxiosRequestConfig; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/common.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/common.ts new file mode 100644 index 00000000000..d74e541f401 --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/common.ts @@ -0,0 +1,138 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance } from 'axios'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + for (const object of objects) { + for (const key in object) { + if (Array.isArray(object[key])) { + searchParams.delete(key); + for (const item of object[key]) { + searchParams.append(key, item); + } + } else { + searchParams.set(key, object[key]); + } + } + } + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/configuration.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/configuration.ts new file mode 100644 index 00000000000..9d6922b1165 --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/git_push.sh b/samples/client/petstore/typescript-axios/builds/test-petstore/git_push.sh new file mode 100644 index 00000000000..f53a75d4fab --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/index.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/index.ts new file mode 100644 index 00000000000..7ffd3df3280 --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts b/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts index 15fa56e5e78..417cd18189f 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts @@ -14,7 +14,7 @@ import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; @@ -32,19 +32,19 @@ export interface ApiResponse { * @type {number} * @memberof ApiResponse */ - code?: number; + 'code'?: number; /** * * @type {string} * @memberof ApiResponse */ - type?: string; + 'type'?: string; /** * * @type {string} * @memberof ApiResponse */ - message?: string; + 'message'?: string; } /** * A category for a pet @@ -57,13 +57,13 @@ export interface Category { * @type {number} * @memberof Category */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof Category */ - name?: string; + 'name'?: string; } /** * An order for a pets from the pet store @@ -76,37 +76,37 @@ export interface Order { * @type {number} * @memberof Order */ - id?: number; + 'id'?: number; /** * * @type {number} * @memberof Order */ - petId?: number; + 'petId'?: number; /** * * @type {number} * @memberof Order */ - quantity?: number; + 'quantity'?: number; /** * * @type {string} * @memberof Order */ - shipDate?: string; + 'shipDate'?: string; /** * Order Status * @type {string} * @memberof Order */ - status?: OrderStatusEnum; + 'status'?: OrderStatusEnum; /** * * @type {boolean} * @memberof Order */ - complete?: boolean; + 'complete'?: boolean; } /** @@ -130,37 +130,37 @@ export interface Pet { * @type {number} * @memberof Pet */ - id?: number; + 'id'?: number; /** * * @type {Category} * @memberof Pet */ - category?: Category; + 'category'?: Category; /** * * @type {string} * @memberof Pet */ - name: string; + 'name': string; /** * * @type {Array} * @memberof Pet */ - photoUrls: Array; + 'photoUrls': Array; /** * * @type {Array} * @memberof Pet */ - tags?: Array; + 'tags'?: Array; /** * pet status in the store * @type {string} * @memberof Pet */ - status?: PetStatusEnum; + 'status'?: PetStatusEnum; } /** @@ -184,13 +184,13 @@ export interface Tag { * @type {number} * @memberof Tag */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof Tag */ - name?: string; + 'name'?: string; } /** * A User who is purchasing from the pet store @@ -203,49 +203,49 @@ export interface User { * @type {number} * @memberof User */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof User */ - username?: string; + 'username'?: string; /** * * @type {string} * @memberof User */ - firstName?: string; + 'firstName'?: string; /** * * @type {string} * @memberof User */ - lastName?: string; + 'lastName'?: string; /** * * @type {string} * @memberof User */ - email?: string; + 'email'?: string; /** * * @type {string} * @memberof User */ - password?: string; + 'password'?: string; /** * * @type {string} * @memberof User */ - phone?: string; + 'phone'?: string; /** * User Status * @type {number} * @memberof User */ - userStatus?: number; + 'userStatus'?: number; } /** @@ -263,7 +263,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (pet: Pet, header1?: Pet, header2?: Array, options: any = {}): Promise => { + addPet: async (pet: Pet, header1?: Pet, header2?: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'pet' is not null or undefined assertParamExists('addPet', 'pet', pet) const localVarPath = `/pet`; @@ -313,7 +313,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -355,7 +355,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise => { + findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -397,7 +397,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: any = {}): Promise => { + findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -438,7 +438,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: any = {}): Promise => { + getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -475,7 +475,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (pet: Pet, options: any = {}): Promise => { + updatePet: async (pet: Pet, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'pet' is not null or undefined assertParamExists('updatePet', 'pet', pet) const localVarPath = `/pet`; @@ -517,7 +517,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -569,7 +569,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -631,7 +631,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(pet: Pet, header1?: Pet, header2?: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(pet: Pet, header1?: Pet, header2?: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(pet, header1, header2, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -643,7 +643,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -654,7 +654,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -666,7 +666,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -677,7 +677,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -688,7 +688,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(pet: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(pet: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(pet, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -701,7 +701,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -714,7 +714,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -836,7 +836,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(pet: Pet, header1?: Pet, header2?: Array, options?: any) { + public addPet(pet: Pet, header1?: Pet, header2?: Array, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).addPet(pet, header1, header2, options).then((request) => request(this.axios, this.basePath)); } @@ -849,7 +849,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: any) { + public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -861,7 +861,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) { + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -874,7 +874,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: any) { + public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -886,7 +886,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: any) { + public getPetById(petId: number, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -898,7 +898,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(pet: Pet, options?: any) { + public updatePet(pet: Pet, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(pet, options).then((request) => request(this.axios, this.basePath)); } @@ -912,7 +912,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -926,7 +926,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) { + public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } @@ -945,7 +945,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: any = {}): Promise => { + deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -978,7 +978,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: any = {}): Promise => { + getInventory: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1012,7 +1012,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: any = {}): Promise => { + getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1046,7 +1046,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (order: Order, options: any = {}): Promise => { + placeOrder: async (order: Order, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'order' is not null or undefined assertParamExists('placeOrder', 'order', order) const localVarPath = `/store/order`; @@ -1092,7 +1092,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1102,7 +1102,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1113,7 +1113,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1124,7 +1124,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(order: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(order: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(order, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1195,7 +1195,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: any) { + public deleteOrder(orderId: string, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1206,7 +1206,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: any) { + public getInventory(options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1218,7 +1218,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: any) { + public getOrderById(orderId: number, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1230,7 +1230,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(order: Order, options?: any) { + public placeOrder(order: Order, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(order, options).then((request) => request(this.axios, this.basePath)); } } @@ -1249,7 +1249,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (user: User, options: any = {}): Promise => { + createUser: async (user: User, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUser', 'user', user) const localVarPath = `/user`; @@ -1285,7 +1285,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (user: Array, options: any = {}): Promise => { + createUsersWithArrayInput: async (user: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUsersWithArrayInput', 'user', user) const localVarPath = `/user/createWithArray`; @@ -1321,7 +1321,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (user: Array, options: any = {}): Promise => { + createUsersWithListInput: async (user: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUsersWithListInput', 'user', user) const localVarPath = `/user/createWithList`; @@ -1357,7 +1357,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: any = {}): Promise => { + deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1391,7 +1391,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: any = {}): Promise => { + getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1426,7 +1426,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: any = {}): Promise => { + loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1468,7 +1468,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: any = {}): Promise => { + logoutUser: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1500,7 +1500,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, user: User, options: any = {}): Promise => { + updateUser: async (username: string, user: User, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'user' is not null or undefined @@ -1549,7 +1549,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(user: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(user, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1560,7 +1560,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(user: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(user: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(user, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1571,7 +1571,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(user: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(user: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(user, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1582,7 +1582,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1593,7 +1593,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1605,7 +1605,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1615,7 +1615,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1627,7 +1627,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, user: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, user, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1740,7 +1740,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(user: User, options?: any) { + public createUser(user: User, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUser(user, options).then((request) => request(this.axios, this.basePath)); } @@ -1752,7 +1752,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(user: Array, options?: any) { + public createUsersWithArrayInput(user: Array, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(user, options).then((request) => request(this.axios, this.basePath)); } @@ -1764,7 +1764,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(user: Array, options?: any) { + public createUsersWithListInput(user: Array, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(user, options).then((request) => request(this.axios, this.basePath)); } @@ -1776,7 +1776,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: any) { + public deleteUser(username: string, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1788,7 +1788,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: any) { + public getUserByName(username: string, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1801,7 +1801,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: any) { + public loginUser(username: string, password: string, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -1812,7 +1812,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: any) { + public logoutUser(options?: AxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -1825,7 +1825,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, user: User, options?: any) { + public updateUser(username: string, user: User, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, user, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts b/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts index c7eaf57bf47..e23d972eeb0 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts @@ -16,7 +16,7 @@ import { Configuration } from "./configuration"; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -38,7 +38,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: any; + options: AxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts index 431d6261ab3..177b990667f 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts @@ -14,7 +14,7 @@ import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; @@ -32,13 +32,13 @@ export interface AdditionalPropertiesClass { * @type {{ [key: string]: string; }} * @memberof AdditionalPropertiesClass */ - map_property?: { [key: string]: string; }; + 'map_property'?: { [key: string]: string; }; /** * * @type {{ [key: string]: { [key: string]: string; }; }} * @memberof AdditionalPropertiesClass */ - map_of_map_property?: { [key: string]: { [key: string]: string; }; }; + 'map_of_map_property'?: { [key: string]: { [key: string]: string; }; }; } /** * @@ -51,13 +51,13 @@ export interface Animal { * @type {string} * @memberof Animal */ - className: string; + 'className': string; /** * * @type {string} * @memberof Animal */ - color?: string; + 'color'?: string; } /** * @@ -70,19 +70,19 @@ export interface ApiResponse { * @type {number} * @memberof ApiResponse */ - code?: number; + 'code'?: number; /** * * @type {string} * @memberof ApiResponse */ - type?: string; + 'type'?: string; /** * * @type {string} * @memberof ApiResponse */ - message?: string; + 'message'?: string; } /** * @@ -95,7 +95,7 @@ export interface Apple { * @type {string} * @memberof Apple */ - cultivar?: string; + 'cultivar'?: string; } /** * @@ -108,13 +108,13 @@ export interface AppleReq { * @type {string} * @memberof AppleReq */ - cultivar: string; + 'cultivar': string; /** * * @type {boolean} * @memberof AppleReq */ - mealy?: boolean; + 'mealy'?: boolean; } /** * @@ -127,7 +127,7 @@ export interface ArrayOfArrayOfNumberOnly { * @type {Array>} * @memberof ArrayOfArrayOfNumberOnly */ - ArrayArrayNumber?: Array>; + 'ArrayArrayNumber'?: Array>; } /** * @@ -140,7 +140,7 @@ export interface ArrayOfNumberOnly { * @type {Array} * @memberof ArrayOfNumberOnly */ - ArrayNumber?: Array; + 'ArrayNumber'?: Array; } /** * @@ -153,19 +153,19 @@ export interface ArrayTest { * @type {Array} * @memberof ArrayTest */ - array_of_string?: Array; + 'array_of_string'?: Array; /** * * @type {Array>} * @memberof ArrayTest */ - array_array_of_integer?: Array>; + 'array_array_of_integer'?: Array>; /** * * @type {Array>} * @memberof ArrayTest */ - array_array_of_model?: Array>; + 'array_array_of_model'?: Array>; } /** * @@ -180,7 +180,7 @@ export interface Banana { * @type {number} * @memberof Banana */ - lengthCm?: number; + 'lengthCm'?: number; } /** * @@ -193,13 +193,13 @@ export interface BananaReq { * @type {number} * @memberof BananaReq */ - lengthCm: number; + 'lengthCm': number; /** * * @type {boolean} * @memberof BananaReq */ - sweet?: boolean; + 'sweet'?: boolean; } /** * @@ -212,37 +212,37 @@ export interface Capitalization { * @type {string} * @memberof Capitalization */ - smallCamel?: string; + 'smallCamel'?: string; /** * * @type {string} * @memberof Capitalization */ - CapitalCamel?: string; + 'CapitalCamel'?: string; /** * * @type {string} * @memberof Capitalization */ - small_Snake?: string; + 'small_Snake'?: string; /** * * @type {string} * @memberof Capitalization */ - Capital_Snake?: string; + 'Capital_Snake'?: string; /** * * @type {string} * @memberof Capitalization */ - SCA_ETH_Flow_Points?: string; + 'SCA_ETH_Flow_Points'?: string; /** * Name of the pet * @type {string} * @memberof Capitalization */ - ATT_NAME?: string; + 'ATT_NAME'?: string; } /** * @@ -255,7 +255,7 @@ export interface Cat extends Animal { * @type {boolean} * @memberof Cat */ - declawed?: boolean; + 'declawed'?: boolean; } /** * @@ -268,7 +268,7 @@ export interface CatAllOf { * @type {boolean} * @memberof CatAllOf */ - declawed?: boolean; + 'declawed'?: boolean; } /** * @@ -281,13 +281,13 @@ export interface Category { * @type {number} * @memberof Category */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof Category */ - name: string; + 'name': string; } /** * Model for testing model with \"_class\" property @@ -300,7 +300,7 @@ export interface ClassModel { * @type {string} * @memberof ClassModel */ - _class?: string; + '_class'?: string; } /** * @@ -313,7 +313,7 @@ export interface Client { * @type {string} * @memberof Client */ - client?: string; + 'client'?: string; } /** * @@ -326,7 +326,7 @@ export interface Dog extends Animal { * @type {string} * @memberof Dog */ - breed?: string; + 'breed'?: string; } /** * @@ -339,7 +339,7 @@ export interface DogAllOf { * @type {string} * @memberof DogAllOf */ - breed?: string; + 'breed'?: string; } /** * @@ -352,13 +352,13 @@ export interface EnumArrays { * @type {string} * @memberof EnumArrays */ - just_symbol?: EnumArraysJustSymbolEnum; + 'just_symbol'?: EnumArraysJustSymbolEnum; /** * * @type {Array} * @memberof EnumArrays */ - array_enum?: Array; + 'array_enum'?: Array; } /** @@ -401,49 +401,49 @@ export interface EnumTest { * @type {string} * @memberof EnumTest */ - enum_string?: EnumTestEnumStringEnum; + 'enum_string'?: EnumTestEnumStringEnum; /** * * @type {string} * @memberof EnumTest */ - enum_string_required: EnumTestEnumStringRequiredEnum; + 'enum_string_required': EnumTestEnumStringRequiredEnum; /** * * @type {number} * @memberof EnumTest */ - enum_integer?: EnumTestEnumIntegerEnum; + 'enum_integer'?: EnumTestEnumIntegerEnum; /** * * @type {number} * @memberof EnumTest */ - enum_number?: EnumTestEnumNumberEnum; + 'enum_number'?: EnumTestEnumNumberEnum; /** * * @type {OuterEnum} * @memberof EnumTest */ - outerEnum?: OuterEnum | null; + 'outerEnum'?: OuterEnum | null; /** * * @type {OuterEnumInteger} * @memberof EnumTest */ - outerEnumInteger?: OuterEnumInteger; + 'outerEnumInteger'?: OuterEnumInteger; /** * * @type {OuterEnumDefaultValue} * @memberof EnumTest */ - outerEnumDefaultValue?: OuterEnumDefaultValue; + 'outerEnumDefaultValue'?: OuterEnumDefaultValue; /** * * @type {OuterEnumIntegerDefaultValue} * @memberof EnumTest */ - outerEnumIntegerDefaultValue?: OuterEnumIntegerDefaultValue; + 'outerEnumIntegerDefaultValue'?: OuterEnumIntegerDefaultValue; } /** @@ -492,13 +492,13 @@ export interface FileSchemaTestClass { * @type {any} * @memberof FileSchemaTestClass */ - file?: any; + 'file'?: any; /** * * @type {Array} * @memberof FileSchemaTestClass */ - files?: Array; + 'files'?: Array; } /** * @@ -511,7 +511,7 @@ export interface Foo { * @type {string} * @memberof Foo */ - bar?: string; + 'bar'?: string; } /** * @@ -524,91 +524,91 @@ export interface FormatTest { * @type {number} * @memberof FormatTest */ - integer?: number; + 'integer'?: number; /** * * @type {number} * @memberof FormatTest */ - int32?: number; + 'int32'?: number; /** * * @type {number} * @memberof FormatTest */ - int64?: number; + 'int64'?: number; /** * * @type {number} * @memberof FormatTest */ - number: number; + 'number': number; /** * * @type {number} * @memberof FormatTest */ - _float?: number; + 'float'?: number; /** * * @type {number} * @memberof FormatTest */ - _double?: number; + 'double'?: number; /** * * @type {string} * @memberof FormatTest */ - string?: string; + 'string'?: string; /** * * @type {string} * @memberof FormatTest */ - _byte: string; + 'byte': string; /** * * @type {any} * @memberof FormatTest */ - binary?: any; + 'binary'?: any; /** * * @type {string} * @memberof FormatTest */ - date: string; + 'date': string; /** * * @type {string} * @memberof FormatTest */ - dateTime?: string; + 'dateTime'?: string; /** * * @type {string} * @memberof FormatTest */ - uuid?: string; + 'uuid'?: string; /** * * @type {string} * @memberof FormatTest */ - password: string; + 'password': string; /** * A string that is a 10 digit number. Can have leading zeros. * @type {string} * @memberof FormatTest */ - pattern_with_digits?: string; + 'pattern_with_digits'?: string; /** * A string starting with \'image_\' (case insensitive) and one to three digits following i.e. Image_01. * @type {string} * @memberof FormatTest */ - pattern_with_digits_and_delimiter?: string; + 'pattern_with_digits_and_delimiter'?: string; } /** * @type Fruit @@ -633,19 +633,19 @@ export interface GmFruit { * @type {string} * @memberof GmFruit */ - color?: string; + 'color'?: string; /** * * @type {string} * @memberof GmFruit */ - cultivar?: string; + 'cultivar'?: string; /** * * @type {number} * @memberof GmFruit */ - lengthCm?: number; + 'lengthCm'?: number; } /** * @@ -658,13 +658,13 @@ export interface HasOnlyReadOnly { * @type {string} * @memberof HasOnlyReadOnly */ - bar?: string; + 'bar'?: string; /** * * @type {string} * @memberof HasOnlyReadOnly */ - foo?: string; + 'foo'?: string; } /** * Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. @@ -677,7 +677,7 @@ export interface HealthCheckResult { * @type {string} * @memberof HealthCheckResult */ - NullableMessage?: string | null; + 'NullableMessage'?: string | null; } /** * @@ -690,7 +690,7 @@ export interface InlineResponseDefault { * @type {Foo} * @memberof InlineResponseDefault */ - string?: Foo; + 'string'?: Foo; } /** * @@ -703,7 +703,7 @@ export interface List { * @type {string} * @memberof List */ - _123_list?: string; + '123-list'?: string; } /** * @type Mammal @@ -722,25 +722,25 @@ export interface MapTest { * @type {{ [key: string]: { [key: string]: string; }; }} * @memberof MapTest */ - map_map_of_string?: { [key: string]: { [key: string]: string; }; }; + 'map_map_of_string'?: { [key: string]: { [key: string]: string; }; }; /** * * @type {{ [key: string]: string; }} * @memberof MapTest */ - map_of_enum_string?: { [key: string]: string; }; + 'map_of_enum_string'?: { [key: string]: string; }; /** * * @type {{ [key: string]: boolean; }} * @memberof MapTest */ - direct_map?: { [key: string]: boolean; }; + 'direct_map'?: { [key: string]: boolean; }; /** * * @type {{ [key: string]: boolean; }} * @memberof MapTest */ - indirect_map?: { [key: string]: boolean; }; + 'indirect_map'?: { [key: string]: boolean; }; } /** @@ -763,19 +763,19 @@ export interface MixedPropertiesAndAdditionalPropertiesClass { * @type {string} * @memberof MixedPropertiesAndAdditionalPropertiesClass */ - uuid?: string; + 'uuid'?: string; /** * * @type {string} * @memberof MixedPropertiesAndAdditionalPropertiesClass */ - dateTime?: string; + 'dateTime'?: string; /** * * @type {{ [key: string]: Animal; }} * @memberof MixedPropertiesAndAdditionalPropertiesClass */ - map?: { [key: string]: Animal; }; + 'map'?: { [key: string]: Animal; }; } /** * Model for testing model name starting with number @@ -788,13 +788,13 @@ export interface Model200Response { * @type {number} * @memberof Model200Response */ - name?: number; + 'name'?: number; /** * * @type {string} * @memberof Model200Response */ - _class?: string; + 'class'?: string; } /** * Must be named `File` for test. @@ -807,7 +807,7 @@ export interface ModelFile { * @type {string} * @memberof ModelFile */ - sourceURI?: string; + 'sourceURI'?: string; } /** * Model for testing model name same as property name @@ -820,25 +820,25 @@ export interface Name { * @type {number} * @memberof Name */ - name: number; + 'name': number; /** * * @type {number} * @memberof Name */ - snake_case?: number; + 'snake_case'?: number; /** * * @type {string} * @memberof Name */ - property?: string; + 'property'?: string; /** * * @type {number} * @memberof Name */ - _123Number?: number; + '123Number'?: number; } /** * @@ -853,73 +853,73 @@ export interface NullableClass { * @type {number} * @memberof NullableClass */ - integer_prop?: number | null; + 'integer_prop'?: number | null; /** * * @type {number} * @memberof NullableClass */ - number_prop?: number | null; + 'number_prop'?: number | null; /** * * @type {boolean} * @memberof NullableClass */ - boolean_prop?: boolean | null; + 'boolean_prop'?: boolean | null; /** * * @type {string} * @memberof NullableClass */ - string_prop?: string | null; + 'string_prop'?: string | null; /** * * @type {string} * @memberof NullableClass */ - date_prop?: string | null; + 'date_prop'?: string | null; /** * * @type {string} * @memberof NullableClass */ - datetime_prop?: string | null; + 'datetime_prop'?: string | null; /** * * @type {Array} * @memberof NullableClass */ - array_nullable_prop?: Array | null; + 'array_nullable_prop'?: Array | null; /** * * @type {Array} * @memberof NullableClass */ - array_and_items_nullable_prop?: Array | null; + 'array_and_items_nullable_prop'?: Array | null; /** * * @type {Array} * @memberof NullableClass */ - array_items_nullable?: Array; + 'array_items_nullable'?: Array; /** * * @type {{ [key: string]: object; }} * @memberof NullableClass */ - object_nullable_prop?: { [key: string]: object; } | null; + 'object_nullable_prop'?: { [key: string]: object; } | null; /** * * @type {{ [key: string]: object; }} * @memberof NullableClass */ - object_and_items_nullable_prop?: { [key: string]: object; } | null; + 'object_and_items_nullable_prop'?: { [key: string]: object; } | null; /** * * @type {{ [key: string]: object; }} * @memberof NullableClass */ - object_items_nullable?: { [key: string]: object; }; + 'object_items_nullable'?: { [key: string]: object; }; } /** * @@ -932,7 +932,7 @@ export interface NumberOnly { * @type {number} * @memberof NumberOnly */ - JustNumber?: number; + 'JustNumber'?: number; } /** * @@ -945,37 +945,37 @@ export interface Order { * @type {number} * @memberof Order */ - id?: number; + 'id'?: number; /** * * @type {number} * @memberof Order */ - petId?: number; + 'petId'?: number; /** * * @type {number} * @memberof Order */ - quantity?: number; + 'quantity'?: number; /** * * @type {string} * @memberof Order */ - shipDate?: string; + 'shipDate'?: string; /** * Order Status * @type {string} * @memberof Order */ - status?: OrderStatusEnum; + 'status'?: OrderStatusEnum; /** * * @type {boolean} * @memberof Order */ - complete?: boolean; + 'complete'?: boolean; } /** @@ -999,19 +999,19 @@ export interface OuterComposite { * @type {number} * @memberof OuterComposite */ - my_number?: number; + 'my_number'?: number; /** * * @type {string} * @memberof OuterComposite */ - my_string?: string; + 'my_string'?: string; /** * * @type {boolean} * @memberof OuterComposite */ - my_boolean?: boolean; + 'my_boolean'?: boolean; } /** * @@ -1072,38 +1072,38 @@ export interface Pet { * @type {number} * @memberof Pet */ - id?: number; + 'id'?: number; /** * * @type {Category} * @memberof Pet */ - category?: Category; + 'category'?: Category; /** * * @type {string} * @memberof Pet */ - name: string; + 'name': string; /** * * @type {Array} * @memberof Pet */ - photoUrls: Array; + 'photoUrls': Array; /** * * @type {Array} * @memberof Pet */ - tags?: Array; + 'tags'?: Array; /** * pet status in the store * @type {string} * @memberof Pet * @deprecated */ - status?: PetStatusEnum; + 'status'?: PetStatusEnum; } /** @@ -1127,13 +1127,13 @@ export interface ReadOnlyFirst { * @type {string} * @memberof ReadOnlyFirst */ - bar?: string; + 'bar'?: string; /** * * @type {string} * @memberof ReadOnlyFirst */ - baz?: string; + 'baz'?: string; } /** * @@ -1146,43 +1146,43 @@ export interface ReadOnlyWithDefault { * @type {string} * @memberof ReadOnlyWithDefault */ - prop1?: string; + 'prop1'?: string; /** * * @type {string} * @memberof ReadOnlyWithDefault */ - prop2?: string; + 'prop2'?: string; /** * * @type {string} * @memberof ReadOnlyWithDefault */ - prop3?: string; + 'prop3'?: string; /** * * @type {boolean} * @memberof ReadOnlyWithDefault */ - boolProp1?: boolean; + 'boolProp1'?: boolean; /** * * @type {boolean} * @memberof ReadOnlyWithDefault */ - boolProp2?: boolean; + 'boolProp2'?: boolean; /** * * @type {number} * @memberof ReadOnlyWithDefault */ - intProp1?: number; + 'intProp1'?: number; /** * * @type {number} * @memberof ReadOnlyWithDefault */ - intProp2?: number; + 'intProp2'?: number; } /** * Model for testing reserved words @@ -1195,7 +1195,7 @@ export interface Return { * @type {number} * @memberof Return */ - _return?: number; + 'return'?: number; } /** * @@ -1208,7 +1208,7 @@ export interface SpecialModelName { * @type {number} * @memberof SpecialModelName */ - $special_property_name?: number; + '$special[property.name]'?: number; } /** * @@ -1221,13 +1221,13 @@ export interface Tag { * @type {number} * @memberof Tag */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof Tag */ - name?: string; + 'name'?: string; } /** * @@ -1240,73 +1240,73 @@ export interface User { * @type {number} * @memberof User */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof User */ - username?: string; + 'username'?: string; /** * * @type {string} * @memberof User */ - firstName?: string; + 'firstName'?: string; /** * * @type {string} * @memberof User */ - lastName?: string; + 'lastName'?: string; /** * * @type {string} * @memberof User */ - email?: string; + 'email'?: string; /** * * @type {string} * @memberof User */ - password?: string; + 'password'?: string; /** * * @type {string} * @memberof User */ - phone?: string; + 'phone'?: string; /** * User Status * @type {number} * @memberof User */ - userStatus?: number; + 'userStatus'?: number; /** * test code generation for objects Value must be a map of strings to values. It cannot be the \'null\' value. * @type {object} * @memberof User */ - arbitraryObject?: object; + 'arbitraryObject'?: object; /** * test code generation for nullable objects. Value must be a map of strings to values or the \'null\' value. * @type {object} * @memberof User */ - arbitraryNullableObject?: object | null; + 'arbitraryNullableObject'?: object | null; /** * test code generation for any type Value can be any type - string, number, boolean, array or object. * @type {any} * @memberof User */ - arbitraryTypeValue?: any; + 'arbitraryTypeValue'?: any; /** * test code generation for any type Value can be any type - string, number, boolean, array, object or the \'null\' value. * @type {any} * @memberof User */ - arbitraryNullableTypeValue?: any | null; + 'arbitraryNullableTypeValue'?: any | null; } /** * @@ -1319,19 +1319,19 @@ export interface Whale { * @type {boolean} * @memberof Whale */ - hasBaleen?: boolean; + 'hasBaleen'?: boolean; /** * * @type {boolean} * @memberof Whale */ - hasTeeth?: boolean; + 'hasTeeth'?: boolean; /** * * @type {string} * @memberof Whale */ - className: string; + 'className': string; } /** * @@ -1344,13 +1344,13 @@ export interface Zebra { * @type {string} * @memberof Zebra */ - type?: ZebraTypeEnum; + 'type'?: ZebraTypeEnum; /** * * @type {string} * @memberof Zebra */ - className: string; + 'className': string; } /** @@ -1377,7 +1377,7 @@ export const AnotherFakeApiAxiosParamCreator = function (configuration?: Configu * @param {*} [options] Override http request option. * @throws {RequiredError} */ - _123testSpecialTags: async (client: Client, options: any = {}): Promise => { + _123testSpecialTags: async (client: Client, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'client' is not null or undefined assertParamExists('_123testSpecialTags', 'client', client) const localVarPath = `/another-fake/dummy`; @@ -1423,7 +1423,7 @@ export const AnotherFakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async _123testSpecialTags(client: Client, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async _123testSpecialTags(client: Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator._123testSpecialTags(client, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1465,7 +1465,7 @@ export class AnotherFakeApi extends BaseAPI { * @throws {RequiredError} * @memberof AnotherFakeApi */ - public _123testSpecialTags(client: Client, options?: any) { + public _123testSpecialTags(client: Client, options?: AxiosRequestConfig) { return AnotherFakeApiFp(this.configuration)._123testSpecialTags(client, options).then((request) => request(this.axios, this.basePath)); } } @@ -1482,7 +1482,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fooGet: async (options: any = {}): Promise => { + fooGet: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/foo`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1521,7 +1521,7 @@ export const DefaultApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fooGet(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fooGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fooGet(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1559,7 +1559,7 @@ export class DefaultApi extends BaseAPI { * @throws {RequiredError} * @memberof DefaultApi */ - public fooGet(options?: any) { + public fooGet(options?: AxiosRequestConfig) { return DefaultApiFp(this.configuration).fooGet(options).then((request) => request(this.axios, this.basePath)); } } @@ -1577,7 +1577,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeHealthGet: async (options: any = {}): Promise => { + fakeHealthGet: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/health`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1607,7 +1607,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeOuterBooleanSerialize: async (body?: boolean, options: any = {}): Promise => { + fakeOuterBooleanSerialize: async (body?: boolean, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/outer/boolean`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1640,7 +1640,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeOuterCompositeSerialize: async (outerComposite?: OuterComposite, options: any = {}): Promise => { + fakeOuterCompositeSerialize: async (outerComposite?: OuterComposite, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/outer/composite`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1673,7 +1673,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeOuterNumberSerialize: async (body?: number, options: any = {}): Promise => { + fakeOuterNumberSerialize: async (body?: number, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/outer/number`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1706,7 +1706,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeOuterStringSerialize: async (body?: string, options: any = {}): Promise => { + fakeOuterStringSerialize: async (body?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/outer/string`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1739,7 +1739,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testBodyWithFileSchema: async (fileSchemaTestClass: FileSchemaTestClass, options: any = {}): Promise => { + testBodyWithFileSchema: async (fileSchemaTestClass: FileSchemaTestClass, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'fileSchemaTestClass' is not null or undefined assertParamExists('testBodyWithFileSchema', 'fileSchemaTestClass', fileSchemaTestClass) const localVarPath = `/fake/body-with-file-schema`; @@ -1775,7 +1775,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testBodyWithQueryParams: async (query: string, user: User, options: any = {}): Promise => { + testBodyWithQueryParams: async (query: string, user: User, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'query' is not null or undefined assertParamExists('testBodyWithQueryParams', 'query', query) // verify required parameter 'user' is not null or undefined @@ -1817,7 +1817,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testClientModel: async (client: Client, options: any = {}): Promise => { + testClientModel: async (client: Client, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'client' is not null or undefined assertParamExists('testClientModel', 'client', client) const localVarPath = `/fake`; @@ -1866,7 +1866,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEndpointParameters: async (number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: any, date?: string, dateTime?: string, password?: string, callback?: string, options: any = {}): Promise => { + testEndpointParameters: async (number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: any, date?: string, dateTime?: string, password?: string, callback?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'number' is not null or undefined assertParamExists('testEndpointParameters', 'number', number) // verify required parameter '_double' is not null or undefined @@ -1976,7 +1976,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEnumParameters: async (enumHeaderStringArray?: Array<'>' | '$'>, enumHeaderString?: '_abc' | '-efg' | '(xyz)', enumQueryStringArray?: Array<'>' | '$'>, enumQueryString?: '_abc' | '-efg' | '(xyz)', enumQueryInteger?: 1 | -2, enumQueryDouble?: 1.1 | -1.2, enumFormStringArray?: Array, enumFormString?: string, options: any = {}): Promise => { + testEnumParameters: async (enumHeaderStringArray?: Array<'>' | '$'>, enumHeaderString?: '_abc' | '-efg' | '(xyz)', enumQueryStringArray?: Array<'>' | '$'>, enumQueryString?: '_abc' | '-efg' | '(xyz)', enumQueryInteger?: 1 | -2, enumQueryDouble?: 1.1 | -1.2, enumFormStringArray?: Array, enumFormString?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/fake`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2049,7 +2049,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testGroupParameters: async (requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options: any = {}): Promise => { + testGroupParameters: async (requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'requiredStringGroup' is not null or undefined assertParamExists('testGroupParameters', 'requiredStringGroup', requiredStringGroup) // verify required parameter 'requiredBooleanGroup' is not null or undefined @@ -2114,7 +2114,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testInlineAdditionalProperties: async (requestBody: { [key: string]: string; }, options: any = {}): Promise => { + testInlineAdditionalProperties: async (requestBody: { [key: string]: string; }, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'requestBody' is not null or undefined assertParamExists('testInlineAdditionalProperties', 'requestBody', requestBody) const localVarPath = `/fake/inline-additionalProperties`; @@ -2151,7 +2151,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testJsonFormData: async (param: string, param2: string, options: any = {}): Promise => { + testJsonFormData: async (param: string, param2: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'param' is not null or undefined assertParamExists('testJsonFormData', 'param', param) // verify required parameter 'param2' is not null or undefined @@ -2201,7 +2201,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testQueryParameterCollectionFormat: async (pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options: any = {}): Promise => { + testQueryParameterCollectionFormat: async (pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'pipe' is not null or undefined assertParamExists('testQueryParameterCollectionFormat', 'pipe', pipe) // verify required parameter 'ioutil' is not null or undefined @@ -2262,7 +2262,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testUniqueItemsHeaderAndQueryParameterCollectionFormat: async (queryUnique: Set, headerUnique: Set, options: any = {}): Promise => { + testUniqueItemsHeaderAndQueryParameterCollectionFormat: async (queryUnique: Set, headerUnique: Set, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'queryUnique' is not null or undefined assertParamExists('testUniqueItemsHeaderAndQueryParameterCollectionFormat', 'queryUnique', queryUnique) // verify required parameter 'headerUnique' is not null or undefined @@ -2315,7 +2315,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeHealthGet(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeHealthGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeHealthGet(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2325,7 +2325,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeOuterBooleanSerialize(body?: boolean, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeOuterBooleanSerialize(body?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterBooleanSerialize(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2335,7 +2335,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterCompositeSerialize(outerComposite, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2345,7 +2345,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeOuterNumberSerialize(body?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeOuterNumberSerialize(body?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterNumberSerialize(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2355,7 +2355,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeOuterStringSerialize(body?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeOuterStringSerialize(body?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterStringSerialize(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2365,7 +2365,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testBodyWithFileSchema(fileSchemaTestClass, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2376,7 +2376,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testBodyWithQueryParams(query: string, user: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testBodyWithQueryParams(query: string, user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testBodyWithQueryParams(query, user, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2387,7 +2387,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testClientModel(client: Client, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testClientModel(client: Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testClientModel(client, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2411,7 +2411,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: any, date?: string, dateTime?: string, password?: string, callback?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: any, date?: string, dateTime?: string, password?: string, callback?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, callback, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2429,7 +2429,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEnumParameters(enumHeaderStringArray?: Array<'>' | '$'>, enumHeaderString?: '_abc' | '-efg' | '(xyz)', enumQueryStringArray?: Array<'>' | '$'>, enumQueryString?: '_abc' | '-efg' | '(xyz)', enumQueryInteger?: 1 | -2, enumQueryDouble?: 1.1 | -1.2, enumFormStringArray?: Array, enumFormString?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEnumParameters(enumHeaderStringArray?: Array<'>' | '$'>, enumHeaderString?: '_abc' | '-efg' | '(xyz)', enumQueryStringArray?: Array<'>' | '$'>, enumQueryString?: '_abc' | '-efg' | '(xyz)', enumQueryInteger?: 1 | -2, enumQueryDouble?: 1.1 | -1.2, enumFormStringArray?: Array, enumFormString?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2445,7 +2445,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2456,7 +2456,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testInlineAdditionalProperties(requestBody, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2468,7 +2468,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testJsonFormData(param: string, param2: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testJsonFormData(param: string, param2: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testJsonFormData(param, param2, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2482,7 +2482,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2493,7 +2493,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testUniqueItemsHeaderAndQueryParameterCollectionFormat(queryUnique: Set, headerUnique: Set, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async testUniqueItemsHeaderAndQueryParameterCollectionFormat(queryUnique: Set, headerUnique: Set, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.testUniqueItemsHeaderAndQueryParameterCollectionFormat(queryUnique, headerUnique, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2697,7 +2697,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeHealthGet(options?: any) { + public fakeHealthGet(options?: AxiosRequestConfig) { return FakeApiFp(this.configuration).fakeHealthGet(options).then((request) => request(this.axios, this.basePath)); } @@ -2708,7 +2708,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeOuterBooleanSerialize(body?: boolean, options?: any) { + public fakeOuterBooleanSerialize(body?: boolean, options?: AxiosRequestConfig) { return FakeApiFp(this.configuration).fakeOuterBooleanSerialize(body, options).then((request) => request(this.axios, this.basePath)); } @@ -2719,7 +2719,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: any) { + public fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: AxiosRequestConfig) { return FakeApiFp(this.configuration).fakeOuterCompositeSerialize(outerComposite, options).then((request) => request(this.axios, this.basePath)); } @@ -2730,7 +2730,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeOuterNumberSerialize(body?: number, options?: any) { + public fakeOuterNumberSerialize(body?: number, options?: AxiosRequestConfig) { return FakeApiFp(this.configuration).fakeOuterNumberSerialize(body, options).then((request) => request(this.axios, this.basePath)); } @@ -2741,7 +2741,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeOuterStringSerialize(body?: string, options?: any) { + public fakeOuterStringSerialize(body?: string, options?: AxiosRequestConfig) { return FakeApiFp(this.configuration).fakeOuterStringSerialize(body, options).then((request) => request(this.axios, this.basePath)); } @@ -2752,7 +2752,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: any) { + public testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: AxiosRequestConfig) { return FakeApiFp(this.configuration).testBodyWithFileSchema(fileSchemaTestClass, options).then((request) => request(this.axios, this.basePath)); } @@ -2764,7 +2764,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testBodyWithQueryParams(query: string, user: User, options?: any) { + public testBodyWithQueryParams(query: string, user: User, options?: AxiosRequestConfig) { return FakeApiFp(this.configuration).testBodyWithQueryParams(query, user, options).then((request) => request(this.axios, this.basePath)); } @@ -2776,7 +2776,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testClientModel(client: Client, options?: any) { + public testClientModel(client: Client, options?: AxiosRequestConfig) { return FakeApiFp(this.configuration).testClientModel(client, options).then((request) => request(this.axios, this.basePath)); } @@ -2801,7 +2801,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: any, date?: string, dateTime?: string, password?: string, callback?: string, options?: any) { + public testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: any, date?: string, dateTime?: string, password?: string, callback?: string, options?: AxiosRequestConfig) { return FakeApiFp(this.configuration).testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, callback, options).then((request) => request(this.axios, this.basePath)); } @@ -2820,7 +2820,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testEnumParameters(enumHeaderStringArray?: Array<'>' | '$'>, enumHeaderString?: '_abc' | '-efg' | '(xyz)', enumQueryStringArray?: Array<'>' | '$'>, enumQueryString?: '_abc' | '-efg' | '(xyz)', enumQueryInteger?: 1 | -2, enumQueryDouble?: 1.1 | -1.2, enumFormStringArray?: Array, enumFormString?: string, options?: any) { + public testEnumParameters(enumHeaderStringArray?: Array<'>' | '$'>, enumHeaderString?: '_abc' | '-efg' | '(xyz)', enumQueryStringArray?: Array<'>' | '$'>, enumQueryString?: '_abc' | '-efg' | '(xyz)', enumQueryInteger?: 1 | -2, enumQueryDouble?: 1.1 | -1.2, enumFormStringArray?: Array, enumFormString?: string, options?: AxiosRequestConfig) { return FakeApiFp(this.configuration).testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, options).then((request) => request(this.axios, this.basePath)); } @@ -2837,7 +2837,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: any) { + public testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: AxiosRequestConfig) { return FakeApiFp(this.configuration).testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, options).then((request) => request(this.axios, this.basePath)); } @@ -2849,7 +2849,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: any) { + public testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: AxiosRequestConfig) { return FakeApiFp(this.configuration).testInlineAdditionalProperties(requestBody, options).then((request) => request(this.axios, this.basePath)); } @@ -2862,7 +2862,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testJsonFormData(param: string, param2: string, options?: any) { + public testJsonFormData(param: string, param2: string, options?: AxiosRequestConfig) { return FakeApiFp(this.configuration).testJsonFormData(param, param2, options).then((request) => request(this.axios, this.basePath)); } @@ -2877,7 +2877,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: any) { + public testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: AxiosRequestConfig) { return FakeApiFp(this.configuration).testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, options).then((request) => request(this.axios, this.basePath)); } @@ -2889,7 +2889,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testUniqueItemsHeaderAndQueryParameterCollectionFormat(queryUnique: Set, headerUnique: Set, options?: any) { + public testUniqueItemsHeaderAndQueryParameterCollectionFormat(queryUnique: Set, headerUnique: Set, options?: AxiosRequestConfig) { return FakeApiFp(this.configuration).testUniqueItemsHeaderAndQueryParameterCollectionFormat(queryUnique, headerUnique, options).then((request) => request(this.axios, this.basePath)); } } @@ -2908,7 +2908,7 @@ export const FakeClassnameTags123ApiAxiosParamCreator = function (configuration? * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testClassname: async (client: Client, options: any = {}): Promise => { + testClassname: async (client: Client, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'client' is not null or undefined assertParamExists('testClassname', 'client', client) const localVarPath = `/fake_classname_test`; @@ -2957,7 +2957,7 @@ export const FakeClassnameTags123ApiFp = function(configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testClassname(client: Client, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testClassname(client: Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testClassname(client, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2999,7 +2999,7 @@ export class FakeClassnameTags123Api extends BaseAPI { * @throws {RequiredError} * @memberof FakeClassnameTags123Api */ - public testClassname(client: Client, options?: any) { + public testClassname(client: Client, options?: AxiosRequestConfig) { return FakeClassnameTags123ApiFp(this.configuration).testClassname(client, options).then((request) => request(this.axios, this.basePath)); } } @@ -3018,7 +3018,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (pet: Pet, options: any = {}): Promise => { + addPet: async (pet: Pet, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'pet' is not null or undefined assertParamExists('addPet', 'pet', pet) const localVarPath = `/pet`; @@ -3061,7 +3061,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -3103,7 +3103,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise => { + findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -3147,7 +3147,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: any = {}): Promise => { + findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -3190,7 +3190,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: any = {}): Promise => { + getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -3227,7 +3227,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (pet: Pet, options: any = {}): Promise => { + updatePet: async (pet: Pet, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'pet' is not null or undefined assertParamExists('updatePet', 'pet', pet) const localVarPath = `/pet`; @@ -3271,7 +3271,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -3323,7 +3323,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -3375,7 +3375,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFileWithRequiredFile: async (petId: number, requiredFile: any, additionalMetadata?: string, options: any = {}): Promise => { + uploadFileWithRequiredFile: async (petId: number, requiredFile: any, additionalMetadata?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFileWithRequiredFile', 'petId', petId) // verify required parameter 'requiredFile' is not null or undefined @@ -3437,7 +3437,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(pet: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(pet: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(pet, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -3449,7 +3449,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -3460,7 +3460,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -3472,7 +3472,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -3483,7 +3483,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -3494,7 +3494,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(pet: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(pet: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(pet, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -3507,7 +3507,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -3520,7 +3520,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -3533,7 +3533,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFileWithRequiredFile(petId: number, requiredFile: any, additionalMetadata?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFileWithRequiredFile(petId: number, requiredFile: any, additionalMetadata?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -3663,7 +3663,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(pet: Pet, options?: any) { + public addPet(pet: Pet, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).addPet(pet, options).then((request) => request(this.axios, this.basePath)); } @@ -3676,7 +3676,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: any) { + public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -3688,7 +3688,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) { + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -3701,7 +3701,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: any) { + public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -3713,7 +3713,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: any) { + public getPetById(petId: number, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -3725,7 +3725,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(pet: Pet, options?: any) { + public updatePet(pet: Pet, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(pet, options).then((request) => request(this.axios, this.basePath)); } @@ -3739,7 +3739,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -3753,7 +3753,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) { + public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } @@ -3767,7 +3767,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFileWithRequiredFile(petId: number, requiredFile: any, additionalMetadata?: string, options?: any) { + public uploadFileWithRequiredFile(petId: number, requiredFile: any, additionalMetadata?: string, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, options).then((request) => request(this.axios, this.basePath)); } } @@ -3786,7 +3786,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: any = {}): Promise => { + deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{order_id}` @@ -3819,7 +3819,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: any = {}): Promise => { + getInventory: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -3853,7 +3853,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: any = {}): Promise => { + getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{order_id}` @@ -3887,7 +3887,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (order: Order, options: any = {}): Promise => { + placeOrder: async (order: Order, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'order' is not null or undefined assertParamExists('placeOrder', 'order', order) const localVarPath = `/store/order`; @@ -3933,7 +3933,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -3943,7 +3943,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -3954,7 +3954,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -3965,7 +3965,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(order: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(order: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(order, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -4036,7 +4036,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: any) { + public deleteOrder(orderId: string, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -4047,7 +4047,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: any) { + public getInventory(options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -4059,7 +4059,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: any) { + public getOrderById(orderId: number, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -4071,7 +4071,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(order: Order, options?: any) { + public placeOrder(order: Order, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(order, options).then((request) => request(this.axios, this.basePath)); } } @@ -4090,7 +4090,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (user: User, options: any = {}): Promise => { + createUser: async (user: User, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUser', 'user', user) const localVarPath = `/user`; @@ -4126,7 +4126,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (user: Array, options: any = {}): Promise => { + createUsersWithArrayInput: async (user: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUsersWithArrayInput', 'user', user) const localVarPath = `/user/createWithArray`; @@ -4162,7 +4162,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (user: Array, options: any = {}): Promise => { + createUsersWithListInput: async (user: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUsersWithListInput', 'user', user) const localVarPath = `/user/createWithList`; @@ -4198,7 +4198,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: any = {}): Promise => { + deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -4232,7 +4232,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: any = {}): Promise => { + getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -4267,7 +4267,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: any = {}): Promise => { + loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -4309,7 +4309,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: any = {}): Promise => { + logoutUser: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -4341,7 +4341,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, user: User, options: any = {}): Promise => { + updateUser: async (username: string, user: User, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'user' is not null or undefined @@ -4390,7 +4390,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(user: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(user, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -4401,7 +4401,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(user: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(user: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(user, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -4412,7 +4412,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(user: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(user: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(user, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -4423,7 +4423,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -4434,7 +4434,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -4446,7 +4446,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -4456,7 +4456,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -4468,7 +4468,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, user: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, user, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -4581,7 +4581,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(user: User, options?: any) { + public createUser(user: User, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUser(user, options).then((request) => request(this.axios, this.basePath)); } @@ -4593,7 +4593,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(user: Array, options?: any) { + public createUsersWithArrayInput(user: Array, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(user, options).then((request) => request(this.axios, this.basePath)); } @@ -4605,7 +4605,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(user: Array, options?: any) { + public createUsersWithListInput(user: Array, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(user, options).then((request) => request(this.axios, this.basePath)); } @@ -4617,7 +4617,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: any) { + public deleteUser(username: string, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -4629,7 +4629,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: any) { + public getUserByName(username: string, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -4642,7 +4642,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: any) { + public loginUser(username: string, password: string, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -4653,7 +4653,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: any) { + public logoutUser(options?: AxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -4666,7 +4666,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, user: User, options?: any) { + public updateUser(username: string, user: User, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, user, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts index ffc1b092d6e..87d8fc9127f 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts @@ -16,7 +16,7 @@ import { Configuration } from "./configuration"; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; export const BASE_PATH = "http://petstore.swagger.io:80/v2".replace(/\/+$/, ""); @@ -38,7 +38,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: any; + options: AxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts index c6cda5b6503..a1fef62370e 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts @@ -14,7 +14,7 @@ import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; @@ -32,19 +32,19 @@ export interface ApiResponse { * @type {number} * @memberof ApiResponse */ - code?: number; + 'code'?: number; /** * * @type {string} * @memberof ApiResponse */ - type?: string; + 'type'?: string; /** * * @type {string} * @memberof ApiResponse */ - message?: string; + 'message'?: string; } /** * A category for a pet @@ -57,13 +57,13 @@ export interface Category { * @type {number} * @memberof Category */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof Category */ - name?: string; + 'name'?: string; } /** * An order for a pets from the pet store @@ -76,37 +76,37 @@ export interface Order { * @type {number} * @memberof Order */ - id?: number; + 'id'?: number; /** * * @type {number} * @memberof Order */ - petId?: number; + 'petId'?: number; /** * * @type {number} * @memberof Order */ - quantity?: number; + 'quantity'?: number; /** * * @type {string} * @memberof Order */ - shipDate?: string; + 'shipDate'?: string; /** * Order Status * @type {string} * @memberof Order */ - status?: OrderStatusEnum; + 'status'?: OrderStatusEnum; /** * * @type {boolean} * @memberof Order */ - complete?: boolean; + 'complete'?: boolean; } /** @@ -130,37 +130,37 @@ export interface Pet { * @type {number} * @memberof Pet */ - id?: number; + 'id'?: number; /** * * @type {Category} * @memberof Pet */ - category?: Category; + 'category'?: Category; /** * * @type {string} * @memberof Pet */ - name: string; + 'name': string; /** * * @type {Array} * @memberof Pet */ - photoUrls: Array; + 'photoUrls': Array; /** * * @type {Array} * @memberof Pet */ - tags?: Array; + 'tags'?: Array; /** * pet status in the store * @type {string} * @memberof Pet */ - status?: PetStatusEnum; + 'status'?: PetStatusEnum; } /** @@ -184,13 +184,13 @@ export interface Tag { * @type {number} * @memberof Tag */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof Tag */ - name?: string; + 'name'?: string; } /** * A User who is purchasing from the pet store @@ -203,49 +203,49 @@ export interface User { * @type {number} * @memberof User */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof User */ - username?: string; + 'username'?: string; /** * * @type {string} * @memberof User */ - firstName?: string; + 'firstName'?: string; /** * * @type {string} * @memberof User */ - lastName?: string; + 'lastName'?: string; /** * * @type {string} * @memberof User */ - email?: string; + 'email'?: string; /** * * @type {string} * @memberof User */ - password?: string; + 'password'?: string; /** * * @type {string} * @memberof User */ - phone?: string; + 'phone'?: string; /** * User Status * @type {number} * @memberof User */ - userStatus?: number; + 'userStatus'?: number; } /** @@ -261,7 +261,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: any = {}): Promise => { + addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -302,7 +302,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -344,7 +344,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise => { + findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -386,7 +386,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: any = {}): Promise => { + findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -427,7 +427,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: any = {}): Promise => { + getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -464,7 +464,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: any = {}): Promise => { + updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -506,7 +506,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -558,7 +558,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -618,7 +618,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -630,7 +630,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -641,7 +641,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -653,7 +653,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -664,7 +664,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -675,7 +675,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -688,7 +688,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -701,7 +701,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -818,7 +818,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - addPet(body: Pet, options?: any): AxiosPromise; + addPet(body: Pet, options?: AxiosRequestConfig): AxiosPromise; /** * @@ -829,7 +829,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - deletePet(petId: number, apiKey?: string, options?: any): AxiosPromise; + deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): AxiosPromise; /** * Multiple status values can be provided with comma separated strings @@ -839,7 +839,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): AxiosPromise>; + findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig): AxiosPromise>; /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -850,7 +850,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - findPetsByTags(tags: Array, options?: any): AxiosPromise>; + findPetsByTags(tags: Array, options?: AxiosRequestConfig): AxiosPromise>; /** * Returns a single pet @@ -860,7 +860,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - getPetById(petId: number, options?: any): AxiosPromise; + getPetById(petId: number, options?: AxiosRequestConfig): AxiosPromise; /** * @@ -870,7 +870,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - updatePet(body: Pet, options?: any): AxiosPromise; + updatePet(body: Pet, options?: AxiosRequestConfig): AxiosPromise; /** * @@ -882,7 +882,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - updatePetWithForm(petId: number, name?: string, status?: string, options?: any): AxiosPromise; + updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): AxiosPromise; /** * @@ -894,7 +894,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): AxiosPromise; + uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig): AxiosPromise; } @@ -913,7 +913,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public addPet(body: Pet, options?: any) { + public addPet(body: Pet, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -926,7 +926,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: any) { + public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -938,7 +938,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) { + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -951,7 +951,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: any) { + public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -963,7 +963,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: any) { + public getPetById(petId: number, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -975,7 +975,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(body: Pet, options?: any) { + public updatePet(body: Pet, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -989,7 +989,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -1003,7 +1003,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) { + public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } @@ -1022,7 +1022,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: any = {}): Promise => { + deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1055,7 +1055,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: any = {}): Promise => { + getInventory: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1089,7 +1089,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: any = {}): Promise => { + getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1123,7 +1123,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body: Order, options: any = {}): Promise => { + placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('placeOrder', 'body', body) const localVarPath = `/store/order`; @@ -1169,7 +1169,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1179,7 +1179,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1190,7 +1190,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1201,7 +1201,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1271,7 +1271,7 @@ export interface StoreApiInterface { * @throws {RequiredError} * @memberof StoreApiInterface */ - deleteOrder(orderId: string, options?: any): AxiosPromise; + deleteOrder(orderId: string, options?: AxiosRequestConfig): AxiosPromise; /** * Returns a map of status codes to quantities @@ -1280,7 +1280,7 @@ export interface StoreApiInterface { * @throws {RequiredError} * @memberof StoreApiInterface */ - getInventory(options?: any): AxiosPromise<{ [key: string]: number; }>; + getInventory(options?: AxiosRequestConfig): AxiosPromise<{ [key: string]: number; }>; /** * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -1290,7 +1290,7 @@ export interface StoreApiInterface { * @throws {RequiredError} * @memberof StoreApiInterface */ - getOrderById(orderId: number, options?: any): AxiosPromise; + getOrderById(orderId: number, options?: AxiosRequestConfig): AxiosPromise; /** * @@ -1300,7 +1300,7 @@ export interface StoreApiInterface { * @throws {RequiredError} * @memberof StoreApiInterface */ - placeOrder(body: Order, options?: any): AxiosPromise; + placeOrder(body: Order, options?: AxiosRequestConfig): AxiosPromise; } @@ -1319,7 +1319,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: any) { + public deleteOrder(orderId: string, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1330,7 +1330,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: any) { + public getInventory(options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1342,7 +1342,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: any) { + public getOrderById(orderId: number, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1354,7 +1354,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(body: Order, options?: any) { + public placeOrder(body: Order, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } } @@ -1373,7 +1373,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: any = {}): Promise => { + createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -1409,7 +1409,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: any = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -1445,7 +1445,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: any = {}): Promise => { + createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -1481,7 +1481,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: any = {}): Promise => { + deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1515,7 +1515,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: any = {}): Promise => { + getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1550,7 +1550,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: any = {}): Promise => { + loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1592,7 +1592,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: any = {}): Promise => { + logoutUser: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1624,7 +1624,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: any = {}): Promise => { + updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -1673,7 +1673,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1684,7 +1684,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1695,7 +1695,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1706,7 +1706,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1717,7 +1717,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1729,7 +1729,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1739,7 +1739,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1751,7 +1751,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1863,7 +1863,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - createUser(body: User, options?: any): AxiosPromise; + createUser(body: User, options?: AxiosRequestConfig): AxiosPromise; /** * @@ -1873,7 +1873,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - createUsersWithArrayInput(body: Array, options?: any): AxiosPromise; + createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): AxiosPromise; /** * @@ -1883,7 +1883,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - createUsersWithListInput(body: Array, options?: any): AxiosPromise; + createUsersWithListInput(body: Array, options?: AxiosRequestConfig): AxiosPromise; /** * This can only be done by the logged in user. @@ -1893,7 +1893,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - deleteUser(username: string, options?: any): AxiosPromise; + deleteUser(username: string, options?: AxiosRequestConfig): AxiosPromise; /** * @@ -1903,7 +1903,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - getUserByName(username: string, options?: any): AxiosPromise; + getUserByName(username: string, options?: AxiosRequestConfig): AxiosPromise; /** * @@ -1914,7 +1914,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - loginUser(username: string, password: string, options?: any): AxiosPromise; + loginUser(username: string, password: string, options?: AxiosRequestConfig): AxiosPromise; /** * @@ -1923,7 +1923,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - logoutUser(options?: any): AxiosPromise; + logoutUser(options?: AxiosRequestConfig): AxiosPromise; /** * This can only be done by the logged in user. @@ -1934,7 +1934,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - updateUser(username: string, body: User, options?: any): AxiosPromise; + updateUser(username: string, body: User, options?: AxiosRequestConfig): AxiosPromise; } @@ -1953,7 +1953,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public createUser(body: User, options?: any) { + public createUser(body: User, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1965,7 +1965,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(body: Array, options?: any) { + public createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1977,7 +1977,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(body: Array, options?: any) { + public createUsersWithListInput(body: Array, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1989,7 +1989,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: any) { + public deleteUser(username: string, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -2001,7 +2001,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: any) { + public getUserByName(username: string, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -2014,7 +2014,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: any) { + public loginUser(username: string, password: string, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -2025,7 +2025,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: any) { + public logoutUser(options?: AxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -2038,7 +2038,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, body: User, options?: any) { + public updateUser(username: string, body: User, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts index c7eaf57bf47..e23d972eeb0 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts @@ -16,7 +16,7 @@ import { Configuration } from "./configuration"; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -38,7 +38,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: any; + options: AxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts index 03545d554fc..947482ddd64 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts @@ -13,7 +13,7 @@ */ -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import { Configuration } from '../../../configuration'; // Some imports not used depending on template conditions // @ts-ignore @@ -37,7 +37,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: any = {}): Promise => { + addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -78,7 +78,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -120,7 +120,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise => { + findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -162,7 +162,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: any = {}): Promise => { + findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -203,7 +203,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: any = {}): Promise => { + getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -240,7 +240,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: any = {}): Promise => { + updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -282,7 +282,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -334,7 +334,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -394,7 +394,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -406,7 +406,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -417,7 +417,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -429,7 +429,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -440,7 +440,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -451,7 +451,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -464,7 +464,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -477,7 +477,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -595,7 +595,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(body: Pet, options?: any) { + public addPet(body: Pet, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -608,7 +608,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: any) { + public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -620,7 +620,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) { + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -633,7 +633,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: any) { + public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -645,7 +645,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: any) { + public getPetById(petId: number, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -657,7 +657,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(body: Pet, options?: any) { + public updatePet(body: Pet, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -671,7 +671,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -685,7 +685,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) { + public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts index d9f74b95dbb..01205ff90bf 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts @@ -13,7 +13,7 @@ */ -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import { Configuration } from '../../../configuration'; // Some imports not used depending on template conditions // @ts-ignore @@ -35,7 +35,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: any = {}): Promise => { + deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -68,7 +68,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: any = {}): Promise => { + getInventory: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -102,7 +102,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: any = {}): Promise => { + getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -136,7 +136,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body: Order, options: any = {}): Promise => { + placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('placeOrder', 'body', body) const localVarPath = `/store/order`; @@ -182,7 +182,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -192,7 +192,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -203,7 +203,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -214,7 +214,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -285,7 +285,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: any) { + public deleteOrder(orderId: string, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -296,7 +296,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: any) { + public getInventory(options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -308,7 +308,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: any) { + public getOrderById(orderId: number, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -320,7 +320,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(body: Order, options?: any) { + public placeOrder(body: Order, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts index 3e63c7e2f36..fef5e04dbf2 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts @@ -13,7 +13,7 @@ */ -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import { Configuration } from '../../../configuration'; // Some imports not used depending on template conditions // @ts-ignore @@ -35,7 +35,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: any = {}): Promise => { + createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -71,7 +71,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: any = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -107,7 +107,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: any = {}): Promise => { + createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -143,7 +143,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: any = {}): Promise => { + deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -177,7 +177,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: any = {}): Promise => { + getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -212,7 +212,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: any = {}): Promise => { + loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -254,7 +254,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: any = {}): Promise => { + logoutUser: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -286,7 +286,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: any = {}): Promise => { + updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -335,7 +335,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -346,7 +346,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -357,7 +357,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -368,7 +368,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -379,7 +379,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -391,7 +391,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -401,7 +401,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -413,7 +413,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -526,7 +526,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(body: User, options?: any) { + public createUser(body: User, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath)); } @@ -538,7 +538,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(body: Array, options?: any) { + public createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -550,7 +550,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(body: Array, options?: any) { + public createUsersWithListInput(body: Array, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -562,7 +562,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: any) { + public deleteUser(username: string, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -574,7 +574,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: any) { + public getUserByName(username: string, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -587,7 +587,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: any) { + public loginUser(username: string, password: string, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -598,7 +598,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: any) { + public logoutUser(options?: AxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -611,7 +611,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, body: User, options?: any) { + public updateUser(username: string, body: User, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts index c7eaf57bf47..e23d972eeb0 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts @@ -16,7 +16,7 @@ import { Configuration } from "./configuration"; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -38,7 +38,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: any; + options: AxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/api-response.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/api-response.ts index 2a6dca47968..6b04a026e17 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/api-response.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/api-response.ts @@ -25,18 +25,18 @@ export interface ApiResponse { * @type {number} * @memberof ApiResponse */ - code?: number; + 'code'?: number; /** * * @type {string} * @memberof ApiResponse */ - type?: string; + 'type'?: string; /** * * @type {string} * @memberof ApiResponse */ - message?: string; + 'message'?: string; } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/category.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/category.ts index 40563929cfb..9e615116bb3 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/category.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/category.ts @@ -25,12 +25,12 @@ export interface Category { * @type {number} * @memberof Category */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof Category */ - name?: string; + 'name'?: string; } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/order.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/order.ts index 2d09d96315d..b2ad43c3e40 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/order.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/order.ts @@ -25,37 +25,37 @@ export interface Order { * @type {number} * @memberof Order */ - id?: number; + 'id'?: number; /** * * @type {number} * @memberof Order */ - petId?: number; + 'petId'?: number; /** * * @type {number} * @memberof Order */ - quantity?: number; + 'quantity'?: number; /** * * @type {string} * @memberof Order */ - shipDate?: string; + 'shipDate'?: string; /** * Order Status * @type {string} * @memberof Order */ - status?: OrderStatusEnum; + 'status'?: OrderStatusEnum; /** * * @type {boolean} * @memberof Order */ - complete?: boolean; + 'complete'?: boolean; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/pet.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/pet.ts index c3032807386..14d646fe149 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/pet.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/pet.ts @@ -27,37 +27,37 @@ export interface Pet { * @type {number} * @memberof Pet */ - id?: number; + 'id'?: number; /** * * @type {Category} * @memberof Pet */ - category?: Category; + 'category'?: Category; /** * * @type {string} * @memberof Pet */ - name: string; + 'name': string; /** * * @type {Array} * @memberof Pet */ - photoUrls: Array; + 'photoUrls': Array; /** * * @type {Array} * @memberof Pet */ - tags?: Array; + 'tags'?: Array; /** * pet status in the store * @type {string} * @memberof Pet */ - status?: PetStatusEnum; + 'status'?: PetStatusEnum; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/tag.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/tag.ts index 6cfb904b9b1..3529b927308 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/tag.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/tag.ts @@ -25,12 +25,12 @@ export interface Tag { * @type {number} * @memberof Tag */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof Tag */ - name?: string; + 'name'?: string; } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/user.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/user.ts index ae8d75a9cea..a33949559e3 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/user.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/user.ts @@ -25,48 +25,48 @@ export interface User { * @type {number} * @memberof User */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof User */ - username?: string; + 'username'?: string; /** * * @type {string} * @memberof User */ - firstName?: string; + 'firstName'?: string; /** * * @type {string} * @memberof User */ - lastName?: string; + 'lastName'?: string; /** * * @type {string} * @memberof User */ - email?: string; + 'email'?: string; /** * * @type {string} * @memberof User */ - password?: string; + 'password'?: string; /** * * @type {string} * @memberof User */ - phone?: string; + 'phone'?: string; /** * User Status * @type {number} * @memberof User */ - userStatus?: number; + 'userStatus'?: number; } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts index 0ce81cf1174..094dfebb9fc 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts @@ -14,7 +14,7 @@ import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; @@ -32,19 +32,19 @@ export interface ApiResponse { * @type {number} * @memberof ApiResponse */ - code?: number; + 'code'?: number; /** * * @type {string} * @memberof ApiResponse */ - type?: string; + 'type'?: string; /** * * @type {string} * @memberof ApiResponse */ - message?: string; + 'message'?: string; } /** * A category for a pet @@ -57,13 +57,13 @@ export interface Category { * @type {number} * @memberof Category */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof Category */ - name?: string; + 'name'?: string; } /** * An order for a pets from the pet store @@ -76,37 +76,37 @@ export interface Order { * @type {number} * @memberof Order */ - id?: number; + 'id'?: number; /** * * @type {number} * @memberof Order */ - petId?: number; + 'petId'?: number; /** * * @type {number} * @memberof Order */ - quantity?: number; + 'quantity'?: number; /** * * @type {string} * @memberof Order */ - shipDate?: string; + 'shipDate'?: string; /** * Order Status * @type {string} * @memberof Order */ - status?: OrderStatusEnum; + 'status'?: OrderStatusEnum; /** * * @type {boolean} * @memberof Order */ - complete?: boolean; + 'complete'?: boolean; } /** @@ -130,37 +130,37 @@ export interface Pet { * @type {number} * @memberof Pet */ - id?: number; + 'id'?: number; /** * * @type {Category} * @memberof Pet */ - category?: Category; + 'category'?: Category; /** * * @type {string} * @memberof Pet */ - name: string; + 'name': string; /** * * @type {Array} * @memberof Pet */ - photoUrls: Array; + 'photoUrls': Array; /** * * @type {Array} * @memberof Pet */ - tags?: Array; + 'tags'?: Array; /** * pet status in the store * @type {string} * @memberof Pet */ - status?: PetStatusEnum; + 'status'?: PetStatusEnum; } /** @@ -184,13 +184,13 @@ export interface Tag { * @type {number} * @memberof Tag */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof Tag */ - name?: string; + 'name'?: string; } /** * A User who is purchasing from the pet store @@ -203,49 +203,49 @@ export interface User { * @type {number} * @memberof User */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof User */ - username?: string; + 'username'?: string; /** * * @type {string} * @memberof User */ - firstName?: string; + 'firstName'?: string; /** * * @type {string} * @memberof User */ - lastName?: string; + 'lastName'?: string; /** * * @type {string} * @memberof User */ - email?: string; + 'email'?: string; /** * * @type {string} * @memberof User */ - password?: string; + 'password'?: string; /** * * @type {string} * @memberof User */ - phone?: string; + 'phone'?: string; /** * User Status * @type {number} * @memberof User */ - userStatus?: number; + 'userStatus'?: number; } /** @@ -261,7 +261,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: any = {}): Promise => { + addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -302,7 +302,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -344,7 +344,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise => { + findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -386,7 +386,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: any = {}): Promise => { + findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -427,7 +427,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: any = {}): Promise => { + getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -464,7 +464,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: any = {}): Promise => { + updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -506,7 +506,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -558,7 +558,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -618,7 +618,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -630,7 +630,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -641,7 +641,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -653,7 +653,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -664,7 +664,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -675,7 +675,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -688,7 +688,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -701,7 +701,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -819,7 +819,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(body: Pet, options?: any) { + public addPet(body: Pet, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -832,7 +832,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: any) { + public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -844,7 +844,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) { + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -857,7 +857,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: any) { + public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -869,7 +869,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: any) { + public getPetById(petId: number, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -881,7 +881,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(body: Pet, options?: any) { + public updatePet(body: Pet, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -895,7 +895,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -909,7 +909,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) { + public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } @@ -928,7 +928,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: any = {}): Promise => { + deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -961,7 +961,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: any = {}): Promise => { + getInventory: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -995,7 +995,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: any = {}): Promise => { + getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1029,7 +1029,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body: Order, options: any = {}): Promise => { + placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('placeOrder', 'body', body) const localVarPath = `/store/order`; @@ -1075,7 +1075,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1085,7 +1085,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1096,7 +1096,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1107,7 +1107,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1178,7 +1178,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: any) { + public deleteOrder(orderId: string, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1189,7 +1189,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: any) { + public getInventory(options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1201,7 +1201,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: any) { + public getOrderById(orderId: number, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1213,7 +1213,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(body: Order, options?: any) { + public placeOrder(body: Order, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } } @@ -1232,7 +1232,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: any = {}): Promise => { + createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -1268,7 +1268,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: any = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -1304,7 +1304,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: any = {}): Promise => { + createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -1340,7 +1340,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: any = {}): Promise => { + deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1374,7 +1374,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: any = {}): Promise => { + getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1409,7 +1409,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: any = {}): Promise => { + loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1451,7 +1451,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: any = {}): Promise => { + logoutUser: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1483,7 +1483,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: any = {}): Promise => { + updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -1532,7 +1532,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1543,7 +1543,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1554,7 +1554,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1565,7 +1565,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1576,7 +1576,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1588,7 +1588,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1598,7 +1598,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1610,7 +1610,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1723,7 +1723,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(body: User, options?: any) { + public createUser(body: User, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1735,7 +1735,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(body: Array, options?: any) { + public createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1747,7 +1747,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(body: Array, options?: any) { + public createUsersWithListInput(body: Array, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1759,7 +1759,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: any) { + public deleteUser(username: string, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1771,7 +1771,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: any) { + public getUserByName(username: string, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1784,7 +1784,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: any) { + public loginUser(username: string, password: string, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -1795,7 +1795,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: any) { + public logoutUser(options?: AxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -1808,7 +1808,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, body: User, options?: any) { + public updateUser(username: string, body: User, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts index c7eaf57bf47..e23d972eeb0 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts @@ -16,7 +16,7 @@ import { Configuration } from "./configuration"; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -38,7 +38,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: any; + options: AxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts index 1f8764baaf0..23924a4e415 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts @@ -14,7 +14,7 @@ import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; @@ -32,19 +32,19 @@ export interface ApiResponse { * @type {number} * @memberof ApiResponse */ - code?: number; + 'code'?: number; /** * * @type {string} * @memberof ApiResponse */ - type?: string; + 'type'?: string; /** * * @type {string} * @memberof ApiResponse */ - message?: string; + 'message'?: string; } /** * A category for a pet @@ -57,13 +57,13 @@ export interface Category { * @type {number} * @memberof Category */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof Category */ - name?: string; + 'name'?: string; } /** * An order for a pets from the pet store @@ -76,37 +76,37 @@ export interface Order { * @type {number} * @memberof Order */ - id?: number; + 'id'?: number; /** * * @type {number} * @memberof Order */ - petId?: number; + 'petId'?: number; /** * * @type {number} * @memberof Order */ - quantity?: number; + 'quantity'?: number; /** * * @type {string} * @memberof Order */ - shipDate?: string; + 'shipDate'?: string; /** * Order Status * @type {string} * @memberof Order */ - status?: OrderStatusEnum; + 'status'?: OrderStatusEnum; /** * * @type {boolean} * @memberof Order */ - complete?: boolean; + 'complete'?: boolean; } /** @@ -130,37 +130,37 @@ export interface Pet { * @type {number} * @memberof Pet */ - id?: number; + 'id'?: number; /** * * @type {Category} * @memberof Pet */ - category?: Category; + 'category'?: Category; /** * * @type {string} * @memberof Pet */ - name: string; + 'name': string; /** * * @type {Array} * @memberof Pet */ - photoUrls: Array; + 'photoUrls': Array; /** * * @type {Array} * @memberof Pet */ - tags?: Array; + 'tags'?: Array; /** * pet status in the store * @type {string} * @memberof Pet */ - status?: PetStatusEnum; + 'status'?: PetStatusEnum; } /** @@ -184,13 +184,13 @@ export interface Tag { * @type {number} * @memberof Tag */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof Tag */ - name?: string; + 'name'?: string; } /** * A User who is purchasing from the pet store @@ -203,49 +203,49 @@ export interface User { * @type {number} * @memberof User */ - id?: number; + 'id'?: number; /** * * @type {string} * @memberof User */ - username?: string; + 'username'?: string; /** * * @type {string} * @memberof User */ - firstName?: string; + 'firstName'?: string; /** * * @type {string} * @memberof User */ - lastName?: string; + 'lastName'?: string; /** * * @type {string} * @memberof User */ - email?: string; + 'email'?: string; /** * * @type {string} * @memberof User */ - password?: string; + 'password'?: string; /** * * @type {string} * @memberof User */ - phone?: string; + 'phone'?: string; /** * User Status * @type {number} * @memberof User */ - userStatus?: number; + 'userStatus'?: number; } /** @@ -261,7 +261,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: any = {}): Promise => { + addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -302,7 +302,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -344,7 +344,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise => { + findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -386,7 +386,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: any = {}): Promise => { + findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -427,7 +427,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: any = {}): Promise => { + getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -464,7 +464,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: any = {}): Promise => { + updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -506,7 +506,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -558,7 +558,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -618,7 +618,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -630,7 +630,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -641,7 +641,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -653,7 +653,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -664,7 +664,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -675,7 +675,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -688,7 +688,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -701,7 +701,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -966,7 +966,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(requestParameters: PetApiAddPetRequest, options?: any) { + public addPet(requestParameters: PetApiAddPetRequest, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).addPet(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } @@ -978,7 +978,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(requestParameters: PetApiDeletePetRequest, options?: any) { + public deletePet(requestParameters: PetApiDeletePetRequest, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(requestParameters.petId, requestParameters.apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -990,7 +990,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(requestParameters: PetApiFindPetsByStatusRequest, options?: any) { + public findPetsByStatus(requestParameters: PetApiFindPetsByStatusRequest, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(requestParameters.status, options).then((request) => request(this.axios, this.basePath)); } @@ -1003,7 +1003,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(requestParameters: PetApiFindPetsByTagsRequest, options?: any) { + public findPetsByTags(requestParameters: PetApiFindPetsByTagsRequest, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(requestParameters.tags, options).then((request) => request(this.axios, this.basePath)); } @@ -1015,7 +1015,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(requestParameters: PetApiGetPetByIdRequest, options?: any) { + public getPetById(requestParameters: PetApiGetPetByIdRequest, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(requestParameters.petId, options).then((request) => request(this.axios, this.basePath)); } @@ -1027,7 +1027,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(requestParameters: PetApiUpdatePetRequest, options?: any) { + public updatePet(requestParameters: PetApiUpdatePetRequest, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } @@ -1039,7 +1039,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(requestParameters: PetApiUpdatePetWithFormRequest, options?: any) { + public updatePetWithForm(requestParameters: PetApiUpdatePetWithFormRequest, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(requestParameters.petId, requestParameters.name, requestParameters.status, options).then((request) => request(this.axios, this.basePath)); } @@ -1051,7 +1051,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(requestParameters: PetApiUploadFileRequest, options?: any) { + public uploadFile(requestParameters: PetApiUploadFileRequest, options?: AxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(requestParameters.petId, requestParameters.additionalMetadata, requestParameters.file, options).then((request) => request(this.axios, this.basePath)); } } @@ -1070,7 +1070,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: any = {}): Promise => { + deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1103,7 +1103,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: any = {}): Promise => { + getInventory: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1137,7 +1137,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: any = {}): Promise => { + getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1171,7 +1171,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body?: Order, options: any = {}): Promise => { + placeOrder: async (body?: Order, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/store/order`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1215,7 +1215,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1225,7 +1225,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1236,7 +1236,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1247,7 +1247,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body?: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body?: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1360,7 +1360,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(requestParameters: StoreApiDeleteOrderRequest, options?: any) { + public deleteOrder(requestParameters: StoreApiDeleteOrderRequest, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(requestParameters.orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1371,7 +1371,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: any) { + public getInventory(options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1383,7 +1383,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(requestParameters: StoreApiGetOrderByIdRequest, options?: any) { + public getOrderById(requestParameters: StoreApiGetOrderByIdRequest, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(requestParameters.orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1395,7 +1395,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(requestParameters: StoreApiPlaceOrderRequest = {}, options?: any) { + public placeOrder(requestParameters: StoreApiPlaceOrderRequest = {}, options?: AxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } } @@ -1414,7 +1414,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: any = {}): Promise => { + createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -1450,7 +1450,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: any = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -1486,7 +1486,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: any = {}): Promise => { + createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -1522,7 +1522,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: any = {}): Promise => { + deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1556,7 +1556,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: any = {}): Promise => { + getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1591,7 +1591,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: any = {}): Promise => { + loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1633,7 +1633,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: any = {}): Promise => { + logoutUser: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1665,7 +1665,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: any = {}): Promise => { + updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -1714,7 +1714,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1725,7 +1725,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1736,7 +1736,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1747,7 +1747,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1758,7 +1758,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1770,7 +1770,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1780,7 +1780,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -1792,7 +1792,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -2017,7 +2017,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(requestParameters: UserApiCreateUserRequest, options?: any) { + public createUser(requestParameters: UserApiCreateUserRequest, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUser(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } @@ -2029,7 +2029,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(requestParameters: UserApiCreateUsersWithArrayInputRequest, options?: any) { + public createUsersWithArrayInput(requestParameters: UserApiCreateUsersWithArrayInputRequest, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } @@ -2041,7 +2041,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(requestParameters: UserApiCreateUsersWithListInputRequest, options?: any) { + public createUsersWithListInput(requestParameters: UserApiCreateUsersWithListInputRequest, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } @@ -2053,7 +2053,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(requestParameters: UserApiDeleteUserRequest, options?: any) { + public deleteUser(requestParameters: UserApiDeleteUserRequest, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(requestParameters.username, options).then((request) => request(this.axios, this.basePath)); } @@ -2065,7 +2065,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(requestParameters: UserApiGetUserByNameRequest, options?: any) { + public getUserByName(requestParameters: UserApiGetUserByNameRequest, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(requestParameters.username, options).then((request) => request(this.axios, this.basePath)); } @@ -2077,7 +2077,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(requestParameters: UserApiLoginUserRequest, options?: any) { + public loginUser(requestParameters: UserApiLoginUserRequest, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(requestParameters.username, requestParameters.password, options).then((request) => request(this.axios, this.basePath)); } @@ -2088,7 +2088,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: any) { + public logoutUser(options?: AxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -2100,7 +2100,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(requestParameters: UserApiUpdateUserRequest, options?: any) { + public updateUser(requestParameters: UserApiUpdateUserRequest, options?: AxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(requestParameters.username, requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts index c7eaf57bf47..e23d972eeb0 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts @@ -16,7 +16,7 @@ import { Configuration } from "./configuration"; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -38,7 +38,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: any; + options: AxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/tests/default/package-lock.json b/samples/client/petstore/typescript-axios/tests/default/package-lock.json index f8363dd1ece..f0ed99cef4a 100644 --- a/samples/client/petstore/typescript-axios/tests/default/package-lock.json +++ b/samples/client/petstore/typescript-axios/tests/default/package-lock.json @@ -1,2872 +1,27 @@ { "name": "typescript-fetch-test", "version": "1.0.0", - "lockfileVersion": 2, + "lockfileVersion": 1, "requires": true, - "packages": { - "": { - "name": "typescript-fetch-test", - "version": "1.0.0", - "hasInstallScript": true, - "license": "ISC", - "dependencies": { - "@openapitools/typescript-axios-petstore": "file:../../builds/with-npm-version", - "chai": "^4.2.0", - "ts-node": "^9.1.1" - }, - "devDependencies": { - "@types/chai": "^4.2.14", - "@types/mocha": "^8.2.0", - "@types/node": "^14.14.14", - "browserify": "^17.0.0", - "mocha": "^8.2.1", - "typescript": "^4.1.2" - } - }, - "../../builds/with-npm-version": { - "name": "@openapitools/typescript-axios-petstore", - "version": "1.0.0", - "license": "Unlicense", - "dependencies": { - "axios": "^0.21.1" - }, - "devDependencies": { - "@types/node": "^12.11.5", - "typescript": "^3.6.4" - } - }, - "../../builds/with-npm-version/node_modules/@types/node": { - "version": "12.20.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.1.tgz", - "integrity": "sha512-tCkE96/ZTO+cWbln2xfyvd6ngHLanvVlJ3e5BeirJ3BYI5GbAyubIrmV4JjjugDly5D9fHjOL5MNsqsCnqwW6g==", - "dev": true - }, - "../../builds/with-npm-version/node_modules/axios": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", - "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", - "dependencies": { - "follow-redirects": "^1.10.0" - } - }, - "../../builds/with-npm-version/node_modules/follow-redirects": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.2.tgz", - "integrity": "sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==", - "engines": { - "node": ">=4.0" - } - }, - "../../builds/with-npm-version/node_modules/typescript": { - "version": "3.9.9", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", - "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/@openapitools/typescript-axios-petstore": { - "resolved": "../../builds/with-npm-version", - "link": true - }, - "node_modules/@types/chai": { - "version": "4.2.14", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.14.tgz", - "integrity": "sha512-G+ITQPXkwTrslfG5L/BksmbLUA0M1iybEsmCWPqzSxsRRhJZimBKJkoMi8fr/CPygPTj4zO5pJH7I2/cm9M7SQ==", - "dev": true - }, - "node_modules/@types/mocha": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.0.tgz", - "integrity": "sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ==", - "dev": true - }, - "node_modules/@types/node": { - "version": "14.14.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.14.tgz", - "integrity": "sha512-UHnOPWVWV1z+VV8k6L1HhG7UbGBgIdghqF3l9Ny9ApPghbjICXkUJSd/b9gOgQfjM1r+37cipdw/HJ3F6ICEnQ==", - "dev": true - }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, - "node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-node": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", - "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", - "dev": true, - "dependencies": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" - } - }, - "node_modules/acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", - "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/array-filter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz", - "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=", - "dev": true - }, - "node_modules/asn1.js": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", - "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", - "dev": true, - "dependencies": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" - } - }, - "node_modules/asn1.js/node_modules/bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", - "dev": true - }, - "node_modules/assert": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", - "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", - "dev": true, - "dependencies": { - "object-assign": "^4.1.1", - "util": "0.10.3" - } - }, - "node_modules/assert/node_modules/inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "node_modules/assert/node_modules/util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "dependencies": { - "inherits": "2.0.1" - } - }, - "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "engines": { - "node": "*" - } - }, - "node_modules/available-typed-arrays": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz", - "integrity": "sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ==", - "dev": true, - "dependencies": { - "array-filter": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true - }, - "node_modules/bn.js": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", - "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "node_modules/browser-pack": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", - "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", - "dev": true, - "dependencies": { - "combine-source-map": "~0.8.0", - "defined": "^1.0.0", - "JSONStream": "^1.0.3", - "safe-buffer": "^5.1.1", - "through2": "^2.0.0", - "umd": "^3.0.0" - }, - "bin": { - "browser-pack": "bin/cmd.js" - } - }, - "node_modules/browser-resolve": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-2.0.0.tgz", - "integrity": "sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==", - "dev": true, - "dependencies": { - "resolve": "^1.17.0" - } - }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "node_modules/browserify": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-17.0.0.tgz", - "integrity": "sha512-SaHqzhku9v/j6XsQMRxPyBrSP3gnwmE27gLJYZgMT2GeK3J0+0toN+MnuNYDfHwVGQfLiMZ7KSNSIXHemy905w==", - "dev": true, - "dependencies": { - "assert": "^1.4.0", - "browser-pack": "^6.0.1", - "browser-resolve": "^2.0.0", - "browserify-zlib": "~0.2.0", - "buffer": "~5.2.1", - "cached-path-relative": "^1.0.0", - "concat-stream": "^1.6.0", - "console-browserify": "^1.1.0", - "constants-browserify": "~1.0.0", - "crypto-browserify": "^3.0.0", - "defined": "^1.0.0", - "deps-sort": "^2.0.1", - "domain-browser": "^1.2.0", - "duplexer2": "~0.1.2", - "events": "^3.0.0", - "glob": "^7.1.0", - "has": "^1.0.0", - "htmlescape": "^1.1.0", - "https-browserify": "^1.0.0", - "inherits": "~2.0.1", - "insert-module-globals": "^7.2.1", - "JSONStream": "^1.0.3", - "labeled-stream-splicer": "^2.0.0", - "mkdirp-classic": "^0.5.2", - "module-deps": "^6.2.3", - "os-browserify": "~0.3.0", - "parents": "^1.0.1", - "path-browserify": "^1.0.0", - "process": "~0.11.0", - "punycode": "^1.3.2", - "querystring-es3": "~0.2.0", - "read-only-stream": "^2.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.1.4", - "shasum-object": "^1.0.0", - "shell-quote": "^1.6.1", - "stream-browserify": "^3.0.0", - "stream-http": "^3.0.0", - "string_decoder": "^1.1.1", - "subarg": "^1.0.0", - "syntax-error": "^1.1.1", - "through2": "^2.0.0", - "timers-browserify": "^1.0.1", - "tty-browserify": "0.0.1", - "url": "~0.11.0", - "util": "~0.12.0", - "vm-browserify": "^1.0.0", - "xtend": "^4.0.0" - }, - "bin": { - "browserify": "bin/cmd.js" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "dependencies": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "dependencies": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "node_modules/browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "dependencies": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/browserify-rsa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", - "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", - "dev": true, - "dependencies": { - "bn.js": "^5.0.0", - "randombytes": "^2.0.1" - } - }, - "node_modules/browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", - "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", - "dev": true, - "dependencies": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - } - }, - "node_modules/browserify-sign/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, - "dependencies": { - "pako": "~1.0.5" - } - }, - "node_modules/buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", - "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", - "dev": true, - "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, - "node_modules/buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" - }, - "node_modules/buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "node_modules/builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, - "node_modules/cached-path-relative": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.2.tgz", - "integrity": "sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg==", - "dev": true - }, - "node_modules/call-bind": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz", - "integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.0" - } - }, - "node_modules/chai": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", - "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", - "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "pathval": "^1.1.0", - "type-detect": "^4.0.5" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "engines": { - "node": "*" - } - }, - "node_modules/cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/combine-source-map": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", - "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=", - "dev": true, - "dependencies": { - "convert-source-map": "~1.1.0", - "inline-source-map": "~0.6.0", - "lodash.memoize": "~3.0.3", - "source-map": "~0.5.3" - } - }, - "node_modules/combine-source-map/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "node_modules/concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "engines": [ - "node >= 0.8" - ], - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "node_modules/console-browserify": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", - "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", - "dev": true - }, - "node_modules/constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "node_modules/convert-source-map": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", - "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", - "dev": true - }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "node_modules/create-ecdh": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", - "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", - "dev": true, - "dependencies": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" - } - }, - "node_modules/create-ecdh/node_modules/bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", - "dev": true - }, - "node_modules/create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "dependencies": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "node_modules/create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "dependencies": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" - }, - "node_modules/crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "dependencies": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - }, - "engines": { - "node": "*" - } - }, - "node_modules/dash-ast": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz", - "integrity": "sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==", - "dev": true - }, - "node_modules/debug": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", - "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dependencies": { - "type-detect": "^4.0.0" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "dependencies": { - "object-keys": "^1.0.12" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", - "dev": true - }, - "node_modules/deps-sort": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.1.tgz", - "integrity": "sha512-1orqXQr5po+3KI6kQb9A4jnXT1PBwggGl2d7Sq2xsnOeI9GPcE/tGcF9UiSZtZBM7MukY4cAh7MemS6tZYipfw==", - "dev": true, - "dependencies": { - "JSONStream": "^1.0.3", - "shasum-object": "^1.0.0", - "subarg": "^1.0.0", - "through2": "^2.0.0" - }, - "bin": { - "deps-sort": "bin/cmd.js" - } - }, - "node_modules/des.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", - "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/detective": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.0.tgz", - "integrity": "sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg==", - "dev": true, - "dependencies": { - "acorn-node": "^1.6.1", - "defined": "^1.0.0", - "minimist": "^1.1.1" - }, - "bin": { - "detective": "bin/detective.js" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "dependencies": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "node_modules/diffie-hellman/node_modules/bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", - "dev": true - }, - "node_modules/domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true, - "engines": { - "node": ">=0.4", - "npm": ">=1.2" - } - }, - "node_modules/duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", - "dev": true, - "dependencies": { - "readable-stream": "^2.0.2" - } - }, - "node_modules/elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", - "dev": true, - "dependencies": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "node_modules/elliptic/node_modules/bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", - "dev": true - }, - "node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "node_modules/es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", - "dev": true, - "dependencies": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/events": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", - "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==", - "dev": true, - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "dependencies": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "node_modules/fast-safe-stringify": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", - "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==", - "dev": true - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, - "node_modules/foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/get-assigned-identifiers": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", - "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==", - "dev": true - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", - "engines": { - "node": "*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.1.tgz", - "integrity": "sha512-ZnWP+AmS1VUaLgTRy47+zKtjTxz+0xMpx3I52i+aalBK1QP19ggLF3Db89KJX7kjfOfP2eoa01qc++GwPgufPg==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - } - }, - "node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true, - "engines": { - "node": ">=4.x" - } - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/hash-base/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/htmlescape": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", - "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/inline-source-map": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", - "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", - "dev": true, - "dependencies": { - "source-map": "~0.5.3" - } - }, - "node_modules/inline-source-map/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/insert-module-globals": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.1.tgz", - "integrity": "sha512-ufS5Qq9RZN+Bu899eA9QCAYThY+gGW7oRkmb0vC93Vlyu/CFGcH0OYPEjVkDXA5FEbTt1+VWzdoOD3Ny9N+8tg==", - "dev": true, - "dependencies": { - "acorn-node": "^1.5.2", - "combine-source-map": "^0.8.0", - "concat-stream": "^1.6.1", - "is-buffer": "^1.1.0", - "JSONStream": "^1.0.3", - "path-is-absolute": "^1.0.1", - "process": "~0.11.0", - "through2": "^2.0.0", - "undeclared-identifiers": "^1.1.2", - "xtend": "^4.0.0" - }, - "bin": { - "insert-module-globals": "bin/cmd.js" - } - }, - "node_modules/is-arguments": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", - "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "node_modules/is-callable": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", - "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-core-module": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", - "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - } - }, - "node_modules/is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/is-generator-function": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.8.tgz", - "integrity": "sha512-2Omr/twNtufVZFr1GhxjOMFPAj2sjc/dKaIqBhvo4qciXfJmITGH6ZGd8eZYNHza8t1y0e01AuqRhJwfWp26WQ==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-regex": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", - "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.4.tgz", - "integrity": "sha512-ILaRgn4zaSrVNXNGtON6iFNotXW3hAPF3+0fB1usg2jFlWqo5fEDdmJkz0zBfoi7Dgskr8Khi2xZ8cXqZEfXNA==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.2", - "call-bind": "^1.0.0", - "es-abstract": "^1.18.0-next.1", - "foreach": "^2.0.5", - "has-symbols": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "node_modules/js-yaml": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", - "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", - "dev": true, - "engines": [ - "node >= 0.2.0" - ] - }, - "node_modules/JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", - "dev": true, - "dependencies": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - }, - "bin": { - "JSONStream": "bin.js" - }, - "engines": { - "node": "*" - } - }, - "node_modules/labeled-stream-splicer": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz", - "integrity": "sha512-Ca4LSXFFZUjPScRaqOcFxneA0VpKZr4MMYCljyQr4LIewTLb3Y0IUTIsnBBsVubIeEfxeSZpSjSsRM8APEQaAw==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "stream-splicer": "^2.0.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/lodash.memoize": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", - "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", - "dev": true - }, - "node_modules/log-symbols": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", - "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" - }, - "node_modules/md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "dependencies": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - }, - "bin": { - "miller-rabin": "bin/miller-rabin" - } - }, - "node_modules/miller-rabin/node_modules/bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", - "dev": true - }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, - "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true - }, - "node_modules/mocha": { - "version": "8.2.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.2.1.tgz", - "integrity": "sha512-cuLBVfyFfFqbNR0uUKbDGXKGk+UDFe6aR4os78XIrMQpZl/nv7JYHcvP5MFIAb374b2zFXsdgEGwmzMtP0Xg8w==", - "dev": true, - "dependencies": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.4.3", - "debug": "4.2.0", - "diff": "4.0.2", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.1.6", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.14.0", - "log-symbols": "4.0.0", - "minimatch": "3.0.4", - "ms": "2.1.2", - "nanoid": "3.1.12", - "serialize-javascript": "5.0.1", - "strip-json-comments": "3.1.1", - "supports-color": "7.2.0", - "which": "2.0.2", - "wide-align": "1.1.3", - "workerpool": "6.0.2", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" - }, - "engines": { - "node": ">= 10.12.0" - } - }, - "node_modules/mocha/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/mocha/node_modules/anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/mocha/node_modules/binary-extensions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", - "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/mocha/node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/mocha/node_modules/chokidar": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", - "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.1.2" - } - }, - "node_modules/mocha/node_modules/cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "node_modules/mocha/node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/mocha/node_modules/fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/mocha/node_modules/glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/mocha/node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/mocha/node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/mocha/node_modules/is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/mocha/node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/mocha/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/mocha/node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/mocha/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/mocha/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/mocha/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/mocha/node_modules/readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/mocha/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/mocha/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/mocha/node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/mocha/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/mocha/node_modules/yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "dependencies": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "node_modules/mocha/node_modules/yargs/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/module-deps": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.3.tgz", - "integrity": "sha512-fg7OZaQBcL4/L+AK5f4iVqf9OMbCclXfy/znXRxTVhJSeW5AIlS9AwheYwDaXM3lVW7OBeaeUEY3gbaC6cLlSA==", - "dev": true, - "dependencies": { - "browser-resolve": "^2.0.0", - "cached-path-relative": "^1.0.2", - "concat-stream": "~1.6.0", - "defined": "^1.0.0", - "detective": "^5.2.0", - "duplexer2": "^0.1.2", - "inherits": "^2.0.1", - "JSONStream": "^1.0.3", - "parents": "^1.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.4.0", - "stream-combiner2": "^1.1.1", - "subarg": "^1.0.0", - "through2": "^2.0.0", - "xtend": "^4.0.0" - }, - "bin": { - "module-deps": "bin/cmd.js" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/nanoid": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.12.tgz", - "integrity": "sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || >=13.7" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", - "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", - "dev": true - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", - "dev": true - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true - }, - "node_modules/parents": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", - "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", - "dev": true, - "dependencies": { - "path-platform": "~0.11.15" - } - }, - "node_modules/parse-asn1": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", - "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", - "dev": true, - "dependencies": { - "asn1.js": "^5.2.0", - "browserify-aes": "^1.0.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, - "node_modules/path-browserify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", - "dev": true - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "node_modules/path-platform": { - "version": "0.11.15", - "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", - "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/pathval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", - "engines": { - "node": "*" - } - }, - "node_modules/pbkdf2": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", - "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", - "dev": true, - "dependencies": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true, - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "node_modules/public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, - "dependencies": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/public-encrypt/node_modules/bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", - "dev": true - }, - "node_modules/punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "node_modules/querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true, - "engines": { - "node": ">=0.4.x" - } - }, - "node_modules/querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true, - "engines": { - "node": ">=0.4.x" - } - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "dependencies": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "node_modules/read-only-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", - "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", - "dev": true, - "dependencies": { - "readable-stream": "^2.0.2" - } - }, - "node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/readable-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/readable-stream/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "node_modules/resolve": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", - "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", - "dev": true, - "dependencies": { - "is-core-module": "^2.1.0", - "path-parse": "^1.0.6" - } - }, - "node_modules/ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "node_modules/serialize-javascript": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", - "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "node_modules/sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, - "node_modules/shasum-object": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shasum-object/-/shasum-object-1.0.0.tgz", - "integrity": "sha512-Iqo5rp/3xVi6M4YheapzZhhGPVs0yZwHj7wvwQ1B9z8H6zk+FEnI7y3Teq7qwnekfEhu8WmG2z0z4iWZaxLWVg==", - "dev": true, - "dependencies": { - "fast-safe-stringify": "^2.0.7" - } - }, - "node_modules/shell-quote": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", - "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", - "dev": true - }, - "node_modules/simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "dev": true - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "node_modules/stream-browserify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", - "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", - "dev": true, - "dependencies": { - "inherits": "~2.0.4", - "readable-stream": "^3.5.0" - } - }, - "node_modules/stream-browserify/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/stream-combiner2": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", - "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", - "dev": true, - "dependencies": { - "duplexer2": "~0.1.0", - "readable-stream": "^2.0.2" - } - }, - "node_modules/stream-http": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.1.1.tgz", - "integrity": "sha512-S7OqaYu0EkFpgeGFb/NPOoPLxFko7TPqtEeFg5DXPB4v/KETHG0Ln6fRFrNezoelpaDKmycEmmZ81cC9DAwgYg==", - "dev": true, - "dependencies": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "xtend": "^4.0.2" - } - }, - "node_modules/stream-http/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/stream-splicer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.1.tgz", - "integrity": "sha512-Xizh4/NPuYSyAXyT7g8IvdJ9HJpxIGL9PjyhtywCZvvP0OPIdqyrr4dMikeuvY8xahpdKEBlBTySe583totajg==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.2" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz", - "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz", - "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", - "dev": true, - "dependencies": { - "minimist": "^1.1.0" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/syntax-error": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", - "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", - "dev": true, - "dependencies": { - "acorn-node": "^1.2.0" - } - }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/timers-browserify": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", - "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", - "dev": true, - "dependencies": { - "process": "~0.11.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/ts-node": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz", - "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==", - "dependencies": { - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "source-map-support": "^0.5.17", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/tty-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", - "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", - "dev": true - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "engines": { - "node": ">=4" - } - }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "node_modules/typescript": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz", - "integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/umd": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", - "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", - "dev": true, - "bin": { - "umd": "bin/cli.js" - } - }, - "node_modules/undeclared-identifiers": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.3.tgz", - "integrity": "sha512-pJOW4nxjlmfwKApE4zvxLScM/njmwj/DiUBv7EabwE4O8kRUy+HIwxQtZLBPll/jx1LJyBcqNfB3/cpv9EZwOw==", - "dev": true, - "dependencies": { - "acorn-node": "^1.3.0", - "dash-ast": "^1.0.0", - "get-assigned-identifiers": "^1.2.0", - "simple-concat": "^1.0.0", - "xtend": "^4.0.1" - }, - "bin": { - "undeclared-identifiers": "bin.js" - } - }, - "node_modules/url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "dependencies": { - "punycode": "1.3.2", - "querystring": "0.2.0" - } - }, - "node_modules/url/node_modules/punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - }, - "node_modules/util": { - "version": "0.12.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.3.tgz", - "integrity": "sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "safe-buffer": "^5.1.2", - "which-typed-array": "^1.1.2" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "node_modules/vm-browserify": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", - "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", - "dev": true - }, - "node_modules/which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "node_modules/which-typed-array": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.4.tgz", - "integrity": "sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.2", - "call-bind": "^1.0.0", - "es-abstract": "^1.18.0-next.1", - "foreach": "^2.0.5", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.1", - "is-typed-array": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "dependencies": { - "string-width": "^1.0.2 || 2" - } - }, - "node_modules/workerpool": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.2.tgz", - "integrity": "sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q==", - "dev": true - }, - "node_modules/wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/wrap-ansi/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/wrap-ansi/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, - "engines": { - "node": ">=0.4" - } - }, - "node_modules/y18n": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", - "dev": true - }, - "node_modules/yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "node_modules/yargs-parser/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser/node_modules/camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser/node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser/node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "engines": { - "node": ">=6" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - } - } - }, "dependencies": { "@openapitools/typescript-axios-petstore": { "version": "file:../../builds/with-npm-version", "requires": { - "@types/node": "^12.11.5", - "axios": "^0.21.1", - "typescript": "^3.6.4" + "axios": "^0.21.4" }, "dependencies": { - "@types/node": { - "version": "12.20.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.1.tgz", - "integrity": "sha512-tCkE96/ZTO+cWbln2xfyvd6ngHLanvVlJ3e5BeirJ3BYI5GbAyubIrmV4JjjugDly5D9fHjOL5MNsqsCnqwW6g==", - "dev": true - }, "axios": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", - "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", "requires": { - "follow-redirects": "^1.10.0" + "follow-redirects": "^1.14.0" } }, "follow-redirects": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.2.tgz", - "integrity": "sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==" - }, - "typescript": { - "version": "3.9.9", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", - "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", - "dev": true + "version": "1.14.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz", + "integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==" } } }, @@ -2894,6 +49,16 @@ "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", "dev": true }, + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dev": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, "acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", @@ -3053,9 +218,9 @@ "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", "dev": true, "requires": { + "JSONStream": "^1.0.3", "combine-source-map": "~0.8.0", "defined": "^1.0.0", - "JSONStream": "^1.0.3", "safe-buffer": "^5.1.1", "through2": "^2.0.0", "umd": "^3.0.0" @@ -3082,6 +247,7 @@ "integrity": "sha512-SaHqzhku9v/j6XsQMRxPyBrSP3gnwmE27gLJYZgMT2GeK3J0+0toN+MnuNYDfHwVGQfLiMZ7KSNSIXHemy905w==", "dev": true, "requires": { + "JSONStream": "^1.0.3", "assert": "^1.4.0", "browser-pack": "^6.0.1", "browser-resolve": "^2.0.0", @@ -3103,7 +269,6 @@ "https-browserify": "^1.0.0", "inherits": "~2.0.1", "insert-module-globals": "^7.2.1", - "JSONStream": "^1.0.3", "labeled-stream-splicer": "^2.0.0", "mkdirp-classic": "^0.5.2", "module-deps": "^6.2.3", @@ -3866,11 +1031,11 @@ "integrity": "sha512-ufS5Qq9RZN+Bu899eA9QCAYThY+gGW7oRkmb0vC93Vlyu/CFGcH0OYPEjVkDXA5FEbTt1+VWzdoOD3Ny9N+8tg==", "dev": true, "requires": { + "JSONStream": "^1.0.3", "acorn-node": "^1.5.2", "combine-source-map": "^0.8.0", "concat-stream": "^1.6.1", "is-buffer": "^1.1.0", - "JSONStream": "^1.0.3", "path-is-absolute": "^1.0.1", "process": "~0.11.0", "through2": "^2.0.0", @@ -3991,16 +1156,6 @@ "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", "dev": true }, - "JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", - "dev": true, - "requires": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - } - }, "labeled-stream-splicer": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz", @@ -4372,6 +1527,7 @@ "integrity": "sha512-fg7OZaQBcL4/L+AK5f4iVqf9OMbCclXfy/znXRxTVhJSeW5AIlS9AwheYwDaXM3lVW7OBeaeUEY3gbaC6cLlSA==", "dev": true, "requires": { + "JSONStream": "^1.0.3", "browser-resolve": "^2.0.0", "cached-path-relative": "^1.0.2", "concat-stream": "~1.6.0", @@ -4379,7 +1535,6 @@ "detective": "^5.2.0", "duplexer2": "^0.1.2", "inherits": "^2.0.1", - "JSONStream": "^1.0.3", "parents": "^1.0.0", "readable-stream": "^2.0.2", "resolve": "^1.4.0", @@ -4842,15 +1997,6 @@ "readable-stream": "^2.0.2" } }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "requires": { - "safe-buffer": "~5.2.0" - } - }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -4898,6 +2044,15 @@ "define-properties": "^1.1.3" } }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", From 026dd8d5f883b5ca12ccab3145f631f9e3065109 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 2 Oct 2021 15:38:05 +0800 Subject: [PATCH 37/50] Move TypeScript, JavaScript tests to CircleCI (#10510) * move ts, js tests to circleci * set NODE_ENV * curl -k * comment out haskell installation --- .travis.yml | 22 ---------------------- CI/circle_parallel.sh | 11 +++++------ pom.xml | 6 +++--- 3 files changed, 8 insertions(+), 31 deletions(-) diff --git a/.travis.yml b/.travis.yml index bd73fe21c67..92ac1baaeae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,28 +21,11 @@ cache: - $HOME/samples/client/petstore/php/OpenAPIToolsClient-php/vendor - $HOME/samples/client/petstore/ruby/vendor/bundle - $HOME/samples/client/petstore/python/.venv/ - - $HOME/samples/openapi3/client/petstore/typescript/tests/default/node_modules - - $HOME/samples/openapi3/client/petstore/typescript/tests/jquery/node_modules - - $HOME/samples/openapi3/client/petstore/typescript/tests/object_params/node_modules - - $HOME/samples/openapi3/client/petstore/typescript/tests/inversify/node_modules - - $HOME/samples/client/petstore/typescript-node/npm/node_modules - - $HOME/samples/client/petstore/typescript-node/npm/typings/ - - $HOME/samples/client/petstore/typescript-fetch/tests/default/node_modules - - $HOME/samples/client/petstore/typescript-fetch/tests/default/typings - - $HOME/samples/client/petstore/typescript-fetch/builds/default/node_modules - - $HOME/samples/client/petstore/typescript-fetch/builds/default/typings - - $HOME/samples/client/petstore/typescript-fetch/builds/es6-target/node_modules - - $HOME/samples/client/petstore/typescript-fetch/builds/es6-target/typings - - $HOME/samples/client/petstore/typescript-fetch/builds/with-npm-version/node_modules - - $HOME/samples/client/petstore/typescript-fetch/npm/with-npm-version/typings - - $HOME/samples/client/petstore/typescript-angular/node_modules - - $HOME/samples/client/petstore/typescript-angular/typings - $HOME/samples/server/petstore/rust-server/target - $HOME/perl5 - $HOME/.cargo - $HOME/.pub-cache - $HOME/samples/server/petstore/cpp-pistache/pistache - - $HOME/.npm - $HOME/.rvm/gems/ruby-2.4.1 - $HOME/website/node_modules/ - $HOME/.cache/deno @@ -88,11 +71,6 @@ before_install: - curl https://sh.rustup.rs -sSf | sh -s -- -y -v # required when sudo: required for the Ruby petstore tests - gem install bundler - - nvm install 12.20.0 - - nvm use 12.20.0 - - npm install -g typescript - - npm install -g npm - - npm config set registry http://registry.npmjs.org/ # set python 3.6.3 as default - source ~/virtualenv/python3.6/bin/activate # -- skip bash test to shorten build time diff --git a/CI/circle_parallel.sh b/CI/circle_parallel.sh index e8a80f93789..6e231909d61 100755 --- a/CI/circle_parallel.sh +++ b/CI/circle_parallel.sh @@ -7,6 +7,8 @@ NODE_INDEX=${CIRCLE_NODE_INDEX:-0} set -e +export NODE_ENV=test + function cleanup { # Show logs of 'petstore.swagger' container to troubleshoot Unit Test failures, if any. docker logs petstore.swagger # container name specified in circle.yml @@ -20,15 +22,12 @@ if [ "$NODE_INDEX" = "1" ]; then mvn --no-snapshot-updates --quiet verify -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error - echo "show ivy2 cache" - ls -l /home/circleci/.ivy2/cache - elif [ "$NODE_INDEX" = "2" ]; then echo "Running node $NODE_INDEX to test haskell" # install haskell - curl -sSL https://get.haskellstack.org/ | sh - stack upgrade - stack --version + #curl -sSLk https://get.haskellstack.org/ | sh + #stack upgrade + #stack --version # prepare r sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" >> /etc/apt/sources.list' gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 diff --git a/pom.xml b/pom.xml index eeb086592fc..820d2f0d605 100644 --- a/pom.xml +++ b/pom.xml @@ -1193,8 +1193,6 @@ - samples/client/petstore/typescript-axios/builds/with-npm-version - samples/client/petstore/typescript-axios/tests/default @@ -1222,7 +1220,6 @@ - samples/client/petstore/javascript-flowtyped samples/client/petstore/python-legacy samples/client/petstore/python-asyncio samples/client/petstore/python-tornado @@ -1359,6 +1356,7 @@ samples/client/petstore/go samples/openapi3/client/petstore/go + samples/client/petstore/javascript-flowtyped samples/client/petstore/javascript-es6 samples/client/petstore/javascript-promise-es6 samples/server/petstore/go-api-server @@ -1386,6 +1384,8 @@ samples/client/petstore/typescript-fetch/tests/default samples/client/petstore/typescript-node/npm samples/client/petstore/typescript-rxjs/builds/with-npm-version + samples/client/petstore/typescript-axios/builds/with-npm-version + samples/client/petstore/typescript-axios/tests/default From 38b8685b0083c93cea8546785c28295af309bb70 Mon Sep 17 00:00:00 2001 From: Heikki Haapala <79839823+aiven-hh@users.noreply.github.com> Date: Sun, 3 Oct 2021 17:30:06 +0300 Subject: [PATCH 38/50] [typescript-axios] Fix invalid query params usage (#10512) * fix: axios query params from options Remove passing query params from options to setSearchParams. Options were already passed to Axios in full so this removes some duplicate logic. Axios does merge query params given in path and through params option so no change in outcome. * chore: generate samples --- .../typescript-axios/apiInner.mustache | 2 +- .../builds/composed-schemas/api.ts | 6 +- .../typescript-axios/builds/default/api.ts | 40 +++++----- .../typescript-axios/builds/es6-target/api.ts | 40 +++++----- .../builds/test-petstore/api.ts | 78 +++++++++---------- .../builds/with-complex-headers/api.ts | 40 +++++----- .../api.ts | 78 +++++++++---------- .../builds/with-interfaces/api.ts | 40 +++++----- .../api/another/level/pet-api.ts | 16 ++-- .../api/another/level/store-api.ts | 8 +- .../api/another/level/user-api.ts | 16 ++-- .../builds/with-npm-version/api.ts | 40 +++++----- .../with-single-request-parameters/api.ts | 40 +++++----- 13 files changed, 222 insertions(+), 222 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache index 3b974480c81..14b4d67503a 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache @@ -182,7 +182,7 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur {{/consumes.0}} {{/bodyParam}} - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; {{#hasFormParams}} diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts b/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts index 2962f7c498d..13c92e708ca 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts @@ -212,7 +212,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(inlineObject, localVarRequestOptions, configuration) @@ -245,7 +245,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(petByAgePetByType, localVarRequestOptions, configuration) @@ -278,7 +278,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(catDog, localVarRequestOptions, configuration) diff --git a/samples/client/petstore/typescript-axios/builds/default/api.ts b/samples/client/petstore/typescript-axios/builds/default/api.ts index 094dfebb9fc..fd8ae456d7a 100644 --- a/samples/client/petstore/typescript-axios/builds/default/api.ts +++ b/samples/client/petstore/typescript-axios/builds/default/api.ts @@ -284,7 +284,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -328,7 +328,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -369,7 +369,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -411,7 +411,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -448,7 +448,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -487,7 +487,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -539,7 +539,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams.toString(); @@ -591,7 +591,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams; @@ -946,7 +946,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -979,7 +979,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1013,7 +1013,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1048,7 +1048,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1251,7 +1251,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1287,7 +1287,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1323,7 +1323,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1358,7 +1358,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1392,7 +1392,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1436,7 +1436,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1466,7 +1466,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1505,7 +1505,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/api.ts b/samples/client/petstore/typescript-axios/builds/es6-target/api.ts index 094dfebb9fc..fd8ae456d7a 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/api.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/api.ts @@ -284,7 +284,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -328,7 +328,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -369,7 +369,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -411,7 +411,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -448,7 +448,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -487,7 +487,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -539,7 +539,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams.toString(); @@ -591,7 +591,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams; @@ -946,7 +946,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -979,7 +979,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1013,7 +1013,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1048,7 +1048,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1251,7 +1251,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1287,7 +1287,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1323,7 +1323,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1358,7 +1358,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1392,7 +1392,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1436,7 +1436,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1466,7 +1466,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1505,7 +1505,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts index 5a6a0ea393c..3d2a576b59c 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts @@ -1774,7 +1774,7 @@ export const AnotherFakeApiAxiosParamCreator = function (configuration?: Configu localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(client, localVarRequestOptions, configuration) @@ -1875,7 +1875,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1970,7 +1970,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -2002,7 +2002,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -2035,7 +2035,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(outerComposite, localVarRequestOptions, configuration) @@ -2068,7 +2068,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -2101,7 +2101,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -2132,7 +2132,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -2166,7 +2166,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(fileSchemaTestClass, localVarRequestOptions, configuration) @@ -2208,7 +2208,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) @@ -2244,7 +2244,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(client, localVarRequestOptions, configuration) @@ -2360,7 +2360,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams.toString(); @@ -2435,7 +2435,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams.toString(); @@ -2506,7 +2506,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -2541,7 +2541,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(requestBody, localVarRequestOptions, configuration) @@ -2589,7 +2589,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams.toString(); @@ -2654,7 +2654,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -3291,7 +3291,7 @@ export const FakeClassnameTags123ApiAxiosParamCreator = function (configuration? localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(client, localVarRequestOptions, configuration) @@ -3404,7 +3404,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(pet, localVarRequestOptions, configuration) @@ -3448,7 +3448,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -3491,7 +3491,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -3535,7 +3535,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -3572,7 +3572,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -3613,7 +3613,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(pet, localVarRequestOptions, configuration) @@ -3665,7 +3665,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams.toString(); @@ -3717,7 +3717,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams; @@ -3771,7 +3771,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams; @@ -4165,7 +4165,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -4198,7 +4198,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -4232,7 +4232,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -4267,7 +4267,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(order, localVarRequestOptions, configuration) @@ -4470,7 +4470,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) @@ -4506,7 +4506,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) @@ -4542,7 +4542,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) @@ -4577,7 +4577,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -4611,7 +4611,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -4655,7 +4655,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -4685,7 +4685,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -4724,7 +4724,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts b/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts index 417cd18189f..4966ecd507d 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts @@ -295,7 +295,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(pet, localVarRequestOptions, configuration) @@ -339,7 +339,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -380,7 +380,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -422,7 +422,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -459,7 +459,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -498,7 +498,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(pet, localVarRequestOptions, configuration) @@ -550,7 +550,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams.toString(); @@ -602,7 +602,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams; @@ -963,7 +963,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -996,7 +996,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1030,7 +1030,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1065,7 +1065,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(order, localVarRequestOptions, configuration) @@ -1268,7 +1268,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) @@ -1304,7 +1304,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) @@ -1340,7 +1340,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) @@ -1375,7 +1375,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1409,7 +1409,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1453,7 +1453,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1483,7 +1483,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1522,7 +1522,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts index 177b990667f..5ef2fa3cbbf 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts @@ -1396,7 +1396,7 @@ export const AnotherFakeApiAxiosParamCreator = function (configuration?: Configu localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(client, localVarRequestOptions, configuration) @@ -1497,7 +1497,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1592,7 +1592,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1624,7 +1624,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1657,7 +1657,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(outerComposite, localVarRequestOptions, configuration) @@ -1690,7 +1690,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1723,7 +1723,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1758,7 +1758,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(fileSchemaTestClass, localVarRequestOptions, configuration) @@ -1800,7 +1800,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) @@ -1836,7 +1836,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(client, localVarRequestOptions, configuration) @@ -1952,7 +1952,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams.toString(); @@ -2027,7 +2027,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams.toString(); @@ -2098,7 +2098,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -2133,7 +2133,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(requestBody, localVarRequestOptions, configuration) @@ -2181,7 +2181,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams.toString(); @@ -2246,7 +2246,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -2290,7 +2290,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -2930,7 +2930,7 @@ export const FakeClassnameTags123ApiAxiosParamCreator = function (configuration? localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(client, localVarRequestOptions, configuration) @@ -3043,7 +3043,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(pet, localVarRequestOptions, configuration) @@ -3087,7 +3087,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -3130,7 +3130,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -3174,7 +3174,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -3211,7 +3211,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -3252,7 +3252,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(pet, localVarRequestOptions, configuration) @@ -3304,7 +3304,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams.toString(); @@ -3356,7 +3356,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams; @@ -3410,7 +3410,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams; @@ -3804,7 +3804,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -3837,7 +3837,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -3871,7 +3871,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -3906,7 +3906,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(order, localVarRequestOptions, configuration) @@ -4109,7 +4109,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) @@ -4145,7 +4145,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) @@ -4181,7 +4181,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) @@ -4216,7 +4216,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -4250,7 +4250,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -4294,7 +4294,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -4324,7 +4324,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -4363,7 +4363,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts index a1fef62370e..986bfee5787 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts @@ -284,7 +284,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -328,7 +328,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -369,7 +369,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -411,7 +411,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -448,7 +448,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -487,7 +487,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -539,7 +539,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams.toString(); @@ -591,7 +591,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams; @@ -1040,7 +1040,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1073,7 +1073,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1107,7 +1107,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1142,7 +1142,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1392,7 +1392,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1428,7 +1428,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1464,7 +1464,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1499,7 +1499,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1533,7 +1533,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1577,7 +1577,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1607,7 +1607,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1646,7 +1646,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts index 947482ddd64..d84bdc20973 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts @@ -60,7 +60,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -104,7 +104,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -145,7 +145,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -187,7 +187,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -224,7 +224,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -263,7 +263,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -315,7 +315,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams.toString(); @@ -367,7 +367,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams; diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts index 01205ff90bf..bf058d959f5 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts @@ -53,7 +53,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -86,7 +86,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -120,7 +120,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -155,7 +155,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts index fef5e04dbf2..44258306cc5 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts @@ -54,7 +54,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -90,7 +90,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -126,7 +126,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -161,7 +161,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -195,7 +195,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -239,7 +239,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -269,7 +269,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -308,7 +308,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts index 094dfebb9fc..fd8ae456d7a 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts @@ -284,7 +284,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -328,7 +328,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -369,7 +369,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -411,7 +411,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -448,7 +448,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -487,7 +487,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -539,7 +539,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams.toString(); @@ -591,7 +591,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams; @@ -946,7 +946,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -979,7 +979,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1013,7 +1013,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1048,7 +1048,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1251,7 +1251,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1287,7 +1287,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1323,7 +1323,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1358,7 +1358,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1392,7 +1392,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1436,7 +1436,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1466,7 +1466,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1505,7 +1505,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts index 23924a4e415..3afadf82f36 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts @@ -284,7 +284,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -328,7 +328,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -369,7 +369,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -411,7 +411,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -448,7 +448,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -487,7 +487,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -539,7 +539,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams.toString(); @@ -591,7 +591,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams; @@ -1088,7 +1088,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1121,7 +1121,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1155,7 +1155,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1188,7 +1188,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1433,7 +1433,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1469,7 +1469,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1505,7 +1505,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) @@ -1540,7 +1540,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1574,7 +1574,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1618,7 +1618,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1648,7 +1648,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1687,7 +1687,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) From 768c76ea3302373e5fb107b0c7facbfa9b25d545 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 4 Oct 2021 10:53:35 +0800 Subject: [PATCH 39/50] Add a link to hackernoon article (#10518) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5805509e444..9327133b55d 100644 --- a/README.md +++ b/README.md @@ -828,6 +828,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2021-07-29 - [How To Rewrite a Huge Codebase](https://dzone.com/articles/how-to-rewrite-a-huge-code-base) by [Curtis Poe](https://dzone.com/users/4565446/publiusovidius.html) - 2021-08-21 - [Generating Client APIs using Swagger Part 1](https://medium.com/@flowsquad/generating-client-apis-using-swagger-part-1-2d46f13f5e92) by [FlowSquad.io](https://medium.com/@flowsquad) - 2021-09-11 - [Invoking AWS ParallelCluster API](https://docs.aws.amazon.com/parallelcluster/latest/ug/api-reference-v3.html) at [AWS ParallelCluster API official documentation](https://docs.aws.amazon.com/parallelcluster/latest/ug/api-reference-v3.html) +- 2021-10-02 - [How to Write Fewer Lines of Code with the OpenAPI Generator](https://hackernoon.com/how-to-write-fewer-lines-of-code-with-the-openapi-generator) by [Mikhail Alfa](https://hackernoon.com/u/alphamikle) ## [6 - About Us](#table-of-contents) From 10b310d33f1f92d63b228d9c281343d0ca88bf02 Mon Sep 17 00:00:00 2001 From: Larry Diamond <1066589+larrydiamond@users.noreply.github.com> Date: Mon, 4 Oct 2021 04:37:34 -0400 Subject: [PATCH 40/50] Optimize: entrySet is faster than keySet + get to prevent N lookups (#10496) * Optimize: replace keySet + N get calls with entrySet saving N calls to get method in a few places * missed one performance optimization * Rolling back a change that was dependent on Java 11 --- .../codegen/plugin/CodeGenMojo.java | 5 +++-- .../openapitools/codegen/DefaultCodegen.java | 17 +++++++++------- .../codegen/DefaultGenerator.java | 20 +++++++++++-------- .../codegen/InlineModelResolver.java | 15 ++++++++------ .../codegen/examples/XmlExampleGenerator.java | 15 ++++++++------ .../languages/AbstractJavaCodegen.java | 8 +++++--- .../AbstractJavaJAXRSServerCodegen.java | 5 +++-- .../AbstractPythonConnexionServerCodegen.java | 17 +++++++++------- .../languages/JMeterClientCodegen.java | 6 ++++-- .../languages/JavaPKMSTServerCodegen.java | 5 +++-- .../languages/NodeJSExpressServerCodegen.java | 10 ++++++---- .../codegen/languages/OCamlClientCodegen.java | 20 +++++++++++-------- .../PhpDataTransferClientCodegen.java | 15 ++++++++------ .../PhpMezzioPathHandlerServerCodegen.java | 10 ++++++---- .../languages/ScalaGatlingCodegen.java | 5 +++-- .../codegen/languages/SpringCodegen.java | 5 +++-- 16 files changed, 107 insertions(+), 71 deletions(-) diff --git a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java index d09fb1cff03..bc32b412f62 100644 --- a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java +++ b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java @@ -721,8 +721,9 @@ public class CodeGenMojo extends AbstractMojo { getLog().warn("environmentVariables is deprecated and will be removed in version 5.1. Use globalProperties instead."); } - for (String key : globalProperties.keySet()) { - String value = globalProperties.get(key); + for (Map.Entry globalPropertiesEntry : globalProperties.entrySet()) { + String key = globalPropertiesEntry.getKey(); + String value = globalPropertiesEntry.getValue(); if (value != null) { configurator.addGlobalProperty(key, value); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 689af8f5267..e76b174022d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -49,6 +49,7 @@ import org.slf4j.LoggerFactory; import java.io.File; import java.util.*; import java.util.Map.Entry; +import java.util.concurrent.ConcurrentSkipListSet; import java.util.concurrent.TimeUnit; import java.util.function.Consumer; import java.util.regex.Matcher; @@ -541,8 +542,9 @@ public class DefaultCodegen implements CodegenConfig { } // Let parent know about all its children - for (String name : allModels.keySet()) { - CodegenModel cm = allModels.get(name); + for (Map.Entry allModelsEntry : allModels.entrySet()) { + String name = allModelsEntry.getKey(); + CodegenModel cm = allModelsEntry.getValue(); CodegenModel parent = allModels.get(cm.getParent()); // if a discriminator exists on the parent, don't add this child to the inheritance hierarchy // TODO Determine what to do if the parent discriminator name == the grandparent discriminator name @@ -3950,8 +3952,9 @@ public class DefaultCodegen implements CodegenConfig { if (operation.getResponses() != null && !operation.getResponses().isEmpty()) { ApiResponse methodResponse = findMethodResponse(operation.getResponses()); - for (String key : operation.getResponses().keySet()) { - ApiResponse response = operation.getResponses().get(key); + for (Map.Entry operationGetResponsesEntry : operation.getResponses().entrySet()) { + String key = operationGetResponsesEntry.getKey(); + ApiResponse response = operationGetResponsesEntry.getValue(); addProducesInfo(response, op); CodegenResponse r = fromResponse(key, response); if (r.baseType != null && @@ -5110,14 +5113,14 @@ public class DefaultCodegen implements CodegenConfig { } // loop through list to update property name with toVarName - Set renamedMandatory = new TreeSet(); + Set renamedMandatory = new ConcurrentSkipListSet(); Iterator mandatoryIterator = m.mandatory.iterator(); while (mandatoryIterator.hasNext()) { renamedMandatory.add(toVarName(mandatoryIterator.next())); } m.mandatory = renamedMandatory; - Set renamedAllMandatory = new TreeSet(); + Set renamedAllMandatory = new ConcurrentSkipListSet(); Iterator allMandatoryIterator = m.allMandatory.iterator(); while (allMandatoryIterator.hasNext()) { renamedAllMandatory.add(toVarName(allMandatoryIterator.next())); @@ -6059,7 +6062,7 @@ public class DefaultCodegen implements CodegenConfig { return null; } - Set produces = new TreeSet(); + Set produces = new ConcurrentSkipListSet(); for (ApiResponse r : operation.getResponses().values()) { ApiResponse response = ModelUtils.getReferencedApiResponse(openAPI, r); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java index a4d286ed453..f720ce6901e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java @@ -62,6 +62,7 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Path; import java.time.ZonedDateTime; import java.util.*; +import java.util.concurrent.ConcurrentSkipListSet; import java.util.function.Function; import java.util.stream.Collectors; @@ -335,8 +336,9 @@ public class DefaultGenerator implements Generator { private void generateModelTests(List files, Map models, String modelName) throws IOException { // to generate model test files - for (String templateName : config.modelTestTemplateFiles().keySet()) { - String suffix = config.modelTestTemplateFiles().get(templateName); + for (Map.Entry configModelTestTemplateFilesEntry : config.modelTestTemplateFiles().entrySet()) { + String templateName = configModelTestTemplateFilesEntry.getKey(); + String suffix = configModelTestTemplateFilesEntry.getValue(); String filename = config.modelTestFileFolder() + File.separator + config.toModelTestFilename(modelName) + suffix; if (generateModelTests) { @@ -1055,8 +1057,9 @@ public class DefaultGenerator implements Generator { if(paths == null) { return ops; } - for (String resourcePath : paths.keySet()) { - PathItem path = paths.get(resourcePath); + for (Map.Entry pathsEntry : paths.entrySet()) { + String resourcePath = pathsEntry.getKey(); + PathItem path = pathsEntry.getValue(); processOperation(resourcePath, "get", path.getGet(), ops, path); processOperation(resourcePath, "head", path.getHead(), ops, path); processOperation(resourcePath, "put", path.getPut(), ops, path); @@ -1199,7 +1202,7 @@ public class DefaultGenerator implements Generator { operations.put("operations", objs); operations.put("package", config.apiPackage()); - Set allImports = new TreeSet<>(); + Set allImports = new ConcurrentSkipListSet<>(); for (CodegenOperation op : ops) { allImports.addAll(op.imports); } @@ -1267,8 +1270,9 @@ public class DefaultGenerator implements Generator { objs.put("package", config.modelPackage()); List models = new ArrayList<>(); Set allImports = new LinkedHashSet<>(); - for (String key : definitions.keySet()) { - Schema schema = definitions.get(key); + for (Map.Entry definitionsEntry : definitions.entrySet()) { + String key = definitionsEntry.getKey(); + Schema schema = definitionsEntry.getValue(); if (schema == null) throw new RuntimeException("schema cannot be null in processModels"); CodegenModel cm = config.fromModel(key, schema); @@ -1282,7 +1286,7 @@ public class DefaultGenerator implements Generator { allImports.addAll(cm.imports); } objs.put("models", models); - Set importSet = new TreeSet<>(); + Set importSet = new ConcurrentSkipListSet<>(); for (String nextImport : allImports) { String mapping = config.importMapping().get(nextImport); if (mapping == null) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java index 86b63daa548..cd607fbdb61 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java @@ -79,8 +79,9 @@ public class InlineModelResolver { return; } - for (String pathname : paths.keySet()) { - PathItem path = paths.get(pathname); + for (Map.Entry pathsEntry : paths.entrySet()) { + String pathname = pathsEntry.getKey(); + PathItem path = pathsEntry.getValue(); List operations = new ArrayList<>(path.readOperations()); // Include callback operation as well @@ -263,8 +264,9 @@ public class InlineModelResolver { return; } - for (String key : responses.keySet()) { - ApiResponse response = responses.get(key); + for (Map.Entry responsesEntry : responses.entrySet()) { + String key = responsesEntry.getKey(); + ApiResponse response = responsesEntry.getValue(); if (ModelUtils.getSchemaFromResponse(response) == null) { continue; } @@ -561,8 +563,9 @@ public class InlineModelResolver { } Map propsToUpdate = new HashMap(); Map modelsToAdd = new HashMap(); - for (String key : properties.keySet()) { - Schema property = properties.get(key); + for (Map.Entry propertiesEntry : properties.entrySet()) { + String key = propertiesEntry.getKey(); + Schema property = propertiesEntry.getValue(); if (property instanceof ObjectSchema && ((ObjectSchema) property).getProperties() != null && ((ObjectSchema) property).getProperties().size() > 0) { ObjectSchema op = (ObjectSchema) property; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/XmlExampleGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/XmlExampleGenerator.java index 562fbe00469..91d5a0120a4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/XmlExampleGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/XmlExampleGenerator.java @@ -81,8 +81,9 @@ public class XmlExampleGenerator { // TODO: map objects will not enter this block Map properties = schema.getProperties(); if (properties != null && !properties.isEmpty()) { - for (String pName : properties.keySet()) { - Schema property = properties.get(pName); + for (Map.Entry propertiesEntry : properties.entrySet()) { + String pName = propertiesEntry.getKey(); + Schema property = propertiesEntry.getValue(); if (property != null && property.getXml() != null && property.getXml().getAttribute() != null && property.getXml().getAttribute()) { attributes.put(pName, property); } else { @@ -93,14 +94,16 @@ public class XmlExampleGenerator { sb.append(indent(indent)).append(TAG_START); sb.append(name); - for (String pName : attributes.keySet()) { - Schema s = attributes.get(pName); + for (Map.Entry attributesEntry : attributes.entrySet()) { + String pName = attributesEntry.getKey(); + Schema s = attributesEntry.getValue(); sb.append(" ").append(pName).append("=").append(quote(toXml(null, s, 0, selfPath))); } sb.append(CLOSE_TAG); sb.append(NEWLINE); - for (String pName : elements.keySet()) { - Schema s = elements.get(pName); + for (Map.Entry elementsEntry : elements.entrySet()) { + String pName = elementsEntry.getKey(); + Schema s = elementsEntry.getValue(); final String asXml = toXml(pName, s, indent + 1, selfPath); if (StringUtils.isEmpty(asXml)) { continue; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index 748e3081549..c6d71e3d6c1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -40,6 +40,7 @@ import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.TreeSet; +import java.util.concurrent.ConcurrentSkipListSet; import java.util.regex.Pattern; import java.util.stream.Stream; @@ -1338,7 +1339,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code Map operations = (Map) objs.get("operations"); List operationList = (List) operations.get("operation"); for (CodegenOperation op : operationList) { - Collection operationImports = new TreeSet(); + Collection operationImports = new ConcurrentSkipListSet(); for (CodegenParameter p : op.allParams) { if (importMapping.containsKey(p.dataType)) { operationImports.add(importMapping.get(p.dataType)); @@ -1356,8 +1357,9 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code return; } if (openAPI.getPaths() != null) { - for (String pathname : openAPI.getPaths().keySet()) { - PathItem path = openAPI.getPaths().get(pathname); + for (Map.Entry openAPIGetPathsEntry : openAPI.getPaths().entrySet()) { + String pathname = openAPIGetPathsEntry.getKey(); + PathItem path = openAPIGetPathsEntry.getValue(); if (path.readOperations() == null) { continue; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaJAXRSServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaJAXRSServerCodegen.java index 2e1cc510a7f..d930e0b33e6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaJAXRSServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaJAXRSServerCodegen.java @@ -142,8 +142,9 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen } if (openAPI.getPaths() != null) { - for (String pathname : openAPI.getPaths().keySet()) { - PathItem path = openAPI.getPaths().get(pathname); + for (Map.Entry openAPIGetPathsEntry : openAPI.getPaths().entrySet()) { + String pathname = openAPIGetPathsEntry.getKey(); + PathItem path = openAPIGetPathsEntry.getValue(); if (path.readOperations() != null) { for (Operation operation : path.readOperations()) { if (operation.getTags() != null) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonConnexionServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonConnexionServerCodegen.java index 042b76572b8..38cbac0eecf 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonConnexionServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonConnexionServerCodegen.java @@ -332,7 +332,7 @@ public abstract class AbstractPythonConnexionServerCodegen extends AbstractPytho PathItem path = paths.get(pathname); // Fix path parameters to be in snake_case if (pathname.contains("{")) { - String fixedPath = new String(); + String fixedPath = ""; for (String token : pathname.substring(1).split("/")) { if (token.startsWith("{")) { String snake_case_token = "{" + this.toParamName(token.substring(1, token.length() - 1)) + "}"; @@ -353,8 +353,9 @@ public abstract class AbstractPythonConnexionServerCodegen extends AbstractPytho } Map operationMap = path.readOperationsMap(); if (operationMap != null) { - for (HttpMethod method : operationMap.keySet()) { - Operation operation = operationMap.get(method); + for (Map.Entry operationMapEntry : operationMap.entrySet()) { + HttpMethod method = operationMapEntry.getKey(); + Operation operation = operationMapEntry.getValue(); String tag = "default"; if (operation.getTags() != null && operation.getTags().size() > 0) { tag = operation.getTags().get(0); @@ -424,8 +425,9 @@ public abstract class AbstractPythonConnexionServerCodegen extends AbstractPytho Components components = openAPI.getComponents(); if (components != null && components.getSecuritySchemes() != null) { Map securitySchemes = components.getSecuritySchemes(); - for (String securityName : securitySchemes.keySet()) { - SecurityScheme securityScheme = securitySchemes.get(securityName); + for (Map.Entry securitySchemesEntry : securitySchemes.entrySet()) { + String securityName = securitySchemesEntry.getKey(); + SecurityScheme securityScheme = securitySchemesEntry.getValue(); String baseFunctionName = controllerPackage + ".security_controller_."; switch (securityScheme.getType()) { case APIKEY: @@ -512,8 +514,9 @@ public abstract class AbstractPythonConnexionServerCodegen extends AbstractPytho Map operationMap = path.readOperationsMap(); if (operationMap != null) { - for (HttpMethod method : operationMap.keySet()) { - Operation operation = operationMap.get(method); + for (Map.Entry operationMapEntry : operationMap.entrySet()) { + HttpMethod method = operationMapEntry.getKey(); + Operation operation = operationMapEntry.getValue(); if (operation.getParameters() != null) { for (Parameter parameter : operation.getParameters()) { Map parameterExtensions = parameter.getExtensions(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java index 9678d29c880..cec0fdeccaa 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java @@ -32,6 +32,7 @@ import java.io.File; import java.util.Arrays; import java.util.EnumSet; import java.util.HashSet; +import java.util.Map; public class JMeterClientCodegen extends DefaultCodegen implements CodegenConfig { @@ -149,8 +150,9 @@ public class JMeterClientCodegen extends DefaultCodegen implements CodegenConfig @Override public void preprocessOpenAPI(OpenAPI openAPI) { if (openAPI != null && openAPI.getPaths() != null) { - for (String pathname : openAPI.getPaths().keySet()) { - PathItem path = openAPI.getPaths().get(pathname); + for (Map.Entry openAPIGetPathsEntry : openAPI.getPaths().entrySet()) { + String pathname = openAPIGetPathsEntry.getKey(); + PathItem path = openAPIGetPathsEntry.getValue(); if (path.readOperations() != null) { for (Operation operation : path.readOperations()) { String pathWithDollars = pathname.replaceAll("\\{", "\\$\\{"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java index e6b291cd730..b6b3d0bb793 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java @@ -543,8 +543,9 @@ public class JavaPKMSTServerCodegen extends AbstractJavaCodegen { this.additionalProperties.put("serverPort", URLPathUtils.getPort(url, 8080)); if (openAPI.getPaths() != null) { - for (String pathname : openAPI.getPaths().keySet()) { - PathItem path = openAPI.getPaths().get(pathname); + for (Map.Entry openAPIGetPathsEntry : openAPI.getPaths().entrySet()) { + String pathname = openAPIGetPathsEntry.getKey(); + PathItem path = openAPIGetPathsEntry.getValue(); if (path.readOperations() != null) { for (Operation operation : path.readOperations()) { if (operation.getTags() != null) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java index c7edba19de0..de51e636a83 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java @@ -360,12 +360,14 @@ public class NodeJSExpressServerCodegen extends DefaultCodegen implements Codege // need vendor extensions Paths paths = openAPI.getPaths(); if (paths != null) { - for (String pathname : paths.keySet()) { - PathItem path = paths.get(pathname); + for (Map.Entry pathsEntry : paths.entrySet()) { + String pathname = pathsEntry.getKey(); + PathItem path = pathsEntry.getValue(); Map operationMap = path.readOperationsMap(); if (operationMap != null) { - for (HttpMethod method : operationMap.keySet()) { - Operation operation = operationMap.get(method); + for (Map.Entry operationMapEntry : operationMap.entrySet()) { + HttpMethod method = operationMapEntry.getKey(); + Operation operation = operationMapEntry.getValue(); String tag = "default"; if (operation.getTags() != null && operation.getTags().size() > 0) { tag = toApiName(operation.getTags().get(0)); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java index be2fd9634f8..962ff922b5d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java @@ -300,8 +300,9 @@ public class OCamlClientCodegen extends DefaultCodegen implements CodegenConfig @SuppressWarnings("unchecked") private void collectEnumSchemas(String parentName, Map schemas) { - for (String sName : schemas.keySet()) { - Schema schema = schemas.get(sName); + for (Map.Entry schemasEntry : schemas.entrySet()) { + String sName = schemasEntry.getKey(); + Schema schema = schemasEntry.getValue(); collectEnumSchemas(parentName, sName, schema); @@ -339,8 +340,9 @@ public class OCamlClientCodegen extends DefaultCodegen implements CodegenConfig } } if (operation.getResponses() != null) { - for (String s : operation.getResponses().keySet()) { - ApiResponse apiResponse = operation.getResponses().get(s); + for (Map.Entry operationGetResponsesEntry : operation.getResponses().entrySet()) { + String s = operationGetResponsesEntry.getKey(); + ApiResponse apiResponse = operationGetResponsesEntry.getValue(); if (apiResponse.getContent() != null) { Content content = apiResponse.getContent(); for (String p : content.keySet()) { @@ -349,8 +351,9 @@ public class OCamlClientCodegen extends DefaultCodegen implements CodegenConfig } if (apiResponse.getHeaders() != null) { Map headers = apiResponse.getHeaders(); - for (String h : headers.keySet()) { - Header header = headers.get(h); + for (Map.Entry headersEntry : headers.entrySet()) { + String h = headersEntry.getKey(); + Header header = headersEntry.getValue(); collectEnumSchemas(h, header.getSchema()); } } @@ -404,8 +407,9 @@ public class OCamlClientCodegen extends DefaultCodegen implements CodegenConfig Paths paths = openAPI.getPaths(); if (paths != null && !paths.isEmpty()) { - for (String path : paths.keySet()) { - PathItem item = paths.get(path); + for (Map.Entry pathsEntry : paths.entrySet()) { + String path = pathsEntry.getKey(); + PathItem item = pathsEntry.getValue(); collectEnumSchemas(item.getGet()); collectEnumSchemas(item.getPost()); collectEnumSchemas(item.getPut()); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpDataTransferClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpDataTransferClientCodegen.java index d50c1326958..9f4cb5651d3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpDataTransferClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpDataTransferClientCodegen.java @@ -201,12 +201,14 @@ public class PhpDataTransferClientCodegen extends AbstractPhpCodegen { protected void generateParameterSchemas(OpenAPI openAPI) { Map paths = openAPI.getPaths(); if (paths != null) { - for (String pathname : paths.keySet()) { - PathItem path = paths.get(pathname); + for (Map.Entry pathsEntry : paths.entrySet()) { + String pathname = pathsEntry.getKey(); + PathItem path = pathsEntry.getValue(); Map operationMap = path.readOperationsMap(); if (operationMap != null) { - for (HttpMethod method : operationMap.keySet()) { - Operation operation = operationMap.get(method); + for (Map.Entry operationMapEntry : operationMap.entrySet()) { + HttpMethod method = operationMapEntry.getKey(); + Operation operation = operationMapEntry.getValue(); Map propertySchemas = new HashMap<>(); if (operation == null || operation.getParameters() == null) { continue; @@ -424,8 +426,9 @@ public class PhpDataTransferClientCodegen extends AbstractPhpCodegen { protected void quoteMediaTypes(OpenAPI openAPI) { Map paths = openAPI.getPaths(); if (paths != null) { - for (String pathname : paths.keySet()) { - PathItem path = paths.get(pathname); + for (Map.Entry pathsEntry : paths.entrySet()) { + String pathname = pathsEntry.getKey(); + PathItem path = pathsEntry.getValue(); List operations = path.readOperations(); if (operations != null) { for (Operation operation : operations) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpMezzioPathHandlerServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpMezzioPathHandlerServerCodegen.java index 06388626d4c..c45a8af07ca 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpMezzioPathHandlerServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpMezzioPathHandlerServerCodegen.java @@ -197,12 +197,14 @@ public class PhpMezzioPathHandlerServerCodegen extends AbstractPhpCodegen { protected void generateParameterSchemas(OpenAPI openAPI) { Map paths = openAPI.getPaths(); if (paths != null) { - for (String pathname : paths.keySet()) { - PathItem path = paths.get(pathname); + for (Map.Entry pathsEntry : paths.entrySet()) { + String pathname = pathsEntry.getKey(); + PathItem path = pathsEntry.getValue(); Map operationMap = path.readOperationsMap(); if (operationMap != null) { - for (HttpMethod method : operationMap.keySet()) { - Operation operation = operationMap.get(method); + for (Map.Entry operationMapEntry : operationMap.entrySet()) { + HttpMethod method = operationMapEntry.getKey(); + Operation operation = operationMapEntry.getValue(); Map propertySchemas = new HashMap<>(); if (operation == null || operation.getParameters() == null) { continue; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java index e19eb0c5b22..7098f0d591d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java @@ -251,8 +251,9 @@ public class ScalaGatlingCodegen extends AbstractScalaCodegen implements Codegen */ @Override public void preprocessOpenAPI(OpenAPI openAPI) { - for (String pathname : openAPI.getPaths().keySet()) { - PathItem path = openAPI.getPaths().get(pathname); + for (Map.Entry openAPIGetPathsEntry : openAPI.getPaths().entrySet()) { + String pathname = openAPIGetPathsEntry.getKey(); + PathItem path = openAPIGetPathsEntry.getValue(); if (path.readOperations() == null) { continue; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index ba5a7f99ef5..0ea94726820 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -556,8 +556,9 @@ public class SpringCodegen extends AbstractJavaCodegen } if (openAPI.getPaths() != null) { - for (String pathname : openAPI.getPaths().keySet()) { - PathItem path = openAPI.getPaths().get(pathname); + for (Map.Entry openAPIGetPathsEntry : openAPI.getPaths().entrySet()) { + String pathname = openAPIGetPathsEntry.getKey(); + PathItem path = openAPIGetPathsEntry.getValue(); if (path.readOperations() != null) { for (Operation operation : path.readOperations()) { if (operation.getTags() != null) { From 45e0b461ba77a531623f1731055a820cc416c271 Mon Sep 17 00:00:00 2001 From: madsvonqualen <16213696+madsvonqualen@users.noreply.github.com> Date: Mon, 4 Oct 2021 10:43:29 +0200 Subject: [PATCH 41/50] [Java] [jaxrs-spec] Add @JsonTypeName to Pojo's (#10489) * Add @JsonTypeName annotation to pojo's in order to make Jackson deserialize superclass instances * Generate samples --- .../src/main/resources/JavaJaxRS/spec/pojo.mustache | 2 ++ .../org/openapitools/model/AdditionalPropertiesAnyType.java | 2 ++ .../java/org/openapitools/model/AdditionalPropertiesArray.java | 2 ++ .../org/openapitools/model/AdditionalPropertiesBoolean.java | 2 ++ .../java/org/openapitools/model/AdditionalPropertiesClass.java | 2 ++ .../org/openapitools/model/AdditionalPropertiesInteger.java | 2 ++ .../java/org/openapitools/model/AdditionalPropertiesNumber.java | 2 ++ .../java/org/openapitools/model/AdditionalPropertiesObject.java | 2 ++ .../java/org/openapitools/model/AdditionalPropertiesString.java | 2 ++ .../src/gen/java/org/openapitools/model/Animal.java | 2 ++ .../java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 2 ++ .../src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java | 2 ++ .../src/gen/java/org/openapitools/model/ArrayTest.java | 2 ++ .../src/gen/java/org/openapitools/model/BigCat.java | 2 ++ .../src/gen/java/org/openapitools/model/BigCatAllOf.java | 2 ++ .../src/gen/java/org/openapitools/model/Capitalization.java | 2 ++ .../src/gen/java/org/openapitools/model/Cat.java | 2 ++ .../src/gen/java/org/openapitools/model/CatAllOf.java | 2 ++ .../src/gen/java/org/openapitools/model/Category.java | 2 ++ .../src/gen/java/org/openapitools/model/ClassModel.java | 2 ++ .../src/gen/java/org/openapitools/model/Client.java | 2 ++ .../src/gen/java/org/openapitools/model/Dog.java | 2 ++ .../src/gen/java/org/openapitools/model/DogAllOf.java | 2 ++ .../src/gen/java/org/openapitools/model/EnumArrays.java | 2 ++ .../src/gen/java/org/openapitools/model/EnumTest.java | 2 ++ .../gen/java/org/openapitools/model/FileSchemaTestClass.java | 2 ++ .../src/gen/java/org/openapitools/model/FormatTest.java | 2 ++ .../src/gen/java/org/openapitools/model/HasOnlyReadOnly.java | 2 ++ .../src/gen/java/org/openapitools/model/MapTest.java | 2 ++ .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 2 ++ .../src/gen/java/org/openapitools/model/Model200Response.java | 2 ++ .../src/gen/java/org/openapitools/model/ModelApiResponse.java | 2 ++ .../src/gen/java/org/openapitools/model/ModelReturn.java | 2 ++ .../src/gen/java/org/openapitools/model/Name.java | 2 ++ .../src/gen/java/org/openapitools/model/NumberOnly.java | 2 ++ .../src/gen/java/org/openapitools/model/Order.java | 2 ++ .../src/gen/java/org/openapitools/model/OuterComposite.java | 2 ++ .../src/gen/java/org/openapitools/model/Pet.java | 2 ++ .../src/gen/java/org/openapitools/model/ReadOnlyFirst.java | 2 ++ .../src/gen/java/org/openapitools/model/SpecialModelName.java | 2 ++ .../src/gen/java/org/openapitools/model/Tag.java | 2 ++ .../src/gen/java/org/openapitools/model/TypeHolderDefault.java | 2 ++ .../src/gen/java/org/openapitools/model/TypeHolderExample.java | 2 ++ .../src/gen/java/org/openapitools/model/User.java | 2 ++ .../src/gen/java/org/openapitools/model/XmlItem.java | 2 ++ .../org/openapitools/model/AdditionalPropertiesAnyType.java | 2 ++ .../java/org/openapitools/model/AdditionalPropertiesArray.java | 2 ++ .../org/openapitools/model/AdditionalPropertiesBoolean.java | 2 ++ .../java/org/openapitools/model/AdditionalPropertiesClass.java | 2 ++ .../org/openapitools/model/AdditionalPropertiesInteger.java | 2 ++ .../java/org/openapitools/model/AdditionalPropertiesNumber.java | 2 ++ .../java/org/openapitools/model/AdditionalPropertiesObject.java | 2 ++ .../java/org/openapitools/model/AdditionalPropertiesString.java | 2 ++ .../jaxrs-spec/src/gen/java/org/openapitools/model/Animal.java | 2 ++ .../java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java | 2 ++ .../src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java | 2 ++ .../src/gen/java/org/openapitools/model/ArrayTest.java | 2 ++ .../jaxrs-spec/src/gen/java/org/openapitools/model/BigCat.java | 2 ++ .../src/gen/java/org/openapitools/model/BigCatAllOf.java | 2 ++ .../src/gen/java/org/openapitools/model/Capitalization.java | 2 ++ .../jaxrs-spec/src/gen/java/org/openapitools/model/Cat.java | 2 ++ .../src/gen/java/org/openapitools/model/CatAllOf.java | 2 ++ .../src/gen/java/org/openapitools/model/Category.java | 2 ++ .../src/gen/java/org/openapitools/model/ClassModel.java | 2 ++ .../jaxrs-spec/src/gen/java/org/openapitools/model/Client.java | 2 ++ .../jaxrs-spec/src/gen/java/org/openapitools/model/Dog.java | 2 ++ .../src/gen/java/org/openapitools/model/DogAllOf.java | 2 ++ .../src/gen/java/org/openapitools/model/EnumArrays.java | 2 ++ .../src/gen/java/org/openapitools/model/EnumTest.java | 2 ++ .../gen/java/org/openapitools/model/FileSchemaTestClass.java | 2 ++ .../src/gen/java/org/openapitools/model/FormatTest.java | 2 ++ .../src/gen/java/org/openapitools/model/HasOnlyReadOnly.java | 2 ++ .../jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java | 2 ++ .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 2 ++ .../src/gen/java/org/openapitools/model/Model200Response.java | 2 ++ .../src/gen/java/org/openapitools/model/ModelApiResponse.java | 2 ++ .../src/gen/java/org/openapitools/model/ModelReturn.java | 2 ++ .../jaxrs-spec/src/gen/java/org/openapitools/model/Name.java | 2 ++ .../src/gen/java/org/openapitools/model/NumberOnly.java | 2 ++ .../jaxrs-spec/src/gen/java/org/openapitools/model/Order.java | 2 ++ .../src/gen/java/org/openapitools/model/OuterComposite.java | 2 ++ .../jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java | 2 ++ .../src/gen/java/org/openapitools/model/ReadOnlyFirst.java | 2 ++ .../src/gen/java/org/openapitools/model/SpecialModelName.java | 2 ++ .../jaxrs-spec/src/gen/java/org/openapitools/model/Tag.java | 2 ++ .../src/gen/java/org/openapitools/model/TypeHolderDefault.java | 2 ++ .../src/gen/java/org/openapitools/model/TypeHolderExample.java | 2 ++ .../jaxrs-spec/src/gen/java/org/openapitools/model/User.java | 2 ++ .../jaxrs-spec/src/gen/java/org/openapitools/model/XmlItem.java | 2 ++ 89 files changed, 178 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache index e9adb6f601a..52162054e2b 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache @@ -5,11 +5,13 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; {{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{#description}}/** * {{.}} **/{{/description}} {{#useSwaggerAnnotations}}{{#description}}@ApiModel(description = "{{{.}}}"){{/description}}{{/useSwaggerAnnotations}} +@JsonTypeName("{{name}}") {{>generatedAnnotation}}{{>additionalModelTypeAnnotations}}public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { {{#vars}}{{#isEnum}}{{^isContainer}} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java index a24968e00ca..50c6702c65f 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -13,9 +13,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesAnyType") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesAnyType extends HashMap implements Serializable { private @Valid String name; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java index 07b0239b39b..3b400ed375e 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -14,9 +14,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesArray") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesArray extends HashMap implements Serializable { private @Valid String name; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java index b6e975c8077..e1dbfa0821a 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -13,9 +13,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesBoolean") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesBoolean extends HashMap implements Serializable { private @Valid String name; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index 5bfc138bc7b..61bec1b6ff4 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -15,9 +15,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesClass") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesClass implements Serializable { private @Valid Map mapString = new HashMap(); diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java index 41c09e8dc08..fc85a62ad02 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -13,9 +13,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesInteger") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesInteger extends HashMap implements Serializable { private @Valid String name; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java index 9a2f39b0166..25852547106 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -14,9 +14,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesNumber") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesNumber extends HashMap implements Serializable { private @Valid String name; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java index bb1485b8613..998b85d511d 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -13,9 +13,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesObject") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesObject extends HashMap implements Serializable { private @Valid String name; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java index c1e80285b2d..b317c03b4c0 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java @@ -13,9 +13,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesString") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesString extends HashMap implements Serializable { private @Valid String name; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java index e3026c4c223..7c6fb6c670a 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java @@ -13,6 +13,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @@ -22,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; }) +@JsonTypeName("Animal") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Animal implements Serializable { private @Valid String className; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 3ef84300b6a..cbca7de2f69 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -14,9 +14,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("ArrayOfArrayOfNumberOnly") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ArrayOfArrayOfNumberOnly implements Serializable { private @Valid List> arrayArrayNumber = new ArrayList>(); diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java index d3c6fcadfbb..ad7cc3db32e 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -14,9 +14,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("ArrayOfNumberOnly") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ArrayOfNumberOnly implements Serializable { private @Valid List arrayNumber = new ArrayList(); diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java index 4fa52633679..f2b7469f65c 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java @@ -14,9 +14,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("ArrayTest") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ArrayTest implements Serializable { private @Valid List arrayOfString = new ArrayList(); diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCat.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCat.java index 26c89c2c086..483c60b3d06 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCat.java @@ -13,9 +13,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("BigCat") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class BigCat extends Cat implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCatAllOf.java index 8c65c517039..db687359046 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCatAllOf.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("BigCat_allOf") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class BigCatAllOf implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Capitalization.java index 22e6aaba4e3..59529655970 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Capitalization.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Capitalization") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Capitalization implements Serializable { private @Valid String smallCamel; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Cat.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Cat.java index 434812e99ca..948b28d037a 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Cat.java @@ -13,9 +13,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Cat") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Cat extends Animal implements Serializable { private @Valid Boolean declawed; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/CatAllOf.java index 5a2938caa7a..b5d2587fe85 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/CatAllOf.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Cat_allOf") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class CatAllOf implements Serializable { private @Valid Boolean declawed; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Category.java index d956e701e99..6d4e8a87992 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Category.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Category") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Category implements Serializable { private @Valid Long id; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ClassModel.java index dff7d34da7b..fec3c619257 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ClassModel.java @@ -11,11 +11,13 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model with \"_class\" property **/ @ApiModel(description = "Model for testing model with \"_class\" property") +@JsonTypeName("ClassModel") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ClassModel implements Serializable { private @Valid String propertyClass; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Client.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Client.java index a78d941134a..74d489b5ace 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Client.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Client") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Client implements Serializable { private @Valid String client; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Dog.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Dog.java index ffa9788752e..20599ecebcf 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Dog.java @@ -13,9 +13,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Dog") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Dog extends Animal implements Serializable { private @Valid String breed; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/DogAllOf.java index b6f161ee911..269faf93678 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/DogAllOf.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Dog_allOf") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class DogAllOf implements Serializable { private @Valid String breed; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java index 805cbc9dc6c..bf05c76fd9e 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java @@ -13,9 +13,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("EnumArrays") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class EnumArrays implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumTest.java index 45776ea2ecd..34ec3b13e07 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumTest.java @@ -12,9 +12,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Enum_Test") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class EnumTest implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index 8dfb9c1fdf3..3896abfe4ec 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -13,9 +13,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("FileSchemaTestClass") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class FileSchemaTestClass implements Serializable { private @Valid java.io.File file; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FormatTest.java index 5a75e807ad6..bbb010c5ff1 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FormatTest.java @@ -16,9 +16,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("format_test") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class FormatTest implements Serializable { private @Valid Integer integer; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java index 4cc9669ab4b..db68308cdce 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("hasOnlyReadOnly") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class HasOnlyReadOnly implements Serializable { private @Valid String bar; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java index dc03895c9dc..f5c57914a90 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java @@ -14,9 +14,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("MapTest") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class MapTest implements Serializable { private @Valid Map> mapMapOfString = new HashMap>(); diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index e54b53cc4bf..77464620e9c 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -17,9 +17,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("MixedPropertiesAndAdditionalPropertiesClass") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class MixedPropertiesAndAdditionalPropertiesClass implements Serializable { private @Valid UUID uuid; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Model200Response.java index 474a40960a7..7aeb481a43a 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Model200Response.java @@ -11,11 +11,13 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name starting with number **/ @ApiModel(description = "Model for testing model name starting with number") +@JsonTypeName("200_response") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Model200Response implements Serializable { private @Valid Integer name; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelApiResponse.java index 2de916c9eae..d541b6586f3 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("ApiResponse") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ModelApiResponse implements Serializable { private @Valid Integer code; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelReturn.java index 28322e11d18..836ae092d18 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelReturn.java @@ -11,11 +11,13 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing reserved words **/ @ApiModel(description = "Model for testing reserved words") +@JsonTypeName("Return") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ModelReturn implements Serializable { private @Valid Integer _return; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Name.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Name.java index 8e967f0f4e3..54d09365aed 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Name.java @@ -11,11 +11,13 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name same as property name **/ @ApiModel(description = "Model for testing model name same as property name") +@JsonTypeName("Name") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Name implements Serializable { private @Valid Integer name; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/NumberOnly.java index ef3694e5177..9ea507266dc 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/NumberOnly.java @@ -12,9 +12,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("NumberOnly") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class NumberOnly implements Serializable { private @Valid BigDecimal justNumber; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Order.java index abf99817683..e67d3772f9d 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Order.java @@ -12,9 +12,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Order") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Order implements Serializable { private @Valid Long id; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java index 2527ca0e85f..95ff03416bb 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java @@ -12,9 +12,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("OuterComposite") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class OuterComposite implements Serializable { private @Valid BigDecimal myNumber; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java index e35c669ac94..6c89798b5ff 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java @@ -17,9 +17,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Pet") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Pet implements Serializable { private @Valid Long id; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ReadOnlyFirst.java index 6d02ab23d29..71451f9cf68 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ReadOnlyFirst.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("ReadOnlyFirst") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ReadOnlyFirst implements Serializable { private @Valid String bar; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/SpecialModelName.java index 137407aab3c..0340c7996ab 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/SpecialModelName.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("$special[model.name]") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class SpecialModelName implements Serializable { private @Valid Long $specialPropertyName; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Tag.java index 1455aaa38c6..db7d608abd5 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Tag.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Tag") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Tag implements Serializable { private @Valid Long id; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java index 50055b2cede..a093d79a6d6 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java @@ -14,9 +14,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("TypeHolderDefault") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class TypeHolderDefault implements Serializable { private @Valid String stringItem = "what"; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java index cf362c22ebe..daaffc8af45 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -14,9 +14,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("TypeHolderExample") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class TypeHolderExample implements Serializable { private @Valid String stringItem; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/User.java index 7357008e71b..271676fb2e0 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/User.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("User") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class User implements Serializable { private @Valid Long id; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java index 5a5783c4180..241ebb4e1bc 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java @@ -14,9 +14,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("XmlItem") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class XmlItem implements Serializable { private @Valid String attributeString; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java index a24968e00ca..50c6702c65f 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -13,9 +13,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesAnyType") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesAnyType extends HashMap implements Serializable { private @Valid String name; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java index 07b0239b39b..3b400ed375e 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -14,9 +14,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesArray") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesArray extends HashMap implements Serializable { private @Valid String name; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java index b6e975c8077..e1dbfa0821a 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -13,9 +13,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesBoolean") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesBoolean extends HashMap implements Serializable { private @Valid String name; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index 5bfc138bc7b..61bec1b6ff4 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -15,9 +15,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesClass") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesClass implements Serializable { private @Valid Map mapString = new HashMap(); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java index 41c09e8dc08..fc85a62ad02 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -13,9 +13,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesInteger") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesInteger extends HashMap implements Serializable { private @Valid String name; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java index 9a2f39b0166..25852547106 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -14,9 +14,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesNumber") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesNumber extends HashMap implements Serializable { private @Valid String name; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java index bb1485b8613..998b85d511d 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -13,9 +13,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesObject") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesObject extends HashMap implements Serializable { private @Valid String name; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java index c1e80285b2d..b317c03b4c0 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java @@ -13,9 +13,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("AdditionalPropertiesString") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesString extends HashMap implements Serializable { private @Valid String name; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Animal.java index e3026c4c223..7c6fb6c670a 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Animal.java @@ -13,6 +13,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ @@ -22,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; }) +@JsonTypeName("Animal") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Animal implements Serializable { private @Valid String className; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 3ef84300b6a..cbca7de2f69 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -14,9 +14,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("ArrayOfArrayOfNumberOnly") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ArrayOfArrayOfNumberOnly implements Serializable { private @Valid List> arrayArrayNumber = new ArrayList>(); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java index d3c6fcadfbb..ad7cc3db32e 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -14,9 +14,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("ArrayOfNumberOnly") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ArrayOfNumberOnly implements Serializable { private @Valid List arrayNumber = new ArrayList(); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java index 4fa52633679..f2b7469f65c 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java @@ -14,9 +14,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("ArrayTest") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ArrayTest implements Serializable { private @Valid List arrayOfString = new ArrayList(); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCat.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCat.java index 26c89c2c086..483c60b3d06 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCat.java @@ -13,9 +13,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("BigCat") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class BigCat extends Cat implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCatAllOf.java index 8c65c517039..db687359046 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCatAllOf.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("BigCat_allOf") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class BigCatAllOf implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Capitalization.java index 22e6aaba4e3..59529655970 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Capitalization.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Capitalization") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Capitalization implements Serializable { private @Valid String smallCamel; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Cat.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Cat.java index 434812e99ca..948b28d037a 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Cat.java @@ -13,9 +13,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Cat") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Cat extends Animal implements Serializable { private @Valid Boolean declawed; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/CatAllOf.java index 5a2938caa7a..b5d2587fe85 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/CatAllOf.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Cat_allOf") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class CatAllOf implements Serializable { private @Valid Boolean declawed; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Category.java index d956e701e99..6d4e8a87992 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Category.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Category") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Category implements Serializable { private @Valid Long id; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ClassModel.java index dff7d34da7b..fec3c619257 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ClassModel.java @@ -11,11 +11,13 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model with \"_class\" property **/ @ApiModel(description = "Model for testing model with \"_class\" property") +@JsonTypeName("ClassModel") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ClassModel implements Serializable { private @Valid String propertyClass; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Client.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Client.java index a78d941134a..74d489b5ace 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Client.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Client") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Client implements Serializable { private @Valid String client; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Dog.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Dog.java index ffa9788752e..20599ecebcf 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Dog.java @@ -13,9 +13,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Dog") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Dog extends Animal implements Serializable { private @Valid String breed; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/DogAllOf.java index b6f161ee911..269faf93678 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/DogAllOf.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Dog_allOf") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class DogAllOf implements Serializable { private @Valid String breed; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java index 805cbc9dc6c..bf05c76fd9e 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java @@ -13,9 +13,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("EnumArrays") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class EnumArrays implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java index 45776ea2ecd..34ec3b13e07 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java @@ -12,9 +12,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Enum_Test") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class EnumTest implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index 8dfb9c1fdf3..3896abfe4ec 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -13,9 +13,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("FileSchemaTestClass") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class FileSchemaTestClass implements Serializable { private @Valid java.io.File file; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FormatTest.java index 5a75e807ad6..bbb010c5ff1 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FormatTest.java @@ -16,9 +16,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("format_test") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class FormatTest implements Serializable { private @Valid Integer integer; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java index 4cc9669ab4b..db68308cdce 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("hasOnlyReadOnly") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class HasOnlyReadOnly implements Serializable { private @Valid String bar; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java index dc03895c9dc..f5c57914a90 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java @@ -14,9 +14,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("MapTest") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class MapTest implements Serializable { private @Valid Map> mapMapOfString = new HashMap>(); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index e54b53cc4bf..77464620e9c 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -17,9 +17,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("MixedPropertiesAndAdditionalPropertiesClass") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class MixedPropertiesAndAdditionalPropertiesClass implements Serializable { private @Valid UUID uuid; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Model200Response.java index 474a40960a7..7aeb481a43a 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Model200Response.java @@ -11,11 +11,13 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name starting with number **/ @ApiModel(description = "Model for testing model name starting with number") +@JsonTypeName("200_response") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Model200Response implements Serializable { private @Valid Integer name; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelApiResponse.java index 2de916c9eae..d541b6586f3 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("ApiResponse") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ModelApiResponse implements Serializable { private @Valid Integer code; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelReturn.java index 28322e11d18..836ae092d18 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelReturn.java @@ -11,11 +11,13 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing reserved words **/ @ApiModel(description = "Model for testing reserved words") +@JsonTypeName("Return") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ModelReturn implements Serializable { private @Valid Integer _return; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Name.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Name.java index 8e967f0f4e3..54d09365aed 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Name.java @@ -11,11 +11,13 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * Model for testing model name same as property name **/ @ApiModel(description = "Model for testing model name same as property name") +@JsonTypeName("Name") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Name implements Serializable { private @Valid Integer name; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/NumberOnly.java index ef3694e5177..9ea507266dc 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/NumberOnly.java @@ -12,9 +12,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("NumberOnly") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class NumberOnly implements Serializable { private @Valid BigDecimal justNumber; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Order.java index abf99817683..e67d3772f9d 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Order.java @@ -12,9 +12,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Order") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Order implements Serializable { private @Valid Long id; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java index 2527ca0e85f..95ff03416bb 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java @@ -12,9 +12,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("OuterComposite") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class OuterComposite implements Serializable { private @Valid BigDecimal myNumber; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java index e35c669ac94..6c89798b5ff 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java @@ -17,9 +17,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Pet") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Pet implements Serializable { private @Valid Long id; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ReadOnlyFirst.java index 6d02ab23d29..71451f9cf68 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ReadOnlyFirst.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("ReadOnlyFirst") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ReadOnlyFirst implements Serializable { private @Valid String bar; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/SpecialModelName.java index 137407aab3c..0340c7996ab 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/SpecialModelName.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("$special[model.name]") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class SpecialModelName implements Serializable { private @Valid Long $specialPropertyName; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Tag.java index 1455aaa38c6..db7d608abd5 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Tag.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("Tag") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Tag implements Serializable { private @Valid Long id; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderDefault.java index 50055b2cede..a093d79a6d6 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderDefault.java @@ -14,9 +14,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("TypeHolderDefault") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class TypeHolderDefault implements Serializable { private @Valid String stringItem = "what"; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderExample.java index cf362c22ebe..daaffc8af45 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -14,9 +14,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("TypeHolderExample") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class TypeHolderExample implements Serializable { private @Valid String stringItem; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/User.java index 7357008e71b..271676fb2e0 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/User.java @@ -11,9 +11,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("User") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class User implements Serializable { private @Valid Long id; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/XmlItem.java index 5a5783c4180..241ebb4e1bc 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/XmlItem.java @@ -14,9 +14,11 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonTypeName; +@JsonTypeName("XmlItem") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class XmlItem implements Serializable { private @Valid String attributeString; From 2ceccfbe3cfc58a2d06934964af9914c5c0aa5ef Mon Sep 17 00:00:00 2001 From: John Gallagher Date: Mon, 4 Oct 2021 10:09:21 +0100 Subject: [PATCH 42/50] [REQ] [RUBY] [FARADAY] Allow middleware to be configured (#10495) * feat: allow configuring middleware in setup * fix: stop requiring Faraday middleware unnecessarily * chore: regenerate petstore samples * chore: regenerate openapi3 client * chore: ci fails so rebuild --- .../api_client_faraday_partial.mustache | 1 + .../ruby-client/configuration.mustache | 35 +++++++++++++++++++ .../ruby-faraday/lib/petstore/api_client.rb | 1 + .../lib/petstore/configuration.rb | 33 +++++++++++++++++ .../ruby/lib/petstore/configuration.rb | 1 + .../lib/x_auth_id_alias/configuration.rb | 1 + .../ruby/lib/dynamic_servers/configuration.rb | 1 + .../ruby-client/lib/petstore/configuration.rb | 1 + 8 files changed, 74 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api_client_faraday_partial.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_client_faraday_partial.mustache index 0b35bbbc7c6..6d055d51001 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api_client_faraday_partial.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api_client_faraday_partial.mustache @@ -13,6 +13,7 @@ connection = Faraday.new(:url => config.base_url, :ssl => ssl_options) do |conn| conn.basic_auth(config.username, config.password) + @config.configure_middleware(conn) if opts[:header_params]["Content-Type"] == "multipart/form-data" conn.request :multipart conn.request :url_encoded diff --git a/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache b/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache index 2d779e04790..efd628c5390 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache @@ -117,6 +117,9 @@ module {{moduleName}} @ssl_ca_file = nil @ssl_client_cert = nil @ssl_client_key = nil + @middlewares = [] + @request_middlewares = [] + @response_middlewares = [] @timeout = 60 {{/isFaraday}} {{^isFaraday}} @@ -346,5 +349,37 @@ module {{moduleName}} url end + + {{#isFaraday}} + # Adds middleware to the stack + def use(*middleware) + @middlewares << middleware + end + + # Adds request middleware to the stack + def request(*middleware) + @request_middlewares << middleware + end + + # Adds response middleware to the stack + def response(*middleware) + @response_middlewares << middleware + end + + # Set up middleware on the connection + def configure_middleware(connection) + @middlewares.each do |middleware| + connection.use(*middleware) + end + + @request_middlewares.each do |middleware| + connection.request(*middleware) + end + + @response_middlewares.each do |middleware| + connection.response(*middleware) + end + end + {{/isFaraday}} end 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 0faad1f7022..457dcc47230 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb @@ -57,6 +57,7 @@ module Petstore connection = Faraday.new(:url => config.base_url, :ssl => ssl_options) do |conn| conn.basic_auth(config.username, config.password) + @config.configure_middleware(conn) if opts[:header_params]["Content-Type"] == "multipart/form-data" conn.request :multipart conn.request :url_encoded diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb index 27a6c4270da..64e35841173 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb @@ -148,6 +148,9 @@ module Petstore @ssl_ca_file = nil @ssl_client_cert = nil @ssl_client_key = nil + @middlewares = [] + @request_middlewares = [] + @response_middlewares = [] @timeout = 60 @debugging = false @inject_format = false @@ -354,5 +357,35 @@ module Petstore url end + + # Adds middleware to the stack + def use(*middleware) + @middlewares << middleware + end + + # Adds request middleware to the stack + def request(*middleware) + @request_middlewares << middleware + end + + # Adds response middleware to the stack + def response(*middleware) + @response_middlewares << middleware + end + + # Set up middleware on the connection + def configure_middleware(connection) + @middlewares.each do |middleware| + connection.use(*middleware) + end + + @request_middlewares.each do |middleware| + connection.request(*middleware) + end + + @response_middlewares.each do |middleware| + connection.response(*middleware) + end + end end end diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index f99968892f3..c567615f775 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -359,5 +359,6 @@ module Petstore url end + end end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb index 2eaaa31535f..c5e7e3c9bcb 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb @@ -313,5 +313,6 @@ module XAuthIDAlias url end + end 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 09196ad1f81..d54b42ad4e9 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 @@ -350,5 +350,6 @@ module DynamicServers url end + end 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 8d5d2824ceb..631f267d04c 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 @@ -266,5 +266,6 @@ module Petstore url end + end end From 9421b3d3c2debff7877103cf5a8cfc21e51d0c35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 17:13:24 +0800 Subject: [PATCH 43/50] Bump eskatos/gradle-command-action from 1 to 2 (#10491) Bumps [eskatos/gradle-command-action](https://github.com/eskatos/gradle-command-action) from 1 to 2. - [Release notes](https://github.com/eskatos/gradle-command-action/releases) - [Commits](https://github.com/eskatos/gradle-command-action/compare/v1...v2) --- updated-dependencies: - dependency-name: eskatos/gradle-command-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/samples-kotlin.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/samples-kotlin.yaml b/.github/workflows/samples-kotlin.yaml index 46c944fd74e..ddc46f801cb 100644 --- a/.github/workflows/samples-kotlin.yaml +++ b/.github/workflows/samples-kotlin.yaml @@ -56,7 +56,7 @@ jobs: ~/.gradle key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} - name: Install Gradle wrapper - uses: eskatos/gradle-command-action@v1 + uses: eskatos/gradle-command-action@v2 with: gradle-version: ${{ env.GRADLE_VERSION }} build-root-directory: ${{ matrix.sample }} From e1d1ced117bf8dfec55f59815f744e84552df828 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 4 Oct 2021 21:16:21 +0800 Subject: [PATCH 44/50] regenreate package-lock.json for ts axios (#10520) --- .../builds/with-npm-version/package-lock.json | 2 +- .../tests/default/package-lock.json | 3577 +++++++++++++---- 2 files changed, 2889 insertions(+), 690 deletions(-) diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/package-lock.json b/samples/client/petstore/typescript-axios/builds/with-npm-version/package-lock.json index a0dd2ce1c3d..282aba874fc 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/package-lock.json +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "Unlicense", "dependencies": { - "axios": "^0.21.1" + "axios": "^0.21.4" }, "devDependencies": { "@types/node": "^12.11.5", diff --git a/samples/client/petstore/typescript-axios/tests/default/package-lock.json b/samples/client/petstore/typescript-axios/tests/default/package-lock.json index f0ed99cef4a..42dfae14ef3 100644 --- a/samples/client/petstore/typescript-axios/tests/default/package-lock.json +++ b/samples/client/petstore/typescript-axios/tests/default/package-lock.json @@ -1,253 +1,310 @@ { "name": "typescript-fetch-test", "version": "1.0.0", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, - "dependencies": { - "@openapitools/typescript-axios-petstore": { - "version": "file:../../builds/with-npm-version", - "requires": { + "packages": { + "": { + "name": "typescript-fetch-test", + "version": "1.0.0", + "hasInstallScript": true, + "license": "ISC", + "dependencies": { + "@openapitools/typescript-axios-petstore": "file:../../builds/with-npm-version", + "chai": "^4.2.0", + "ts-node": "^9.1.1" + }, + "devDependencies": { + "@types/chai": "^4.2.14", + "@types/mocha": "^8.2.0", + "@types/node": "^14.14.14", + "browserify": "^17.0.0", + "mocha": "^8.2.1", + "typescript": "^4.1.2" + } + }, + "../../builds/with-npm-version": { + "name": "@openapitools/typescript-axios-petstore", + "version": "1.0.0", + "license": "Unlicense", + "dependencies": { "axios": "^0.21.4" }, + "devDependencies": { + "@types/node": "^12.11.5", + "typescript": "^3.6.4" + } + }, + "../../builds/with-npm-version/node_modules/@types/node": { + "version": "12.20.23", + "dev": true, + "license": "MIT" + }, + "../../builds/with-npm-version/node_modules/axios": { + "version": "0.21.1", + "license": "MIT", "dependencies": { - "axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "requires": { - "follow-redirects": "^1.14.0" - } - }, - "follow-redirects": { - "version": "1.14.4", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz", - "integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==" + "follow-redirects": "^1.10.0" + } + }, + "../../builds/with-npm-version/node_modules/follow-redirects": { + "version": "1.14.3", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true } } }, - "@types/chai": { - "version": "4.2.14", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.14.tgz", - "integrity": "sha512-G+ITQPXkwTrslfG5L/BksmbLUA0M1iybEsmCWPqzSxsRRhJZimBKJkoMi8fr/CPygPTj4zO5pJH7I2/cm9M7SQ==", - "dev": true - }, - "@types/mocha": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.0.tgz", - "integrity": "sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ==", - "dev": true - }, - "@types/node": { - "version": "14.14.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.14.tgz", - "integrity": "sha512-UHnOPWVWV1z+VV8k6L1HhG7UbGBgIdghqF3l9Ny9ApPghbjICXkUJSd/b9gOgQfjM1r+37cipdw/HJ3F6ICEnQ==", - "dev": true - }, - "@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, - "JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "../../builds/with-npm-version/node_modules/typescript": { + "version": "3.9.10", "dev": true, - "requires": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" } }, - "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true + "node_modules/@openapitools/typescript-axios-petstore": { + "resolved": "../../builds/with-npm-version", + "link": true }, - "acorn-node": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", - "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", + "node_modules/@types/chai": { + "version": "4.2.14", "dev": true, - "requires": { + "license": "MIT" + }, + "node_modules/@types/mocha": { + "version": "8.2.0", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "14.14.14", + "dev": true, + "license": "MIT" + }, + "node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "dev": true, + "license": "ISC" + }, + "node_modules/acorn": { + "version": "7.4.1", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-node": { + "version": "1.8.2", + "dev": true, + "license": "Apache-2.0", + "dependencies": { "acorn": "^7.0.0", "acorn-walk": "^7.0.0", "xtend": "^4.0.2" } }, - "acorn-walk": { + "node_modules/acorn-walk": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", - "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", - "dev": true - }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "requires": { - "color-convert": "^2.0.1" + "license": "MIT", + "engines": { + "node": ">=0.4.0" } }, - "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "node_modules/ansi-colors": { + "version": "4.1.1", "dev": true, - "requires": { + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "license": "MIT" + }, + "node_modules/argparse": { + "version": "1.0.10", + "dev": true, + "license": "MIT", + "dependencies": { "sprintf-js": "~1.0.2" } }, - "array-filter": { + "node_modules/array-filter": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz", - "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=", - "dev": true - }, - "asn1.js": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", - "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", "dev": true, - "requires": { + "license": "MIT" + }, + "node_modules/asn1.js": { + "version": "5.4.1", + "dev": true, + "license": "MIT", + "dependencies": { "bn.js": "^4.0.0", "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0", "safer-buffer": "^2.1.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", - "dev": true - } } }, - "assert": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", - "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "node_modules/asn1.js/node_modules/bn.js": { + "version": "4.11.9", "dev": true, - "requires": { + "license": "MIT" + }, + "node_modules/assert": { + "version": "1.5.0", + "dev": true, + "license": "MIT", + "dependencies": { "object-assign": "^4.1.1", "util": "0.10.3" - }, + } + }, + "node_modules/assert/node_modules/inherits": { + "version": "2.0.1", + "dev": true, + "license": "ISC" + }, + "node_modules/assert/node_modules/util": { + "version": "0.10.3", + "dev": true, + "license": "MIT", "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } + "inherits": "2.0.1" } }, - "assertion-error": { + "node_modules/assertion-error": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==" - }, - "available-typed-arrays": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz", - "integrity": "sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ==", - "dev": true, - "requires": { - "array-filter": "^1.0.0" + "license": "MIT", + "engines": { + "node": "*" } }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true - }, - "bn.js": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", - "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/available-typed-arrays": { + "version": "1.0.2", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { + "array-filter": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/balanced-match": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/bn.js": { + "version": "5.1.3", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "dev": true, + "license": "MIT", + "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, - "brorand": { + "node_modules/brorand": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browser-pack": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", - "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", "dev": true, - "requires": { - "JSONStream": "^1.0.3", + "license": "MIT" + }, + "node_modules/browser-pack": { + "version": "6.1.0", + "dev": true, + "license": "MIT", + "dependencies": { "combine-source-map": "~0.8.0", "defined": "^1.0.0", + "JSONStream": "^1.0.3", "safe-buffer": "^5.1.1", "through2": "^2.0.0", "umd": "^3.0.0" + }, + "bin": { + "browser-pack": "bin/cmd.js" } }, - "browser-resolve": { + "node_modules/browser-resolve": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-2.0.0.tgz", - "integrity": "sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "resolve": "^1.17.0" } }, - "browser-stdout": { + "node_modules/browser-stdout": { "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "browserify": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-17.0.0.tgz", - "integrity": "sha512-SaHqzhku9v/j6XsQMRxPyBrSP3gnwmE27gLJYZgMT2GeK3J0+0toN+MnuNYDfHwVGQfLiMZ7KSNSIXHemy905w==", "dev": true, - "requires": { - "JSONStream": "^1.0.3", + "license": "ISC" + }, + "node_modules/browserify": { + "version": "17.0.0", + "dev": true, + "license": "MIT", + "dependencies": { "assert": "^1.4.0", "browser-pack": "^6.0.1", "browser-resolve": "^2.0.0", @@ -269,6 +326,2625 @@ "https-browserify": "^1.0.0", "inherits": "~2.0.1", "insert-module-globals": "^7.2.1", + "JSONStream": "^1.0.3", + "labeled-stream-splicer": "^2.0.0", + "mkdirp-classic": "^0.5.2", + "module-deps": "^6.2.3", + "os-browserify": "~0.3.0", + "parents": "^1.0.1", + "path-browserify": "^1.0.0", + "process": "~0.11.0", + "punycode": "^1.3.2", + "querystring-es3": "~0.2.0", + "read-only-stream": "^2.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.1.4", + "shasum-object": "^1.0.0", + "shell-quote": "^1.6.1", + "stream-browserify": "^3.0.0", + "stream-http": "^3.0.0", + "string_decoder": "^1.1.1", + "subarg": "^1.0.0", + "syntax-error": "^1.1.1", + "through2": "^2.0.0", + "timers-browserify": "^1.0.1", + "tty-browserify": "0.0.1", + "url": "~0.11.0", + "util": "~0.12.0", + "vm-browserify": "^1.0.0", + "xtend": "^4.0.0" + }, + "bin": { + "browserify": "bin/cmd.js" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/browserify-cipher": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "node_modules/browserify-des": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/browserify-rsa": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "node_modules/browserify-sign": { + "version": "4.2.1", + "dev": true, + "license": "ISC", + "dependencies": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + } + }, + "node_modules/browserify-sign/node_modules/readable-stream": { + "version": "3.6.0", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/browserify-zlib": { + "version": "0.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "pako": "~1.0.5" + } + }, + "node_modules/buffer": { + "version": "5.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "node_modules/buffer-from": { + "version": "1.1.1", + "license": "MIT" + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "dev": true, + "license": "MIT" + }, + "node_modules/builtin-status-codes": { + "version": "3.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/cached-path-relative": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "node_modules/call-bind": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chai": { + "version": "4.2.0", + "license": "MIT", + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.0", + "type-detect": "^4.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/check-error": { + "version": "1.0.2", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/cipher-base": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "node_modules/combine-source-map": { + "version": "0.8.0", + "dev": true, + "license": "MIT", + "dependencies": { + "convert-source-map": "~1.1.0", + "inline-source-map": "~0.6.0", + "lodash.memoize": "~3.0.3", + "source-map": "~0.5.3" + } + }, + "node_modules/combine-source-map/node_modules/source-map": { + "version": "0.5.7", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "dev": true, + "engines": [ + "node >= 0.8" + ], + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/console-browserify": { + "version": "1.2.0", + "dev": true + }, + "node_modules/constants-browserify": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/convert-source-map": { + "version": "1.1.3", + "dev": true, + "license": "MIT" + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "node_modules/create-ecdh": { + "version": "4.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + } + }, + "node_modules/create-ecdh/node_modules/bn.js": { + "version": "4.11.9", + "dev": true, + "license": "MIT" + }, + "node_modules/create-hash": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "dev": true, + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "license": "MIT" + }, + "node_modules/crypto-browserify": { + "version": "3.12.0", + "dev": true, + "license": "MIT", + "dependencies": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + }, + "engines": { + "node": "*" + } + }, + "node_modules/dash-ast": { + "version": "1.0.0", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/debug": { + "version": "4.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/deep-eql": { + "version": "3.0.1", + "license": "MIT", + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/define-properties": { + "version": "1.1.3", + "dev": true, + "license": "MIT", + "dependencies": { + "object-keys": "^1.0.12" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/defined": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/deps-sort": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "JSONStream": "^1.0.3", + "shasum-object": "^1.0.0", + "subarg": "^1.0.0", + "through2": "^2.0.0" + }, + "bin": { + "deps-sort": "bin/cmd.js" + } + }, + "node_modules/des.js": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/detective": { + "version": "5.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn-node": "^1.6.1", + "defined": "^1.0.0", + "minimist": "^1.1.1" + }, + "bin": { + "detective": "bin/detective.js" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/diff": { + "version": "4.0.2", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/diffie-hellman": { + "version": "5.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "node_modules/diffie-hellman/node_modules/bn.js": { + "version": "4.11.9", + "dev": true, + "license": "MIT" + }, + "node_modules/domain-browser": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4", + "npm": ">=1.2" + } + }, + "node_modules/duplexer2": { + "version": "0.1.4", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "readable-stream": "^2.0.2" + } + }, + "node_modules/elliptic": { + "version": "6.5.3", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.11.9", + "dev": true, + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "7.0.3", + "dev": true, + "license": "MIT" + }, + "node_modules/es-abstract": { + "version": "1.18.0-next.1", + "dev": true, + "license": "MIT", + "dependencies": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/events": { + "version": "3.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/fast-safe-stringify": { + "version": "2.0.7", + "dev": true, + "license": "MIT" + }, + "node_modules/find-up": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/foreach": { + "version": "2.0.5", + "dev": true, + "license": "MIT" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/function-bind": { + "version": "1.1.1", + "dev": true, + "license": "MIT" + }, + "node_modules/get-assigned-identifiers": { + "version": "1.2.0", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.1.6", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/growl": { + "version": "1.10.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.x" + } + }, + "node_modules/has": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hash-base": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash-base/node_modules/readable-stream": { + "version": "3.6.0", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/he": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/htmlescape": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/https-browserify": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/ieee754": { + "version": "1.2.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/inflight": { + "version": "1.0.6", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "dev": true, + "license": "ISC" + }, + "node_modules/inline-source-map": { + "version": "0.6.2", + "dev": true, + "license": "MIT", + "dependencies": { + "source-map": "~0.5.3" + } + }, + "node_modules/inline-source-map/node_modules/source-map": { + "version": "0.5.7", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/insert-module-globals": { + "version": "7.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn-node": "^1.5.2", + "combine-source-map": "^0.8.0", + "concat-stream": "^1.6.1", + "is-buffer": "^1.1.0", + "JSONStream": "^1.0.3", + "path-is-absolute": "^1.0.1", + "process": "~0.11.0", + "through2": "^2.0.0", + "undeclared-identifiers": "^1.1.2", + "xtend": "^4.0.0" + }, + "bin": { + "insert-module-globals": "bin/cmd.js" + } + }, + "node_modules/is-arguments": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "dev": true, + "license": "MIT" + }, + "node_modules/is-callable": { + "version": "1.2.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/is-generator-function": { + "version": "1.0.8", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-regex": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.2", + "call-bind": "^1.0.0", + "es-abstract": "^1.18.0-next.1", + "foreach": "^2.0.5", + "has-symbols": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/js-yaml": { + "version": "3.14.0", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "dev": true, + "engines": [ + "node >= 0.2.0" + ], + "license": "MIT" + }, + "node_modules/JSONStream": { + "version": "1.3.5", + "dev": true, + "license": "(MIT OR Apache-2.0)", + "dependencies": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/labeled-stream-splicer": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "stream-splicer": "^2.0.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.memoize": { + "version": "3.0.4", + "dev": true, + "license": "MIT" + }, + "node_modules/log-symbols": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "license": "ISC" + }, + "node_modules/md5.js": { + "version": "1.3.5", + "dev": true, + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/miller-rabin": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "bin": { + "miller-rabin": "bin/miller-rabin" + } + }, + "node_modules/miller-rabin/node_modules/bn.js": { + "version": "4.11.9", + "dev": true, + "license": "MIT" + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "dev": true, + "license": "ISC" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/minimatch": { + "version": "3.0.4", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.5", + "dev": true, + "license": "MIT" + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "dev": true, + "license": "MIT" + }, + "node_modules/mocha": { + "version": "8.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.4.3", + "debug": "4.2.0", + "diff": "4.0.2", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.1.6", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.14.0", + "log-symbols": "4.0.0", + "minimatch": "3.0.4", + "ms": "2.1.2", + "nanoid": "3.1.12", + "serialize-javascript": "5.0.1", + "strip-json-comments": "3.1.1", + "supports-color": "7.2.0", + "which": "2.0.2", + "wide-align": "1.1.3", + "workerpool": "6.0.2", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 10.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/mocha/node_modules/ansi-regex": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/mocha/node_modules/anymatch": { + "version": "3.1.1", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/mocha/node_modules/binary-extensions": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/braces": { + "version": "3.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/chokidar": { + "version": "3.4.3", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.1.2" + } + }, + "node_modules/mocha/node_modules/cliui": { + "version": "5.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "node_modules/mocha/node_modules/fill-range": { + "version": "7.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/fsevents": { + "version": "2.1.3", + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/mocha/node_modules/glob-parent": { + "version": "5.1.1", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/mocha/node_modules/is-binary-path": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/is-extglob": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mocha/node_modules/is-glob": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mocha/node_modules/is-number": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/mocha/node_modules/locate-path": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/mocha/node_modules/normalize-path": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mocha/node_modules/p-limit": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/p-locate": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/mocha/node_modules/path-exists": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/mocha/node_modules/readdirp": { + "version": "3.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/mocha/node_modules/string-width": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/mocha/node_modules/strip-ansi": { + "version": "5.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/mocha/node_modules/to-regex-range": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/mocha/node_modules/which": { + "version": "2.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/mocha/node_modules/yargs": { + "version": "13.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "node_modules/mocha/node_modules/yargs/node_modules/find-up": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/module-deps": { + "version": "6.2.3", + "dev": true, + "license": "MIT", + "dependencies": { + "browser-resolve": "^2.0.0", + "cached-path-relative": "^1.0.2", + "concat-stream": "~1.6.0", + "defined": "^1.0.0", + "detective": "^5.2.0", + "duplexer2": "^0.1.2", + "inherits": "^2.0.1", + "JSONStream": "^1.0.3", + "parents": "^1.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.4.0", + "stream-combiner2": "^1.1.1", + "subarg": "^1.0.0", + "through2": "^2.0.0", + "xtend": "^4.0.0" + }, + "bin": { + "module-deps": "bin/cmd.js" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.1.12", + "dev": true, + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || >=13.7" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.9.0", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/os-browserify": { + "version": "0.3.0", + "dev": true, + "license": "MIT" + }, + "node_modules/p-limit": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "dev": true, + "license": "(MIT AND Zlib)" + }, + "node_modules/parents": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "path-platform": "~0.11.15" + } + }, + "node_modules/parse-asn1": { + "version": "5.1.6", + "dev": true, + "license": "ISC", + "dependencies": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/path-browserify": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/path-exists": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.6", + "dev": true, + "license": "MIT" + }, + "node_modules/path-platform": { + "version": "0.11.15", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/pathval": { + "version": "1.1.0", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/pbkdf2": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/picomatch": { + "version": "2.2.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/process": { + "version": "0.11.10", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/public-encrypt": { + "version": "4.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/public-encrypt/node_modules/bn.js": { + "version": "4.11.9", + "dev": true, + "license": "MIT" + }, + "node_modules/punycode": { + "version": "1.4.1", + "dev": true, + "license": "MIT" + }, + "node_modules/querystring": { + "version": "0.2.0", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/querystring-es3": { + "version": "0.2.1", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/randomfill": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "node_modules/read-only-stream": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "readable-stream": "^2.0.2" + } + }, + "node_modules/readable-stream": { + "version": "2.3.7", + "dev": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/readable-stream/node_modules/string_decoder": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/resolve": { + "version": "1.19.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.1.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/serialize-javascript": { + "version": "5.0.1", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/sha.js": { + "version": "2.4.11", + "dev": true, + "license": "(MIT AND BSD-3-Clause)", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/shasum-object": { + "version": "1.0.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "fast-safe-stringify": "^2.0.7" + } + }, + "node_modules/shell-quote": { + "version": "1.7.2", + "dev": true, + "license": "MIT" + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/source-map": { + "version": "0.6.1", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.19", + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/stream-browserify": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "~2.0.4", + "readable-stream": "^3.5.0" + } + }, + "node_modules/stream-browserify/node_modules/readable-stream": { + "version": "3.6.0", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/stream-combiner2": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "duplexer2": "~0.1.0", + "readable-stream": "^2.0.2" + } + }, + "node_modules/stream-http": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "xtend": "^4.0.2" + } + }, + "node_modules/stream-http/node_modules/readable-stream": { + "version": "3.6.0", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/stream-splicer": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.2" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/subarg": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.1.0" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/syntax-error": { + "version": "1.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn-node": "^1.2.0" + } + }, + "node_modules/through": { + "version": "2.3.8", + "dev": true, + "license": "MIT" + }, + "node_modules/through2": { + "version": "2.0.5", + "dev": true, + "license": "MIT", + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/timers-browserify": { + "version": "1.4.2", + "dev": true, + "dependencies": { + "process": "~0.11.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/ts-node": { + "version": "9.1.1", + "license": "MIT", + "dependencies": { + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "typescript": ">=2.7" + } + }, + "node_modules/tty-browserify": { + "version": "0.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/type-detect": { + "version": "4.0.8", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "dev": true, + "license": "MIT" + }, + "node_modules/typescript": { + "version": "4.1.3", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/umd": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "bin": { + "umd": "bin/cli.js" + } + }, + "node_modules/undeclared-identifiers": { + "version": "1.1.3", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "acorn-node": "^1.3.0", + "dash-ast": "^1.0.0", + "get-assigned-identifiers": "^1.2.0", + "simple-concat": "^1.0.0", + "xtend": "^4.0.1" + }, + "bin": { + "undeclared-identifiers": "bin.js" + } + }, + "node_modules/url": { + "version": "0.11.0", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "node_modules/url/node_modules/punycode": { + "version": "1.3.2", + "dev": true, + "license": "MIT" + }, + "node_modules/util": { + "version": "0.12.3", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "safe-buffer": "^5.1.2", + "which-typed-array": "^1.1.2" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "node_modules/vm-browserify": { + "version": "1.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/which-module": { + "version": "2.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/which-typed-array": { + "version": "1.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.2", + "call-bind": "^1.0.0", + "es-abstract": "^1.18.0-next.1", + "foreach": "^2.0.5", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.1", + "is-typed-array": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/wide-align": { + "version": "1.1.3", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^1.0.2 || 2" + } + }, + "node_modules/workerpool": { + "version": "6.0.2", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/wrap-ansi": { + "version": "5.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "3.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "1.9.3", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.3", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "5.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "dev": true, + "license": "ISC" + }, + "node_modules/xtend": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "4.0.1", + "dev": true, + "license": "ISC" + }, + "node_modules/yargs-parser": { + "version": "13.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "node_modules/yargs-parser/node_modules/camelcase": { + "version": "5.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser/node_modules/camelcase": { + "version": "6.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs-unparser/node_modules/decamelize": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs-unparser/node_modules/is-plain-obj": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + }, + "dependencies": { + "@openapitools/typescript-axios-petstore": { + "version": "file:../../builds/with-npm-version", + "requires": { + "@types/node": "^12.11.5", + "axios": "^0.21.4", + "typescript": "^3.6.4" + }, + "dependencies": { + "@types/node": { + "version": "12.20.23", + "dev": true + }, + "axios": { + "version": "0.21.1", + "requires": { + "follow-redirects": "^1.10.0" + } + }, + "follow-redirects": { + "version": "1.14.3" + }, + "typescript": { + "version": "3.9.10", + "dev": true + } + } + }, + "@types/chai": { + "version": "4.2.14", + "dev": true + }, + "@types/mocha": { + "version": "8.2.0", + "dev": true + }, + "@types/node": { + "version": "14.14.14", + "dev": true + }, + "@ungap/promise-all-settled": { + "version": "1.1.2", + "dev": true + }, + "acorn": { + "version": "7.4.1", + "dev": true + }, + "acorn-node": { + "version": "1.8.2", + "dev": true, + "requires": { + "acorn": "^7.0.0", + "acorn-walk": "^7.0.0", + "xtend": "^4.0.2" + } + }, + "acorn-walk": { + "version": "7.2.0", + "dev": true + }, + "ansi-colors": { + "version": "4.1.1", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "arg": { + "version": "4.1.3" + }, + "argparse": { + "version": "1.0.10", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "array-filter": { + "version": "1.0.0", + "dev": true + }, + "asn1.js": { + "version": "5.4.1", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "dev": true + } + } + }, + "assert": { + "version": "1.5.0", + "dev": true, + "requires": { + "object-assign": "^4.1.1", + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "dev": true + }, + "util": { + "version": "0.10.3", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assertion-error": { + "version": "1.1.0" + }, + "available-typed-arrays": { + "version": "1.0.2", + "dev": true, + "requires": { + "array-filter": "^1.0.0" + } + }, + "balanced-match": { + "version": "1.0.0", + "dev": true + }, + "base64-js": { + "version": "1.5.1", + "dev": true + }, + "bn.js": { + "version": "5.1.3", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "brorand": { + "version": "1.1.0", + "dev": true + }, + "browser-pack": { + "version": "6.1.0", + "dev": true, + "requires": { + "combine-source-map": "~0.8.0", + "defined": "^1.0.0", + "JSONStream": "^1.0.3", + "safe-buffer": "^5.1.1", + "through2": "^2.0.0", + "umd": "^3.0.0" + } + }, + "browser-resolve": { + "version": "2.0.0", + "dev": true, + "requires": { + "resolve": "^1.17.0" + } + }, + "browser-stdout": { + "version": "1.3.1", + "dev": true + }, + "browserify": { + "version": "17.0.0", + "dev": true, + "requires": { + "assert": "^1.4.0", + "browser-pack": "^6.0.1", + "browser-resolve": "^2.0.0", + "browserify-zlib": "~0.2.0", + "buffer": "~5.2.1", + "cached-path-relative": "^1.0.0", + "concat-stream": "^1.6.0", + "console-browserify": "^1.1.0", + "constants-browserify": "~1.0.0", + "crypto-browserify": "^3.0.0", + "defined": "^1.0.0", + "deps-sort": "^2.0.1", + "domain-browser": "^1.2.0", + "duplexer2": "~0.1.2", + "events": "^3.0.0", + "glob": "^7.1.0", + "has": "^1.0.0", + "htmlescape": "^1.1.0", + "https-browserify": "^1.0.0", + "inherits": "~2.0.1", + "insert-module-globals": "^7.2.1", + "JSONStream": "^1.0.3", "labeled-stream-splicer": "^2.0.0", "mkdirp-classic": "^0.5.2", "module-deps": "^6.2.3", @@ -299,8 +2975,6 @@ }, "browserify-aes": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, "requires": { "buffer-xor": "^1.0.3", @@ -313,8 +2987,6 @@ }, "browserify-cipher": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", "dev": true, "requires": { "browserify-aes": "^1.0.4", @@ -324,8 +2996,6 @@ }, "browserify-des": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", "dev": true, "requires": { "cipher-base": "^1.0.1", @@ -336,8 +3006,6 @@ }, "browserify-rsa": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", - "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", "dev": true, "requires": { "bn.js": "^5.0.0", @@ -346,8 +3014,6 @@ }, "browserify-sign": { "version": "4.2.1", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", - "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", "dev": true, "requires": { "bn.js": "^5.1.1", @@ -363,8 +3029,6 @@ "dependencies": { "readable-stream": { "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -376,8 +3040,6 @@ }, "browserify-zlib": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", "dev": true, "requires": { "pako": "~1.0.5" @@ -385,8 +3047,6 @@ }, "buffer": { "version": "5.2.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", - "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", "dev": true, "requires": { "base64-js": "^1.0.2", @@ -394,32 +3054,22 @@ } }, "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + "version": "1.1.1" }, "buffer-xor": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", "dev": true }, "builtin-status-codes": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", "dev": true }, "cached-path-relative": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.2.tgz", - "integrity": "sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg==", "dev": true }, "call-bind": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz", - "integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==", "dev": true, "requires": { "function-bind": "^1.1.1", @@ -428,8 +3078,6 @@ }, "chai": { "version": "4.2.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", - "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", "requires": { "assertion-error": "^1.1.0", "check-error": "^1.0.2", @@ -441,8 +3089,6 @@ }, "chalk": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -450,14 +3096,10 @@ } }, "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=" + "version": "1.0.2" }, "cipher-base": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "dev": true, "requires": { "inherits": "^2.0.1", @@ -466,8 +3108,6 @@ }, "color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -475,14 +3115,10 @@ }, "color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "combine-source-map": { "version": "0.8.0", - "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", - "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=", "dev": true, "requires": { "convert-source-map": "~1.1.0", @@ -493,22 +3129,16 @@ "dependencies": { "source-map": { "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "dev": true } } }, "concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, "concat-stream": { "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -519,32 +3149,22 @@ }, "console-browserify": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", - "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", "dev": true }, "constants-browserify": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", "dev": true }, "convert-source-map": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", - "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", "dev": true }, "core-util-is": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, "create-ecdh": { "version": "4.0.4", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", - "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", "dev": true, "requires": { "bn.js": "^4.1.0", @@ -553,16 +3173,12 @@ "dependencies": { "bn.js": { "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true } } }, "create-hash": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, "requires": { "cipher-base": "^1.0.1", @@ -574,8 +3190,6 @@ }, "create-hmac": { "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "requires": { "cipher-base": "^1.0.3", @@ -587,14 +3201,10 @@ } }, "create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" + "version": "1.1.1" }, "crypto-browserify": { "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", "dev": true, "requires": { "browserify-cipher": "^1.0.0", @@ -612,14 +3222,10 @@ }, "dash-ast": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz", - "integrity": "sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==", "dev": true }, "debug": { "version": "4.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", - "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "dev": true, "requires": { "ms": "2.1.2" @@ -627,22 +3233,16 @@ }, "decamelize": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, "deep-eql": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", "requires": { "type-detect": "^4.0.0" } }, "define-properties": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", "dev": true, "requires": { "object-keys": "^1.0.12" @@ -650,14 +3250,10 @@ }, "defined": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", "dev": true }, "deps-sort": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.1.tgz", - "integrity": "sha512-1orqXQr5po+3KI6kQb9A4jnXT1PBwggGl2d7Sq2xsnOeI9GPcE/tGcF9UiSZtZBM7MukY4cAh7MemS6tZYipfw==", "dev": true, "requires": { "JSONStream": "^1.0.3", @@ -668,8 +3264,6 @@ }, "des.js": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", - "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", "dev": true, "requires": { "inherits": "^2.0.1", @@ -678,8 +3272,6 @@ }, "detective": { "version": "5.2.0", - "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.0.tgz", - "integrity": "sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg==", "dev": true, "requires": { "acorn-node": "^1.6.1", @@ -688,14 +3280,10 @@ } }, "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" + "version": "4.0.2" }, "diffie-hellman": { "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "dev": true, "requires": { "bn.js": "^4.1.0", @@ -705,22 +3293,16 @@ "dependencies": { "bn.js": { "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true } } }, "domain-browser": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", "dev": true }, "duplexer2": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", "dev": true, "requires": { "readable-stream": "^2.0.2" @@ -728,8 +3310,6 @@ }, "elliptic": { "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", "dev": true, "requires": { "bn.js": "^4.4.0", @@ -743,22 +3323,16 @@ "dependencies": { "bn.js": { "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true } } }, "emoji-regex": { "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, "es-abstract": { "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", "dev": true, "requires": { "es-to-primitive": "^1.2.1", @@ -777,8 +3351,6 @@ }, "es-to-primitive": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, "requires": { "is-callable": "^1.1.4", @@ -788,26 +3360,18 @@ }, "escape-string-regexp": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, "esprima": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, "events": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", - "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==", "dev": true }, "evp_bytestokey": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "dev": true, "requires": { "md5.js": "^1.3.4", @@ -816,14 +3380,10 @@ }, "fast-safe-stringify": { "version": "2.0.7", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", - "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==", "dev": true }, "find-up": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "requires": { "locate-path": "^6.0.0", @@ -832,49 +3392,33 @@ }, "flat": { "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true }, "foreach": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", "dev": true }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, "function-bind": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, "get-assigned-identifiers": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", - "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==", "dev": true }, "get-caller-file": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=" + "version": "2.0.0" }, "get-intrinsic": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.1.tgz", - "integrity": "sha512-ZnWP+AmS1VUaLgTRy47+zKtjTxz+0xMpx3I52i+aalBK1QP19ggLF3Db89KJX7kjfOfP2eoa01qc++GwPgufPg==", "dev": true, "requires": { "function-bind": "^1.1.1", @@ -884,8 +3428,6 @@ }, "glob": { "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -898,14 +3440,10 @@ }, "growl": { "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, "has": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "requires": { "function-bind": "^1.1.1" @@ -913,20 +3451,14 @@ }, "has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "has-symbols": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", "dev": true }, "hash-base": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", "dev": true, "requires": { "inherits": "^2.0.4", @@ -936,8 +3468,6 @@ "dependencies": { "readable-stream": { "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -949,8 +3479,6 @@ }, "hash.js": { "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -959,14 +3487,10 @@ }, "he": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, "hmac-drbg": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "dev": true, "requires": { "hash.js": "^1.0.3", @@ -976,26 +3500,18 @@ }, "htmlescape": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", - "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", "dev": true }, "https-browserify": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", "dev": true }, "ieee754": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "dev": true }, "inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { "once": "^1.3.0", @@ -1004,14 +3520,10 @@ }, "inherits": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, "inline-source-map": { "version": "0.6.2", - "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", - "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", "dev": true, "requires": { "source-map": "~0.5.3" @@ -1019,23 +3531,19 @@ "dependencies": { "source-map": { "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "dev": true } } }, "insert-module-globals": { "version": "7.2.1", - "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.1.tgz", - "integrity": "sha512-ufS5Qq9RZN+Bu899eA9QCAYThY+gGW7oRkmb0vC93Vlyu/CFGcH0OYPEjVkDXA5FEbTt1+VWzdoOD3Ny9N+8tg==", "dev": true, "requires": { - "JSONStream": "^1.0.3", "acorn-node": "^1.5.2", "combine-source-map": "^0.8.0", "concat-stream": "^1.6.1", "is-buffer": "^1.1.0", + "JSONStream": "^1.0.3", "path-is-absolute": "^1.0.1", "process": "~0.11.0", "through2": "^2.0.0", @@ -1045,8 +3553,6 @@ }, "is-arguments": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", - "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", "dev": true, "requires": { "call-bind": "^1.0.0" @@ -1054,20 +3560,14 @@ }, "is-buffer": { "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "dev": true }, "is-callable": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", - "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", "dev": true }, "is-core-module": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", - "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", "dev": true, "requires": { "has": "^1.0.3" @@ -1075,32 +3575,22 @@ }, "is-date-object": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", "dev": true }, "is-fullwidth-code-point": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, "is-generator-function": { "version": "1.0.8", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.8.tgz", - "integrity": "sha512-2Omr/twNtufVZFr1GhxjOMFPAj2sjc/dKaIqBhvo4qciXfJmITGH6ZGd8eZYNHza8t1y0e01AuqRhJwfWp26WQ==", "dev": true }, "is-negative-zero": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", "dev": true }, "is-regex": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", - "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", "dev": true, "requires": { "has-symbols": "^1.0.1" @@ -1108,8 +3598,6 @@ }, "is-symbol": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", "dev": true, "requires": { "has-symbols": "^1.0.1" @@ -1117,8 +3605,6 @@ }, "is-typed-array": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.4.tgz", - "integrity": "sha512-ILaRgn4zaSrVNXNGtON6iFNotXW3hAPF3+0fB1usg2jFlWqo5fEDdmJkz0zBfoi7Dgskr8Khi2xZ8cXqZEfXNA==", "dev": true, "requires": { "available-typed-arrays": "^1.0.2", @@ -1130,20 +3616,14 @@ }, "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, "isexe": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, "js-yaml": { "version": "3.14.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", - "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -1152,14 +3632,18 @@ }, "jsonparse": { "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", "dev": true }, + "JSONStream": { + "version": "1.3.5", + "dev": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, "labeled-stream-splicer": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz", - "integrity": "sha512-Ca4LSXFFZUjPScRaqOcFxneA0VpKZr4MMYCljyQr4LIewTLb3Y0IUTIsnBBsVubIeEfxeSZpSjSsRM8APEQaAw==", "dev": true, "requires": { "inherits": "^2.0.1", @@ -1168,8 +3652,6 @@ }, "locate-path": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "requires": { "p-locate": "^5.0.0" @@ -1177,28 +3659,20 @@ }, "lodash.memoize": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", - "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", "dev": true }, "log-symbols": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", - "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", "dev": true, "requires": { "chalk": "^4.0.0" } }, "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + "version": "1.3.6" }, "md5.js": { "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "dev": true, "requires": { "hash-base": "^3.0.0", @@ -1208,8 +3682,6 @@ }, "miller-rabin": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", "dev": true, "requires": { "bn.js": "^4.0.0", @@ -1218,28 +3690,20 @@ "dependencies": { "bn.js": { "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true } } }, "minimalistic-assert": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", "dev": true }, "minimalistic-crypto-utils": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", "dev": true }, "minimatch": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -1247,20 +3711,14 @@ }, "minimist": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, "mkdirp-classic": { "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", "dev": true }, "mocha": { "version": "8.2.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.2.1.tgz", - "integrity": "sha512-cuLBVfyFfFqbNR0uUKbDGXKGk+UDFe6aR4os78XIrMQpZl/nv7JYHcvP5MFIAb374b2zFXsdgEGwmzMtP0Xg8w==", "dev": true, "requires": { "@ungap/promise-all-settled": "1.1.2", @@ -1292,14 +3750,10 @@ "dependencies": { "ansi-regex": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, "anymatch": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", "dev": true, "requires": { "normalize-path": "^3.0.0", @@ -1308,14 +3762,10 @@ }, "binary-extensions": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", - "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", "dev": true }, "braces": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { "fill-range": "^7.0.1" @@ -1323,8 +3773,6 @@ }, "chokidar": { "version": "3.4.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", - "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", "dev": true, "requires": { "anymatch": "~3.1.1", @@ -1339,8 +3787,6 @@ }, "cliui": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, "requires": { "string-width": "^3.1.0", @@ -1350,8 +3796,6 @@ }, "fill-range": { "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "requires": { "to-regex-range": "^5.0.1" @@ -1359,15 +3803,11 @@ }, "fsevents": { "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", "dev": true, "optional": true }, "glob-parent": { "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -1375,8 +3815,6 @@ }, "is-binary-path": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "requires": { "binary-extensions": "^2.0.0" @@ -1384,14 +3822,10 @@ }, "is-extglob": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, "is-glob": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", "dev": true, "requires": { "is-extglob": "^2.1.1" @@ -1399,14 +3833,10 @@ }, "is-number": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, "locate-path": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { "p-locate": "^3.0.0", @@ -1415,14 +3845,10 @@ }, "normalize-path": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, "p-limit": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -1430,8 +3856,6 @@ }, "p-locate": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { "p-limit": "^2.0.0" @@ -1439,14 +3863,10 @@ }, "path-exists": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true }, "readdirp": { "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", "dev": true, "requires": { "picomatch": "^2.2.1" @@ -1454,8 +3874,6 @@ }, "string-width": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { "emoji-regex": "^7.0.1", @@ -1465,8 +3883,6 @@ }, "strip-ansi": { "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { "ansi-regex": "^4.1.0" @@ -1474,8 +3890,6 @@ }, "to-regex-range": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "requires": { "is-number": "^7.0.0" @@ -1483,8 +3897,6 @@ }, "which": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { "isexe": "^2.0.0" @@ -1492,8 +3904,6 @@ }, "yargs": { "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, "requires": { "cliui": "^5.0.0", @@ -1510,8 +3920,6 @@ "dependencies": { "find-up": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { "locate-path": "^3.0.0" @@ -1523,11 +3931,8 @@ }, "module-deps": { "version": "6.2.3", - "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.3.tgz", - "integrity": "sha512-fg7OZaQBcL4/L+AK5f4iVqf9OMbCclXfy/znXRxTVhJSeW5AIlS9AwheYwDaXM3lVW7OBeaeUEY3gbaC6cLlSA==", "dev": true, "requires": { - "JSONStream": "^1.0.3", "browser-resolve": "^2.0.0", "cached-path-relative": "^1.0.2", "concat-stream": "~1.6.0", @@ -1535,6 +3940,7 @@ "detective": "^5.2.0", "duplexer2": "^0.1.2", "inherits": "^2.0.1", + "JSONStream": "^1.0.3", "parents": "^1.0.0", "readable-stream": "^2.0.2", "resolve": "^1.4.0", @@ -1546,38 +3952,26 @@ }, "ms": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "nanoid": { "version": "3.1.12", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.12.tgz", - "integrity": "sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A==", "dev": true }, "object-assign": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true }, "object-inspect": { "version": "1.9.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", - "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", "dev": true }, "object-keys": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true }, "object.assign": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", "dev": true, "requires": { "call-bind": "^1.0.0", @@ -1588,8 +3982,6 @@ }, "once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { "wrappy": "1" @@ -1597,14 +3989,10 @@ }, "os-browserify": { "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", "dev": true }, "p-limit": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { "yocto-queue": "^0.1.0" @@ -1612,8 +4000,6 @@ }, "p-locate": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "requires": { "p-limit": "^3.0.2" @@ -1621,20 +4007,14 @@ }, "p-try": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, "pako": { "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", "dev": true }, "parents": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", - "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", "dev": true, "requires": { "path-platform": "~0.11.15" @@ -1642,8 +4022,6 @@ }, "parse-asn1": { "version": "5.1.6", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", - "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", "dev": true, "requires": { "asn1.js": "^5.2.0", @@ -1655,43 +4033,29 @@ }, "path-browserify": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", "dev": true }, "path-exists": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, "path-parse": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, "path-platform": { "version": "0.11.15", - "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", - "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", "dev": true }, "pathval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=" + "version": "1.1.0" }, "pbkdf2": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", - "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", "dev": true, "requires": { "create-hash": "^1.1.2", @@ -1703,26 +4067,18 @@ }, "picomatch": { "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", "dev": true }, "process": { "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", "dev": true }, "process-nextick-args": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, "public-encrypt": { "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", "dev": true, "requires": { "bn.js": "^4.1.0", @@ -1735,34 +4091,24 @@ "dependencies": { "bn.js": { "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true } } }, "punycode": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", "dev": true }, "querystring": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", "dev": true }, "querystring-es3": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", "dev": true }, "randombytes": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "requires": { "safe-buffer": "^5.1.0" @@ -1770,8 +4116,6 @@ }, "randomfill": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", "dev": true, "requires": { "randombytes": "^2.0.5", @@ -1780,8 +4124,6 @@ }, "read-only-stream": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", - "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", "dev": true, "requires": { "readable-stream": "^2.0.2" @@ -1789,8 +4131,6 @@ }, "readable-stream": { "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -1804,14 +4144,10 @@ "dependencies": { "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, "string_decoder": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { "safe-buffer": "~5.1.0" @@ -1821,20 +4157,14 @@ }, "require-directory": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, "require-main-filename": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, "resolve": { "version": "1.19.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", - "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", "dev": true, "requires": { "is-core-module": "^2.1.0", @@ -1843,8 +4173,6 @@ }, "ripemd160": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "dev": true, "requires": { "hash-base": "^3.0.0", @@ -1853,20 +4181,14 @@ }, "safe-buffer": { "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, "safer-buffer": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, "serialize-javascript": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", - "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", "dev": true, "requires": { "randombytes": "^2.1.0" @@ -1874,14 +4196,10 @@ }, "set-blocking": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, "sha.js": { "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, "requires": { "inherits": "^2.0.1", @@ -1890,8 +4208,6 @@ }, "shasum-object": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shasum-object/-/shasum-object-1.0.0.tgz", - "integrity": "sha512-Iqo5rp/3xVi6M4YheapzZhhGPVs0yZwHj7wvwQ1B9z8H6zk+FEnI7y3Teq7qwnekfEhu8WmG2z0z4iWZaxLWVg==", "dev": true, "requires": { "fast-safe-stringify": "^2.0.7" @@ -1899,25 +4215,17 @@ }, "shell-quote": { "version": "1.7.2", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", - "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", "dev": true }, "simple-concat": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", "dev": true }, "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "version": "0.6.1" }, "source-map-support": { "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -1925,14 +4233,10 @@ }, "sprintf-js": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, "stream-browserify": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", - "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", "dev": true, "requires": { "inherits": "~2.0.4", @@ -1941,8 +4245,6 @@ "dependencies": { "readable-stream": { "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -1954,8 +4256,6 @@ }, "stream-combiner2": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", - "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", "dev": true, "requires": { "duplexer2": "~0.1.0", @@ -1964,8 +4264,6 @@ }, "stream-http": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.1.1.tgz", - "integrity": "sha512-S7OqaYu0EkFpgeGFb/NPOoPLxFko7TPqtEeFg5DXPB4v/KETHG0Ln6fRFrNezoelpaDKmycEmmZ81cC9DAwgYg==", "dev": true, "requires": { "builtin-status-codes": "^3.0.0", @@ -1976,8 +4274,6 @@ "dependencies": { "readable-stream": { "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -1989,18 +4285,21 @@ }, "stream-splicer": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.1.tgz", - "integrity": "sha512-Xizh4/NPuYSyAXyT7g8IvdJ9HJpxIGL9PjyhtywCZvvP0OPIdqyrr4dMikeuvY8xahpdKEBlBTySe583totajg==", "dev": true, "requires": { "inherits": "^2.0.1", "readable-stream": "^2.0.2" } }, + "string_decoder": { + "version": "1.3.0", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, "string-width": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", @@ -2009,14 +4308,10 @@ "dependencies": { "ansi-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, "strip-ansi": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { "ansi-regex": "^3.0.0" @@ -2026,8 +4321,6 @@ }, "string.prototype.trimend": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz", - "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", "dev": true, "requires": { "call-bind": "^1.0.0", @@ -2036,33 +4329,18 @@ }, "string.prototype.trimstart": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz", - "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", "dev": true, "requires": { "call-bind": "^1.0.0", "define-properties": "^1.1.3" } }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "requires": { - "safe-buffer": "~5.2.0" - } - }, "strip-json-comments": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, "subarg": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", "dev": true, "requires": { "minimist": "^1.1.0" @@ -2070,8 +4348,6 @@ }, "supports-color": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -2079,8 +4355,6 @@ }, "syntax-error": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", - "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", "dev": true, "requires": { "acorn-node": "^1.2.0" @@ -2088,14 +4362,10 @@ }, "through": { "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, "through2": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", "dev": true, "requires": { "readable-stream": "~2.3.6", @@ -2104,8 +4374,6 @@ }, "timers-browserify": { "version": "1.4.2", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", - "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", "dev": true, "requires": { "process": "~0.11.0" @@ -2113,8 +4381,6 @@ }, "ts-node": { "version": "9.1.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz", - "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==", "requires": { "arg": "^4.1.0", "create-require": "^1.1.0", @@ -2126,37 +4392,24 @@ }, "tty-browserify": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", - "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", "dev": true }, "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" + "version": "4.0.8" }, "typedarray": { "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true }, "typescript": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz", - "integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==", - "dev": true + "version": "4.1.3" }, "umd": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", - "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", "dev": true }, "undeclared-identifiers": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.3.tgz", - "integrity": "sha512-pJOW4nxjlmfwKApE4zvxLScM/njmwj/DiUBv7EabwE4O8kRUy+HIwxQtZLBPll/jx1LJyBcqNfB3/cpv9EZwOw==", "dev": true, "requires": { "acorn-node": "^1.3.0", @@ -2168,8 +4421,6 @@ }, "url": { "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", "dev": true, "requires": { "punycode": "1.3.2", @@ -2178,16 +4429,12 @@ "dependencies": { "punycode": { "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", "dev": true } } }, "util": { "version": "0.12.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.3.tgz", - "integrity": "sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -2200,26 +4447,18 @@ }, "util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, "vm-browserify": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", - "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", "dev": true }, "which-module": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, "which-typed-array": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.4.tgz", - "integrity": "sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==", "dev": true, "requires": { "available-typed-arrays": "^1.0.2", @@ -2233,8 +4472,6 @@ }, "wide-align": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "dev": true, "requires": { "string-width": "^1.0.2 || 2" @@ -2242,14 +4479,10 @@ }, "workerpool": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.2.tgz", - "integrity": "sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q==", "dev": true }, "wrap-ansi": { "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "dev": true, "requires": { "ansi-styles": "^3.2.0", @@ -2259,14 +4492,10 @@ "dependencies": { "ansi-regex": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, "ansi-styles": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" @@ -2274,8 +4503,6 @@ }, "color-convert": { "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "requires": { "color-name": "1.1.3" @@ -2283,14 +4510,10 @@ }, "color-name": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, "string-width": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { "emoji-regex": "^7.0.1", @@ -2300,8 +4523,6 @@ }, "strip-ansi": { "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { "ansi-regex": "^4.1.0" @@ -2311,26 +4532,18 @@ }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, "xtend": { "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "dev": true }, "y18n": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", "dev": true }, "yargs-parser": { "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -2339,16 +4552,12 @@ "dependencies": { "camelcase": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true } } }, "yargs-unparser": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, "requires": { "camelcase": "^6.0.0", @@ -2359,33 +4568,23 @@ "dependencies": { "camelcase": { "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", "dev": true }, "decamelize": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true }, "is-plain-obj": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true } } }, "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" + "version": "3.1.1" }, "yocto-queue": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true } } From 1735ab9d27656171def2440fa75cfe0c80a510f5 Mon Sep 17 00:00:00 2001 From: RomainPruvostMHH <76999857+RomainPruvostMHH@users.noreply.github.com> Date: Tue, 5 Oct 2021 03:47:29 +0200 Subject: [PATCH 45/50] [Java] Replace Java EE 8 dependencies by Jakarta EE 8 (#10513) * Migrate javax.annotation:javax.annotation-api to jakarta.annotation:jakarta.annotation-api:1.3.5 * Migrate javax.annotation:javax.annotation-api to jakarta.annotation:jakarta.annotation-api:1.3.5 for sbt * Migrate javax.annotation:javax.annotation-api to jakarta.annotation:jakarta.annotation-api:1.3.5 for gradle * Commit samples files after the execution of the command "generate-samples.sh for configs java and kotlin * Delete org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec from the exclusion section of org.jboss.resteasy:resteasy-client in the resteasy module because jboss-annotations-api_1.2_spec isn't a transitive dependency * Migrate javax.validation:validation-api to jakarta.validation:jakarta.validation-api:2.0.2 for maven * Migrate javax.validation:validation-api to jakarta.validation:jakarta.validation-api:2.0.2 for gradle * Migrate javax.validation:validation-api to jakarta.validation:jakarta.validation-api:2.0.2 for sbt * Commit samples files after the execution of the command "generate-samples.sh for configs java, spring, jaxrs and kotlin * Migrate javax.ws.rs:javax.ws.rs-api to jakarta.ws.rs:jakarta.ws.rs-api:2.1.6 for maven * Commit samples files after the execution of the command "generate-samples.sh for configs java, spring, jaxrs and kotlin * Migrate javax.json.bind:javax.json.bind-api to jakarta.json.bind:jakarta.json.bind-api:1.0.2 for maven * Commit samples files after the execution of the command "generate-samples.sh for configs java, spring, jaxrs and kotlin * Migrate javax.json:javax.json-api to jakarta.json:jakarta.json-api:1.1.6 for maven * Commit samples files after the execution of the command "generate-samples.sh for configs java, spring, jaxrs and kotlin * Migrate javax.xml.bind:jaxb-api to jakarta.xml.bind:jakarta.xml.bind-api:2.3.3 for maven * Commit samples files after the execution of the command "generate-samples.sh for configs java, spring, jaxrs and kotlin * Migrate javax.el:el-api to jakarta.el:jakarta.el-api:3.0.3 for maven * Migrate javax.servlet:servlet-api to jakarta.servlet:jakarta.servlet-api:4.0.4 for maven * Delete the property servlet-api-version in pom files because it is useless * Commit samples files after the execution of the command "generate-samples.sh for configs java, spring, jaxrs and kotlin * Migrate javax.activation:activation to jakarta.activation:jakarta.activation-api:1.2.2 for maven * Delete javax.activation:activation from the exclusion section of org.jboss.resteasy:resteasy-client in the resteasy module because javax.activation:activation isn't a transitive dependency * Commit samples files after the execution of the command "generate-samples.sh for configs java, spring, jaxrs and kotlin * Fix the name of property jakarta.activation-version * Fix a missing property 'jakarta-annotation-version' in JavaJaxRS/resteasy/pom.mustache * generate samples * Fix version value of jakarta.validation-api artifact in Java/libraries/rest-assured/pom.mustache * Fix missing property jakarta-annotation-version in jaxrs-resteasy/eap/pom.mustache * generate samples * Revert changes in sample files after running the command generate-samples.sh in gitBash * Fix files in samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8 * Replace the old dependency javax.validation:validation-api by the new Jakarta EE 8 jakarta.validation:jakarta.validation-api in openapi-generator-online Co-authored-by: rpruvost Co-authored-by: rpruvost --- modules/openapi-generator-online/pom.xml | 4 +- .../main/resources/Java/build.gradle.mustache | 5 +- .../Java/libraries/apache/pom.mustache | 17 ++++--- .../libraries/feign/build.gradle.mustache | 5 +- .../Java/libraries/feign/build.sbt.mustache | 2 +- .../Java/libraries/feign/pom.mustache | 8 +-- .../google-api-client/build.gradle.mustache | 5 +- .../google-api-client/build.sbt.mustache | 2 +- .../libraries/google-api-client/pom.mustache | 8 +-- .../libraries/jersey2/build.gradle.mustache | 5 +- .../Java/libraries/jersey2/build.sbt.mustache | 2 +- .../Java/libraries/jersey2/pom.mustache | 17 ++++--- .../Java/libraries/microprofile/pom.mustache | 50 ++++++++++--------- .../libraries/native/build.gradle.mustache | 3 +- .../Java/libraries/native/pom.mustache | 8 +-- .../okhttp-gson/build.gradle.mustache | 8 ++- .../libraries/okhttp-gson/build.sbt.mustache | 4 +- .../Java/libraries/okhttp-gson/pom.mustache | 26 ++++++---- .../rest-assured/build.gradle.mustache | 7 +-- .../libraries/rest-assured/build.sbt.mustache | 4 +- .../Java/libraries/rest-assured/pom.mustache | 17 ++++--- .../libraries/resteasy/build.gradle.mustache | 5 +- .../libraries/resteasy/build.sbt.mustache | 2 +- .../Java/libraries/resteasy/pom.mustache | 20 ++------ .../resttemplate/build.gradle.mustache | 5 +- .../Java/libraries/resttemplate/pom.mustache | 8 +-- .../libraries/retrofit/build.gradle.mustache | 5 +- .../libraries/retrofit/build.sbt.mustache | 2 +- .../Java/libraries/retrofit/pom.mustache | 8 +-- .../libraries/retrofit2/build.gradle.mustache | 7 +-- .../libraries/retrofit2/build.sbt.mustache | 4 +- .../Java/libraries/retrofit2/pom.mustache | 17 ++++--- .../libraries/vertx/build.gradle.mustache | 3 +- .../Java/libraries/vertx/pom.mustache | 8 +-- .../libraries/webclient/build.gradle.mustache | 6 +-- .../Java/libraries/webclient/pom.mustache | 8 +-- .../src/main/resources/Java/pom.mustache | 17 ++++--- .../main/resources/JavaInflector/pom.mustache | 8 +-- .../resources/JavaJaxRS/cxf-cdi/pom.mustache | 12 +++-- .../resources/JavaJaxRS/cxf-ext/pom.mustache | 11 ++-- .../JavaJaxRS/cxf-ext/server/pom.mustache | 10 ++-- .../main/resources/JavaJaxRS/cxf/pom.mustache | 19 ++++--- .../JavaJaxRS/cxf/server/pom.mustache | 19 ++++--- .../JavaJaxRS/libraries/jersey1/pom.mustache | 16 +++--- .../src/main/resources/JavaJaxRS/pom.mustache | 16 +++--- .../JavaJaxRS/resteasy/eap/gradle.mustache | 4 +- .../JavaJaxRS/resteasy/eap/pom.mustache | 22 ++++---- .../JavaJaxRS/resteasy/gradle.mustache | 4 +- .../resources/JavaJaxRS/resteasy/pom.mustache | 22 ++++---- .../spec/libraries/helidon/pom.mustache | 6 +-- .../spec/libraries/openliberty/pom.mustache | 7 +-- .../resources/JavaJaxRS/spec/pom.mustache | 16 +++--- .../libraries/spring-boot/pom.mustache | 9 ++-- .../libraries/spring-mvc/pom.mustache | 30 +++++------ .../resources/java-msf4j-server/pom.mustache | 14 +++--- .../main/resources/java-pkmst/pom.mustache | 8 +-- .../libraries/spring-boot/pom.mustache | 12 ++--- .../kotlin-vertx-server/pom.mustache | 7 +-- .../scala-httpclient/build.gradle.mustache | 3 +- .../scala-play-server/build.sbt.mustache | 2 +- .../libraries/jersey2/build.gradle.mustache | 5 +- .../Java/libraries/jersey2/build.sbt.mustache | 2 +- .../Java/libraries/jersey2/pom.mustache | 17 ++++--- .../java/apache-httpclient/build.gradle | 5 +- .../petstore/java/apache-httpclient/pom.xml | 8 +-- .../java/feign-no-nullable/build.gradle | 5 +- .../petstore/java/feign-no-nullable/build.sbt | 2 +- .../petstore/java/feign-no-nullable/pom.xml | 8 +-- .../client/petstore/java/feign/build.gradle | 5 +- samples/client/petstore/java/feign/build.sbt | 2 +- .../petstore/java/feign/feign10x/pom.xml | 8 +-- samples/client/petstore/java/feign/pom.xml | 8 +-- .../java/google-api-client/build.gradle | 5 +- .../petstore/java/google-api-client/build.sbt | 2 +- .../petstore/java/google-api-client/pom.xml | 8 +-- .../client/petstore/java/jersey1/build.gradle | 5 +- samples/client/petstore/java/jersey1/pom.xml | 8 +-- .../jersey2-java8-localdatetime/build.gradle | 5 +- .../jersey2-java8-localdatetime/build.sbt | 2 +- .../java/jersey2-java8-localdatetime/pom.xml | 8 +-- .../petstore/java/jersey2-java8/build.gradle | 5 +- .../petstore/java/jersey2-java8/build.sbt | 2 +- .../petstore/java/jersey2-java8/pom.xml | 8 +-- .../java/microprofile-rest-client/pom.xml | 44 ++++++++-------- .../petstore/java/native-async/build.gradle | 3 +- .../client/petstore/java/native-async/pom.xml | 8 +-- .../client/petstore/java/native/build.gradle | 3 +- samples/client/petstore/java/native/pom.xml | 8 +-- .../build.gradle | 8 ++- .../okhttp-gson-dynamicOperations/build.sbt | 4 +- .../okhttp-gson-dynamicOperations/pom.xml | 8 +-- .../okhttp-gson-parcelableModel/build.gradle | 8 ++- .../okhttp-gson-parcelableModel/build.sbt | 4 +- .../java/okhttp-gson-parcelableModel/pom.xml | 8 +-- .../petstore/java/okhttp-gson/build.gradle | 8 ++- .../petstore/java/okhttp-gson/build.sbt | 4 +- .../client/petstore/java/okhttp-gson/pom.xml | 8 +-- .../java/rest-assured-jackson/build.gradle | 7 +-- .../java/rest-assured-jackson/build.sbt | 4 +- .../java/rest-assured-jackson/pom.xml | 15 +++--- .../petstore/java/rest-assured/build.gradle | 6 +-- .../petstore/java/rest-assured/build.sbt | 4 +- .../client/petstore/java/rest-assured/pom.xml | 15 +++--- .../petstore/java/resteasy/build.gradle | 5 +- .../client/petstore/java/resteasy/build.sbt | 2 +- samples/client/petstore/java/resteasy/pom.xml | 20 ++------ .../java/resttemplate-withXml/build.gradle | 5 +- .../java/resttemplate-withXml/pom.xml | 8 +-- .../petstore/java/resttemplate/build.gradle | 5 +- .../client/petstore/java/resttemplate/pom.xml | 8 +-- .../java/retrofit2-play26/build.gradle | 7 +-- .../petstore/java/retrofit2-play26/build.sbt | 4 +- .../petstore/java/retrofit2-play26/pom.xml | 15 +++--- .../petstore/java/retrofit2/build.gradle | 4 +- .../client/petstore/java/retrofit2/build.sbt | 2 +- .../client/petstore/java/retrofit2/pom.xml | 8 +-- .../petstore/java/retrofit2rx2/build.gradle | 4 +- .../petstore/java/retrofit2rx2/build.sbt | 2 +- .../client/petstore/java/retrofit2rx2/pom.xml | 8 +-- .../petstore/java/retrofit2rx3/build.gradle | 4 +- .../petstore/java/retrofit2rx3/build.sbt | 2 +- .../client/petstore/java/retrofit2rx3/pom.xml | 8 +-- .../java/vertx-no-nullable/build.gradle | 3 +- .../petstore/java/vertx-no-nullable/pom.xml | 8 +-- .../client/petstore/java/vertx/build.gradle | 3 +- samples/client/petstore/java/vertx/pom.xml | 8 +-- .../webclient-nulable-arrays/build.gradle | 6 +-- .../java/webclient-nulable-arrays/pom.xml | 8 +-- .../petstore/java/webclient/build.gradle | 6 +-- .../client/petstore/java/webclient/pom.xml | 8 +-- .../petstore/jaxrs-cxf-client-jackson/pom.xml | 8 +-- .../client/petstore/jaxrs-cxf-client/pom.xml | 8 +-- .../scala-httpclient-deprecated/build.gradle | 3 +- samples/client/petstore/spring-stubs/pom.xml | 9 ++-- .../java/jersey2-java8/build.gradle | 5 +- .../java/jersey2-java8/build.sbt | 2 +- .../java/jersey2-java8/pom.xml | 8 +-- .../build.gradle | 5 +- .../build.sbt | 2 +- .../jersey2-java8-special-characters/pom.xml | 8 +-- .../petstore/java/jersey2-java8/build.gradle | 5 +- .../petstore/java/jersey2-java8/build.sbt | 2 +- .../petstore/java/jersey2-java8/pom.xml | 8 +-- .../client/petstore/java/native/pom.xml | 8 +-- .../jaxrs-cxf-client-jackson-nullable/pom.xml | 8 +-- .../kotlin-springboot-reactive/pom.xml | 8 +-- .../server/petstore/kotlin-springboot/pom.xml | 8 +-- .../server/petstore/java-inflector/pom.xml | 8 +-- samples/server/petstore/java-msf4j/pom.xml | 14 +++--- samples/server/petstore/java-pkmst/pom.xml | 8 +-- .../jaxrs-cxf-annotated-base-path/pom.xml | 19 ++++--- .../jaxrs-cxf-cdi-default-value/pom.xml | 10 ++-- samples/server/petstore/jaxrs-cxf-cdi/pom.xml | 10 ++-- .../petstore/jaxrs-cxf-non-spring-app/pom.xml | 19 ++++--- samples/server/petstore/jaxrs-cxf/pom.xml | 19 ++++--- .../server/petstore/jaxrs-datelib-j8/pom.xml | 16 +++--- samples/server/petstore/jaxrs-jersey/pom.xml | 16 +++--- .../jaxrs-resteasy/default-value/build.gradle | 4 +- .../jaxrs-resteasy/default-value/pom.xml | 20 ++++---- .../jaxrs-resteasy/default/build.gradle | 4 +- .../petstore/jaxrs-resteasy/default/pom.xml | 20 ++++---- .../jaxrs-resteasy/eap-java8/build.gradle | 4 +- .../petstore/jaxrs-resteasy/eap-java8/pom.xml | 20 ++++---- .../jaxrs-resteasy/eap-joda/build.gradle | 4 +- .../petstore/jaxrs-resteasy/eap-joda/pom.xml | 20 ++++---- .../petstore/jaxrs-resteasy/eap/build.gradle | 4 +- .../petstore/jaxrs-resteasy/eap/pom.xml | 20 ++++---- .../jaxrs-resteasy/java8/build.gradle | 4 +- .../petstore/jaxrs-resteasy/java8/pom.xml | 20 ++++---- .../petstore/jaxrs-resteasy/joda/build.gradle | 4 +- .../petstore/jaxrs-resteasy/joda/pom.xml | 20 ++++---- .../petstore/jaxrs-spec-interface/pom.xml | 14 +++--- samples/server/petstore/jaxrs-spec/pom.xml | 14 +++--- .../petstore/jaxrs/jersey1-useTags/pom.xml | 16 +++--- samples/server/petstore/jaxrs/jersey1/pom.xml | 16 +++--- .../petstore/jaxrs/jersey2-useTags/pom.xml | 16 +++--- samples/server/petstore/jaxrs/jersey2/pom.xml | 16 +++--- .../kotlin-springboot-delegate/pom.xml | 12 ++--- .../kotlin-springboot-modelMutable/pom.xml | 8 +-- .../kotlin-springboot-reactive/pom.xml | 12 ++--- .../server/petstore/kotlin-springboot/pom.xml | 12 ++--- samples/server/petstore/kotlin/vertx/pom.xml | 7 +-- .../petstore/spring-mvc-default-value/pom.xml | 9 ++-- .../petstore/spring-mvc-j8-async/pom.xml | 30 +++++------ .../spring-mvc-j8-localdatetime/pom.xml | 30 +++++------ .../petstore/spring-mvc-no-nullable/pom.xml | 30 +++++------ .../spring-mvc-spring-pageable/pom.xml | 30 +++++------ samples/server/petstore/spring-mvc/pom.xml | 30 +++++------ .../pom.xml | 9 ++-- .../springboot-beanvalidation/pom.xml | 9 ++-- .../petstore/springboot-delegate-j8/pom.xml | 9 ++-- .../petstore/springboot-delegate/pom.xml | 9 ++-- .../springboot-implicitHeaders/pom.xml | 9 ++-- .../petstore/springboot-reactive/pom.xml | 4 +- .../pom.xml | 9 ++-- .../pom.xml | 9 ++-- .../pom.xml | 9 ++-- .../springboot-spring-pageable/pom.xml | 9 ++-- .../petstore/springboot-useoptional/pom.xml | 9 ++-- .../petstore/springboot-virtualan/pom.xml | 9 ++-- samples/server/petstore/springboot/pom.xml | 9 ++-- 201 files changed, 1007 insertions(+), 909 deletions(-) diff --git a/modules/openapi-generator-online/pom.xml b/modules/openapi-generator-online/pom.xml index c594694ead3..5fcf6e8ab52 100644 --- a/modules/openapi-generator-online/pom.xml +++ b/modules/openapi-generator-online/pom.xml @@ -132,8 +132,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api org.openapitools diff --git a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache index 70dea8f3f25..6a12e63d329 100644 --- a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache @@ -56,7 +56,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -129,6 +129,7 @@ ext { {{#openApiNullable}} jackson_databind_nullable_version = "0.2.1" {{/openApiNullable}} + jakarta_annotation_version = "1.3.5" {{#threetenbp}} jackson_threetenbp_version = "2.9.10" {{/threetenbp}} @@ -161,6 +162,6 @@ dependencies { {{^java8}} implementation "com.brsanthu:migbase64:2.2" {{/java8}} - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/apache/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/apache/pom.mustache index b12d43c0440..89c3f5ffaf3 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/apache/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/apache/pom.mustache @@ -321,9 +321,9 @@ {{#useBeanValidation}} - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided {{/useBeanValidation}} @@ -345,9 +345,9 @@ {{/parcelableModel}} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -366,7 +366,10 @@ {{#threetenbp}} 2.9.10 {{/threetenbp}} - 1.3.2 + 1.3.5 +{{#useBeanValidation}} + 2.0.2 +{{/useBeanValidation}} 1.0.0 4.13.1 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache index eda36125e37..93944f967e2 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache @@ -49,7 +49,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -105,6 +105,7 @@ ext { {{#openApiNullable}} jackson_databind_nullable_version = "0.2.1" {{/openApiNullable}} + jakarta_annotation_version = "1.3.5" {{#threetenbp}} jackson_threetenbp_version = "2.9.10" {{/threetenbp}} @@ -140,7 +141,7 @@ dependencies { implementation "com.brsanthu:migbase64:2.2" implementation "com.github.scribejava:scribejava-core:$scribejava_version" implementation "com.brsanthu:migbase64:2.2" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "org.junit.jupiter:junit-jupiter:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" testImplementation "org.junit.jupiter:junit-jupiter-params:$junit_version" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache index 95745cdad26..f2912f0dfb9 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache @@ -23,7 +23,7 @@ lazy val root = (project in file(".")). "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "com.github.scribejava" % "scribejava-core" % "8.0.0" % "compile", "com.brsanthu" % "migbase64" % "2.2" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "org.junit.jupiter" % "junit-jupiter" % "5.7.0" % "test", "org.junit.jupiter" % "junit-jupiter-params" % "5.7.0" % "test", "com.github.tomakehurst" % "wiremock-jre8" % "2.27.2" % "test", diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache index 28b5437ccc0..5f87e95f569 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache @@ -311,9 +311,9 @@ ${scribejava-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -371,7 +371,7 @@ {{#threetenbp}} 2.9.10 {{/threetenbp}} - 1.3.2 + 1.3.5 5.7.0 1.0.0 8.0.0 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache index 6abca3fddb7..766ddb5c52d 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache @@ -55,7 +55,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -113,6 +113,7 @@ ext { {{#openApiNullable}} jackson_databind_nullable_version = "0.2.1" {{/openApiNullable}} + jakarta_annotation_version = "1.3.5" google_api_client_version = "1.23.0" jersey_common_version = "2.25.1" jodatime_version = "2.9.9" @@ -147,6 +148,6 @@ dependencies { {{#withXml}} implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson_version" {{/withXml}} - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.sbt.mustache index be30ae48caf..721b638dd9d 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.sbt.mustache @@ -27,7 +27,7 @@ lazy val root = (project in file(".")). {{#threetenbp}} "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", {{/threetenbp}} - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache index fdcb6953faf..bcd5b7d3bff 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache @@ -298,9 +298,9 @@ {{/threetenbp}} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -328,7 +328,7 @@ {{#threetenbp}} 2.9.10 {{/threetenbp}} - 1.3.2 + 1.3.5 1.0.0 4.13.1 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache index 378de9fb1e1..95c49396bfa 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache @@ -55,7 +55,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -112,6 +112,7 @@ ext { {{#openApiNullable}} jackson_databind_nullable_version = "0.2.1" {{/openApiNullable}} + jakarta_annotation_version = "1.3.5" jersey_version = "2.27" junit_version = "4.13.1" {{#threetenbp}} @@ -157,7 +158,7 @@ dependencies { {{^java8}} implementation "com.brsanthu:migbase64:2.2" {{/java8}} - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache index 9823c3c657e..910f21f798d 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache @@ -36,7 +36,7 @@ lazy val root = (project in file(".")). {{^java8}} "com.brsanthu" % "migbase64" % "2.2", {{/java8}} - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache index f36f0cd8817..4a87eaeed45 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache @@ -344,16 +344,16 @@ {{#useBeanValidation}} - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided {{/useBeanValidation}} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -379,7 +379,10 @@ {{#threetenbp}} 2.9.10 {{/threetenbp}} - 1.3.2 + 1.3.5 +{{#useBeanValidation}} + 2.0.2 +{{/useBeanValidation}} 4.13.1 {{#hasHttpSignatureMethods}} 1.5 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache index 6803b15c083..642e02c21c3 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache @@ -67,8 +67,8 @@ {{#useBeanValidation}} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} provided @@ -82,9 +82,9 @@ - javax.ws.rs - javax.ws.rs-api - 2.1.1 + jakarta.ws.rs + jakarta.ws.rs-api + ${jakarta.ws.rs-version} provided @@ -109,19 +109,19 @@ {{/disableMultipart}} - javax.json.bind - javax.json.bind-api - 1.0 + jakarta.json.bind + jakarta.json.bind-api + ${jakarta.json.bind-version} - javax.json - javax.json-api - 1.1.4 + jakarta.json + jakarta.json-api + ${jakarta.json-version} - javax.xml.bind - jaxb-api - 2.2.11 + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind-version} com.sun.xml.bind @@ -134,9 +134,9 @@ 2.2.11 - javax.activation - activation - 1.1.1 + jakarta.activation + jakarta.activation-api + ${jakarta.activation-version} {{#java8}} @@ -161,9 +161,9 @@ {{/useBeanValidationFeature}} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -184,13 +184,17 @@ 9.2.9.v20150224 4.13.1 1.2.0 - 2.5 {{#useBeanValidation}} - 1.1.0.Final + 2.0.2 {{/useBeanValidation}} 3.2.7 2.9.7 - 1.3.2 + 1.2.2 + 1.3.5 + 1.0.2 + 1.1.6 + 2.1.6 + 2.3.3 UTF-8 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache index 36504882370..46d8966d431 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache @@ -63,6 +63,7 @@ artifacts { ext { swagger_annotations_version = "1.5.22" jackson_version = "2.10.4" + jakarta_annotation_version = "1.3.5" junit_version = "4.13.1" {{#threetenbp}} threetenbp_version = "2.9.10" @@ -77,7 +78,7 @@ dependencies { implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" implementation "org.openapitools:jackson-databind-nullable:0.2.1" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" {{#threetenbp}} implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$threetenbp_version" {{/threetenbp}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache index 4a90d80c3dc..d81feac5e79 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache @@ -208,9 +208,9 @@ 3.0.2 - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -230,7 +230,7 @@ 11 2.10.4 0.2.1 - 1.3.2 + 1.3.5 {{#threetenbp}} 2.9.10 {{/threetenbp}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache index e02068856b6..7ed25443766 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache @@ -56,7 +56,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:javax.annotation-api:1.3.2' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -101,6 +101,10 @@ if(hasProperty('target') && target == 'android') { } } +ext { + jakarta_annotation_version = "1.3.5" +} + dependencies { implementation 'io.swagger:swagger-annotations:1.5.24' implementation "com.google.code.findbugs:jsr305:3.0.2" @@ -124,7 +128,7 @@ dependencies { {{#dynamicOperations}} implementation 'io.swagger.parser.v3:swagger-parser-v3:2.0.23' {{/dynamicOperations}} - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'junit:junit:4.13.1' } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache index ccab8251805..907e8a916ec 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache @@ -30,9 +30,9 @@ lazy val root = (project in file(".")). "io.swagger.parser.v3" % "swagger-parser-v3" "2.0.23" % "compile" {{/dynamicOperations}} "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache index 39f6f2b5c4b..780b025dbc7 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache @@ -284,9 +284,9 @@ {{#useBeanValidation}} - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided {{/useBeanValidation}} @@ -298,9 +298,9 @@ 5.4.1.Final - javax.el - el-api - 2.2 + jakarta.el + jakarta.el-api + ${jakarta.el-version} {{/performBeanValidation}} {{#parcelableModel}} @@ -313,9 +313,9 @@ {{/parcelableModel}} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided {{#openApiNullable}} @@ -357,7 +357,13 @@ {{#threetenbp}} 1.5.0 {{/threetenbp}} - 1.3.2 + 1.3.5 +{{#performBeanValidation}} + 3.0.3 +{{/performBeanValidation}} +{{#useBeanValidation}} + 2.0.2 +{{/useBeanValidation}} 4.13.1 UTF-8 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache index 4659399ee1d..a1db459b5ae 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache @@ -49,7 +49,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -104,6 +104,7 @@ ext { {{#openApiNullable}} jackson_databind_nullable_version = "0.2.1" {{/openApiNullable}} + jakarta_annotation_version = "1.3.5" {{#threetenbp}} jackson_threetenbp_version = "2.10.0" {{/threetenbp}} @@ -158,11 +159,11 @@ dependencies { {{/threetenbp}} implementation "com.squareup.okio:okio:$okio_version" {{#useBeanValidation}} - implementation "javax.validation:validation-api:2.0.1.Final" + implementation "jakarta.validation:jakarta.validation-api:2.0.2" {{/useBeanValidation}} {{#performBeanValidation}} implementation "org.hibernate:hibernate-validator:6.0.19.Final" {{/performBeanValidation}} - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.sbt.mustache index 48a8c8dfcb7..22390e12e0e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.sbt.mustache @@ -45,12 +45,12 @@ lazy val root = (project in file(".")). {{/threetenbp}} "com.squareup.okio" % "okio" % "1.17.5" % "compile", {{#useBeanValidation}} - "javax.validation" % "validation-api" % "2.0.1.Final" % "compile", + "jakarta.validation" % "jakarta.validation-api" % "2.0.2" % "compile", {{/useBeanValidation}} {{#performBeanValidation}} "org.hibernate" % "hibernate-validator" % "6.0.19.Final" % "compile", {{/performBeanValidation}} - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache index 57d94de93ef..7a26d17a1d9 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache @@ -231,9 +231,9 @@ 3.0.2 - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -322,9 +322,9 @@ {{#useBeanValidation}} - javax.validation - validation-api - 2.0.1.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided {{/useBeanValidation}} @@ -363,7 +363,10 @@ 2.10.0 {{/threetenbp}} {{/jackson}} - 1.3.2 + 1.3.5 +{{#useBeanValidation}} + 2.0.2 +{{/useBeanValidation}} 1.17.5 4.13.1 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache index 852a2f638a5..67083a02010 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache @@ -49,7 +49,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -100,6 +100,7 @@ ext { {{#openApiNullable}} jackson_databind_nullable_version = "0.2.1" {{/openApiNullable}} + jakarta_annotation_version = "1.3.5" threetenbp_version = "2.9.10" resteasy_version = "4.5.11.Final" junit_version = "4.13" @@ -119,6 +120,6 @@ dependencies { implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" {{/openApiNullable}} implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache index 785100fb678..957990ebf21 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache @@ -18,7 +18,7 @@ lazy val root = (project in file(".")). "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.5.1" % "compile", "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.10" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache index edeb08f18c1..4f7c83977d5 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache @@ -191,14 +191,6 @@ net.jcip jcip-annotations - - org.jboss.spec.javax.annotation - jboss-annotations-api_1.2_spec - - - javax.activation - activation - @@ -214,10 +206,6 @@ com.sun.mail javax.mail - - javax.activation - activation - @@ -269,9 +257,9 @@ ${threetenbp-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -289,7 +277,7 @@ 2.10.5 2.10.5.1 0.2.1 - 1.3.2 + 1.3.5 2.9.10 1.0.0 4.13 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache index 433d396baf4..43c5845302c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache @@ -55,7 +55,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -113,6 +113,7 @@ ext { {{#openApiNullable}} jackson_databind_nullable_version = "0.2.1" {{/openApiNullable}} + jakarta_annotation_version = "1.3.5" spring_web_version = "5.2.5.RELEASE" jodatime_version = "2.9.9" junit_version = "4.13.1" @@ -146,6 +147,6 @@ dependencies { {{#withXml}} implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson_version" {{/withXml}} - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache index 17dd7024edd..ae3ceab2455 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache @@ -299,9 +299,9 @@ {{/threetenbp}} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -320,7 +320,7 @@ 2.10.5 2.10.5.1 0.2.1 - 1.3.2 + 1.3.5 {{#joda}} 2.9.9 {{/joda}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache index ec85f6ec71b..34d66a2d530 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache @@ -55,7 +55,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -105,6 +105,7 @@ ext { oltu_version = "1.0.1" retrofit_version = "1.9.0" swagger_annotations_version = "1.5.21" + jakarta_annotation_version = "1.3.5" junit_version = "4.13.1" jodatime_version = "2.9.3" {{#threetenbp}} @@ -122,6 +123,6 @@ dependencies { {{#threetenbp}} implementation "org.threeten:threetenbp:$threetenbp_version" {{/threetenbp}} - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.sbt.mustache index cef4b1c048d..b279317657f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.sbt.mustache @@ -17,7 +17,7 @@ lazy val root = (project in file(".")). {{#threetenbp}} "org.threeten" % "threetenbp" % "1.4.0" % "compile", {{/threetenbp}} - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/pom.mustache index b495864db77..1566db9a17f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/pom.mustache @@ -265,9 +265,9 @@ {{/parcelableModel}} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -288,7 +288,7 @@ 1.4.0 {{/threetenbp}} 1.0.1 - 1.3.2 + 1.3.5 1.0.0 4.13.1 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache index 090eefa3383..fe9207df02d 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache @@ -55,7 +55,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -115,6 +115,7 @@ ext { {{#openApiNullable}} jackson_databind_nullable_version = "0.2.1" {{/openApiNullable}} + jakarta_annotation_version = "1.3.5" {{#play24}} play_version = "2.4.11" {{/play24}} @@ -176,7 +177,7 @@ dependencies { {{#usePlayWS}} {{#play26}} implementation "com.typesafe.play:play-ahc-ws_2.12:$play_version" - implementation "javax.validation:validation-api:1.1.0.Final" + implementation "jakarta.validation:jakarta.validation-api:2.0.2" {{/play26}} {{^play26}} implementation "com.typesafe.play:play-java-ws_2.11:$play_version" @@ -190,6 +191,6 @@ dependencies { {{/openApiNullable}} implementation "com.fasterxml.jackson.datatype:jackson-datatype-{{^java8}}joda{{/java8}}{{#java8}}jsr310{{/java8}}:$jackson_version" {{/usePlayWS}} - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache index a9301f736a4..d859cf83d24 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache @@ -23,7 +23,7 @@ lazy val root = (project in file(".")). {{/play25}} {{#play26}} "com.typesafe.play" % "play-ahc-ws_2.12" % "2.6.7" % "compile", - "javax.validation" % "validation-api" % "1.1.0.Final" % "compile", + "jakarta.validation" % "jakarta.validation-api" % "2.0.2" % "compile", {{/play26}} "com.squareup.retrofit2" % "converter-jackson" % "2.3.0" % "compile", "com.fasterxml.jackson.core" % "jackson-core" % "2.10.5" % "compile", @@ -51,7 +51,7 @@ lazy val root = (project in file(".")). "org.threeten" % "threetenbp" % "1.4.0" % "compile", {{/threetenbp}} "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.11" % "test" ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache index b8b3d5dcb28..66609e17c2d 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache @@ -372,9 +372,9 @@ ${play-version} - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} {{/play26}} {{/usePlayWS}} @@ -388,9 +388,9 @@ {{/parcelableModel}} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -439,7 +439,10 @@ {{#threetenbp}} 1.4.0 {{/threetenbp}} - 1.3.2 + 1.3.5 +{{#useBeanValidation}} + 2.0.2 +{{/useBeanValidation}} 1.0.1 4.13.1 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache index 143a1936217..1fce1c6262c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache @@ -35,6 +35,7 @@ ext { {{#openApiNullable}} jackson_databind_nullable_version = "0.2.1" {{/openApiNullable}} + jakarta_annotation_version = "1.3.5" {{#threetenbp}} jackson_threeten_version = "2.9.10" {{/threetenbp}} @@ -60,7 +61,7 @@ dependencies { {{#openApiNullable}} implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" {{/openApiNullable}} - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" testImplementation "io.vertx:vertx-unit:$vertx_version" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache index 5432485d9df..cd17acbc20f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache @@ -281,9 +281,9 @@ {{/threetenbp}} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -309,7 +309,7 @@ 2.10.5 2.10.5.1 0.2.1 - 1.3.2 + 1.3.5 4.13.1 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/build.gradle.mustache index 9d352d127f9..d419eb4010d 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/build.gradle.mustache @@ -56,7 +56,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -130,7 +130,7 @@ ext { {{#openApiNullable}} jackson_databind_nullable_version = "0.2.1" {{/openApiNullable}} - javax_annotation_version = "1.3.2" + jakarta_annotation_version = "1.3.5" reactor_version = "3.4.3" reactor_netty_version = "0.7.15.RELEASE" jodatime_version = "2.9.9" @@ -159,6 +159,6 @@ dependencies { {{^java8}} implementation "com.brsanthu:migbase64:2.2" {{/java8}} - implementation "javax.annotation:javax.annotation-api:$javax_annotation_version" + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache index 0b24d140966..3e8e1d6da3f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache @@ -132,9 +132,9 @@ {{/joda}} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -155,7 +155,7 @@ {{#openApiNullable}} 0.2.1 {{/openApiNullable}} - 1.3.2 + 1.3.5 4.13.1 3.4.3 0.7.15.RELEASE diff --git a/modules/openapi-generator/src/main/resources/Java/pom.mustache b/modules/openapi-generator/src/main/resources/Java/pom.mustache index 20b602c5421..ccb784c095d 100644 --- a/modules/openapi-generator/src/main/resources/Java/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/pom.mustache @@ -321,9 +321,9 @@ {{#useBeanValidation}} - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided {{/useBeanValidation}} @@ -345,9 +345,9 @@ {{/parcelableModel}} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -366,7 +366,10 @@ {{#threetenbp}} 2.9.10 {{/threetenbp}} - 1.3.2 + 1.3.5 +{{#useBeanValidation}} + 2.0.2 +{{/useBeanValidation}} 1.0.0 4.13.1 diff --git a/modules/openapi-generator/src/main/resources/JavaInflector/pom.mustache b/modules/openapi-generator/src/main/resources/JavaInflector/pom.mustache index d49ea4d9a61..7599d6e08ef 100644 --- a/modules/openapi-generator/src/main/resources/JavaInflector/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaInflector/pom.mustache @@ -127,9 +127,9 @@ ${swagger-inflector-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -148,7 +148,7 @@ 1.0.14 9.2.9.v20150224 1.0.1 - 1.3.2 + 1.3.5 4.13.1 1.6.3 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pom.mustache index ad111b7111c..046297f2ad7 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pom.mustache @@ -95,13 +95,19 @@ {{#useBeanValidation}} - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided {{/useBeanValidation}} + +{{#useBeanValidation}} + 2.0.2 +{{/useBeanValidation}} + + diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pom.mustache index 33836935a5a..2c36ff37ee4 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pom.mustache @@ -51,8 +51,8 @@ {{#useBeanValidation}} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -127,8 +127,8 @@ {{#useBeanValidation}} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} provided @@ -217,9 +217,8 @@ 9.2.9.v20150224 4.13.1 1.2.0 - 2.5 {{#useBeanValidation}} - 1.1.0.Final + 2.0.2 {{/useBeanValidation}} 3.3.0 2.9.9 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/pom.mustache index 35daec1ecb8..c523f0a994c 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/pom.mustache @@ -57,8 +57,8 @@ {{#useBeanValidation}} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -155,8 +155,8 @@ {{#useBeanValidation}} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api {{^generateSpringBootApplication}} ${beanvalidation-version} {{/generateSpringBootApplication}} @@ -338,7 +338,7 @@ 1.5.18 9.2.9.v20150224 {{#useBeanValidation}} - 1.1.0.Final + 2.0.2 {{/useBeanValidation}} {{#generateSpringApplication}} {{^generateSpringBootApplication}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pom.mustache index 0a1eb949a0b..9787babbd3a 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pom.mustache @@ -51,8 +51,8 @@ {{#useBeanValidation}} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -127,8 +127,8 @@ {{#useBeanValidation}} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} provided @@ -194,9 +194,9 @@ {{/useBeanValidationFeature}} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -217,13 +217,12 @@ 9.2.9.v20150224 4.13.1 1.2.0 - 2.5 {{#useBeanValidation}} - 1.1.0.Final + 2.0.2 {{/useBeanValidation}} 3.3.0 2.9.9 - 1.3.2 + 1.3.5 UTF-8 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/pom.mustache index 7f8a635e216..5649020a9ab 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/pom.mustache @@ -51,8 +51,8 @@ {{#useBeanValidation}} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -136,8 +136,8 @@ {{#useBeanValidation}} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} provided @@ -238,9 +238,9 @@ {{/generateSpringBootApplication}} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided {{#useSwaggerUI}} @@ -268,9 +268,8 @@ 9.2.9.v20150224 4.13 1.2.0 - 2.5 {{#useBeanValidation}} - 1.1.0.Final + 2.0.2 {{/useBeanValidation}} {{#generateSpringApplication}} 4.3.13.RELEASE @@ -280,7 +279,7 @@ {{/generateSpringBootApplication}} 3.3.0 2.9.9 - 1.3.2 + 1.3.5 UTF-8 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/pom.mustache index 3b4215b98c4..0bef89d2309 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/pom.mustache @@ -54,8 +54,8 @@ {{#useBeanValidation}} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -139,8 +139,8 @@ ${jersey-version} - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} @@ -189,8 +189,8 @@ {{#useBeanValidation}} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} provided @@ -211,14 +211,14 @@ ${java.version} 1.5.22 {{#useBeanValidation}} - 1.1.0.Final + 2.0.2 {{/useBeanValidation}} 9.2.9.v20150224 1.19.1 2.9.9 1.7.21 4.13 - 2.5 + 4.0.4 UTF-8 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/pom.mustache index 591e0337edf..9d55026baf1 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/pom.mustache @@ -62,8 +62,8 @@ {{#useBeanValidation}} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -136,8 +136,8 @@ test - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} @@ -193,8 +193,8 @@ {{#useBeanValidation}} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} provided @@ -216,7 +216,7 @@ ${java.version} 1.5.18 {{#useBeanValidation}} - 1.1.0.Final + 2.0.2 {{/useBeanValidation}} 9.2.9.v20150224 2.22.2 @@ -227,7 +227,7 @@ {{/supportJava6}} 4.13.1 1.2.0 - 2.5 + 4.0.4 UTF-8 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache index b1f08021b4e..b343b8ec954 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache @@ -12,11 +12,11 @@ dependencies { providedCompile 'org.jboss.resteasy:jaxrs-api:3.0.11.Final' providedCompile 'org.jboss.resteasy:resteasy-validator-provider-11:3.0.11.Final' providedCompile 'org.jboss.resteasy:resteasy-multipart-provider:3.0.11.Final' - providedCompile 'javax.annotation:javax.annotation-api:1.2' + providedCompile 'jakarta.annotation:jakarta.annotation-api:1.3.5' providedCompile 'org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final' compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final' {{#useBeanValidation}} - providedCompile 'javax.validation:validation-api:1.1.0.Final' + providedCompile 'jakarta.validation:jakarta.validation-api:2.0.2' {{/useBeanValidation}} {{^java8}} compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.9' diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pom.mustache index b6b8841c739..86e1c728807 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pom.mustache @@ -73,8 +73,8 @@ ${slf4j-version} - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} provided @@ -110,9 +110,9 @@ provided - javax.annotation - javax.annotation-api - 1.2 + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -150,9 +150,9 @@ {{#useBeanValidation}} - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided {{/useBeanValidation}} @@ -192,6 +192,10 @@ 3.0.11.Final 1.6.3 4.8.1 - 2.5 + 4.0.4 +{{#useBeanValidation}} + 2.0.2 +{{/useBeanValidation}} + 1.3.5 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache index 6427c11001b..cd6febf1470 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache @@ -12,13 +12,13 @@ dependencies { providedCompile 'org.jboss.resteasy:jaxrs-api:3.0.11.Final' providedCompile 'org.jboss.resteasy:resteasy-validator-provider-11:3.0.11.Final' providedCompile 'org.jboss.resteasy:resteasy-multipart-provider:3.0.11.Final' - providedCompile 'javax.annotation:javax.annotation-api:1.2' + providedCompile 'jakarta.annotation:jakarta.annotation-api:1.3.5' providedCompile 'javax:javaee-api:7.0' providedCompile 'org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final' compile 'io.swagger:swagger-annotations:1.5.22' compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final' {{#useBeanValidation}} - providedCompile 'javax.validation:validation-api:1.1.0.Final' + providedCompile 'jakarta.validation:jakarta.validation-api:2.0.2' {{/useBeanValidation}} compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.9' compile 'joda-time:joda-time:2.7' diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pom.mustache index b23f9688274..b1b3bddee0c 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pom.mustache @@ -91,8 +91,8 @@ ${slf4j-version} - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} provided @@ -128,9 +128,9 @@ provided - javax.annotation - javax.annotation-api - 1.2 + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -187,9 +187,9 @@ {{#useBeanValidation}} - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided {{/useBeanValidation}} @@ -211,6 +211,10 @@ 3.13.0.Final 1.6.3 4.13.1 - 2.5 + 4.0.4 + 1.3.5 +{{#useBeanValidation}} + 2.0.2 +{{/useBeanValidation}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/pom.mustache index 1a1d93bd214..e72b2b5d440 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/pom.mustache @@ -24,7 +24,7 @@ 3.0.2 1.1.2 2.29 - 1.2.0 + 1.2.2 5.1.0 @@ -97,8 +97,8 @@ runtime - javax.activation - javax.activation-api + jakarta.activation + jakarta.activation-api ${version.lib.activation-api} runtime diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/pom.mustache index 344bf268fbe..6719f55780c 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/pom.mustache @@ -38,9 +38,9 @@ provided - javax.validation - validation-api - 2.0.1.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} com.fasterxml.jackson.core @@ -61,6 +61,7 @@ usr ${project.artifactId} ${project.build.directory}/${app.name}.zip + 2.0.2 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache index 9d5d85ddbe3..48ac267133b 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache @@ -65,9 +65,9 @@ - javax.ws.rs - javax.ws.rs-api - 2.1.1 + jakarta.ws.rs + jakarta.ws.rs-api + ${jakarta.ws.rs-version} provided {{#java8}} @@ -132,9 +132,9 @@ {{#useBeanValidation}} - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided {{/useBeanValidation}} @@ -142,5 +142,9 @@ 2.9.9 4.13.1 +{{#useBeanValidation}} + 2.0.2 +{{/useBeanValidation}} + 2.1.6 diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache index d5ae34ff8a5..58b6e67d34c 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache @@ -99,9 +99,8 @@ ${springfox-version} - javax.xml.bind - jaxb-api - 2.3.1 + jakarta.xml.bind + jakarta.xml.bind-api {{/useSpringfox}} {{^useSpringfox}} @@ -167,8 +166,8 @@ {{#useBeanValidation}} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api {{/useBeanValidation}} {{#virtualService}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache index e7ca6777fca..7179f1abe40 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache @@ -52,8 +52,8 @@ {{#useBeanValidation}} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -138,14 +138,14 @@ ${spring-version} - javax.annotation - javax.annotation-api - 1.3.2 + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} - javax.xml.bind - jaxb-api - 2.2.11 + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind-version} {{#useSpringfox}} @@ -243,15 +243,15 @@ test - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} {{#useBeanValidation}} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} provided @@ -279,15 +279,17 @@ {{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}} ${java.version} ${java.version} + 1.3.5 + 2.3.3 9.2.15.v20160210 1.7.21 4.13.1 - 2.5 + 4.0.4 2.8.0 2.9.9 2.8.4 {{#useBeanValidation}} - 1.1.0.Final + 2.0.2 {{/useBeanValidation}} 4.3.20.RELEASE {{#openApiNullable}} diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/pom.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/pom.mustache index 60c5a11683e..3bde01d7112 100644 --- a/modules/openapi-generator/src/main/resources/java-msf4j-server/pom.mustache +++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/pom.mustache @@ -47,8 +47,8 @@ - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} @@ -67,9 +67,9 @@ ${jackson-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -86,9 +86,9 @@ {{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}} ${java.version} ${java.version} - 2.5 + 4.0.4 2.8.9 - 1.3.2 + 1.3.5 UTF-8 diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/pom.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/pom.mustache index f1b5a3c4425..6339f166a70 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/pom.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/pom.mustache @@ -15,7 +15,7 @@ 1.2.5 1.2.5 3.10.0 - 1.3.2 + 1.3.5 2.6.0 2.6.0 1.7.25 @@ -162,9 +162,9 @@ 1.2 - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided {{#pkmstInterceptor}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/pom.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/pom.mustache index cfc42f1da0d..a74c26927bc 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/pom.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/pom.mustache @@ -8,7 +8,7 @@ 1.3.30 1.2.0 - 1.3.2 + 1.3.5 org.springframework.boot @@ -131,14 +131,14 @@ {{#useBeanValidation}} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api {{/useBeanValidation}} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided diff --git a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/pom.mustache b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/pom.mustache index f225974d193..1daf924bb13 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/pom.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/pom.mustache @@ -14,6 +14,7 @@ 1.8 1.3.10 true + 1.3.5 4.13 3.4.1 3.8.1 @@ -51,9 +52,9 @@ - javax.annotation - javax.annotation-api - 1.2 + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} org.jetbrains.kotlin diff --git a/modules/openapi-generator/src/main/resources/scala-httpclient/build.gradle.mustache b/modules/openapi-generator/src/main/resources/scala-httpclient/build.gradle.mustache index c4e0d84b6cb..2ad0d4a0de0 100644 --- a/modules/openapi-generator/src/main/resources/scala-httpclient/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/scala-httpclient/build.gradle.mustache @@ -48,7 +48,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -96,6 +96,7 @@ if(hasProperty('target') && target == 'android') { ext { scala_version = "2.10.4" + jakarta_annotation_version = "1.3.5" joda_version = "1.2" jodatime_version = "2.2" jersey_version = "1.19" diff --git a/modules/openapi-generator/src/main/resources/scala-play-server/build.sbt.mustache b/modules/openapi-generator/src/main/resources/scala-play-server/build.sbt.mustache index 83787752471..c6122070664 100644 --- a/modules/openapi-generator/src/main/resources/scala-play-server/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/scala-play-server/build.sbt.mustache @@ -11,7 +11,7 @@ libraryDependencies ++= Seq( {{#useSwaggerUI}} "org.webjars" % "swagger-ui" % "3.1.5", {{/useSwaggerUI}} - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "org.scalatest" %% "scalatest" % "3.0.4" % Test, "org.scalatestplus.play" %% "scalatestplus-play" % "3.1.2" % Test ) diff --git a/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/build.gradle.mustache b/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/build.gradle.mustache index 378de9fb1e1..95c49396bfa 100644 --- a/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/build.gradle.mustache +++ b/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/build.gradle.mustache @@ -55,7 +55,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -112,6 +112,7 @@ ext { {{#openApiNullable}} jackson_databind_nullable_version = "0.2.1" {{/openApiNullable}} + jakarta_annotation_version = "1.3.5" jersey_version = "2.27" junit_version = "4.13.1" {{#threetenbp}} @@ -157,7 +158,7 @@ dependencies { {{^java8}} implementation "com.brsanthu:migbase64:2.2" {{/java8}} - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/build.sbt.mustache b/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/build.sbt.mustache index 9823c3c657e..910f21f798d 100644 --- a/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/build.sbt.mustache +++ b/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/build.sbt.mustache @@ -36,7 +36,7 @@ lazy val root = (project in file(".")). {{^java8}} "com.brsanthu" % "migbase64" % "2.2", {{/java8}} - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/pom.mustache b/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/pom.mustache index f36f0cd8817..4a87eaeed45 100644 --- a/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/pom.mustache +++ b/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/pom.mustache @@ -344,16 +344,16 @@ {{#useBeanValidation}} - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided {{/useBeanValidation}} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -379,7 +379,10 @@ {{#threetenbp}} 2.9.10 {{/threetenbp}} - 1.3.2 + 1.3.5 +{{#useBeanValidation}} + 2.0.2 +{{/useBeanValidation}} 4.13.1 {{#hasHttpSignatureMethods}} 1.5 diff --git a/samples/client/petstore/java/apache-httpclient/build.gradle b/samples/client/petstore/java/apache-httpclient/build.gradle index eec12618591..fee361a3cbe 100644 --- a/samples/client/petstore/java/apache-httpclient/build.gradle +++ b/samples/client/petstore/java/apache-httpclient/build.gradle @@ -50,7 +50,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -115,6 +115,7 @@ ext { jackson_version = "2.12.1" jackson_databind_version = "2.10.5.1" jackson_databind_nullable_version = "0.2.1" + jakarta_annotation_version = "1.3.5" jackson_threetenbp_version = "2.9.10" jersey_version = "1.19.4" jodatime_version = "2.9.9" @@ -133,6 +134,6 @@ dependencies { implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threetenbp_version" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/apache-httpclient/pom.xml b/samples/client/petstore/java/apache-httpclient/pom.xml index 0c99a14aa39..24ca1bbbc19 100644 --- a/samples/client/petstore/java/apache-httpclient/pom.xml +++ b/samples/client/petstore/java/apache-httpclient/pom.xml @@ -272,9 +272,9 @@ ${jackson-threetenbp-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -291,7 +291,7 @@ 1.19.4 2.12.1 2.9.10 - 1.3.2 + 1.3.5 1.0.0 4.13.1 diff --git a/samples/client/petstore/java/feign-no-nullable/build.gradle b/samples/client/petstore/java/feign-no-nullable/build.gradle index f7c9d2b424e..e8630f875ec 100644 --- a/samples/client/petstore/java/feign-no-nullable/build.gradle +++ b/samples/client/petstore/java/feign-no-nullable/build.gradle @@ -49,7 +49,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -102,6 +102,7 @@ ext { swagger_annotations_version = "1.5.24" jackson_version = "2.10.3" jackson_databind_version = "2.10.3" + jakarta_annotation_version = "1.3.5" jackson_threetenbp_version = "2.9.10" feign_version = "10.11" feign_form_version = "3.8.0" @@ -124,7 +125,7 @@ dependencies { implementation "com.brsanthu:migbase64:2.2" implementation "com.github.scribejava:scribejava-core:$scribejava_version" implementation "com.brsanthu:migbase64:2.2" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "org.junit.jupiter:junit-jupiter:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" testImplementation "org.junit.jupiter:junit-jupiter-params:$junit_version" diff --git a/samples/client/petstore/java/feign-no-nullable/build.sbt b/samples/client/petstore/java/feign-no-nullable/build.sbt index cdf3cd5db6b..5f47c449575 100644 --- a/samples/client/petstore/java/feign-no-nullable/build.sbt +++ b/samples/client/petstore/java/feign-no-nullable/build.sbt @@ -23,7 +23,7 @@ lazy val root = (project in file(".")). "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "com.github.scribejava" % "scribejava-core" % "8.0.0" % "compile", "com.brsanthu" % "migbase64" % "2.2" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "org.junit.jupiter" % "junit-jupiter" % "5.7.0" % "test", "org.junit.jupiter" % "junit-jupiter-params" % "5.7.0" % "test", "com.github.tomakehurst" % "wiremock-jre8" % "2.27.2" % "test", diff --git a/samples/client/petstore/java/feign-no-nullable/pom.xml b/samples/client/petstore/java/feign-no-nullable/pom.xml index c81c63c999c..798bebf47d5 100644 --- a/samples/client/petstore/java/feign-no-nullable/pom.xml +++ b/samples/client/petstore/java/feign-no-nullable/pom.xml @@ -273,9 +273,9 @@ ${scribejava-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -328,7 +328,7 @@ 2.10.3 2.10.3 2.9.10 - 1.3.2 + 1.3.5 5.7.0 1.0.0 8.0.0 diff --git a/samples/client/petstore/java/feign/build.gradle b/samples/client/petstore/java/feign/build.gradle index 394cdda63a9..6a9e84819fc 100644 --- a/samples/client/petstore/java/feign/build.gradle +++ b/samples/client/petstore/java/feign/build.gradle @@ -49,7 +49,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -103,6 +103,7 @@ ext { jackson_version = "2.10.3" jackson_databind_version = "2.10.3" jackson_databind_nullable_version = "0.2.1" + jakarta_annotation_version = "1.3.5" jackson_threetenbp_version = "2.9.10" feign_version = "10.11" feign_form_version = "3.8.0" @@ -126,7 +127,7 @@ dependencies { implementation "com.brsanthu:migbase64:2.2" implementation "com.github.scribejava:scribejava-core:$scribejava_version" implementation "com.brsanthu:migbase64:2.2" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "org.junit.jupiter:junit-jupiter:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" testImplementation "org.junit.jupiter:junit-jupiter-params:$junit_version" diff --git a/samples/client/petstore/java/feign/build.sbt b/samples/client/petstore/java/feign/build.sbt index 5f999c727fe..50dd4219edb 100644 --- a/samples/client/petstore/java/feign/build.sbt +++ b/samples/client/petstore/java/feign/build.sbt @@ -23,7 +23,7 @@ lazy val root = (project in file(".")). "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "com.github.scribejava" % "scribejava-core" % "8.0.0" % "compile", "com.brsanthu" % "migbase64" % "2.2" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "org.junit.jupiter" % "junit-jupiter" % "5.7.0" % "test", "org.junit.jupiter" % "junit-jupiter-params" % "5.7.0" % "test", "com.github.tomakehurst" % "wiremock-jre8" % "2.27.2" % "test", diff --git a/samples/client/petstore/java/feign/feign10x/pom.xml b/samples/client/petstore/java/feign/feign10x/pom.xml index 5016e9ac36f..772091df060 100644 --- a/samples/client/petstore/java/feign/feign10x/pom.xml +++ b/samples/client/petstore/java/feign/feign10x/pom.xml @@ -273,9 +273,9 @@ ${oltu-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -311,7 +311,7 @@ 0.2.1 2.10.3 2.9.10 - 1.3.2 + 1.3.5 4.13 1.0.0 1.0.1 diff --git a/samples/client/petstore/java/feign/pom.xml b/samples/client/petstore/java/feign/pom.xml index 57974bab472..b6ab732f2d4 100644 --- a/samples/client/petstore/java/feign/pom.xml +++ b/samples/client/petstore/java/feign/pom.xml @@ -278,9 +278,9 @@ ${scribejava-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -334,7 +334,7 @@ 0.2.1 2.10.3 2.9.10 - 1.3.2 + 1.3.5 5.7.0 1.0.0 8.0.0 diff --git a/samples/client/petstore/java/google-api-client/build.gradle b/samples/client/petstore/java/google-api-client/build.gradle index a13141ccd06..39ed02a1cd4 100644 --- a/samples/client/petstore/java/google-api-client/build.gradle +++ b/samples/client/petstore/java/google-api-client/build.gradle @@ -49,7 +49,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -99,6 +99,7 @@ ext { jackson_version = "2.12.1" jackson_databind_version = "2.10.5.1" jackson_databind_nullable_version = "0.2.1" + jakarta_annotation_version = "1.3.5" google_api_client_version = "1.23.0" jersey_common_version = "2.25.1" jodatime_version = "2.9.9" @@ -117,6 +118,6 @@ dependencies { implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threeten_version" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/google-api-client/build.sbt b/samples/client/petstore/java/google-api-client/build.sbt index 4de7cb971b0..ad1c65c2f6b 100644 --- a/samples/client/petstore/java/google-api-client/build.sbt +++ b/samples/client/petstore/java/google-api-client/build.sbt @@ -16,7 +16,7 @@ lazy val root = (project in file(".")). "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.5.1" % "compile", "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/samples/client/petstore/java/google-api-client/pom.xml b/samples/client/petstore/java/google-api-client/pom.xml index 16e1cae0bfe..7614163bc46 100644 --- a/samples/client/petstore/java/google-api-client/pom.xml +++ b/samples/client/petstore/java/google-api-client/pom.xml @@ -249,9 +249,9 @@ ${jackson-threetenbp-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -272,7 +272,7 @@ 2.10.4 0.2.1 2.9.10 - 1.3.2 + 1.3.5 1.0.0 4.13.1 diff --git a/samples/client/petstore/java/jersey1/build.gradle b/samples/client/petstore/java/jersey1/build.gradle index 26176baae04..ad75b3eaeb9 100644 --- a/samples/client/petstore/java/jersey1/build.gradle +++ b/samples/client/petstore/java/jersey1/build.gradle @@ -50,7 +50,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -115,6 +115,7 @@ ext { jackson_version = "2.12.1" jackson_databind_version = "2.10.5.1" jackson_databind_nullable_version = "0.2.1" + jakarta_annotation_version = "1.3.5" jackson_threetenbp_version = "2.9.10" jersey_version = "1.19.4" jodatime_version = "2.9.9" @@ -133,6 +134,6 @@ dependencies { implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threetenbp_version" implementation "com.brsanthu:migbase64:2.2" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/jersey1/pom.xml b/samples/client/petstore/java/jersey1/pom.xml index 27fd6628515..04222d57919 100644 --- a/samples/client/petstore/java/jersey1/pom.xml +++ b/samples/client/petstore/java/jersey1/pom.xml @@ -273,9 +273,9 @@ 2.2 - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -292,7 +292,7 @@ 1.19.4 2.12.1 2.9.10 - 1.3.2 + 1.3.5 1.0.0 4.13.1 diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/build.gradle b/samples/client/petstore/java/jersey2-java8-localdatetime/build.gradle index 69c3ef01c35..70f7fb88421 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/build.gradle +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/build.gradle @@ -49,7 +49,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -98,6 +98,7 @@ ext { jackson_version = "2.10.5" jackson_databind_version = "2.10.5.1" jackson_databind_nullable_version = "0.2.1" + jakarta_annotation_version = "1.3.5" jersey_version = "2.27" junit_version = "4.13.1" scribejava_apis_version = "6.9.0" @@ -117,7 +118,7 @@ dependencies { implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" implementation "com.github.scribejava:scribejava-apis:$scribejava_apis_version" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/build.sbt b/samples/client/petstore/java/jersey2-java8-localdatetime/build.sbt index 87d9502a1f2..8b7bfc7e620 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/build.sbt +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/build.sbt @@ -20,7 +20,7 @@ lazy val root = (project in file(".")). "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.5.1" % "compile", "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.10" % "compile", "com.github.scribejava" % "scribejava-apis" % "6.9.0" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/pom.xml b/samples/client/petstore/java/jersey2-java8-localdatetime/pom.xml index 195e915d565..cbbdb8ce35d 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/pom.xml +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/pom.xml @@ -281,9 +281,9 @@ ${scribejava-apis-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -306,7 +306,7 @@ 2.10.5 2.10.5.1 0.2.1 - 1.3.2 + 1.3.5 4.13.1 6.9.0 diff --git a/samples/client/petstore/java/jersey2-java8/build.gradle b/samples/client/petstore/java/jersey2-java8/build.gradle index cad4adf93db..84fe3e2c33d 100644 --- a/samples/client/petstore/java/jersey2-java8/build.gradle +++ b/samples/client/petstore/java/jersey2-java8/build.gradle @@ -49,7 +49,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -98,6 +98,7 @@ ext { jackson_version = "2.10.5" jackson_databind_version = "2.10.5.1" jackson_databind_nullable_version = "0.2.1" + jakarta_annotation_version = "1.3.5" jersey_version = "2.27" junit_version = "4.13.1" scribejava_apis_version = "6.9.0" @@ -117,7 +118,7 @@ dependencies { implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" implementation "com.github.scribejava:scribejava-apis:$scribejava_apis_version" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/jersey2-java8/build.sbt b/samples/client/petstore/java/jersey2-java8/build.sbt index 6eeba2a7096..3d0a3ff1a8c 100644 --- a/samples/client/petstore/java/jersey2-java8/build.sbt +++ b/samples/client/petstore/java/jersey2-java8/build.sbt @@ -20,7 +20,7 @@ lazy val root = (project in file(".")). "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.5.1" % "compile", "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.10" % "compile", "com.github.scribejava" % "scribejava-apis" % "6.9.0" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/samples/client/petstore/java/jersey2-java8/pom.xml b/samples/client/petstore/java/jersey2-java8/pom.xml index 1fb675e1439..deffd3c8cc1 100644 --- a/samples/client/petstore/java/jersey2-java8/pom.xml +++ b/samples/client/petstore/java/jersey2-java8/pom.xml @@ -281,9 +281,9 @@ ${scribejava-apis-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -306,7 +306,7 @@ 2.10.5 2.10.5.1 0.2.1 - 1.3.2 + 1.3.5 4.13.1 6.9.0 diff --git a/samples/client/petstore/java/microprofile-rest-client/pom.xml b/samples/client/petstore/java/microprofile-rest-client/pom.xml index 442314e9649..39b65989001 100644 --- a/samples/client/petstore/java/microprofile-rest-client/pom.xml +++ b/samples/client/petstore/java/microprofile-rest-client/pom.xml @@ -71,9 +71,9 @@ - javax.ws.rs - javax.ws.rs-api - 2.1.1 + jakarta.ws.rs + jakarta.ws.rs-api + ${jakarta.ws.rs-version} provided @@ -96,19 +96,19 @@ 3.2.6 - javax.json.bind - javax.json.bind-api - 1.0 + jakarta.json.bind + jakarta.json.bind-api + ${jakarta.json.bind-version} - javax.json - javax.json-api - 1.1.4 + jakarta.json + jakarta.json-api + ${jakarta.json-version} - javax.xml.bind - jaxb-api - 2.2.11 + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind-version} com.sun.xml.bind @@ -121,9 +121,9 @@ 2.2.11 - javax.activation - activation - 1.1.1 + jakarta.activation + jakarta.activation-api + ${jakarta.activation-version} @@ -132,9 +132,9 @@ ${jackson-jaxrs-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -155,10 +155,14 @@ 9.2.9.v20150224 4.13.1 1.2.0 - 2.5 3.2.7 2.9.7 - 1.3.2 + 1.2.2 + 1.3.5 + 1.0.2 + 1.1.6 + 2.1.6 + 2.3.3 UTF-8 diff --git a/samples/client/petstore/java/native-async/build.gradle b/samples/client/petstore/java/native-async/build.gradle index 9e037855cba..6bebeffcdd4 100644 --- a/samples/client/petstore/java/native-async/build.gradle +++ b/samples/client/petstore/java/native-async/build.gradle @@ -63,6 +63,7 @@ artifacts { ext { swagger_annotations_version = "1.5.22" jackson_version = "2.10.4" + jakarta_annotation_version = "1.3.5" junit_version = "4.13.1" } @@ -74,6 +75,6 @@ dependencies { implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" implementation "org.openapitools:jackson-databind-nullable:0.2.1" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/native-async/pom.xml b/samples/client/petstore/java/native-async/pom.xml index de6911c94fd..eb1bf8a993f 100644 --- a/samples/client/petstore/java/native-async/pom.xml +++ b/samples/client/petstore/java/native-async/pom.xml @@ -194,9 +194,9 @@ 3.0.2 - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -216,7 +216,7 @@ 11 2.10.4 0.2.1 - 1.3.2 + 1.3.5 4.13.1 diff --git a/samples/client/petstore/java/native/build.gradle b/samples/client/petstore/java/native/build.gradle index 9e037855cba..6bebeffcdd4 100644 --- a/samples/client/petstore/java/native/build.gradle +++ b/samples/client/petstore/java/native/build.gradle @@ -63,6 +63,7 @@ artifacts { ext { swagger_annotations_version = "1.5.22" jackson_version = "2.10.4" + jakarta_annotation_version = "1.3.5" junit_version = "4.13.1" } @@ -74,6 +75,6 @@ dependencies { implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" implementation "org.openapitools:jackson-databind-nullable:0.2.1" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/native/pom.xml b/samples/client/petstore/java/native/pom.xml index de6911c94fd..eb1bf8a993f 100644 --- a/samples/client/petstore/java/native/pom.xml +++ b/samples/client/petstore/java/native/pom.xml @@ -194,9 +194,9 @@ 3.0.2 - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -216,7 +216,7 @@ 11 2.10.4 0.2.1 - 1.3.2 + 1.3.5 4.13.1 diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.gradle b/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.gradle index e5d608265de..3ba63d7bf1e 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.gradle +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.gradle @@ -52,7 +52,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:javax.annotation-api:1.3.2' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -97,6 +97,10 @@ if(hasProperty('target') && target == 'android') { } } +ext { + jakarta_annotation_version = "1.3.5" +} + dependencies { implementation 'io.swagger:swagger-annotations:1.5.24' implementation "com.google.code.findbugs:jsr305:3.0.2" @@ -109,7 +113,7 @@ dependencies { implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' implementation 'org.threeten:threetenbp:1.4.3' implementation 'io.swagger.parser.v3:swagger-parser-v3:2.0.23' - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'junit:junit:4.13.1' } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.sbt b/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.sbt index 96c44f5d7de..2957b77a9e6 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.sbt +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/build.sbt @@ -19,9 +19,9 @@ lazy val root = (project in file(".")). "org.threeten" % "threetenbp" % "1.4.3" % "compile", "io.swagger.parser.v3" % "swagger-parser-v3" "2.0.23" % "compile" "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/pom.xml b/samples/client/petstore/java/okhttp-gson-dynamicOperations/pom.xml index c4c2c923a10..169961f2e35 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/pom.xml +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/pom.xml @@ -262,9 +262,9 @@ 2.0.23 - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -297,7 +297,7 @@ 3.11 0.2.1 1.5.0 - 1.3.2 + 1.3.5 4.13.1 UTF-8 diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle index 157cb472fc0..67f50a9726a 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle @@ -52,7 +52,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:javax.annotation-api:1.3.2' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -97,6 +97,10 @@ if(hasProperty('target') && target == 'android') { } } +ext { + jakarta_annotation_version = "1.3.5" +} + dependencies { implementation 'io.swagger:swagger-annotations:1.5.24' implementation "com.google.code.findbugs:jsr305:3.0.2" @@ -108,7 +112,7 @@ dependencies { implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1' implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' implementation 'org.threeten:threetenbp:1.4.3' - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'junit:junit:4.13.1' } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt index 89da006858c..e566d0fb4fb 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt @@ -18,9 +18,9 @@ lazy val root = (project in file(".")). "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1", "org.threeten" % "threetenbp" % "1.4.3" % "compile", "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml b/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml index 5b92eb11c69..cbded0cff24 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml @@ -264,9 +264,9 @@ provided - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -299,7 +299,7 @@ 3.11 0.2.1 1.5.0 - 1.3.2 + 1.3.5 4.13.1 UTF-8 diff --git a/samples/client/petstore/java/okhttp-gson/build.gradle b/samples/client/petstore/java/okhttp-gson/build.gradle index bfa3f209830..bbcaa86c63c 100644 --- a/samples/client/petstore/java/okhttp-gson/build.gradle +++ b/samples/client/petstore/java/okhttp-gson/build.gradle @@ -52,7 +52,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:javax.annotation-api:1.3.2' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -97,6 +97,10 @@ if(hasProperty('target') && target == 'android') { } } +ext { + jakarta_annotation_version = "1.3.5" +} + dependencies { implementation 'io.swagger:swagger-annotations:1.5.24' implementation "com.google.code.findbugs:jsr305:3.0.2" @@ -108,7 +112,7 @@ dependencies { implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1' implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' implementation 'org.threeten:threetenbp:1.4.3' - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'junit:junit:4.13.1' } diff --git a/samples/client/petstore/java/okhttp-gson/build.sbt b/samples/client/petstore/java/okhttp-gson/build.sbt index 5b476bc7d12..a791297fd3e 100644 --- a/samples/client/petstore/java/okhttp-gson/build.sbt +++ b/samples/client/petstore/java/okhttp-gson/build.sbt @@ -18,9 +18,9 @@ lazy val root = (project in file(".")). "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1", "org.threeten" % "threetenbp" % "1.4.3" % "compile", "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/samples/client/petstore/java/okhttp-gson/pom.xml b/samples/client/petstore/java/okhttp-gson/pom.xml index 302f2cf0248..7406e439fd1 100644 --- a/samples/client/petstore/java/okhttp-gson/pom.xml +++ b/samples/client/petstore/java/okhttp-gson/pom.xml @@ -257,9 +257,9 @@ ${threetenbp-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -292,7 +292,7 @@ 3.11 0.2.1 1.5.0 - 1.3.2 + 1.3.5 4.13.1 UTF-8 diff --git a/samples/client/petstore/java/rest-assured-jackson/build.gradle b/samples/client/petstore/java/rest-assured-jackson/build.gradle index 4a4238e9451..126452afdc1 100644 --- a/samples/client/petstore/java/rest-assured-jackson/build.gradle +++ b/samples/client/petstore/java/rest-assured-jackson/build.gradle @@ -49,7 +49,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -101,6 +101,7 @@ ext { jackson_version = "2.10.3" jackson_databind_version = "2.10.3" jackson_databind_nullable_version = "0.2.1" + jakarta_annotation_version = "1.3.5" okio_version = "1.17.5" } @@ -115,8 +116,8 @@ dependencies { implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" implementation "com.squareup.okio:okio:$okio_version" - implementation "javax.validation:validation-api:2.0.1.Final" + implementation "jakarta.validation:jakarta.validation-api:2.0.2" implementation "org.hibernate:hibernate-validator:6.0.19.Final" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/rest-assured-jackson/build.sbt b/samples/client/petstore/java/rest-assured-jackson/build.sbt index cffebbde699..4422008b635 100644 --- a/samples/client/petstore/java/rest-assured-jackson/build.sbt +++ b/samples/client/petstore/java/rest-assured-jackson/build.sbt @@ -19,9 +19,9 @@ lazy val root = (project in file(".")). "org.openapitools" % "jackson-databind-nullable" % "0.2.1", "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.10.3", "com.squareup.okio" % "okio" % "1.17.5" % "compile", - "javax.validation" % "validation-api" % "2.0.1.Final" % "compile", + "jakarta.validation" % "jakarta.validation-api" % "2.0.2" % "compile", "org.hibernate" % "hibernate-validator" % "6.0.19.Final" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/samples/client/petstore/java/rest-assured-jackson/pom.xml b/samples/client/petstore/java/rest-assured-jackson/pom.xml index ca8195e3e45..0c2e6e4bc45 100644 --- a/samples/client/petstore/java/rest-assured-jackson/pom.xml +++ b/samples/client/petstore/java/rest-assured-jackson/pom.xml @@ -222,9 +222,9 @@ 3.0.2 - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -261,9 +261,9 @@ - javax.validation - validation-api - 2.0.1.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided @@ -288,7 +288,8 @@ 1.8.4 2.10.3 0.2.1 - 1.3.2 + 1.3.5 + 2.0.2 1.17.5 4.13.1 diff --git a/samples/client/petstore/java/rest-assured/build.gradle b/samples/client/petstore/java/rest-assured/build.gradle index 4b26258f395..928f5dd4918 100644 --- a/samples/client/petstore/java/rest-assured/build.gradle +++ b/samples/client/petstore/java/rest-assured/build.gradle @@ -49,7 +49,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -112,8 +112,8 @@ dependencies { implementation 'com.google.code.gson:gson:$gson_version' implementation "org.threeten:threetenbp:$threetenbp_version" implementation "com.squareup.okio:okio:$okio_version" - implementation "javax.validation:validation-api:2.0.1.Final" + implementation "jakarta.validation:jakarta.validation-api:2.0.2" implementation "org.hibernate:hibernate-validator:6.0.19.Final" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/rest-assured/build.sbt b/samples/client/petstore/java/rest-assured/build.sbt index e5f9285fd7e..9fe390caca5 100644 --- a/samples/client/petstore/java/rest-assured/build.sbt +++ b/samples/client/petstore/java/rest-assured/build.sbt @@ -17,9 +17,9 @@ lazy val root = (project in file(".")). "io.gsonfire" % "gson-fire" % "1.8.4" % "compile", "org.threeten" % "threetenbp" % "1.4.3" % "compile", "com.squareup.okio" % "okio" % "1.17.5" % "compile", - "javax.validation" % "validation-api" % "2.0.1.Final" % "compile", + "jakarta.validation" % "jakarta.validation-api" % "2.0.2" % "compile", "org.hibernate" % "hibernate-validator" % "6.0.19.Final" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/samples/client/petstore/java/rest-assured/pom.xml b/samples/client/petstore/java/rest-assured/pom.xml index 48e826a48e9..8a6b704adb0 100644 --- a/samples/client/petstore/java/rest-assured/pom.xml +++ b/samples/client/petstore/java/rest-assured/pom.xml @@ -211,9 +211,9 @@ 3.0.2 - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -243,9 +243,9 @@ - javax.validation - validation-api - 2.0.1.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided @@ -269,7 +269,8 @@ 2.8.6 1.8.4 1.4.3 - 1.3.2 + 1.3.5 + 2.0.2 1.17.5 4.13.1 diff --git a/samples/client/petstore/java/resteasy/build.gradle b/samples/client/petstore/java/resteasy/build.gradle index 47a46676967..49838b21fe2 100644 --- a/samples/client/petstore/java/resteasy/build.gradle +++ b/samples/client/petstore/java/resteasy/build.gradle @@ -49,7 +49,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -98,6 +98,7 @@ ext { jackson_version = "2.10.5" jackson_databind_version = "2.10.5.1" jackson_databind_nullable_version = "0.2.1" + jakarta_annotation_version = "1.3.5" threetenbp_version = "2.9.10" resteasy_version = "4.5.11.Final" junit_version = "4.13" @@ -115,6 +116,6 @@ dependencies { implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$threetenbp_version" implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/resteasy/build.sbt b/samples/client/petstore/java/resteasy/build.sbt index 2686e7b74de..915c8f01189 100644 --- a/samples/client/petstore/java/resteasy/build.sbt +++ b/samples/client/petstore/java/resteasy/build.sbt @@ -18,7 +18,7 @@ lazy val root = (project in file(".")). "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.5.1" % "compile", "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.10" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/samples/client/petstore/java/resteasy/pom.xml b/samples/client/petstore/java/resteasy/pom.xml index 6e429c2da2d..6fbca0739e0 100644 --- a/samples/client/petstore/java/resteasy/pom.xml +++ b/samples/client/petstore/java/resteasy/pom.xml @@ -184,14 +184,6 @@ net.jcip jcip-annotations - - org.jboss.spec.javax.annotation - jboss-annotations-api_1.2_spec - - - javax.activation - activation - @@ -207,10 +199,6 @@ com.sun.mail javax.mail - - javax.activation - activation - @@ -250,9 +238,9 @@ ${threetenbp-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -270,7 +258,7 @@ 2.10.5 2.10.5.1 0.2.1 - 1.3.2 + 1.3.5 2.9.10 1.0.0 4.13 diff --git a/samples/client/petstore/java/resttemplate-withXml/build.gradle b/samples/client/petstore/java/resttemplate-withXml/build.gradle index f3a4d1fbaee..7e3a6d9dd83 100644 --- a/samples/client/petstore/java/resttemplate-withXml/build.gradle +++ b/samples/client/petstore/java/resttemplate-withXml/build.gradle @@ -49,7 +49,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -99,6 +99,7 @@ ext { jackson_version = "2.10.5" jackson_databind_version = "2.10.5.1" jackson_databind_nullable_version = "0.2.1" + jakarta_annotation_version = "1.3.5" spring_web_version = "5.2.5.RELEASE" jodatime_version = "2.9.9" junit_version = "4.13.1" @@ -118,6 +119,6 @@ dependencies { implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threeten_version" implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson_version" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/resttemplate-withXml/pom.xml b/samples/client/petstore/java/resttemplate-withXml/pom.xml index e8e0ab812eb..8c6793c1c40 100644 --- a/samples/client/petstore/java/resttemplate-withXml/pom.xml +++ b/samples/client/petstore/java/resttemplate-withXml/pom.xml @@ -268,9 +268,9 @@ ${jackson-threetenbp-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -289,7 +289,7 @@ 2.10.5 2.10.5.1 0.2.1 - 1.3.2 + 1.3.5 2.9.10 1.0.0 4.13.1 diff --git a/samples/client/petstore/java/resttemplate/build.gradle b/samples/client/petstore/java/resttemplate/build.gradle index 4a60d33ebe7..d5e355df064 100644 --- a/samples/client/petstore/java/resttemplate/build.gradle +++ b/samples/client/petstore/java/resttemplate/build.gradle @@ -49,7 +49,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -99,6 +99,7 @@ ext { jackson_version = "2.10.5" jackson_databind_version = "2.10.5.1" jackson_databind_nullable_version = "0.2.1" + jakarta_annotation_version = "1.3.5" spring_web_version = "5.2.5.RELEASE" jodatime_version = "2.9.9" junit_version = "4.13.1" @@ -117,6 +118,6 @@ dependencies { implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threeten_version" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/resttemplate/pom.xml b/samples/client/petstore/java/resttemplate/pom.xml index 9569cedb754..9921e8011ee 100644 --- a/samples/client/petstore/java/resttemplate/pom.xml +++ b/samples/client/petstore/java/resttemplate/pom.xml @@ -260,9 +260,9 @@ ${jackson-threetenbp-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -281,7 +281,7 @@ 2.10.5 2.10.5.1 0.2.1 - 1.3.2 + 1.3.5 2.9.10 1.0.0 4.13.1 diff --git a/samples/client/petstore/java/retrofit2-play26/build.gradle b/samples/client/petstore/java/retrofit2-play26/build.gradle index 69c39e5fcd5..eb0580bd8c2 100644 --- a/samples/client/petstore/java/retrofit2-play26/build.gradle +++ b/samples/client/petstore/java/retrofit2-play26/build.gradle @@ -49,7 +49,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -100,6 +100,7 @@ ext { jackson_version = "2.10.5" jackson_databind_version = "2.10.5.1" jackson_databind_nullable_version = "0.2.1" + jakarta_annotation_version = "1.3.5" play_version = "2.6.7" swagger_annotations_version = "1.5.22" junit_version = "4.13.1" @@ -119,13 +120,13 @@ dependencies { implementation "io.gsonfire:gson-fire:$json_fire_version" implementation "org.threeten:threetenbp:$threetenbp_version" implementation "com.typesafe.play:play-ahc-ws_2.12:$play_version" - implementation "javax.validation:validation-api:1.1.0.Final" + implementation "jakarta.validation:jakarta.validation-api:2.0.2" implementation "com.squareup.retrofit2:converter-jackson:$retrofit_version" implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/retrofit2-play26/build.sbt b/samples/client/petstore/java/retrofit2-play26/build.sbt index 68c717dc37d..3b482330d1e 100644 --- a/samples/client/petstore/java/retrofit2-play26/build.sbt +++ b/samples/client/petstore/java/retrofit2-play26/build.sbt @@ -12,7 +12,7 @@ lazy val root = (project in file(".")). "com.squareup.retrofit2" % "retrofit" % "2.3.0" % "compile", "com.squareup.retrofit2" % "converter-scalars" % "2.3.0" % "compile", "com.typesafe.play" % "play-ahc-ws_2.12" % "2.6.7" % "compile", - "javax.validation" % "validation-api" % "1.1.0.Final" % "compile", + "jakarta.validation" % "jakarta.validation-api" % "2.0.2" % "compile", "com.squareup.retrofit2" % "converter-jackson" % "2.3.0" % "compile", "com.fasterxml.jackson.core" % "jackson-core" % "2.10.5" % "compile", "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.5" % "compile", @@ -21,7 +21,7 @@ lazy val root = (project in file(".")). "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", "org.threeten" % "threetenbp" % "1.4.0" % "compile", "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.11" % "test" ) diff --git a/samples/client/petstore/java/retrofit2-play26/pom.xml b/samples/client/petstore/java/retrofit2-play26/pom.xml index d0fc81c43ca..baf6f9835fc 100644 --- a/samples/client/petstore/java/retrofit2-play26/pom.xml +++ b/samples/client/petstore/java/retrofit2-play26/pom.xml @@ -283,14 +283,14 @@ ${play-version} - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -313,7 +313,8 @@ 0.2.1 2.5.0 1.4.0 - 1.3.2 + 1.3.5 + 2.0.2 1.0.1 4.13.1 diff --git a/samples/client/petstore/java/retrofit2/build.gradle b/samples/client/petstore/java/retrofit2/build.gradle index b1b43ae2fb4..4dafb81ae67 100644 --- a/samples/client/petstore/java/retrofit2/build.gradle +++ b/samples/client/petstore/java/retrofit2/build.gradle @@ -49,7 +49,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -114,6 +114,6 @@ dependencies { } implementation "io.gsonfire:gson-fire:$json_fire_version" implementation "org.threeten:threetenbp:$threetenbp_version" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/retrofit2/build.sbt b/samples/client/petstore/java/retrofit2/build.sbt index 8ad7b88e1ae..10ac2d347a1 100644 --- a/samples/client/petstore/java/retrofit2/build.sbt +++ b/samples/client/petstore/java/retrofit2/build.sbt @@ -16,7 +16,7 @@ lazy val root = (project in file(".")). "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", "org.threeten" % "threetenbp" % "1.4.0" % "compile", "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.11" % "test" ) diff --git a/samples/client/petstore/java/retrofit2/pom.xml b/samples/client/petstore/java/retrofit2/pom.xml index 10c1ec0dc8b..e184e4db6c6 100644 --- a/samples/client/petstore/java/retrofit2/pom.xml +++ b/samples/client/petstore/java/retrofit2/pom.xml @@ -247,9 +247,9 @@ ${threetenbp-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -269,7 +269,7 @@ 1.5.22 2.5.0 1.4.0 - 1.3.2 + 1.3.5 1.0.1 4.13.1 diff --git a/samples/client/petstore/java/retrofit2rx2/build.gradle b/samples/client/petstore/java/retrofit2rx2/build.gradle index 9766c51dbf9..4c801b8e23d 100644 --- a/samples/client/petstore/java/retrofit2rx2/build.gradle +++ b/samples/client/petstore/java/retrofit2rx2/build.gradle @@ -49,7 +49,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -117,6 +117,6 @@ dependencies { } implementation "io.gsonfire:gson-fire:$json_fire_version" implementation "org.threeten:threetenbp:$threetenbp_version" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/retrofit2rx2/build.sbt b/samples/client/petstore/java/retrofit2rx2/build.sbt index d6abba22867..63064b30ddf 100644 --- a/samples/client/petstore/java/retrofit2rx2/build.sbt +++ b/samples/client/petstore/java/retrofit2rx2/build.sbt @@ -18,7 +18,7 @@ lazy val root = (project in file(".")). "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", "org.threeten" % "threetenbp" % "1.4.0" % "compile", "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.11" % "test" ) diff --git a/samples/client/petstore/java/retrofit2rx2/pom.xml b/samples/client/petstore/java/retrofit2rx2/pom.xml index 29e33941239..c841514837e 100644 --- a/samples/client/petstore/java/retrofit2rx2/pom.xml +++ b/samples/client/petstore/java/retrofit2rx2/pom.xml @@ -257,9 +257,9 @@ ${retrofit-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -280,7 +280,7 @@ 2.5.0 2.1.1 1.4.0 - 1.3.2 + 1.3.5 1.0.1 4.13.1 diff --git a/samples/client/petstore/java/retrofit2rx3/build.gradle b/samples/client/petstore/java/retrofit2rx3/build.gradle index bbb209016f5..96760ecfecc 100644 --- a/samples/client/petstore/java/retrofit2rx3/build.gradle +++ b/samples/client/petstore/java/retrofit2rx3/build.gradle @@ -49,7 +49,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -117,6 +117,6 @@ dependencies { } implementation "io.gsonfire:gson-fire:$json_fire_version" implementation "org.threeten:threetenbp:$threetenbp_version" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/retrofit2rx3/build.sbt b/samples/client/petstore/java/retrofit2rx3/build.sbt index e543cc28dc6..a5a113fd9dc 100644 --- a/samples/client/petstore/java/retrofit2rx3/build.sbt +++ b/samples/client/petstore/java/retrofit2rx3/build.sbt @@ -18,7 +18,7 @@ lazy val root = (project in file(".")). "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", "org.threeten" % "threetenbp" % "1.4.0" % "compile", "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.11" % "test" ) diff --git a/samples/client/petstore/java/retrofit2rx3/pom.xml b/samples/client/petstore/java/retrofit2rx3/pom.xml index 67178524622..adb7eb9927b 100644 --- a/samples/client/petstore/java/retrofit2rx3/pom.xml +++ b/samples/client/petstore/java/retrofit2rx3/pom.xml @@ -257,9 +257,9 @@ 3.0.0 - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -280,7 +280,7 @@ 2.5.0 3.0.4 1.4.0 - 1.3.2 + 1.3.5 1.0.1 4.13.1 diff --git a/samples/client/petstore/java/vertx-no-nullable/build.gradle b/samples/client/petstore/java/vertx-no-nullable/build.gradle index b707ad140bb..ef71d28b690 100644 --- a/samples/client/petstore/java/vertx-no-nullable/build.gradle +++ b/samples/client/petstore/java/vertx-no-nullable/build.gradle @@ -32,6 +32,7 @@ ext { jackson_databind_version = "2.10.5.1" vertx_version = "3.4.2" junit_version = "4.13.1" + jakarta_annotation_version = "1.3.5" jackson_threeten_version = "2.9.10" } @@ -45,7 +46,7 @@ dependencies { implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:jackson_threeten_version" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" testImplementation "io.vertx:vertx-unit:$vertx_version" } diff --git a/samples/client/petstore/java/vertx-no-nullable/pom.xml b/samples/client/petstore/java/vertx-no-nullable/pom.xml index ed82307ce4f..c0c0281f9eb 100644 --- a/samples/client/petstore/java/vertx-no-nullable/pom.xml +++ b/samples/client/petstore/java/vertx-no-nullable/pom.xml @@ -251,9 +251,9 @@ 2.9.10 - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -279,7 +279,7 @@ 2.10.5 2.10.5.1 0.2.1 - 1.3.2 + 1.3.5 4.13.1 diff --git a/samples/client/petstore/java/vertx/build.gradle b/samples/client/petstore/java/vertx/build.gradle index 063f228289b..7d499745c83 100644 --- a/samples/client/petstore/java/vertx/build.gradle +++ b/samples/client/petstore/java/vertx/build.gradle @@ -33,6 +33,7 @@ ext { vertx_version = "3.4.2" junit_version = "4.13.1" jackson_databind_nullable_version = "0.2.1" + jakarta_annotation_version = "1.3.5" } dependencies { @@ -45,7 +46,7 @@ dependencies { implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" testImplementation "io.vertx:vertx-unit:$vertx_version" } diff --git a/samples/client/petstore/java/vertx/pom.xml b/samples/client/petstore/java/vertx/pom.xml index 07d20c311d1..e751a57d090 100644 --- a/samples/client/petstore/java/vertx/pom.xml +++ b/samples/client/petstore/java/vertx/pom.xml @@ -251,9 +251,9 @@ ${jackson-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -279,7 +279,7 @@ 2.10.5 2.10.5.1 0.2.1 - 1.3.2 + 1.3.5 4.13.1 diff --git a/samples/client/petstore/java/webclient-nulable-arrays/build.gradle b/samples/client/petstore/java/webclient-nulable-arrays/build.gradle index 85246dc6513..686f85f5ace 100644 --- a/samples/client/petstore/java/webclient-nulable-arrays/build.gradle +++ b/samples/client/petstore/java/webclient-nulable-arrays/build.gradle @@ -50,7 +50,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -116,7 +116,7 @@ ext { jackson_version = "2.11.3" jackson_databind_version = "2.11.3" jackson_databind_nullable_version = "0.2.1" - javax_annotation_version = "1.3.2" + jakarta_annotation_version = "1.3.5" reactor_version = "3.4.3" reactor_netty_version = "0.7.15.RELEASE" jodatime_version = "2.9.9" @@ -135,6 +135,6 @@ dependencies { implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" - implementation "javax.annotation:javax.annotation-api:$javax_annotation_version" + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/webclient-nulable-arrays/pom.xml b/samples/client/petstore/java/webclient-nulable-arrays/pom.xml index 30382edacdf..6a4e433806c 100644 --- a/samples/client/petstore/java/webclient-nulable-arrays/pom.xml +++ b/samples/client/petstore/java/webclient-nulable-arrays/pom.xml @@ -109,9 +109,9 @@ ${jackson-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -130,7 +130,7 @@ 2.11.3 2.11.3 0.2.1 - 1.3.2 + 1.3.5 4.13.1 3.4.3 0.7.15.RELEASE diff --git a/samples/client/petstore/java/webclient/build.gradle b/samples/client/petstore/java/webclient/build.gradle index 6091974a8bc..eb34d7a99cc 100644 --- a/samples/client/petstore/java/webclient/build.gradle +++ b/samples/client/petstore/java/webclient/build.gradle @@ -50,7 +50,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -116,7 +116,7 @@ ext { jackson_version = "2.11.3" jackson_databind_version = "2.11.3" jackson_databind_nullable_version = "0.2.1" - javax_annotation_version = "1.3.2" + jakarta_annotation_version = "1.3.5" reactor_version = "3.4.3" reactor_netty_version = "0.7.15.RELEASE" jodatime_version = "2.9.9" @@ -135,6 +135,6 @@ dependencies { implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" - implementation "javax.annotation:javax.annotation-api:$javax_annotation_version" + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/webclient/pom.xml b/samples/client/petstore/java/webclient/pom.xml index fd9ba167047..fa73267d009 100644 --- a/samples/client/petstore/java/webclient/pom.xml +++ b/samples/client/petstore/java/webclient/pom.xml @@ -109,9 +109,9 @@ ${jackson-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -130,7 +130,7 @@ 2.11.3 2.11.3 0.2.1 - 1.3.2 + 1.3.5 4.13.1 3.4.3 0.7.15.RELEASE diff --git a/samples/client/petstore/jaxrs-cxf-client-jackson/pom.xml b/samples/client/petstore/jaxrs-cxf-client-jackson/pom.xml index aa59537336d..7fccbfb562e 100644 --- a/samples/client/petstore/jaxrs-cxf-client-jackson/pom.xml +++ b/samples/client/petstore/jaxrs-cxf-client-jackson/pom.xml @@ -149,9 +149,9 @@ ${jackson-jaxrs-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -175,7 +175,7 @@ 2.5 3.3.0 2.9.9 - 1.3.2 + 1.3.5 UTF-8 diff --git a/samples/client/petstore/jaxrs-cxf-client/pom.xml b/samples/client/petstore/jaxrs-cxf-client/pom.xml index fe612296899..d2c3b968a2a 100644 --- a/samples/client/petstore/jaxrs-cxf-client/pom.xml +++ b/samples/client/petstore/jaxrs-cxf-client/pom.xml @@ -149,9 +149,9 @@ ${jackson-jaxrs-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -175,7 +175,7 @@ 2.5 3.3.0 2.9.9 - 1.3.2 + 1.3.5 UTF-8 diff --git a/samples/client/petstore/scala-httpclient-deprecated/build.gradle b/samples/client/petstore/scala-httpclient-deprecated/build.gradle index ef58789495a..90b3353edf6 100644 --- a/samples/client/petstore/scala-httpclient-deprecated/build.gradle +++ b/samples/client/petstore/scala-httpclient-deprecated/build.gradle @@ -48,7 +48,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -96,6 +96,7 @@ if(hasProperty('target') && target == 'android') { ext { scala_version = "2.10.4" + jakarta_annotation_version = "1.3.5" joda_version = "1.2" jodatime_version = "2.2" jersey_version = "1.19" diff --git a/samples/client/petstore/spring-stubs/pom.xml b/samples/client/petstore/spring-stubs/pom.xml index f19b4e5ddf4..2ae7301fc58 100644 --- a/samples/client/petstore/spring-stubs/pom.xml +++ b/samples/client/petstore/spring-stubs/pom.xml @@ -40,9 +40,8 @@ ${springfox-version} - javax.xml.bind - jaxb-api - 2.3.1 + jakarta.xml.bind + jakarta.xml.bind-api com.fasterxml.jackson.datatype @@ -55,8 +54,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api com.fasterxml.jackson.core diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/build.gradle b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/build.gradle index 63613e700e0..7af266cd572 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/build.gradle +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/build.gradle @@ -49,7 +49,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -98,6 +98,7 @@ ext { jackson_version = "2.10.5" jackson_databind_version = "2.10.5.1" jackson_databind_nullable_version = "0.2.1" + jakarta_annotation_version = "1.3.5" jersey_version = "2.27" junit_version = "4.13.1" threetenbp_version = "2.9.10" @@ -117,7 +118,7 @@ dependencies { implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$threetenbp_version" implementation "com.brsanthu:migbase64:2.2" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/build.sbt b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/build.sbt index 2bd6f3ba8fb..6f45ec3cc59 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/build.sbt +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/build.sbt @@ -20,7 +20,7 @@ lazy val root = (project in file(".")). "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.5.1" % "compile", "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "com.brsanthu" % "migbase64" % "2.2", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/pom.xml b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/pom.xml index 1640fe3346e..4b679de53da 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/pom.xml +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/pom.xml @@ -282,9 +282,9 @@ 2.2 - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -308,7 +308,7 @@ 2.10.5.1 0.2.1 2.9.10 - 1.3.2 + 1.3.5 4.13.1 diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/build.gradle b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/build.gradle index aea71f87096..b8563fe54bf 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/build.gradle +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/build.gradle @@ -49,7 +49,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -98,6 +98,7 @@ ext { jackson_version = "2.10.5" jackson_databind_version = "2.10.5.1" jackson_databind_nullable_version = "0.2.1" + jakarta_annotation_version = "1.3.5" jersey_version = "2.27" junit_version = "4.13.1" } @@ -115,7 +116,7 @@ dependencies { implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/build.sbt b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/build.sbt index 9bcab931704..f45421c8d9a 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/build.sbt +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/build.sbt @@ -19,7 +19,7 @@ lazy val root = (project in file(".")). "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.5.1" % "compile", "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.5.1" % "compile", "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.10" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/pom.xml b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/pom.xml index 5a6affc0fa6..ac61d729960 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/pom.xml +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/pom.xml @@ -276,9 +276,9 @@ ${jackson-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -301,7 +301,7 @@ 2.10.5 2.10.5.1 0.2.1 - 1.3.2 + 1.3.5 4.13.1 diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/build.gradle b/samples/openapi3/client/petstore/java/jersey2-java8/build.gradle index ea8b5ac0593..88a93f54b5e 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/build.gradle +++ b/samples/openapi3/client/petstore/java/jersey2-java8/build.gradle @@ -49,7 +49,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" } } @@ -98,6 +98,7 @@ ext { jackson_version = "2.10.5" jackson_databind_version = "2.10.5.1" jackson_databind_nullable_version = "0.2.1" + jakarta_annotation_version = "1.3.5" jersey_version = "2.27" junit_version = "4.13.1" scribejava_apis_version = "6.9.0" @@ -119,7 +120,7 @@ dependencies { implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" implementation "com.github.scribejava:scribejava-apis:$scribejava_apis_version" implementation "org.tomitribe:tomitribe-http-signatures:$tomitribe_http_signatures_version" - implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation "junit:junit:$junit_version" } diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/build.sbt b/samples/openapi3/client/petstore/java/jersey2-java8/build.sbt index fa36119041e..35a6095582d 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/build.sbt +++ b/samples/openapi3/client/petstore/java/jersey2-java8/build.sbt @@ -21,7 +21,7 @@ lazy val root = (project in file(".")). "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.10" % "compile", "com.github.scribejava" % "scribejava-apis" % "6.9.0" % "compile", "org.tomitribe" % "tomitribe-http-signatures" % "1.5" % "compile", - "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "junit" % "junit" % "4.13.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/pom.xml b/samples/openapi3/client/petstore/java/jersey2-java8/pom.xml index bfe48b1b028..0de23c35d49 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/pom.xml +++ b/samples/openapi3/client/petstore/java/jersey2-java8/pom.xml @@ -286,9 +286,9 @@ ${scribejava-apis-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -311,7 +311,7 @@ 2.10.5 2.10.5.1 0.2.1 - 1.3.2 + 1.3.5 4.13.1 1.5 6.9.0 diff --git a/samples/openapi3/client/petstore/java/native/pom.xml b/samples/openapi3/client/petstore/java/native/pom.xml index 58e5bf25f54..0fa9f4b7b94 100644 --- a/samples/openapi3/client/petstore/java/native/pom.xml +++ b/samples/openapi3/client/petstore/java/native/pom.xml @@ -194,9 +194,9 @@ 3.0.2 - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -216,7 +216,7 @@ 11 2.10.4 0.2.1 - 1.3.2 + 1.3.5 4.13.1 diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/pom.xml b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/pom.xml index c35a2bc81fb..5af87d3e0da 100644 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/pom.xml +++ b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/pom.xml @@ -154,9 +154,9 @@ ${jackson-databind-nullable-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -180,7 +180,7 @@ 2.5 3.3.0 2.9.9 - 1.3.2 + 1.3.5 0.2.1 UTF-8 diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/pom.xml b/samples/openapi3/server/petstore/kotlin-springboot-reactive/pom.xml index cfbc66f6dc9..915ec6f9513 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/pom.xml +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/pom.xml @@ -8,7 +8,7 @@ 1.3.30 1.2.0 - 1.3.2 + 1.3.5 org.springframework.boot @@ -125,9 +125,9 @@ validation-api - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided diff --git a/samples/openapi3/server/petstore/kotlin-springboot/pom.xml b/samples/openapi3/server/petstore/kotlin-springboot/pom.xml index 8af5e943b3a..1bfa3bec626 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/pom.xml +++ b/samples/openapi3/server/petstore/kotlin-springboot/pom.xml @@ -8,7 +8,7 @@ 1.3.30 1.2.0 - 1.3.2 + 1.3.5 org.springframework.boot @@ -115,9 +115,9 @@ validation-api - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided diff --git a/samples/server/petstore/java-inflector/pom.xml b/samples/server/petstore/java-inflector/pom.xml index 6190136fc91..7330747f60e 100644 --- a/samples/server/petstore/java-inflector/pom.xml +++ b/samples/server/petstore/java-inflector/pom.xml @@ -127,9 +127,9 @@ ${swagger-inflector-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -148,7 +148,7 @@ 1.0.14 9.2.9.v20150224 1.0.1 - 1.3.2 + 1.3.5 4.8.2 1.6.3 diff --git a/samples/server/petstore/java-msf4j/pom.xml b/samples/server/petstore/java-msf4j/pom.xml index 638d1a5fb56..d2a5c14078d 100644 --- a/samples/server/petstore/java-msf4j/pom.xml +++ b/samples/server/petstore/java-msf4j/pom.xml @@ -47,8 +47,8 @@ - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} @@ -67,9 +67,9 @@ ${jackson-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -86,9 +86,9 @@ 1.7 ${java.version} ${java.version} - 2.5 + 4.0.4 2.8.9 - 1.3.2 + 1.3.5 UTF-8 diff --git a/samples/server/petstore/java-pkmst/pom.xml b/samples/server/petstore/java-pkmst/pom.xml index 853d9b990f6..98a9d112a1a 100644 --- a/samples/server/petstore/java-pkmst/pom.xml +++ b/samples/server/petstore/java-pkmst/pom.xml @@ -15,7 +15,7 @@ 1.2.5 1.2.5 3.10.0 - 1.3.2 + 1.3.5 2.6.0 2.6.0 1.7.25 @@ -139,9 +139,9 @@ 1.2 - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml b/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml index 9cadde2c712..bb88fe50d58 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml @@ -41,8 +41,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -124,8 +124,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} provided @@ -180,9 +180,9 @@ ${jackson-jaxrs-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -203,11 +203,10 @@ 9.2.9.v20150224 4.13 1.2.0 - 2.5 - 1.1.0.Final + 2.0.2 3.3.0 2.9.9 - 1.3.2 + 1.3.5 UTF-8 diff --git a/samples/server/petstore/jaxrs-cxf-cdi-default-value/pom.xml b/samples/server/petstore/jaxrs-cxf-cdi-default-value/pom.xml index 4b8ee0f1827..b85ec260a72 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi-default-value/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-cdi-default-value/pom.xml @@ -87,12 +87,16 @@ - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided + + 2.0.2 + + diff --git a/samples/server/petstore/jaxrs-cxf-cdi/pom.xml b/samples/server/petstore/jaxrs-cxf-cdi/pom.xml index e924d7a7910..c2d476250e2 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-cdi/pom.xml @@ -87,12 +87,16 @@ - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided + + 2.0.2 + + diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml b/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml index 668a0a3f507..37380542275 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml @@ -41,8 +41,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -124,8 +124,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} provided @@ -180,9 +180,9 @@ ${jackson-jaxrs-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -203,11 +203,10 @@ 9.2.9.v20150224 4.13 1.2.0 - 2.5 - 1.1.0.Final + 2.0.2 3.3.0 2.9.9 - 1.3.2 + 1.3.5 UTF-8 diff --git a/samples/server/petstore/jaxrs-cxf/pom.xml b/samples/server/petstore/jaxrs-cxf/pom.xml index ae4de62e07c..a4a13cf0922 100644 --- a/samples/server/petstore/jaxrs-cxf/pom.xml +++ b/samples/server/petstore/jaxrs-cxf/pom.xml @@ -41,8 +41,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -124,8 +124,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} provided @@ -180,9 +180,9 @@ ${jackson-jaxrs-version} - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -203,11 +203,10 @@ 9.2.9.v20150224 4.13 1.2.0 - 2.5 - 1.1.0.Final + 2.0.2 3.3.0 2.9.9 - 1.3.2 + 1.3.5 UTF-8 diff --git a/samples/server/petstore/jaxrs-datelib-j8/pom.xml b/samples/server/petstore/jaxrs-datelib-j8/pom.xml index 006d336efa5..9a6ef106bfe 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/pom.xml +++ b/samples/server/petstore/jaxrs-datelib-j8/pom.xml @@ -54,8 +54,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -127,8 +127,8 @@ test - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} @@ -161,8 +161,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} provided @@ -182,13 +182,13 @@ ${java.version} ${java.version} 1.5.18 - 1.1.0.Final + 2.0.2 9.2.9.v20150224 2.22.2 2.9.9 4.13.1 1.2.0 - 2.5 + 4.0.4 UTF-8 diff --git a/samples/server/petstore/jaxrs-jersey/pom.xml b/samples/server/petstore/jaxrs-jersey/pom.xml index d3cde5f366d..1f10526075d 100644 --- a/samples/server/petstore/jaxrs-jersey/pom.xml +++ b/samples/server/petstore/jaxrs-jersey/pom.xml @@ -54,8 +54,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -127,8 +127,8 @@ test - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} @@ -161,8 +161,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} provided @@ -182,13 +182,13 @@ ${java.version} ${java.version} 1.5.18 - 1.1.0.Final + 2.0.2 9.2.9.v20150224 2.22.2 2.9.9 4.13.1 1.2.0 - 2.5 + 4.0.4 UTF-8 diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/build.gradle b/samples/server/petstore/jaxrs-resteasy/default-value/build.gradle index b4805e5de7b..dd8b11f8b67 100644 --- a/samples/server/petstore/jaxrs-resteasy/default-value/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/default-value/build.gradle @@ -12,12 +12,12 @@ dependencies { providedCompile 'org.jboss.resteasy:jaxrs-api:3.0.11.Final' providedCompile 'org.jboss.resteasy:resteasy-validator-provider-11:3.0.11.Final' providedCompile 'org.jboss.resteasy:resteasy-multipart-provider:3.0.11.Final' - providedCompile 'javax.annotation:javax.annotation-api:1.2' + providedCompile 'jakarta.annotation:jakarta.annotation-api:1.3.5' providedCompile 'javax:javaee-api:7.0' providedCompile 'org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final' compile 'io.swagger:swagger-annotations:1.5.22' compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final' - providedCompile 'javax.validation:validation-api:1.1.0.Final' + providedCompile 'jakarta.validation:jakarta.validation-api:2.0.2' compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.9' compile 'joda-time:joda-time:2.7' //TODO: swaggerFeature diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/pom.xml b/samples/server/petstore/jaxrs-resteasy/default-value/pom.xml index 23fba0b0d9e..928711e47ad 100644 --- a/samples/server/petstore/jaxrs-resteasy/default-value/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/default-value/pom.xml @@ -84,8 +84,8 @@ ${slf4j-version} - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} provided @@ -121,9 +121,9 @@ provided - javax.annotation - javax.annotation-api - 1.2 + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -170,9 +170,9 @@ - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided @@ -193,6 +193,8 @@ 3.13.0.Final 1.6.3 4.13.1 - 2.5 + 4.0.4 + 1.3.5 + 2.0.2 diff --git a/samples/server/petstore/jaxrs-resteasy/default/build.gradle b/samples/server/petstore/jaxrs-resteasy/default/build.gradle index b4805e5de7b..dd8b11f8b67 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/default/build.gradle @@ -12,12 +12,12 @@ dependencies { providedCompile 'org.jboss.resteasy:jaxrs-api:3.0.11.Final' providedCompile 'org.jboss.resteasy:resteasy-validator-provider-11:3.0.11.Final' providedCompile 'org.jboss.resteasy:resteasy-multipart-provider:3.0.11.Final' - providedCompile 'javax.annotation:javax.annotation-api:1.2' + providedCompile 'jakarta.annotation:jakarta.annotation-api:1.3.5' providedCompile 'javax:javaee-api:7.0' providedCompile 'org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final' compile 'io.swagger:swagger-annotations:1.5.22' compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final' - providedCompile 'javax.validation:validation-api:1.1.0.Final' + providedCompile 'jakarta.validation:jakarta.validation-api:2.0.2' compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.9' compile 'joda-time:joda-time:2.7' //TODO: swaggerFeature diff --git a/samples/server/petstore/jaxrs-resteasy/default/pom.xml b/samples/server/petstore/jaxrs-resteasy/default/pom.xml index 95c2c1342eb..4e86fffb5d9 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/default/pom.xml @@ -84,8 +84,8 @@ ${slf4j-version} - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} provided @@ -121,9 +121,9 @@ provided - javax.annotation - javax.annotation-api - 1.2 + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -170,9 +170,9 @@ - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided @@ -193,6 +193,8 @@ 3.13.0.Final 1.6.3 4.13.1 - 2.5 + 4.0.4 + 1.3.5 + 2.0.2 diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle b/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle index 6498d44c2e8..68567d57b78 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle @@ -12,10 +12,10 @@ dependencies { providedCompile 'org.jboss.resteasy:jaxrs-api:3.0.11.Final' providedCompile 'org.jboss.resteasy:resteasy-validator-provider-11:3.0.11.Final' providedCompile 'org.jboss.resteasy:resteasy-multipart-provider:3.0.11.Final' - providedCompile 'javax.annotation:javax.annotation-api:1.2' + providedCompile 'jakarta.annotation:jakarta.annotation-api:1.3.5' providedCompile 'org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final' compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final' - providedCompile 'javax.validation:validation-api:1.1.0.Final' + providedCompile 'jakarta.validation:jakarta.validation-api:2.0.2' compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.9' testCompile 'junit:junit:4.13', 'org.hamcrest:hamcrest-core:1.3' diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/pom.xml b/samples/server/petstore/jaxrs-resteasy/eap-java8/pom.xml index 9abc115ec5b..44b7c44fe09 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/pom.xml @@ -66,8 +66,8 @@ ${slf4j-version} - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} provided @@ -103,9 +103,9 @@ provided - javax.annotation - javax.annotation-api - 1.2 + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -142,9 +142,9 @@ - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided @@ -169,6 +169,8 @@ 3.0.11.Final 1.6.3 4.8.1 - 2.5 + 4.0.4 + 2.0.2 + 1.3.5 diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle b/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle index 8e189f8148c..6c0bb712e06 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle @@ -12,10 +12,10 @@ dependencies { providedCompile 'org.jboss.resteasy:jaxrs-api:3.0.11.Final' providedCompile 'org.jboss.resteasy:resteasy-validator-provider-11:3.0.11.Final' providedCompile 'org.jboss.resteasy:resteasy-multipart-provider:3.0.11.Final' - providedCompile 'javax.annotation:javax.annotation-api:1.2' + providedCompile 'jakarta.annotation:jakarta.annotation-api:1.3.5' providedCompile 'org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final' compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final' - providedCompile 'javax.validation:validation-api:1.1.0.Final' + providedCompile 'jakarta.validation:jakarta.validation-api:2.0.2' compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.9' compile 'joda-time:joda-time:2.7' testCompile 'junit:junit:4.13', diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/pom.xml b/samples/server/petstore/jaxrs-resteasy/eap-joda/pom.xml index 6b25997d1c8..de6afb232c2 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/pom.xml @@ -66,8 +66,8 @@ ${slf4j-version} - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} provided @@ -103,9 +103,9 @@ provided - javax.annotation - javax.annotation-api - 1.2 + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -142,9 +142,9 @@ - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided @@ -174,6 +174,8 @@ 3.0.11.Final 1.6.3 4.8.1 - 2.5 + 4.0.4 + 2.0.2 + 1.3.5 diff --git a/samples/server/petstore/jaxrs-resteasy/eap/build.gradle b/samples/server/petstore/jaxrs-resteasy/eap/build.gradle index 8e189f8148c..6c0bb712e06 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/eap/build.gradle @@ -12,10 +12,10 @@ dependencies { providedCompile 'org.jboss.resteasy:jaxrs-api:3.0.11.Final' providedCompile 'org.jboss.resteasy:resteasy-validator-provider-11:3.0.11.Final' providedCompile 'org.jboss.resteasy:resteasy-multipart-provider:3.0.11.Final' - providedCompile 'javax.annotation:javax.annotation-api:1.2' + providedCompile 'jakarta.annotation:jakarta.annotation-api:1.3.5' providedCompile 'org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final' compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final' - providedCompile 'javax.validation:validation-api:1.1.0.Final' + providedCompile 'jakarta.validation:jakarta.validation-api:2.0.2' compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.9' compile 'joda-time:joda-time:2.7' testCompile 'junit:junit:4.13', diff --git a/samples/server/petstore/jaxrs-resteasy/eap/pom.xml b/samples/server/petstore/jaxrs-resteasy/eap/pom.xml index ff234bc266e..336166cdf9c 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/eap/pom.xml @@ -66,8 +66,8 @@ ${slf4j-version} - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} provided @@ -103,9 +103,9 @@ provided - javax.annotation - javax.annotation-api - 1.2 + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -142,9 +142,9 @@ - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided @@ -174,6 +174,8 @@ 3.0.11.Final 1.6.3 4.8.1 - 2.5 + 4.0.4 + 2.0.2 + 1.3.5 diff --git a/samples/server/petstore/jaxrs-resteasy/java8/build.gradle b/samples/server/petstore/jaxrs-resteasy/java8/build.gradle index b4805e5de7b..dd8b11f8b67 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/java8/build.gradle @@ -12,12 +12,12 @@ dependencies { providedCompile 'org.jboss.resteasy:jaxrs-api:3.0.11.Final' providedCompile 'org.jboss.resteasy:resteasy-validator-provider-11:3.0.11.Final' providedCompile 'org.jboss.resteasy:resteasy-multipart-provider:3.0.11.Final' - providedCompile 'javax.annotation:javax.annotation-api:1.2' + providedCompile 'jakarta.annotation:jakarta.annotation-api:1.3.5' providedCompile 'javax:javaee-api:7.0' providedCompile 'org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final' compile 'io.swagger:swagger-annotations:1.5.22' compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final' - providedCompile 'javax.validation:validation-api:1.1.0.Final' + providedCompile 'jakarta.validation:jakarta.validation-api:2.0.2' compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.9' compile 'joda-time:joda-time:2.7' //TODO: swaggerFeature diff --git a/samples/server/petstore/jaxrs-resteasy/java8/pom.xml b/samples/server/petstore/jaxrs-resteasy/java8/pom.xml index 2fecf534a14..c2a4501fca0 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/java8/pom.xml @@ -84,8 +84,8 @@ ${slf4j-version} - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} provided @@ -121,9 +121,9 @@ provided - javax.annotation - javax.annotation-api - 1.2 + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -165,9 +165,9 @@ - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided @@ -188,6 +188,8 @@ 3.13.0.Final 1.6.3 4.13.1 - 2.5 + 4.0.4 + 1.3.5 + 2.0.2 diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build.gradle b/samples/server/petstore/jaxrs-resteasy/joda/build.gradle index b4805e5de7b..dd8b11f8b67 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/joda/build.gradle @@ -12,12 +12,12 @@ dependencies { providedCompile 'org.jboss.resteasy:jaxrs-api:3.0.11.Final' providedCompile 'org.jboss.resteasy:resteasy-validator-provider-11:3.0.11.Final' providedCompile 'org.jboss.resteasy:resteasy-multipart-provider:3.0.11.Final' - providedCompile 'javax.annotation:javax.annotation-api:1.2' + providedCompile 'jakarta.annotation:jakarta.annotation-api:1.3.5' providedCompile 'javax:javaee-api:7.0' providedCompile 'org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final' compile 'io.swagger:swagger-annotations:1.5.22' compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final' - providedCompile 'javax.validation:validation-api:1.1.0.Final' + providedCompile 'jakarta.validation:jakarta.validation-api:2.0.2' compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.9' compile 'joda-time:joda-time:2.7' //TODO: swaggerFeature diff --git a/samples/server/petstore/jaxrs-resteasy/joda/pom.xml b/samples/server/petstore/jaxrs-resteasy/joda/pom.xml index d539b83828c..d31af2a492f 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/joda/pom.xml @@ -84,8 +84,8 @@ ${slf4j-version} - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} provided @@ -121,9 +121,9 @@ provided - javax.annotation - javax.annotation-api - 1.2 + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided @@ -170,9 +170,9 @@ - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided @@ -193,6 +193,8 @@ 3.13.0.Final 1.6.3 4.13.1 - 2.5 + 4.0.4 + 1.3.5 + 2.0.2 diff --git a/samples/server/petstore/jaxrs-spec-interface/pom.xml b/samples/server/petstore/jaxrs-spec-interface/pom.xml index 33f4064e9d4..bb8acd34af9 100644 --- a/samples/server/petstore/jaxrs-spec-interface/pom.xml +++ b/samples/server/petstore/jaxrs-spec-interface/pom.xml @@ -38,9 +38,9 @@ - javax.ws.rs - javax.ws.rs-api - 2.1.1 + jakarta.ws.rs + jakarta.ws.rs-api + ${jakarta.ws.rs-version} provided @@ -73,14 +73,16 @@ - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided 2.9.9 4.13.1 + 2.0.2 + 2.1.6 diff --git a/samples/server/petstore/jaxrs-spec/pom.xml b/samples/server/petstore/jaxrs-spec/pom.xml index c3216b9b4a6..0ed13d0cdda 100644 --- a/samples/server/petstore/jaxrs-spec/pom.xml +++ b/samples/server/petstore/jaxrs-spec/pom.xml @@ -53,9 +53,9 @@ - javax.ws.rs - javax.ws.rs-api - 2.1.1 + jakarta.ws.rs + jakarta.ws.rs-api + ${jakarta.ws.rs-version} provided @@ -108,14 +108,16 @@ - javax.validation - validation-api - 1.1.0.Final + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} provided 2.9.9 4.13.1 + 2.0.2 + 2.1.6 diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/pom.xml b/samples/server/petstore/jaxrs/jersey1-useTags/pom.xml index 4730e2d1a86..232ac76fcc3 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/pom.xml +++ b/samples/server/petstore/jaxrs/jersey1-useTags/pom.xml @@ -46,8 +46,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -130,8 +130,8 @@ ${jersey-version} - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} @@ -179,8 +179,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} provided @@ -199,13 +199,13 @@ ${java.version} ${java.version} 1.5.22 - 1.1.0.Final + 2.0.2 9.2.9.v20150224 1.19.1 2.9.9 1.7.21 4.13 - 2.5 + 4.0.4 UTF-8 diff --git a/samples/server/petstore/jaxrs/jersey1/pom.xml b/samples/server/petstore/jaxrs/jersey1/pom.xml index 76be24bcdad..9356dcfe7eb 100644 --- a/samples/server/petstore/jaxrs/jersey1/pom.xml +++ b/samples/server/petstore/jaxrs/jersey1/pom.xml @@ -46,8 +46,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -130,8 +130,8 @@ ${jersey-version} - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} @@ -179,8 +179,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} provided @@ -199,13 +199,13 @@ ${java.version} ${java.version} 1.5.22 - 1.1.0.Final + 2.0.2 9.2.9.v20150224 1.19.1 2.9.9 1.7.21 4.13 - 2.5 + 4.0.4 UTF-8 diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml b/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml index 31e30816611..47724379c18 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml +++ b/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml @@ -54,8 +54,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -127,8 +127,8 @@ test - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} @@ -161,8 +161,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} provided @@ -182,13 +182,13 @@ ${java.version} ${java.version} 1.5.18 - 1.1.0.Final + 2.0.2 9.2.9.v20150224 2.22.2 2.9.9 4.13.1 1.2.0 - 2.5 + 4.0.4 UTF-8 diff --git a/samples/server/petstore/jaxrs/jersey2/pom.xml b/samples/server/petstore/jaxrs/jersey2/pom.xml index f46407987ae..018c3a205cc 100644 --- a/samples/server/petstore/jaxrs/jersey2/pom.xml +++ b/samples/server/petstore/jaxrs/jersey2/pom.xml @@ -54,8 +54,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -127,8 +127,8 @@ test - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} @@ -161,8 +161,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} provided @@ -182,13 +182,13 @@ ${java.version} ${java.version} 1.5.18 - 1.1.0.Final + 2.0.2 9.2.9.v20150224 2.22.2 2.9.9 4.13.1 1.2.0 - 2.5 + 4.0.4 UTF-8 diff --git a/samples/server/petstore/kotlin-springboot-delegate/pom.xml b/samples/server/petstore/kotlin-springboot-delegate/pom.xml index 32a5347bada..f7094ec0e10 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/pom.xml +++ b/samples/server/petstore/kotlin-springboot-delegate/pom.xml @@ -8,7 +8,7 @@ 1.3.30 1.2.0 - 1.3.2 + 1.3.5 org.springframework.boot @@ -111,13 +111,13 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/pom.xml b/samples/server/petstore/kotlin-springboot-modelMutable/pom.xml index 8af5e943b3a..1bfa3bec626 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/pom.xml +++ b/samples/server/petstore/kotlin-springboot-modelMutable/pom.xml @@ -8,7 +8,7 @@ 1.3.30 1.2.0 - 1.3.2 + 1.3.5 org.springframework.boot @@ -115,9 +115,9 @@ validation-api - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided diff --git a/samples/server/petstore/kotlin-springboot-reactive/pom.xml b/samples/server/petstore/kotlin-springboot-reactive/pom.xml index 17b60380752..cb52346a5c9 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/pom.xml +++ b/samples/server/petstore/kotlin-springboot-reactive/pom.xml @@ -8,7 +8,7 @@ 1.3.30 1.2.0 - 1.3.2 + 1.3.5 org.springframework.boot @@ -121,13 +121,13 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided diff --git a/samples/server/petstore/kotlin-springboot/pom.xml b/samples/server/petstore/kotlin-springboot/pom.xml index 32a5347bada..f7094ec0e10 100644 --- a/samples/server/petstore/kotlin-springboot/pom.xml +++ b/samples/server/petstore/kotlin-springboot/pom.xml @@ -8,7 +8,7 @@ 1.3.30 1.2.0 - 1.3.2 + 1.3.5 org.springframework.boot @@ -111,13 +111,13 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api - javax.annotation - javax.annotation-api - ${javax-annotation-version} + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} provided diff --git a/samples/server/petstore/kotlin/vertx/pom.xml b/samples/server/petstore/kotlin/vertx/pom.xml index 2c2af368f31..9d151636971 100644 --- a/samples/server/petstore/kotlin/vertx/pom.xml +++ b/samples/server/petstore/kotlin/vertx/pom.xml @@ -14,6 +14,7 @@ 1.8 1.3.10 true + 1.3.5 4.13 3.4.1 3.8.1 @@ -51,9 +52,9 @@ - javax.annotation - javax.annotation-api - 1.2 + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} org.jetbrains.kotlin diff --git a/samples/server/petstore/spring-mvc-default-value/pom.xml b/samples/server/petstore/spring-mvc-default-value/pom.xml index da3d53777b0..fa8da51ae2d 100644 --- a/samples/server/petstore/spring-mvc-default-value/pom.xml +++ b/samples/server/petstore/spring-mvc-default-value/pom.xml @@ -53,9 +53,8 @@ ${springfox-version} - javax.xml.bind - jaxb-api - 2.3.1 + jakarta.xml.bind + jakarta.xml.bind-api com.fasterxml.jackson.datatype @@ -68,8 +67,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api com.fasterxml.jackson.core diff --git a/samples/server/petstore/spring-mvc-j8-async/pom.xml b/samples/server/petstore/spring-mvc-j8-async/pom.xml index e694563c2f8..8d2528b1b2a 100644 --- a/samples/server/petstore/spring-mvc-j8-async/pom.xml +++ b/samples/server/petstore/spring-mvc-j8-async/pom.xml @@ -44,8 +44,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -96,14 +96,14 @@ ${spring-version} - javax.annotation - javax.annotation-api - 1.3.2 + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} - javax.xml.bind - jaxb-api - 2.2.11 + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind-version} @@ -139,14 +139,14 @@ test - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} provided @@ -165,14 +165,16 @@ 1.8 ${java.version} ${java.version} + 1.3.5 + 2.3.3 9.2.15.v20160210 1.7.21 4.13.1 - 2.5 + 4.0.4 2.8.0 2.9.9 2.8.4 - 1.1.0.Final + 2.0.2 4.3.20.RELEASE 0.2.1 2.9.8 diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/pom.xml b/samples/server/petstore/spring-mvc-j8-localdatetime/pom.xml index 0014c2edaaa..6155fc3e512 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/pom.xml +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/pom.xml @@ -44,8 +44,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -96,14 +96,14 @@ ${spring-version} - javax.annotation - javax.annotation-api - 1.3.2 + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} - javax.xml.bind - jaxb-api - 2.2.11 + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind-version} @@ -139,14 +139,14 @@ test - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} provided @@ -165,14 +165,16 @@ 1.8 ${java.version} ${java.version} + 1.3.5 + 2.3.3 9.2.15.v20160210 1.7.21 4.13.1 - 2.5 + 4.0.4 2.8.0 2.9.9 2.8.4 - 1.1.0.Final + 2.0.2 4.3.20.RELEASE 0.2.1 2.9.8 diff --git a/samples/server/petstore/spring-mvc-no-nullable/pom.xml b/samples/server/petstore/spring-mvc-no-nullable/pom.xml index bd986111e16..126e6408ffc 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/pom.xml +++ b/samples/server/petstore/spring-mvc-no-nullable/pom.xml @@ -44,8 +44,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -96,14 +96,14 @@ ${spring-version} - javax.annotation - javax.annotation-api - 1.3.2 + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} - javax.xml.bind - jaxb-api - 2.2.11 + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind-version} @@ -134,14 +134,14 @@ test - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} provided @@ -160,14 +160,16 @@ 1.8 ${java.version} ${java.version} + 1.3.5 + 2.3.3 9.2.15.v20160210 1.7.21 4.13.1 - 2.5 + 4.0.4 2.8.0 2.9.9 2.8.4 - 1.1.0.Final + 2.0.2 4.3.20.RELEASE 2.9.8 diff --git a/samples/server/petstore/spring-mvc-spring-pageable/pom.xml b/samples/server/petstore/spring-mvc-spring-pageable/pom.xml index 2eb530e02b7..c448133c798 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/pom.xml +++ b/samples/server/petstore/spring-mvc-spring-pageable/pom.xml @@ -44,8 +44,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -96,14 +96,14 @@ ${spring-version} - javax.annotation - javax.annotation-api - 1.3.2 + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} - javax.xml.bind - jaxb-api - 2.2.11 + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind-version} @@ -139,14 +139,14 @@ test - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} provided @@ -165,14 +165,16 @@ 1.8 ${java.version} ${java.version} + 1.3.5 + 2.3.3 9.2.15.v20160210 1.7.21 4.13.1 - 2.5 + 4.0.4 2.8.0 2.9.9 2.8.4 - 1.1.0.Final + 2.0.2 4.3.20.RELEASE 0.2.1 2.9.8 diff --git a/samples/server/petstore/spring-mvc/pom.xml b/samples/server/petstore/spring-mvc/pom.xml index 515caf3d99a..c61218492ae 100644 --- a/samples/server/petstore/spring-mvc/pom.xml +++ b/samples/server/petstore/spring-mvc/pom.xml @@ -44,8 +44,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} @@ -96,14 +96,14 @@ ${spring-version} - javax.annotation - javax.annotation-api - 1.3.2 + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} - javax.xml.bind - jaxb-api - 2.2.11 + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind-version} @@ -139,14 +139,14 @@ test - javax.servlet - servlet-api + jakarta.servlet + jakarta.servlet-api ${servlet-api-version} - javax.validation - validation-api + jakarta.validation + jakarta.validation-api ${beanvalidation-version} provided @@ -165,14 +165,16 @@ 1.8 ${java.version} ${java.version} + 1.3.5 + 2.3.3 9.2.15.v20160210 1.7.21 4.13.1 - 2.5 + 4.0.4 2.8.0 2.9.9 2.8.4 - 1.1.0.Final + 2.0.2 4.3.20.RELEASE 0.2.1 2.9.8 diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/pom.xml b/samples/server/petstore/springboot-beanvalidation-no-nullable/pom.xml index 2ddc19a9ad0..2c3a945d191 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/pom.xml +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/pom.xml @@ -53,9 +53,8 @@ ${springfox-version} - javax.xml.bind - jaxb-api - 2.3.1 + jakarta.xml.bind + jakarta.xml.bind-api com.github.joschi.jackson @@ -64,8 +63,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-beanvalidation/pom.xml b/samples/server/petstore/springboot-beanvalidation/pom.xml index 2513ea62aa9..ae8ec70bc1c 100644 --- a/samples/server/petstore/springboot-beanvalidation/pom.xml +++ b/samples/server/petstore/springboot-beanvalidation/pom.xml @@ -53,9 +53,8 @@ ${springfox-version} - javax.xml.bind - jaxb-api - 2.3.1 + jakarta.xml.bind + jakarta.xml.bind-api com.fasterxml.jackson.datatype @@ -68,8 +67,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-delegate-j8/pom.xml b/samples/server/petstore/springboot-delegate-j8/pom.xml index b39fd49019a..14ed219b34c 100644 --- a/samples/server/petstore/springboot-delegate-j8/pom.xml +++ b/samples/server/petstore/springboot-delegate-j8/pom.xml @@ -53,9 +53,8 @@ ${springfox-version} - javax.xml.bind - jaxb-api - 2.3.1 + jakarta.xml.bind + jakarta.xml.bind-api com.fasterxml.jackson.datatype @@ -68,8 +67,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-delegate/pom.xml b/samples/server/petstore/springboot-delegate/pom.xml index dc5d49ec292..f5fe58e2f14 100644 --- a/samples/server/petstore/springboot-delegate/pom.xml +++ b/samples/server/petstore/springboot-delegate/pom.xml @@ -53,9 +53,8 @@ ${springfox-version} - javax.xml.bind - jaxb-api - 2.3.1 + jakarta.xml.bind + jakarta.xml.bind-api com.fasterxml.jackson.datatype @@ -68,8 +67,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-implicitHeaders/pom.xml b/samples/server/petstore/springboot-implicitHeaders/pom.xml index a76942cd3e2..149407e2aad 100644 --- a/samples/server/petstore/springboot-implicitHeaders/pom.xml +++ b/samples/server/petstore/springboot-implicitHeaders/pom.xml @@ -53,9 +53,8 @@ ${springfox-version} - javax.xml.bind - jaxb-api - 2.3.1 + jakarta.xml.bind + jakarta.xml.bind-api com.fasterxml.jackson.datatype @@ -68,8 +67,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-reactive/pom.xml b/samples/server/petstore/springboot-reactive/pom.xml index 4bf88f96666..bc82bfdfef5 100644 --- a/samples/server/petstore/springboot-reactive/pom.xml +++ b/samples/server/petstore/springboot-reactive/pom.xml @@ -76,8 +76,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/pom.xml b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/pom.xml index 4994d159114..d129b82917e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/pom.xml +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/pom.xml @@ -53,9 +53,8 @@ ${springfox-version} - javax.xml.bind - jaxb-api - 2.3.1 + jakarta.xml.bind + jakarta.xml.bind-api com.github.joschi.jackson @@ -69,8 +68,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/pom.xml b/samples/server/petstore/springboot-spring-pageable-delegatePattern/pom.xml index 2b0c56c20ea..5a29021686c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/pom.xml +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/pom.xml @@ -53,9 +53,8 @@ ${springfox-version} - javax.xml.bind - jaxb-api - 2.3.1 + jakarta.xml.bind + jakarta.xml.bind-api com.fasterxml.jackson.datatype @@ -68,8 +67,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/pom.xml b/samples/server/petstore/springboot-spring-pageable-without-j8/pom.xml index 442a2b387d4..62d59d9d1d7 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/pom.xml +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/pom.xml @@ -53,9 +53,8 @@ ${springfox-version} - javax.xml.bind - jaxb-api - 2.3.1 + jakarta.xml.bind + jakarta.xml.bind-api com.github.joschi.jackson @@ -69,8 +68,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-spring-pageable/pom.xml b/samples/server/petstore/springboot-spring-pageable/pom.xml index 8f9635c9d14..38fbd7d57fa 100644 --- a/samples/server/petstore/springboot-spring-pageable/pom.xml +++ b/samples/server/petstore/springboot-spring-pageable/pom.xml @@ -53,9 +53,8 @@ ${springfox-version} - javax.xml.bind - jaxb-api - 2.3.1 + jakarta.xml.bind + jakarta.xml.bind-api com.fasterxml.jackson.datatype @@ -68,8 +67,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-useoptional/pom.xml b/samples/server/petstore/springboot-useoptional/pom.xml index cd0114f1e82..bbfc822dfba 100644 --- a/samples/server/petstore/springboot-useoptional/pom.xml +++ b/samples/server/petstore/springboot-useoptional/pom.xml @@ -53,9 +53,8 @@ ${springfox-version} - javax.xml.bind - jaxb-api - 2.3.1 + jakarta.xml.bind + jakarta.xml.bind-api com.fasterxml.jackson.datatype @@ -68,8 +67,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api com.fasterxml.jackson.core diff --git a/samples/server/petstore/springboot-virtualan/pom.xml b/samples/server/petstore/springboot-virtualan/pom.xml index 8dc39bea12e..920b8d60089 100644 --- a/samples/server/petstore/springboot-virtualan/pom.xml +++ b/samples/server/petstore/springboot-virtualan/pom.xml @@ -53,9 +53,8 @@ ${springfox-version} - javax.xml.bind - jaxb-api - 2.3.1 + jakarta.xml.bind + jakarta.xml.bind-api com.fasterxml.jackson.datatype @@ -68,8 +67,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api diff --git a/samples/server/petstore/springboot/pom.xml b/samples/server/petstore/springboot/pom.xml index 0fedc5a3c63..62aa1140a3e 100644 --- a/samples/server/petstore/springboot/pom.xml +++ b/samples/server/petstore/springboot/pom.xml @@ -53,9 +53,8 @@ ${springfox-version} - javax.xml.bind - jaxb-api - 2.3.1 + jakarta.xml.bind + jakarta.xml.bind-api com.fasterxml.jackson.datatype @@ -68,8 +67,8 @@ - javax.validation - validation-api + jakarta.validation + jakarta.validation-api com.fasterxml.jackson.core From f5e8f54b219b36010f850b5b2067b8dced3fb283 Mon Sep 17 00:00:00 2001 From: Josh Burton Date: Tue, 5 Oct 2021 19:03:48 +1300 Subject: [PATCH 46/50] [dart-dio-next] Adds an option for using the dio_http package (#10497) * [dart-dio] Adds an option for using the dio_http package Relates to #10305 * [dart-dio-next] Generates new dio_http sample * [dart-dio-next] renames dio_http sample, adds pom.xml * [dart-dio-next] Removes executions not required --- ...ext-dio-http-petstore-client-lib-fake.yaml | 11 + docs/generators/dart-dio-next.md | 1 + .../languages/DartDioNextClientCodegen.java | 54 +- .../resources/dart/libraries/dio/api.mustache | 2 +- .../dart/libraries/dio/api_client.mustache | 2 +- .../libraries/dio/auth/api_key_auth.mustache | 2 +- .../dart/libraries/dio/auth/auth.mustache | 2 +- .../libraries/dio/auth/basic_auth.mustache | 2 +- .../libraries/dio/auth/bearer_auth.mustache | 2 +- .../dart/libraries/dio/auth/oauth.mustache | 2 +- .../dart/libraries/dio/pubspec.mustache | 5 + .../built_value/api_util.mustache | 4 +- .../dio/DartDioNextClientCodegenTest.java | 20 + .../dio/DartDioNextClientOptionsTest.java | 1 + .../DartDioNextClientOptionsProvider.java | 1 + pom.xml | 1 + .../.gitignore | 41 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 121 ++ .../.openapi-generator/VERSION | 1 + .../README.md | 200 +++ .../analysis_options.yaml | 9 + .../doc/AdditionalPropertiesClass.md | 16 + .../doc/Animal.md | 16 + .../doc/AnotherFakeApi.md | 57 + .../doc/ApiResponse.md | 17 + .../doc/ArrayOfArrayOfNumberOnly.md | 15 + .../doc/ArrayOfNumberOnly.md | 15 + .../doc/ArrayTest.md | 17 + .../doc/Capitalization.md | 20 + .../doc/Cat.md | 17 + .../doc/CatAllOf.md | 15 + .../doc/Category.md | 16 + .../doc/ClassModel.md | 15 + .../doc/DefaultApi.md | 51 + .../doc/DeprecatedObject.md | 15 + .../doc/Dog.md | 17 + .../doc/DogAllOf.md | 15 + .../doc/EnumArrays.md | 16 + .../doc/EnumTest.md | 22 + .../doc/FakeApi.md | 816 ++++++++++ .../doc/FakeClassnameTags123Api.md | 61 + .../doc/FileSchemaTestClass.md | 16 + .../doc/Foo.md | 15 + .../doc/FormatTest.md | 30 + .../doc/HasOnlyReadOnly.md | 16 + .../doc/HealthCheckResult.md | 15 + .../doc/InlineResponseDefault.md | 15 + .../doc/MapTest.md | 18 + ...dPropertiesAndAdditionalPropertiesClass.md | 17 + .../doc/Model200Response.md | 16 + .../doc/ModelClient.md | 15 + .../doc/ModelEnumClass.md | 14 + .../doc/ModelFile.md | 15 + .../doc/ModelList.md | 15 + .../doc/ModelReturn.md | 15 + .../doc/Name.md | 18 + .../doc/NullableClass.md | 26 + .../doc/NumberOnly.md | 15 + .../doc/ObjectWithDeprecatedFields.md | 18 + .../doc/Order.md | 20 + .../doc/OuterComposite.md | 17 + .../doc/OuterEnum.md | 14 + .../doc/OuterEnumDefaultValue.md | 14 + .../doc/OuterEnumInteger.md | 14 + .../doc/OuterEnumIntegerDefaultValue.md | 14 + .../doc/OuterObjectWithEnumProperty.md | 15 + .../doc/Pet.md | 20 + .../doc/PetApi.md | 427 +++++ .../doc/ReadOnlyFirst.md | 16 + .../doc/SpecialModelName.md | 15 + .../doc/StoreApi.md | 186 +++ .../doc/Tag.md | 16 + .../doc/User.md | 22 + .../doc/UserApi.md | 349 ++++ .../lib/openapi.dart | 65 + .../lib/src/api.dart | 115 ++ .../lib/src/api/another_fake_api.dart | 113 ++ .../lib/src/api/default_api.dart | 92 ++ .../lib/src/api/fake_api.dart | 1417 +++++++++++++++++ .../src/api/fake_classname_tags123_api.dart | 120 ++ .../lib/src/api/pet_api.dart | 755 +++++++++ .../lib/src/api/store_api.dart | 314 ++++ .../lib/src/api/user_api.dart | 532 +++++++ .../lib/src/api_util.dart | 78 + .../lib/src/auth/api_key_auth.dart | 30 + .../lib/src/auth/auth.dart | 18 + .../lib/src/auth/basic_auth.dart | 37 + .../lib/src/auth/bearer_auth.dart | 26 + .../lib/src/auth/oauth.dart | 26 + .../lib/src/date_serializer.dart | 31 + .../model/additional_properties_class.dart | 87 + .../lib/src/model/animal.dart | 85 + .../lib/src/model/api_response.dart | 101 ++ .../model/array_of_array_of_number_only.dart | 72 + .../lib/src/model/array_of_number_only.dart | 72 + .../lib/src/model/array_test.dart | 103 ++ .../lib/src/model/capitalization.dart | 147 ++ .../lib/src/model/cat.dart | 104 ++ .../lib/src/model/cat_all_of.dart | 71 + .../lib/src/model/category.dart | 85 + .../lib/src/model/class_model.dart | 71 + .../lib/src/model/date.dart | 70 + .../lib/src/model/deprecated_object.dart | 71 + .../lib/src/model/dog.dart | 104 ++ .../lib/src/model/dog_all_of.dart | 71 + .../lib/src/model/enum_arrays.dart | 119 ++ .../lib/src/model/enum_test.dart | 252 +++ .../lib/src/model/file_schema_test_class.dart | 88 + .../lib/src/model/foo.dart | 72 + .../lib/src/model/format_test.dart | 292 ++++ .../lib/src/model/has_only_read_only.dart | 86 + .../lib/src/model/health_check_result.dart | 72 + .../src/model/inline_response_default.dart | 72 + .../lib/src/model/map_test.dart | 133 ++ ...rties_and_additional_properties_class.dart | 103 ++ .../lib/src/model/model200_response.dart | 86 + .../lib/src/model/model_client.dart | 71 + .../lib/src/model/model_enum_class.dart | 35 + .../lib/src/model/model_file.dart | 72 + .../lib/src/model/model_list.dart | 71 + .../lib/src/model/model_return.dart | 71 + .../lib/src/model/name.dart | 114 ++ .../lib/src/model/nullable_class.dart | 249 +++ .../lib/src/model/number_only.dart | 71 + .../model/object_with_deprecated_fields.dart | 118 ++ .../lib/src/model/order.dart | 170 ++ .../lib/src/model/outer_composite.dart | 101 ++ .../lib/src/model/outer_enum.dart | 35 + .../src/model/outer_enum_default_value.dart | 35 + .../lib/src/model/outer_enum_integer.dart | 35 + .../outer_enum_integer_default_value.dart | 35 + .../outer_object_with_enum_property.dart | 71 + .../lib/src/model/pet.dart | 167 ++ .../lib/src/model/read_only_first.dart | 86 + .../lib/src/model/special_model_name.dart | 71 + .../lib/src/model/tag.dart | 86 + .../lib/src/model/user.dart | 177 ++ .../lib/src/serializers.dart | 150 ++ .../dio_http_petstore_client_lib_fake/pom.xml | 88 + .../pubspec.yaml | 17 + .../additional_properties_class_test.dart | 21 + .../test/animal_test.dart | 21 + .../test/another_fake_api_test.dart | 20 + .../test/api_response_test.dart | 26 + .../array_of_array_of_number_only_test.dart | 16 + .../test/array_of_number_only_test.dart | 16 + .../test/array_test_test.dart | 26 + .../test/capitalization_test.dart | 42 + .../test/cat_all_of_test.dart | 16 + .../test/cat_test.dart | 26 + .../test/category_test.dart | 21 + .../test/class_model_test.dart | 16 + .../test/default_api_test.dart | 16 + .../test/deprecated_object_test.dart | 16 + .../test/dog_all_of_test.dart | 16 + .../test/dog_test.dart | 26 + .../test/enum_arrays_test.dart | 21 + .../test/enum_test_test.dart | 51 + .../test/fake_api_test.dart | 136 ++ .../test/fake_classname_tags123_api_test.dart | 20 + .../test/file_schema_test_class_test.dart | 21 + .../test/foo_test.dart | 16 + .../test/format_test_test.dart | 93 ++ .../test/has_only_read_only_test.dart | 21 + .../test/health_check_result_test.dart | 16 + .../test/inline_response_default_test.dart | 16 + .../test/map_test_test.dart | 31 + ..._and_additional_properties_class_test.dart | 26 + .../test/model200_response_test.dart | 21 + .../test/model_client_test.dart | 16 + .../test/model_enum_class_test.dart | 9 + .../test/model_file_test.dart | 17 + .../test/model_list_test.dart | 16 + .../test/model_return_test.dart | 16 + .../test/name_test.dart | 31 + .../test/nullable_class_test.dart | 71 + .../test/number_only_test.dart | 16 + .../object_with_deprecated_fields_test.dart | 31 + .../test/order_test.dart | 42 + .../test/outer_composite_test.dart | 26 + .../test/outer_enum_default_value_test.dart | 9 + ...outer_enum_integer_default_value_test.dart | 9 + .../test/outer_enum_integer_test.dart | 9 + .../test/outer_enum_test.dart | 9 + .../outer_object_with_enum_property_test.dart | 16 + .../test/pet_api_test.dart | 80 + .../test/pet_test.dart | 42 + .../test/read_only_first_test.dart | 21 + .../test/special_model_name_test.dart | 16 + .../test/store_api_test.dart | 45 + .../test/tag_test.dart | 21 + .../test/user_api_test.dart | 73 + .../test/user_test.dart | 52 + 194 files changed, 13389 insertions(+), 12 deletions(-) create mode 100644 bin/configs/dart-dio-next-dio-http-petstore-client-lib-fake.yaml create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.gitignore create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator-ignore create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/FILES create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/VERSION create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/README.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/analysis_options.yaml create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/AdditionalPropertiesClass.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Animal.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/AnotherFakeApi.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ApiResponse.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ArrayOfNumberOnly.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ArrayTest.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Capitalization.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Cat.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/CatAllOf.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Category.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ClassModel.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DefaultApi.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DeprecatedObject.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Dog.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DogAllOf.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/EnumArrays.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/EnumTest.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FakeApi.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FakeClassnameTags123Api.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FileSchemaTestClass.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Foo.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FormatTest.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/HasOnlyReadOnly.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/HealthCheckResult.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/InlineResponseDefault.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/MapTest.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Model200Response.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelClient.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelEnumClass.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelFile.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelList.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelReturn.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Name.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/NullableClass.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/NumberOnly.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Order.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterComposite.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnum.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnumDefaultValue.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnumInteger.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnumIntegerDefaultValue.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterObjectWithEnumProperty.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Pet.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/PetApi.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ReadOnlyFirst.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/SpecialModelName.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/StoreApi.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Tag.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/User.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/UserApi.md create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/openapi.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/another_fake_api.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/default_api.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/fake_api.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/fake_classname_tags123_api.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/pet_api.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/store_api.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/user_api.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api_util.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/api_key_auth.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/auth.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/basic_auth.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/bearer_auth.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/oauth.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/date_serializer.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/additional_properties_class.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/animal.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/api_response.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_of_number_only.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/capitalization.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/cat.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/cat_all_of.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/category.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/class_model.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/date.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/deprecated_object.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/dog.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/dog_all_of.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/enum_arrays.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/enum_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/file_schema_test_class.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/foo.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/format_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/has_only_read_only.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/health_check_result.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/inline_response_default.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/map_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model200_response.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_client.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_enum_class.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_file.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_list.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_return.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/name.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/nullable_class.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/number_only.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/order.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_composite.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_default_value.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_integer.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_integer_default_value.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_object_with_enum_property.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/pet.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/read_only_first.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/special_model_name.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/tag.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/user.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/serializers.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/pom.xml create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/pubspec.yaml create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/additional_properties_class_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/animal_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/another_fake_api_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/api_response_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_of_array_of_number_only_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_of_number_only_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_test_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/capitalization_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/cat_all_of_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/cat_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/category_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/class_model_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/default_api_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/deprecated_object_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/dog_all_of_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/dog_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/enum_arrays_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/enum_test_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/fake_api_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/fake_classname_tags123_api_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/file_schema_test_class_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/foo_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/format_test_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/has_only_read_only_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/health_check_result_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/inline_response_default_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/map_test_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/mixed_properties_and_additional_properties_class_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model200_response_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_client_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_enum_class_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_file_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_list_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_return_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/name_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/nullable_class_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/number_only_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/object_with_deprecated_fields_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/order_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_composite_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_default_value_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_integer_default_value_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_integer_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_object_with_enum_property_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/pet_api_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/pet_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/read_only_first_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/special_model_name_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/store_api_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/tag_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/user_api_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/user_test.dart diff --git a/bin/configs/dart-dio-next-dio-http-petstore-client-lib-fake.yaml b/bin/configs/dart-dio-next-dio-http-petstore-client-lib-fake.yaml new file mode 100644 index 00000000000..eb33c1a7f2f --- /dev/null +++ b/bin/configs/dart-dio-next-dio-http-petstore-client-lib-fake.yaml @@ -0,0 +1,11 @@ +generatorName: dart-dio-next +outputDir: samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/dart/libraries/dio +typeMappings: + Client: "ModelClient" + File: "ModelFile" + EnumClass: "ModelEnumClass" +additionalProperties: + hideGenerationTimestamp: "true" + dioLibrary: "dio_http" diff --git a/docs/generators/dart-dio-next.md b/docs/generators/dart-dio-next.md index d644e35b04a..ac9d15dc069 100644 --- a/docs/generators/dart-dio-next.md +++ b/docs/generators/dart-dio-next.md @@ -9,6 +9,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |dateLibrary|Specify Date library|
                  **core**
                  [DEFAULT] Dart core library (DateTime)
                  **timemachine**
                  Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.
                  |core| +|dioLibrary|Specify Dio library|
                  **dio_http**
                  dio_http 5.x
                  **dio**
                  [DEFAULT] dio 4.x
                  |dio| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
                  **false**
                  The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
                  **true**
                  Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
                  |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
                  **true**
                  The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
                  **false**
                  The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
                  |true| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java index 07d11e4e721..5bc677623de 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java @@ -39,6 +39,11 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { private final Logger LOGGER = LoggerFactory.getLogger(DartDioNextClientCodegen.class); + public static final String DIO_LIBRARY = "dioLibrary"; + public static final String DIO_ORIGINAL = "dio"; + public static final String DIO_HTTP = "dio_http"; + public static final String DIO_LIBRARY_DEFAULT = DIO_ORIGINAL; + public static final String DATE_LIBRARY = "dateLibrary"; public static final String DATE_LIBRARY_CORE = "core"; public static final String DATE_LIBRARY_TIME_MACHINE = "timemachine"; @@ -47,11 +52,13 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { public static final String SERIALIZATION_LIBRARY_BUILT_VALUE = "built_value"; public static final String SERIALIZATION_LIBRARY_DEFAULT = SERIALIZATION_LIBRARY_BUILT_VALUE; - private static final String DIO_IMPORT = "package:dio/dio.dart"; private static final String CLIENT_NAME = "clientName"; private String dateLibrary; + private String dioLibrary; + private String dioImport; + private String clientName; public DartDioNextClientCodegen() { @@ -80,6 +87,7 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { serializationLibrary.setDefault(SERIALIZATION_LIBRARY_DEFAULT); cliOptions.add(serializationLibrary); + // Date Library Option final CliOption dateOption = CliOption.newString(DATE_LIBRARY, "Specify Date library"); dateOption.setDefault(DATE_LIBRARY_DEFAULT); @@ -88,6 +96,16 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { dateOptions.put(DATE_LIBRARY_TIME_MACHINE, "Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing."); dateOption.setEnum(dateOptions); cliOptions.add(dateOption); + + // Dio Library Option + final CliOption dioOption = CliOption.newString(DIO_LIBRARY, "Specify Dio library"); + dioOption.setDefault(DIO_LIBRARY_DEFAULT); + + final Map dioOptions = new HashMap<>(); + dioOptions.put(DIO_ORIGINAL, "[DEFAULT] dio 4.x"); + dioOptions.put(DIO_HTTP, "dio_http 5.x"); + dioOption.setEnum(dioOptions); + cliOptions.add(dioOption); } public String getDateLibrary() { @@ -98,6 +116,14 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { this.dateLibrary = library; } + public String getDioLibrary() { + return dioLibrary; + } + + public void setDioLibrary(String library) { + this.dioLibrary = library; + } + public String getClientName() { return clientName; } @@ -137,6 +163,12 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { } setDateLibrary(additionalProperties.get(DATE_LIBRARY).toString()); + if (!additionalProperties.containsKey(DIO_LIBRARY)) { + additionalProperties.put(DIO_LIBRARY, DIO_LIBRARY_DEFAULT); + LOGGER.debug("Dio library not set, using default {}", DIO_LIBRARY_DEFAULT); + } + setDioLibrary(additionalProperties.get(DIO_LIBRARY).toString()); + if (!additionalProperties.containsKey(CLIENT_NAME)) { final String name = org.openapitools.codegen.utils.StringUtils.camelize(pubName); additionalProperties.put(CLIENT_NAME, name); @@ -162,15 +194,31 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { supportingFiles.add(new SupportingFile("auth/oauth.mustache", authFolder, "oauth.dart")); supportingFiles.add(new SupportingFile("auth/auth.mustache", authFolder, "auth.dart")); + configureDioLibrary(); configureSerializationLibrary(srcFolder); configureDateLibrary(srcFolder); } + private void configureDioLibrary() { + switch (dioLibrary) { + case DIO_HTTP: + dioImport = "package:dio_http/dio_http.dart"; + break; + case DIO_ORIGINAL: + default: + dioImport = "package:dio/dio.dart"; + break; + } + } + private void configureSerializationLibrary(String srcFolder) { switch (library) { default: case SERIALIZATION_LIBRARY_BUILT_VALUE: additionalProperties.put("useBuiltValue", "true"); + additionalProperties.put("useDioHttp", dioLibrary.equals(DIO_HTTP)); + additionalProperties.put("dioImport", dioImport); + additionalProperties.put("dioLibrary", dioLibrary); configureSerializationLibraryBuiltValue(srcFolder); break; } @@ -195,7 +243,7 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { imports.put("BuiltMap", "package:built_collection/built_collection.dart"); imports.put("JsonObject", "package:built_value/json_object.dart"); imports.put("Uint8List", "dart:typed_data"); - imports.put("MultipartFile", DIO_IMPORT); + imports.put("MultipartFile", dioImport); } private void configureDateLibrary(String srcFolder) { @@ -367,7 +415,7 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { for (String modelImport : originalImports) { if (imports.containsKey(modelImport)) { String i = imports.get(modelImport); - if (Objects.equals(i, DIO_IMPORT) && !isModel) { + if (Objects.equals(i, dioImport) && !isModel) { // Don't add imports to operations that are already imported continue; } diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache index 01663cfd23c..ce040b2d8a6 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache @@ -2,7 +2,7 @@ import 'dart:async'; {{#useBuiltValue}}import 'package:built_value/serializer.dart';{{/useBuiltValue}} -import 'package:dio/dio.dart'; +import '{{dioImport}}'; {{#operations}} {{#imports}}import '{{.}}'; diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_client.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_client.mustache index 35fabd973d1..97b998b1d67 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_client.mustache @@ -1,5 +1,5 @@ {{>header}} -import 'package:dio/dio.dart';{{#useBuiltValue}} +import '{{dioImport}}';{{#useBuiltValue}} import 'package:built_value/serializer.dart'; import 'package:{{pubName}}/src/serializers.dart';{{/useBuiltValue}} import 'package:{{pubName}}/src/auth/api_key_auth.dart'; diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/api_key_auth.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/api_key_auth.mustache index 2174d159630..71d10a81855 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/api_key_auth.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/api_key_auth.mustache @@ -1,6 +1,6 @@ {{>header}} -import 'package:dio/dio.dart'; +import '{{dioImport}}'; import 'package:{{pubName}}/src/auth/auth.dart'; class ApiKeyAuthInterceptor extends AuthInterceptor { diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/auth.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/auth.mustache index a266e2384c7..7c275784c05 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/auth.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/auth.mustache @@ -1,5 +1,5 @@ {{>header}} -import 'package:dio/dio.dart'; +import '{{dioImport}}'; abstract class AuthInterceptor extends Interceptor { /// Get auth information on given route for the given type. diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/basic_auth.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/basic_auth.mustache index c286274c3a2..3472d1cd228 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/basic_auth.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/basic_auth.mustache @@ -1,7 +1,7 @@ {{>header}} import 'dart:convert'; -import 'package:dio/dio.dart'; +import '{{dioImport}}'; import 'package:{{pubName}}/src/auth/auth.dart'; class BasicAuthInfo { diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/bearer_auth.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/bearer_auth.mustache index 626c7d238d0..7aa011d9169 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/bearer_auth.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/bearer_auth.mustache @@ -1,5 +1,5 @@ {{>header}} -import 'package:dio/dio.dart'; +import '{{dioImport}}'; import 'package:{{pubName}}/src/auth/auth.dart'; class BearerAuthInterceptor extends AuthInterceptor { diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/oauth.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/oauth.mustache index 4f7b79655af..fccc6610f4e 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/oauth.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/oauth.mustache @@ -1,5 +1,5 @@ {{>header}} -import 'package:dio/dio.dart'; +import '{{dioImport}}'; import 'package:{{pubName}}/src/auth/auth.dart'; class OAuthInterceptor extends AuthInterceptor { diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/pubspec.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/pubspec.mustache index 6bf879a4897..d480e663acc 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/pubspec.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/pubspec.mustache @@ -7,7 +7,12 @@ environment: sdk: '>=2.12.0 <3.0.0' dependencies: +{{#useDioHttp}} + dio_http: '>=5.0.0 <6.0.0' +{{/useDioHttp}} +{{^useDioHttp}} dio: '>=4.0.0 <5.0.0' +{{/useDioHttp}} {{#useBuiltValue}} built_value: '>=8.1.0 <9.0.0' built_collection: '>=5.1.0 <6.0.0' diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache index fb5ab08aeda..4cdede63a0e 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache @@ -4,8 +4,8 @@ import 'dart:typed_data'; import 'package:built_collection/built_collection.dart'; import 'package:built_value/serializer.dart'; -import 'package:dio/dio.dart'; -import 'package:dio/src/parameter.dart'; +import '{{dioImport}}'; +import 'package:{{dioLibrary}}/src/parameter.dart'; /// Format the given form parameter object into something that Dio can handle. /// Returns primitive or String. diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextClientCodegenTest.java index 805d9dd03e3..898e32810b3 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextClientCodegenTest.java @@ -83,4 +83,24 @@ public class DartDioNextClientCodegenTest { } } + + @Test + public void testInitialDioLibraryValues() throws Exception { + final DartDioNextClientCodegen codegen = new DartDioNextClientCodegen(); + codegen.processOpts(); + + Assert.assertEquals(codegen.additionalProperties().get(DartDioNextClientCodegen.DIO_LIBRARY), DartDioNextClientCodegen.DIO_LIBRARY_DEFAULT); + Assert.assertEquals(codegen.getDioLibrary(), DartDioNextClientCodegen.DIO_LIBRARY_DEFAULT); + } + + @Test + public void testAdditionalPropertiesPutForDioLibraryValues() throws Exception { + final DartDioNextClientCodegen codegen = new DartDioNextClientCodegen(); + codegen.additionalProperties().put(DartDioNextClientCodegen.DIO_LIBRARY, DartDioNextClientCodegen.DIO_HTTP); + codegen.processOpts(); + + Assert.assertEquals(codegen.additionalProperties().get(DartDioNextClientCodegen.DIO_LIBRARY), DartDioNextClientCodegen.DIO_HTTP); + Assert.assertEquals(codegen.getDioLibrary(), DartDioNextClientCodegen.DIO_HTTP); + } + } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextClientOptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextClientOptionsTest.java index f2237e4fbaa..210c8290cd6 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextClientOptionsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextClientOptionsTest.java @@ -50,6 +50,7 @@ public class DartDioNextClientOptionsTest extends AbstractOptionsTest { verify(clientCodegen).setSourceFolder(DartDioNextClientOptionsProvider.SOURCE_FOLDER_VALUE); verify(clientCodegen).setUseEnumExtension(Boolean.parseBoolean(DartDioNextClientOptionsProvider.USE_ENUM_EXTENSION)); verify(clientCodegen).setDateLibrary(DartDioNextClientCodegen.DATE_LIBRARY_DEFAULT); + verify(clientCodegen).setDioLibrary(DartDioNextClientCodegen.DIO_LIBRARY_DEFAULT); verify(clientCodegen).setLibrary(DartDioNextClientCodegen.SERIALIZATION_LIBRARY_DEFAULT); } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioNextClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioNextClientOptionsProvider.java index b03f2a97214..2b4840d7d42 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioNextClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioNextClientOptionsProvider.java @@ -58,6 +58,7 @@ public class DartDioNextClientOptionsProvider implements OptionsProvider { .put(DartDioNextClientCodegen.PUB_HOMEPAGE, PUB_HOMEPAGE_VALUE) .put(CodegenConstants.SERIALIZATION_LIBRARY, DartDioNextClientCodegen.SERIALIZATION_LIBRARY_DEFAULT) .put(DartDioNextClientCodegen.DATE_LIBRARY, DartDioNextClientCodegen.DATE_LIBRARY_DEFAULT) + .put(DartDioNextClientCodegen.DIO_LIBRARY, DartDioNextClientCodegen.DIO_LIBRARY_DEFAULT) .put(CodegenConstants.SOURCE_FOLDER, SOURCE_FOLDER_VALUE) .put(DartDioNextClientCodegen.USE_ENUM_EXTENSION, USE_ENUM_EXTENSION) .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) diff --git a/pom.xml b/pom.xml index 820d2f0d605..402fd42cd18 100644 --- a/pom.xml +++ b/pom.xml @@ -1466,6 +1466,7 @@ samples/openapi3/client/petstore/dart2/petstore samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake + samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.gitignore b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.gitignore new file mode 100644 index 00000000000..4298cdcbd1a --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.gitignore @@ -0,0 +1,41 @@ +# See https://dart.dev/guides/libraries/private-files + +# Files and directories created by pub +.dart_tool/ +.buildlog +.packages +.project +.pub/ +build/ +**/packages/ + +# Files created by dart2js +# (Most Dart developers will use pub build to compile Dart, use/modify these +# rules if you intend to use dart2js directly +# Convention is to use extension '.dart.js' for Dart compiled to Javascript to +# differentiate from explicit Javascript files) +*.dart.js +*.part.js +*.js.deps +*.js.map +*.info.json + +# Directory created by dartdoc +doc/api/ + +# Don't commit pubspec lock file +# (Library packages only! Remove pattern if developing an application package) +pubspec.lock + +# Don’t commit files and directories created by other development environments. +# For example, if your development environment creates any of the following files, +# consider putting them in a global ignore file: + +# IntelliJ +*.iml +*.ipr +*.iws +.idea/ + +# Mac +.DS_Store diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator-ignore b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator-ignore new file mode 100644 index 00000000000..7484ee590a3 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/FILES b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/FILES new file mode 100644 index 00000000000..ae28fd24bea --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/FILES @@ -0,0 +1,121 @@ +.gitignore +README.md +analysis_options.yaml +doc/AdditionalPropertiesClass.md +doc/Animal.md +doc/AnotherFakeApi.md +doc/ApiResponse.md +doc/ArrayOfArrayOfNumberOnly.md +doc/ArrayOfNumberOnly.md +doc/ArrayTest.md +doc/Capitalization.md +doc/Cat.md +doc/CatAllOf.md +doc/Category.md +doc/ClassModel.md +doc/DefaultApi.md +doc/DeprecatedObject.md +doc/Dog.md +doc/DogAllOf.md +doc/EnumArrays.md +doc/EnumTest.md +doc/FakeApi.md +doc/FakeClassnameTags123Api.md +doc/FileSchemaTestClass.md +doc/Foo.md +doc/FormatTest.md +doc/HasOnlyReadOnly.md +doc/HealthCheckResult.md +doc/InlineResponseDefault.md +doc/MapTest.md +doc/MixedPropertiesAndAdditionalPropertiesClass.md +doc/Model200Response.md +doc/ModelClient.md +doc/ModelEnumClass.md +doc/ModelFile.md +doc/ModelList.md +doc/ModelReturn.md +doc/Name.md +doc/NullableClass.md +doc/NumberOnly.md +doc/ObjectWithDeprecatedFields.md +doc/Order.md +doc/OuterComposite.md +doc/OuterEnum.md +doc/OuterEnumDefaultValue.md +doc/OuterEnumInteger.md +doc/OuterEnumIntegerDefaultValue.md +doc/OuterObjectWithEnumProperty.md +doc/Pet.md +doc/PetApi.md +doc/ReadOnlyFirst.md +doc/SpecialModelName.md +doc/StoreApi.md +doc/Tag.md +doc/User.md +doc/UserApi.md +lib/openapi.dart +lib/src/api.dart +lib/src/api/another_fake_api.dart +lib/src/api/default_api.dart +lib/src/api/fake_api.dart +lib/src/api/fake_classname_tags123_api.dart +lib/src/api/pet_api.dart +lib/src/api/store_api.dart +lib/src/api/user_api.dart +lib/src/api_util.dart +lib/src/auth/api_key_auth.dart +lib/src/auth/auth.dart +lib/src/auth/basic_auth.dart +lib/src/auth/bearer_auth.dart +lib/src/auth/oauth.dart +lib/src/date_serializer.dart +lib/src/model/additional_properties_class.dart +lib/src/model/animal.dart +lib/src/model/api_response.dart +lib/src/model/array_of_array_of_number_only.dart +lib/src/model/array_of_number_only.dart +lib/src/model/array_test.dart +lib/src/model/capitalization.dart +lib/src/model/cat.dart +lib/src/model/cat_all_of.dart +lib/src/model/category.dart +lib/src/model/class_model.dart +lib/src/model/date.dart +lib/src/model/deprecated_object.dart +lib/src/model/dog.dart +lib/src/model/dog_all_of.dart +lib/src/model/enum_arrays.dart +lib/src/model/enum_test.dart +lib/src/model/file_schema_test_class.dart +lib/src/model/foo.dart +lib/src/model/format_test.dart +lib/src/model/has_only_read_only.dart +lib/src/model/health_check_result.dart +lib/src/model/inline_response_default.dart +lib/src/model/map_test.dart +lib/src/model/mixed_properties_and_additional_properties_class.dart +lib/src/model/model200_response.dart +lib/src/model/model_client.dart +lib/src/model/model_enum_class.dart +lib/src/model/model_file.dart +lib/src/model/model_list.dart +lib/src/model/model_return.dart +lib/src/model/name.dart +lib/src/model/nullable_class.dart +lib/src/model/number_only.dart +lib/src/model/object_with_deprecated_fields.dart +lib/src/model/order.dart +lib/src/model/outer_composite.dart +lib/src/model/outer_enum.dart +lib/src/model/outer_enum_default_value.dart +lib/src/model/outer_enum_integer.dart +lib/src/model/outer_enum_integer_default_value.dart +lib/src/model/outer_object_with_enum_property.dart +lib/src/model/pet.dart +lib/src/model/read_only_first.dart +lib/src/model/special_model_name.dart +lib/src/model/tag.dart +lib/src/model/user.dart +lib/src/serializers.dart +pubspec.yaml diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/VERSION new file mode 100644 index 00000000000..4b448de535c --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/README.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/README.md new file mode 100644 index 00000000000..52553e236b0 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/README.md @@ -0,0 +1,200 @@ +# openapi (EXPERIMENTAL) +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 1.0.0 +- Build package: org.openapitools.codegen.languages.DartDioNextClientCodegen + +## Requirements + +* Dart 2.12.0 or later OR Flutter 1.26.0 or later +* Dio 4.0.0+ + +## Installation & Usage + +### pub.dev +To use the package from [pub.dev](https://pub.dev), please include the following in pubspec.yaml +```yaml +dependencies: + openapi: 1.0.0 +``` + +### Github +If this Dart package is published to Github, please include the following in pubspec.yaml +```yaml +dependencies: + openapi: + git: + url: https://github.com/GIT_USER_ID/GIT_REPO_ID.git + #ref: main +``` + +### Local development +To use the package from your local drive, please include the following in pubspec.yaml +```yaml +dependencies: + openapi: + path: /path/to/openapi +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```dart +import 'package:openapi/openapi.dart'; + + +final api = Openapi().getAnotherFakeApi(); +final ModelClient modelClient = ; // ModelClient | client model + +try { + final response = await api.call123testSpecialTags(modelClient); + print(response); +} catch on DioError (e) { + print("Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n"); +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +[*AnotherFakeApi*](doc/AnotherFakeApi.md) | [**call123testSpecialTags**](doc/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags +[*DefaultApi*](doc/DefaultApi.md) | [**fooGet**](doc/DefaultApi.md#fooget) | **GET** /foo | +[*FakeApi*](doc/FakeApi.md) | [**fakeHealthGet**](doc/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint +[*FakeApi*](doc/FakeApi.md) | [**fakeHttpSignatureTest**](doc/FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication +[*FakeApi*](doc/FakeApi.md) | [**fakeOuterBooleanSerialize**](doc/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +[*FakeApi*](doc/FakeApi.md) | [**fakeOuterCompositeSerialize**](doc/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +[*FakeApi*](doc/FakeApi.md) | [**fakeOuterNumberSerialize**](doc/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | +[*FakeApi*](doc/FakeApi.md) | [**fakeOuterStringSerialize**](doc/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | +[*FakeApi*](doc/FakeApi.md) | [**fakePropertyEnumIntegerSerialize**](doc/FakeApi.md#fakepropertyenumintegerserialize) | **POST** /fake/property/enum-int | +[*FakeApi*](doc/FakeApi.md) | [**testBodyWithBinary**](doc/FakeApi.md#testbodywithbinary) | **PUT** /fake/body-with-binary | +[*FakeApi*](doc/FakeApi.md) | [**testBodyWithFileSchema**](doc/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +[*FakeApi*](doc/FakeApi.md) | [**testBodyWithQueryParams**](doc/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +[*FakeApi*](doc/FakeApi.md) | [**testClientModel**](doc/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +[*FakeApi*](doc/FakeApi.md) | [**testEndpointParameters**](doc/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[*FakeApi*](doc/FakeApi.md) | [**testEnumParameters**](doc/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters +[*FakeApi*](doc/FakeApi.md) | [**testGroupParameters**](doc/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[*FakeApi*](doc/FakeApi.md) | [**testInlineAdditionalProperties**](doc/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[*FakeApi*](doc/FakeApi.md) | [**testJsonFormData**](doc/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +[*FakeApi*](doc/FakeApi.md) | [**testQueryParameterCollectionFormat**](doc/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | +[*FakeClassnameTags123Api*](doc/FakeClassnameTags123Api.md) | [**testClassname**](doc/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case +[*PetApi*](doc/PetApi.md) | [**addPet**](doc/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store +[*PetApi*](doc/PetApi.md) | [**deletePet**](doc/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[*PetApi*](doc/PetApi.md) | [**findPetsByStatus**](doc/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +[*PetApi*](doc/PetApi.md) | [**findPetsByTags**](doc/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +[*PetApi*](doc/PetApi.md) | [**getPetById**](doc/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +[*PetApi*](doc/PetApi.md) | [**updatePet**](doc/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet +[*PetApi*](doc/PetApi.md) | [**updatePetWithForm**](doc/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +[*PetApi*](doc/PetApi.md) | [**uploadFile**](doc/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[*PetApi*](doc/PetApi.md) | [**uploadFileWithRequiredFile**](doc/PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +[*StoreApi*](doc/StoreApi.md) | [**deleteOrder**](doc/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[*StoreApi*](doc/StoreApi.md) | [**getInventory**](doc/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +[*StoreApi*](doc/StoreApi.md) | [**getOrderById**](doc/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +[*StoreApi*](doc/StoreApi.md) | [**placeOrder**](doc/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet +[*UserApi*](doc/UserApi.md) | [**createUser**](doc/UserApi.md#createuser) | **POST** /user | Create user +[*UserApi*](doc/UserApi.md) | [**createUsersWithArrayInput**](doc/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +[*UserApi*](doc/UserApi.md) | [**createUsersWithListInput**](doc/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +[*UserApi*](doc/UserApi.md) | [**deleteUser**](doc/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user +[*UserApi*](doc/UserApi.md) | [**getUserByName**](doc/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name +[*UserApi*](doc/UserApi.md) | [**loginUser**](doc/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system +[*UserApi*](doc/UserApi.md) | [**logoutUser**](doc/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +[*UserApi*](doc/UserApi.md) | [**updateUser**](doc/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user + + +## Documentation For Models + + - [AdditionalPropertiesClass](doc/AdditionalPropertiesClass.md) + - [Animal](doc/Animal.md) + - [ApiResponse](doc/ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](doc/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](doc/ArrayOfNumberOnly.md) + - [ArrayTest](doc/ArrayTest.md) + - [Capitalization](doc/Capitalization.md) + - [Cat](doc/Cat.md) + - [CatAllOf](doc/CatAllOf.md) + - [Category](doc/Category.md) + - [ClassModel](doc/ClassModel.md) + - [DeprecatedObject](doc/DeprecatedObject.md) + - [Dog](doc/Dog.md) + - [DogAllOf](doc/DogAllOf.md) + - [EnumArrays](doc/EnumArrays.md) + - [EnumTest](doc/EnumTest.md) + - [FileSchemaTestClass](doc/FileSchemaTestClass.md) + - [Foo](doc/Foo.md) + - [FormatTest](doc/FormatTest.md) + - [HasOnlyReadOnly](doc/HasOnlyReadOnly.md) + - [HealthCheckResult](doc/HealthCheckResult.md) + - [InlineResponseDefault](doc/InlineResponseDefault.md) + - [MapTest](doc/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](doc/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](doc/Model200Response.md) + - [ModelClient](doc/ModelClient.md) + - [ModelEnumClass](doc/ModelEnumClass.md) + - [ModelFile](doc/ModelFile.md) + - [ModelList](doc/ModelList.md) + - [ModelReturn](doc/ModelReturn.md) + - [Name](doc/Name.md) + - [NullableClass](doc/NullableClass.md) + - [NumberOnly](doc/NumberOnly.md) + - [ObjectWithDeprecatedFields](doc/ObjectWithDeprecatedFields.md) + - [Order](doc/Order.md) + - [OuterComposite](doc/OuterComposite.md) + - [OuterEnum](doc/OuterEnum.md) + - [OuterEnumDefaultValue](doc/OuterEnumDefaultValue.md) + - [OuterEnumInteger](doc/OuterEnumInteger.md) + - [OuterEnumIntegerDefaultValue](doc/OuterEnumIntegerDefaultValue.md) + - [OuterObjectWithEnumProperty](doc/OuterObjectWithEnumProperty.md) + - [Pet](doc/Pet.md) + - [ReadOnlyFirst](doc/ReadOnlyFirst.md) + - [SpecialModelName](doc/SpecialModelName.md) + - [Tag](doc/Tag.md) + - [User](doc/User.md) + + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +## api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +## bearer_test + +- **Type**: HTTP basic authentication + +## http_basic_test + +- **Type**: HTTP basic authentication + +## http_signature_test + +- **Type**: HTTP basic authentication + +## petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + + +## Author + + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/analysis_options.yaml b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/analysis_options.yaml new file mode 100644 index 00000000000..a611887d3ac --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/analysis_options.yaml @@ -0,0 +1,9 @@ +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-next/dio_http_petstore_client_lib_fake/doc/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/AdditionalPropertiesClass.md new file mode 100644 index 00000000000..f9f7857894d --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/AdditionalPropertiesClass.md @@ -0,0 +1,16 @@ +# openapi.model.AdditionalPropertiesClass + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapProperty** | **BuiltMap<String, String>** | | [optional] +**mapOfMapProperty** | [**BuiltMap<String, BuiltMap<String, String>>**](BuiltMap.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/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Animal.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Animal.md new file mode 100644 index 00000000000..415b56e9bc2 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Animal.md @@ -0,0 +1,16 @@ +# openapi.model.Animal + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] [default to 'red'] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/AnotherFakeApi.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/AnotherFakeApi.md new file mode 100644 index 00000000000..df89b0eb12a --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/AnotherFakeApi.md @@ -0,0 +1,57 @@ +# openapi.api.AnotherFakeApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**call123testSpecialTags**](AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags + + +# **call123testSpecialTags** +> ModelClient call123testSpecialTags(modelClient) + +To test special tags + +To test special tags and operation ID starting with number + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getAnotherFakeApi(); +final ModelClient modelClient = ; // ModelClient | client model + +try { + final response = api.call123testSpecialTags(modelClient); + print(response); +} catch on DioError (e) { + print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **modelClient** | [**ModelClient**](ModelClient.md)| client model | + +### Return type + +[**ModelClient**](ModelClient.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ApiResponse.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ApiResponse.md new file mode 100644 index 00000000000..7ad5da0f89e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ApiResponse.md @@ -0,0 +1,17 @@ +# openapi.model.ApiResponse + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | [optional] +**type** | **String** | | [optional] +**message** | **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/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 00000000000..d1a272ab602 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,15 @@ +# openapi.model.ArrayOfArrayOfNumberOnly + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayArrayNumber** | [**BuiltList<BuiltList<num>>**](BuiltList.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/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ArrayOfNumberOnly.md new file mode 100644 index 00000000000..94b60f272fd --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ArrayOfNumberOnly.md @@ -0,0 +1,15 @@ +# openapi.model.ArrayOfNumberOnly + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayNumber** | **BuiltList<num>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ArrayTest.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ArrayTest.md new file mode 100644 index 00000000000..0813d4fa93c --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ArrayTest.md @@ -0,0 +1,17 @@ +# openapi.model.ArrayTest + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayOfString** | **BuiltList<String>** | | [optional] +**arrayArrayOfInteger** | [**BuiltList<BuiltList<int>>**](BuiltList.md) | | [optional] +**arrayArrayOfModel** | [**BuiltList<BuiltList<ReadOnlyFirst>>**](BuiltList.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/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Capitalization.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Capitalization.md new file mode 100644 index 00000000000..4a07b4eb820 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Capitalization.md @@ -0,0 +1,20 @@ +# openapi.model.Capitalization + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] +**smallSnake** | **String** | | [optional] +**capitalSnake** | **String** | | [optional] +**sCAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Cat.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Cat.md new file mode 100644 index 00000000000..6552eea4b43 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Cat.md @@ -0,0 +1,17 @@ +# openapi.model.Cat + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] [default to 'red'] +**declawed** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/CatAllOf.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/CatAllOf.md new file mode 100644 index 00000000000..36b2ae0e8ab --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/CatAllOf.md @@ -0,0 +1,15 @@ +# openapi.model.CatAllOf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Category.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Category.md new file mode 100644 index 00000000000..ae6bc52e89d --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Category.md @@ -0,0 +1,16 @@ +# openapi.model.Category + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **String** | | [default to 'default-name'] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ClassModel.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ClassModel.md new file mode 100644 index 00000000000..13ae5d3a470 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ClassModel.md @@ -0,0 +1,15 @@ +# openapi.model.ClassModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**class_** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DefaultApi.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DefaultApi.md new file mode 100644 index 00000000000..f1753b62ee8 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DefaultApi.md @@ -0,0 +1,51 @@ +# openapi.api.DefaultApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fooGet**](DefaultApi.md#fooget) | **GET** /foo | + + +# **fooGet** +> InlineResponseDefault fooGet() + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getDefaultApi(); + +try { + final response = api.fooGet(); + print(response); +} catch on DioError (e) { + print('Exception when calling DefaultApi->fooGet: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**InlineResponseDefault**](InlineResponseDefault.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DeprecatedObject.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DeprecatedObject.md new file mode 100644 index 00000000000..bf2ef67a26f --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DeprecatedObject.md @@ -0,0 +1,15 @@ +# openapi.model.DeprecatedObject + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **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/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Dog.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Dog.md new file mode 100644 index 00000000000..d36439b767b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Dog.md @@ -0,0 +1,17 @@ +# openapi.model.Dog + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] [default to 'red'] +**breed** | **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/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DogAllOf.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DogAllOf.md new file mode 100644 index 00000000000..97a7c8fba49 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/DogAllOf.md @@ -0,0 +1,15 @@ +# openapi.model.DogAllOf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **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/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/EnumArrays.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/EnumArrays.md new file mode 100644 index 00000000000..06170bb8f51 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/EnumArrays.md @@ -0,0 +1,16 @@ +# openapi.model.EnumArrays + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justSymbol** | **String** | | [optional] +**arrayEnum** | **BuiltList<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/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/EnumTest.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/EnumTest.md new file mode 100644 index 00000000000..7c24fe2347b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/EnumTest.md @@ -0,0 +1,22 @@ +# openapi.model.EnumTest + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumString** | **String** | | [optional] +**enumStringRequired** | **String** | | +**enumInteger** | **int** | | [optional] +**enumNumber** | **double** | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] +**outerEnumInteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] +**outerEnumDefaultValue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] +**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.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/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FakeApi.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FakeApi.md new file mode 100644 index 00000000000..740e5ee6683 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FakeApi.md @@ -0,0 +1,816 @@ +# openapi.api.FakeApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fakeHealthGet**](FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint +[**fakeHttpSignatureTest**](FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication +[**fakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +[**fakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +[**fakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | +[**fakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | +[**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakepropertyenumintegerserialize) | **POST** /fake/property/enum-int | +[**testBodyWithBinary**](FakeApi.md#testbodywithbinary) | **PUT** /fake/body-with-binary | +[**testBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +[**testBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +[**testClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +[**testEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters +[**testGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**testInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**testJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +[**testQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | + + +# **fakeHealthGet** +> HealthCheckResult fakeHealthGet() + +Health check endpoint + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); + +try { + final response = api.fakeHealthGet(); + print(response); +} catch on DioError (e) { + print('Exception when calling FakeApi->fakeHealthGet: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HealthCheckResult**](HealthCheckResult.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeHttpSignatureTest** +> fakeHttpSignatureTest(pet, query1, header1) + +test http signature authentication + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: http_signature_test +//defaultApiClient.getAuthentication('http_signature_test').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('http_signature_test').password = 'YOUR_PASSWORD'; + +final api = Openapi().getFakeApi(); +final Pet pet = ; // Pet | Pet object that needs to be added to the store +final String query1 = query1_example; // String | query parameter +final String header1 = header1_example; // String | header parameter + +try { + api.fakeHttpSignatureTest(pet, query1, header1); +} catch on DioError (e) { + print('Exception when calling FakeApi->fakeHttpSignatureTest: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **query1** | **String**| query parameter | [optional] + **header1** | **String**| header parameter | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[http_signature_test](../README.md#http_signature_test) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterBooleanSerialize** +> bool fakeOuterBooleanSerialize(body) + + + +Test serialization of outer boolean types + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final bool body = true; // bool | Input boolean as post body + +try { + final response = api.fakeOuterBooleanSerialize(body); + print(response); +} catch on DioError (e) { + print('Exception when calling FakeApi->fakeOuterBooleanSerialize: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **bool**| Input boolean as post body | [optional] + +### Return type + +**bool** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterCompositeSerialize** +> OuterComposite fakeOuterCompositeSerialize(outerComposite) + + + +Test serialization of object with outer number type + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final OuterComposite outerComposite = ; // OuterComposite | Input composite as post body + +try { + final response = api.fakeOuterCompositeSerialize(outerComposite); + print(response); +} catch on DioError (e) { + print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterNumberSerialize** +> num fakeOuterNumberSerialize(body) + + + +Test serialization of outer number types + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final num body = 8.14; // num | Input number as post body + +try { + final response = api.fakeOuterNumberSerialize(body); + print(response); +} catch on DioError (e) { + print('Exception when calling FakeApi->fakeOuterNumberSerialize: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **num**| Input number as post body | [optional] + +### Return type + +**num** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterStringSerialize** +> String fakeOuterStringSerialize(body) + + + +Test serialization of outer string types + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final String body = body_example; // String | Input string as post body + +try { + final response = api.fakeOuterStringSerialize(body); + print(response); +} catch on DioError (e) { + print('Exception when calling FakeApi->fakeOuterStringSerialize: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **String**| Input string as post body | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakePropertyEnumIntegerSerialize** +> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty) + + + +Test serialization of enum (int) properties with examples + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final OuterObjectWithEnumProperty outerObjectWithEnumProperty = ; // OuterObjectWithEnumProperty | Input enum (int) as post body + +try { + final response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); + print(response); +} catch on DioError (e) { + print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | + +### Return type + +[**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithBinary** +> testBodyWithBinary(body) + + + +For this test, the body has to be a binary file. + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final MultipartFile body = BINARY_DATA_HERE; // MultipartFile | image to upload + +try { + api.testBodyWithBinary(body); +} catch on DioError (e) { + print('Exception when calling FakeApi->testBodyWithBinary: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **MultipartFile**| image to upload | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: image/png + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithFileSchema** +> testBodyWithFileSchema(fileSchemaTestClass) + + + +For this test, the body for this request must reference a schema named `File`. + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final FileSchemaTestClass fileSchemaTestClass = ; // FileSchemaTestClass | + +try { + api.testBodyWithFileSchema(fileSchemaTestClass); +} catch on DioError (e) { + print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithQueryParams** +> testBodyWithQueryParams(query, user) + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final String query = query_example; // String | +final User user = ; // User | + +try { + api.testBodyWithQueryParams(query, user); +} catch on DioError (e) { + print('Exception when calling FakeApi->testBodyWithQueryParams: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **String**| | + **user** | [**User**](User.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testClientModel** +> ModelClient testClientModel(modelClient) + +To test \"client\" model + +To test \"client\" model + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final ModelClient modelClient = ; // ModelClient | client model + +try { + final response = api.testClientModel(modelClient); + print(response); +} catch on DioError (e) { + print('Exception when calling FakeApi->testClientModel: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **modelClient** | [**ModelClient**](ModelClient.md)| client model | + +### Return type + +[**ModelClient**](ModelClient.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEndpointParameters** +> testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback) + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: http_basic_test +//defaultApiClient.getAuthentication('http_basic_test').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('http_basic_test').password = 'YOUR_PASSWORD'; + +final api = Openapi().getFakeApi(); +final num number = 8.14; // num | None +final double double_ = 1.2; // double | None +final String patternWithoutDelimiter = patternWithoutDelimiter_example; // String | None +final String byte = BYTE_ARRAY_DATA_HERE; // String | None +final int integer = 56; // int | None +final int int32 = 56; // int | None +final int int64 = 789; // int | None +final double float = 3.4; // double | None +final String string = string_example; // String | None +final Uint8List binary = BINARY_DATA_HERE; // Uint8List | None +final Date date = 2013-10-20; // Date | None +final DateTime dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None +final String password = password_example; // String | None +final String callback = callback_example; // String | None + +try { + api.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback); +} catch on DioError (e) { + print('Exception when calling FakeApi->testEndpointParameters: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **num**| None | + **double_** | **double**| None | + **patternWithoutDelimiter** | **String**| None | + **byte** | **String**| None | + **integer** | **int**| None | [optional] + **int32** | **int**| None | [optional] + **int64** | **int**| None | [optional] + **float** | **double**| None | [optional] + **string** | **String**| None | [optional] + **binary** | **Uint8List**| None | [optional] + **date** | **Date**| None | [optional] + **dateTime** | **DateTime**| None | [optional] + **password** | **String**| None | [optional] + **callback** | **String**| None | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEnumParameters** +> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) + +To test enum parameters + +To test enum parameters + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final BuiltList enumHeaderStringArray = ; // BuiltList | Header parameter enum test (string array) +final String enumHeaderString = enumHeaderString_example; // String | Header parameter enum test (string) +final BuiltList enumQueryStringArray = ; // BuiltList | Query parameter enum test (string array) +final String enumQueryString = enumQueryString_example; // String | Query parameter enum test (string) +final int enumQueryInteger = 56; // int | Query parameter enum test (double) +final double enumQueryDouble = 1.2; // double | Query parameter enum test (double) +final BuiltList enumFormStringArray = ; // BuiltList | Form parameter enum test (string array) +final String enumFormString = enumFormString_example; // String | Form parameter enum test (string) + +try { + api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); +} catch on DioError (e) { + print('Exception when calling FakeApi->testEnumParameters: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumHeaderStringArray** | [**BuiltList<String>**](String.md)| Header parameter enum test (string array) | [optional] + **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to '-efg'] + **enumQueryStringArray** | [**BuiltList<String>**](String.md)| Query parameter enum test (string array) | [optional] + **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to '-efg'] + **enumQueryInteger** | **int**| Query parameter enum test (double) | [optional] + **enumQueryDouble** | **double**| Query parameter enum test (double) | [optional] + **enumFormStringArray** | [**BuiltList<String>**](String.md)| Form parameter enum test (string array) | [optional] [default to '$'] + **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to '-efg'] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testGroupParameters** +> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group) + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: bearer_test +//defaultApiClient.getAuthentication('bearer_test').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('bearer_test').password = 'YOUR_PASSWORD'; + +final api = Openapi().getFakeApi(); +final int requiredStringGroup = 56; // int | Required String in group parameters +final bool requiredBooleanGroup = true; // bool | Required Boolean in group parameters +final int requiredInt64Group = 789; // int | Required Integer in group parameters +final int stringGroup = 56; // int | String in group parameters +final bool booleanGroup = true; // bool | Boolean in group parameters +final int int64Group = 789; // int | Integer in group parameters + +try { + api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); +} catch on DioError (e) { + print('Exception when calling FakeApi->testGroupParameters: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requiredStringGroup** | **int**| Required String in group parameters | + **requiredBooleanGroup** | **bool**| Required Boolean in group parameters | + **requiredInt64Group** | **int**| Required Integer in group parameters | + **stringGroup** | **int**| String in group parameters | [optional] + **booleanGroup** | **bool**| Boolean in group parameters | [optional] + **int64Group** | **int**| Integer in group parameters | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[bearer_test](../README.md#bearer_test) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testInlineAdditionalProperties** +> testInlineAdditionalProperties(requestBody) + +test inline additionalProperties + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final BuiltMap requestBody = ; // BuiltMap | request body + +try { + api.testInlineAdditionalProperties(requestBody); +} catch on DioError (e) { + print('Exception when calling FakeApi->testInlineAdditionalProperties: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requestBody** | [**BuiltMap<String, String>**](String.md)| request body | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testJsonFormData** +> testJsonFormData(param, param2) + +test json serialization of form data + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final String param = param_example; // String | field1 +final String param2 = param2_example; // String | field2 + +try { + api.testJsonFormData(param, param2); +} catch on DioError (e) { + print('Exception when calling FakeApi->testJsonFormData: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **String**| field1 | + **param2** | **String**| field2 | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testQueryParameterCollectionFormat** +> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) + + + +To test the collection format in query parameters + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final BuiltList pipe = ; // BuiltList | +final BuiltList ioutil = ; // BuiltList | +final BuiltList http = ; // BuiltList | +final BuiltList url = ; // BuiltList | +final BuiltList context = ; // BuiltList | +final String allowEmpty = allowEmpty_example; // String | +final BuiltMap language = ; // BuiltMap | + +try { + api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); +} catch on DioError (e) { + print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pipe** | [**BuiltList<String>**](String.md)| | + **ioutil** | [**BuiltList<String>**](String.md)| | + **http** | [**BuiltList<String>**](String.md)| | + **url** | [**BuiltList<String>**](String.md)| | + **context** | [**BuiltList<String>**](String.md)| | + **allowEmpty** | **String**| | + **language** | [**BuiltMap<String, String>**](String.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FakeClassnameTags123Api.md new file mode 100644 index 00000000000..35e244fbf21 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FakeClassnameTags123Api.md @@ -0,0 +1,61 @@ +# openapi.api.FakeClassnameTags123Api + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testClassname**](FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case + + +# **testClassname** +> ModelClient testClassname(modelClient) + +To test class name in snake case + +To test class name in snake case + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key_query +//defaultApiClient.getAuthentication('api_key_query').apiKey = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//defaultApiClient.getAuthentication('api_key_query').apiKeyPrefix = 'Bearer'; + +final api = Openapi().getFakeClassnameTags123Api(); +final ModelClient modelClient = ; // ModelClient | client model + +try { + final response = api.testClassname(modelClient); + print(response); +} catch on DioError (e) { + print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **modelClient** | [**ModelClient**](ModelClient.md)| client model | + +### Return type + +[**ModelClient**](ModelClient.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FileSchemaTestClass.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FileSchemaTestClass.md new file mode 100644 index 00000000000..105fece87f1 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FileSchemaTestClass.md @@ -0,0 +1,16 @@ +# openapi.model.FileSchemaTestClass + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | [**ModelFile**](ModelFile.md) | | [optional] +**files** | [**BuiltList<ModelFile>**](ModelFile.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/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Foo.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Foo.md new file mode 100644 index 00000000000..185b76e3f5b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Foo.md @@ -0,0 +1,15 @@ +# openapi.model.Foo + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [default to 'bar'] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FormatTest.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FormatTest.md new file mode 100644 index 00000000000..f811264ca2b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/FormatTest.md @@ -0,0 +1,30 @@ +# openapi.model.FormatTest + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **int** | | [optional] +**int32** | **int** | | [optional] +**int64** | **int** | | [optional] +**number** | **num** | | +**float** | **double** | | [optional] +**double_** | **double** | | [optional] +**decimal** | **double** | | [optional] +**string** | **String** | | [optional] +**byte** | **String** | | +**binary** | [**Uint8List**](Uint8List.md) | | [optional] +**date** | [**Date**](Date.md) | | +**dateTime** | [**DateTime**](DateTime.md) | | [optional] +**uuid** | **String** | | [optional] +**password** | **String** | | +**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] +**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/HasOnlyReadOnly.md new file mode 100644 index 00000000000..32cae937155 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/HasOnlyReadOnly.md @@ -0,0 +1,16 @@ +# openapi.model.HasOnlyReadOnly + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] +**foo** | **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/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/HealthCheckResult.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/HealthCheckResult.md new file mode 100644 index 00000000000..4d6aeb75d96 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/HealthCheckResult.md @@ -0,0 +1,15 @@ +# openapi.model.HealthCheckResult + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**nullableMessage** | **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/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/InlineResponseDefault.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/InlineResponseDefault.md new file mode 100644 index 00000000000..c5e61e1162b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/InlineResponseDefault.md @@ -0,0 +1,15 @@ +# openapi.model.InlineResponseDefault + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**string** | [**Foo**](Foo.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/MapTest.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/MapTest.md new file mode 100644 index 00000000000..4ad87df6423 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/MapTest.md @@ -0,0 +1,18 @@ +# openapi.model.MapTest + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapMapOfString** | [**BuiltMap<String, BuiltMap<String, String>>**](BuiltMap.md) | | [optional] +**mapOfEnumString** | **BuiltMap<String, String>** | | [optional] +**directMap** | **BuiltMap<String, bool>** | | [optional] +**indirectMap** | **BuiltMap<String, bool>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 00000000000..b1a4c4ccc40 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,17 @@ +# openapi.model.MixedPropertiesAndAdditionalPropertiesClass + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **String** | | [optional] +**dateTime** | [**DateTime**](DateTime.md) | | [optional] +**map** | [**BuiltMap<String, Animal>**](Animal.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/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Model200Response.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Model200Response.md new file mode 100644 index 00000000000..5aa3fb97c32 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Model200Response.md @@ -0,0 +1,16 @@ +# openapi.model.Model200Response + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **int** | | [optional] +**class_** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelClient.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelClient.md new file mode 100644 index 00000000000..f7b922f4a39 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelClient.md @@ -0,0 +1,15 @@ +# openapi.model.ModelClient + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client** | **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/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelEnumClass.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelEnumClass.md new file mode 100644 index 00000000000..ebaafb44c7f --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelEnumClass.md @@ -0,0 +1,14 @@ +# openapi.model.ModelEnumClass + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelFile.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelFile.md new file mode 100644 index 00000000000..4be260e93f6 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelFile.md @@ -0,0 +1,15 @@ +# openapi.model.ModelFile + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourceURI** | **String** | Test capitalization | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelList.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelList.md new file mode 100644 index 00000000000..283aa1f6b71 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelList.md @@ -0,0 +1,15 @@ +# openapi.model.ModelList + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**n123list** | **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/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelReturn.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelReturn.md new file mode 100644 index 00000000000..bc02df7a369 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ModelReturn.md @@ -0,0 +1,15 @@ +# openapi.model.ModelReturn + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**return_** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Name.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Name.md new file mode 100644 index 00000000000..25f49ea946b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Name.md @@ -0,0 +1,18 @@ +# openapi.model.Name + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **int** | | +**snakeCase** | **int** | | [optional] +**property** | **String** | | [optional] +**n123number** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/NullableClass.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/NullableClass.md new file mode 100644 index 00000000000..4ce8d5e1757 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/NullableClass.md @@ -0,0 +1,26 @@ +# openapi.model.NullableClass + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integerProp** | **int** | | [optional] +**numberProp** | **num** | | [optional] +**booleanProp** | **bool** | | [optional] +**stringProp** | **String** | | [optional] +**dateProp** | [**Date**](Date.md) | | [optional] +**datetimeProp** | [**DateTime**](DateTime.md) | | [optional] +**arrayNullableProp** | [**BuiltList<JsonObject>**](JsonObject.md) | | [optional] +**arrayAndItemsNullableProp** | [**BuiltList<JsonObject>**](JsonObject.md) | | [optional] +**arrayItemsNullable** | [**BuiltList<JsonObject>**](JsonObject.md) | | [optional] +**objectNullableProp** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | | [optional] +**objectAndItemsNullableProp** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | | [optional] +**objectItemsNullable** | [**BuiltMap<String, JsonObject>**](JsonObject.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/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/NumberOnly.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/NumberOnly.md new file mode 100644 index 00000000000..d8096a3db37 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/NumberOnly.md @@ -0,0 +1,15 @@ +# openapi.model.NumberOnly + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justNumber** | **num** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md new file mode 100644 index 00000000000..3e7848d382c --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md @@ -0,0 +1,18 @@ +# openapi.model.ObjectWithDeprecatedFields + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **String** | | [optional] +**id** | **num** | | [optional] +**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] +**bars** | **BuiltList<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/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Order.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Order.md new file mode 100644 index 00000000000..bde5ffe51a2 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Order.md @@ -0,0 +1,20 @@ +# openapi.model.Order + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**petId** | **int** | | [optional] +**quantity** | **int** | | [optional] +**shipDate** | [**DateTime**](DateTime.md) | | [optional] +**status** | **String** | Order Status | [optional] +**complete** | **bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterComposite.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterComposite.md new file mode 100644 index 00000000000..04bab7eff5d --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterComposite.md @@ -0,0 +1,17 @@ +# openapi.model.OuterComposite + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myNumber** | **num** | | [optional] +**myString** | **String** | | [optional] +**myBoolean** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnum.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnum.md new file mode 100644 index 00000000000..af62ad87ab2 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnum.md @@ -0,0 +1,14 @@ +# openapi.model.OuterEnum + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnumDefaultValue.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnumDefaultValue.md new file mode 100644 index 00000000000..c1bf8b0dec4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnumDefaultValue.md @@ -0,0 +1,14 @@ +# openapi.model.OuterEnumDefaultValue + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnumInteger.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnumInteger.md new file mode 100644 index 00000000000..8c80a9e5c85 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnumInteger.md @@ -0,0 +1,14 @@ +# openapi.model.OuterEnumInteger + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnumIntegerDefaultValue.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnumIntegerDefaultValue.md new file mode 100644 index 00000000000..eb8b55d7024 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterEnumIntegerDefaultValue.md @@ -0,0 +1,14 @@ +# openapi.model.OuterEnumIntegerDefaultValue + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterObjectWithEnumProperty.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterObjectWithEnumProperty.md new file mode 100644 index 00000000000..eab2ae8f66b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/OuterObjectWithEnumProperty.md @@ -0,0 +1,15 @@ +# openapi.model.OuterObjectWithEnumProperty + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**OuterEnumInteger**](OuterEnumInteger.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Pet.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Pet.md new file mode 100644 index 00000000000..08e0aeedd78 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Pet.md @@ -0,0 +1,20 @@ +# openapi.model.Pet + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **String** | | +**photoUrls** | **BuiltSet<String>** | | +**tags** | [**BuiltList<Tag>**](Tag.md) | | [optional] +**status** | **String** | pet status in the store | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/PetApi.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/PetApi.md new file mode 100644 index 00000000000..6afc643ea56 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/PetApi.md @@ -0,0 +1,427 @@ +# openapi.api.PetApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetApi.md#addpet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) + + +# **addPet** +> addPet(pet) + +Add a new pet to the store + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api = Openapi().getPetApi(); +final Pet pet = ; // Pet | Pet object that needs to be added to the store + +try { + api.addPet(pet); +} catch on DioError (e) { + print('Exception when calling PetApi->addPet: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deletePet** +> deletePet(petId, apiKey) + +Deletes a pet + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api = Openapi().getPetApi(); +final int petId = 789; // int | Pet id to delete +final String apiKey = apiKey_example; // String | + +try { + api.deletePet(petId, apiKey); +} catch on DioError (e) { + print('Exception when calling PetApi->deletePet: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| Pet id to delete | + **apiKey** | **String**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByStatus** +> BuiltList findPetsByStatus(status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api = Openapi().getPetApi(); +final BuiltList status = ; // BuiltList | Status values that need to be considered for filter + +try { + final response = api.findPetsByStatus(status); + print(response); +} catch on DioError (e) { + print('Exception when calling PetApi->findPetsByStatus: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**BuiltList<String>**](String.md)| Status values that need to be considered for filter | + +### Return type + +[**BuiltList<Pet>**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByTags** +> BuiltSet findPetsByTags(tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api = Openapi().getPetApi(); +final BuiltSet tags = ; // BuiltSet | Tags to filter by + +try { + final response = api.findPetsByTags(tags); + print(response); +} catch on DioError (e) { + print('Exception when calling PetApi->findPetsByTags: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**BuiltSet<String>**](String.md)| Tags to filter by | + +### Return type + +[**BuiltSet<Pet>**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getPetById** +> Pet getPetById(petId) + +Find pet by ID + +Returns a single pet + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; + +final api = Openapi().getPetApi(); +final int petId = 789; // int | ID of pet to return + +try { + final response = api.getPetById(petId); + print(response); +} catch on DioError (e) { + print('Exception when calling PetApi->getPetById: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePet** +> updatePet(pet) + +Update an existing pet + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api = Openapi().getPetApi(); +final Pet pet = ; // Pet | Pet object that needs to be added to the store + +try { + api.updatePet(pet); +} catch on DioError (e) { + print('Exception when calling PetApi->updatePet: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePetWithForm** +> updatePetWithForm(petId, name, status) + +Updates a pet in the store with form data + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api = Openapi().getPetApi(); +final int petId = 789; // int | ID of pet that needs to be updated +final String name = name_example; // String | Updated name of the pet +final String status = status_example; // String | Updated status of the pet + +try { + api.updatePetWithForm(petId, name, status); +} catch on DioError (e) { + print('Exception when calling PetApi->updatePetWithForm: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| ID of pet that needs to be updated | + **name** | **String**| Updated name of the pet | [optional] + **status** | **String**| Updated status of the pet | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFile** +> ApiResponse uploadFile(petId, additionalMetadata, file) + +uploads an image + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api = Openapi().getPetApi(); +final int petId = 789; // int | ID of pet to update +final String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server +final MultipartFile file = BINARY_DATA_HERE; // MultipartFile | file to upload + +try { + final response = api.uploadFile(petId, additionalMetadata, file); + print(response); +} catch on DioError (e) { + print('Exception when calling PetApi->uploadFile: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| ID of pet to update | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] + **file** | **MultipartFile**| file to upload | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFileWithRequiredFile** +> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata) + +uploads an image (required) + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api = Openapi().getPetApi(); +final int petId = 789; // int | ID of pet to update +final MultipartFile requiredFile = BINARY_DATA_HERE; // MultipartFile | file to upload +final String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server + +try { + final response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + print(response); +} catch on DioError (e) { + print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| ID of pet to update | + **requiredFile** | **MultipartFile**| file to upload | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ReadOnlyFirst.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ReadOnlyFirst.md new file mode 100644 index 00000000000..8f612e8ba19 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/ReadOnlyFirst.md @@ -0,0 +1,16 @@ +# openapi.model.ReadOnlyFirst + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] +**baz** | **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/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/SpecialModelName.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/SpecialModelName.md new file mode 100644 index 00000000000..5fcfa98e0b3 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/SpecialModelName.md @@ -0,0 +1,15 @@ +# openapi.model.SpecialModelName + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/StoreApi.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/StoreApi.md new file mode 100644 index 00000000000..5c8a683579e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/StoreApi.md @@ -0,0 +1,186 @@ +# openapi.api.StoreApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[**getInventory**](StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +[**placeOrder**](StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet + + +# **deleteOrder** +> deleteOrder(orderId) + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getStoreApi(); +final String orderId = orderId_example; // String | ID of the order that needs to be deleted + +try { + api.deleteOrder(orderId); +} catch on DioError (e) { + print('Exception when calling StoreApi->deleteOrder: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String**| ID of the order that needs to be deleted | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getInventory** +> BuiltMap getInventory() + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; + +final api = Openapi().getStoreApi(); + +try { + final response = api.getInventory(); + print(response); +} catch on DioError (e) { + print('Exception when calling StoreApi->getInventory: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**BuiltMap<String, int>** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrderById** +> Order getOrderById(orderId) + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getStoreApi(); +final int orderId = 789; // int | ID of pet that needs to be fetched + +try { + final response = api.getOrderById(orderId); + print(response); +} catch on DioError (e) { + print('Exception when calling StoreApi->getOrderById: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **int**| ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **placeOrder** +> Order placeOrder(order) + +Place an order for a pet + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getStoreApi(); +final Order order = ; // Order | order placed for purchasing the pet + +try { + final response = api.placeOrder(order); + print(response); +} catch on DioError (e) { + print('Exception when calling StoreApi->placeOrder: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order** | [**Order**](Order.md)| order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Tag.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Tag.md new file mode 100644 index 00000000000..c219f987c19 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/Tag.md @@ -0,0 +1,16 @@ +# openapi.model.Tag + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **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/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/User.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/User.md new file mode 100644 index 00000000000..fa87e64d859 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/User.md @@ -0,0 +1,22 @@ +# openapi.model.User + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**username** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] +**email** | **String** | | [optional] +**password** | **String** | | [optional] +**phone** | **String** | | [optional] +**userStatus** | **int** | User Status | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/UserApi.md b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/UserApi.md new file mode 100644 index 00000000000..e3af05ffb08 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/doc/UserApi.md @@ -0,0 +1,349 @@ +# openapi.api.UserApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserApi.md#createuser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserApi.md#loginuser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserApi.md#updateuser) | **PUT** /user/{username} | Updated user + + +# **createUser** +> createUser(user) + +Create user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getUserApi(); +final User user = ; // User | Created user object + +try { + api.createUser(user); +} catch on DioError (e) { + print('Exception when calling UserApi->createUser: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | [**User**](User.md)| Created user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithArrayInput** +> createUsersWithArrayInput(user) + +Creates list of users with given input array + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getUserApi(); +final BuiltList user = ; // BuiltList | List of user object + +try { + api.createUsersWithArrayInput(user); +} catch on DioError (e) { + print('Exception when calling UserApi->createUsersWithArrayInput: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | [**BuiltList<User>**](User.md)| List of user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithListInput** +> createUsersWithListInput(user) + +Creates list of users with given input array + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getUserApi(); +final BuiltList user = ; // BuiltList | List of user object + +try { + api.createUsersWithListInput(user); +} catch on DioError (e) { + print('Exception when calling UserApi->createUsersWithListInput: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | [**BuiltList<User>**](User.md)| List of user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteUser** +> deleteUser(username) + +Delete user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getUserApi(); +final String username = username_example; // String | The name that needs to be deleted + +try { + api.deleteUser(username); +} catch on DioError (e) { + print('Exception when calling UserApi->deleteUser: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be deleted | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getUserByName** +> User getUserByName(username) + +Get user by user name + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getUserApi(); +final String username = username_example; // String | The name that needs to be fetched. Use user1 for testing. + +try { + final response = api.getUserByName(username); + print(response); +} catch on DioError (e) { + print('Exception when calling UserApi->getUserByName: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loginUser** +> String loginUser(username, password) + +Logs user into the system + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getUserApi(); +final String username = username_example; // String | The user name for login +final String password = password_example; // String | The password for login in clear text + +try { + final response = api.loginUser(username, password); + print(response); +} catch on DioError (e) { + print('Exception when calling UserApi->loginUser: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The user name for login | + **password** | **String**| The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **logoutUser** +> logoutUser() + +Logs out current logged in user session + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getUserApi(); + +try { + api.logoutUser(); +} catch on DioError (e) { + print('Exception when calling UserApi->logoutUser: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +> updateUser(username, user) + +Updated user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getUserApi(); +final String username = username_example; // String | name that need to be deleted +final User user = ; // User | Updated user object + +try { + api.updateUser(username, user); +} catch on DioError (e) { + print('Exception when calling UserApi->updateUser: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| name that need to be deleted | + **user** | [**User**](User.md)| Updated user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/openapi.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/openapi.dart new file mode 100644 index 00000000000..5dbf2a6964d --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/openapi.dart @@ -0,0 +1,65 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +export 'package:openapi/src/api.dart'; +export 'package:openapi/src/auth/api_key_auth.dart'; +export 'package:openapi/src/auth/basic_auth.dart'; +export 'package:openapi/src/auth/oauth.dart'; +export 'package:openapi/src/serializers.dart'; +export 'package:openapi/src/model/date.dart'; + +export 'package:openapi/src/api/another_fake_api.dart'; +export 'package:openapi/src/api/default_api.dart'; +export 'package:openapi/src/api/fake_api.dart'; +export 'package:openapi/src/api/fake_classname_tags123_api.dart'; +export 'package:openapi/src/api/pet_api.dart'; +export 'package:openapi/src/api/store_api.dart'; +export 'package:openapi/src/api/user_api.dart'; + +export 'package:openapi/src/model/additional_properties_class.dart'; +export 'package:openapi/src/model/animal.dart'; +export 'package:openapi/src/model/api_response.dart'; +export 'package:openapi/src/model/array_of_array_of_number_only.dart'; +export 'package:openapi/src/model/array_of_number_only.dart'; +export 'package:openapi/src/model/array_test.dart'; +export 'package:openapi/src/model/capitalization.dart'; +export 'package:openapi/src/model/cat.dart'; +export 'package:openapi/src/model/cat_all_of.dart'; +export 'package:openapi/src/model/category.dart'; +export 'package:openapi/src/model/class_model.dart'; +export 'package:openapi/src/model/deprecated_object.dart'; +export 'package:openapi/src/model/dog.dart'; +export 'package:openapi/src/model/dog_all_of.dart'; +export 'package:openapi/src/model/enum_arrays.dart'; +export 'package:openapi/src/model/enum_test.dart'; +export 'package:openapi/src/model/file_schema_test_class.dart'; +export 'package:openapi/src/model/foo.dart'; +export 'package:openapi/src/model/format_test.dart'; +export 'package:openapi/src/model/has_only_read_only.dart'; +export 'package:openapi/src/model/health_check_result.dart'; +export 'package:openapi/src/model/inline_response_default.dart'; +export 'package:openapi/src/model/map_test.dart'; +export 'package:openapi/src/model/mixed_properties_and_additional_properties_class.dart'; +export 'package:openapi/src/model/model200_response.dart'; +export 'package:openapi/src/model/model_client.dart'; +export 'package:openapi/src/model/model_enum_class.dart'; +export 'package:openapi/src/model/model_file.dart'; +export 'package:openapi/src/model/model_list.dart'; +export 'package:openapi/src/model/model_return.dart'; +export 'package:openapi/src/model/name.dart'; +export 'package:openapi/src/model/nullable_class.dart'; +export 'package:openapi/src/model/number_only.dart'; +export 'package:openapi/src/model/object_with_deprecated_fields.dart'; +export 'package:openapi/src/model/order.dart'; +export 'package:openapi/src/model/outer_composite.dart'; +export 'package:openapi/src/model/outer_enum.dart'; +export 'package:openapi/src/model/outer_enum_default_value.dart'; +export 'package:openapi/src/model/outer_enum_integer.dart'; +export 'package:openapi/src/model/outer_enum_integer_default_value.dart'; +export 'package:openapi/src/model/outer_object_with_enum_property.dart'; +export 'package:openapi/src/model/pet.dart'; +export 'package:openapi/src/model/read_only_first.dart'; +export 'package:openapi/src/model/special_model_name.dart'; +export 'package:openapi/src/model/tag.dart'; +export 'package:openapi/src/model/user.dart'; diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api.dart new file mode 100644 index 00000000000..d2d54f38185 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api.dart @@ -0,0 +1,115 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:dio_http/dio_http.dart'; +import 'package:built_value/serializer.dart'; +import 'package:openapi/src/serializers.dart'; +import 'package:openapi/src/auth/api_key_auth.dart'; +import 'package:openapi/src/auth/basic_auth.dart'; +import 'package:openapi/src/auth/bearer_auth.dart'; +import 'package:openapi/src/auth/oauth.dart'; +import 'package:openapi/src/api/another_fake_api.dart'; +import 'package:openapi/src/api/default_api.dart'; +import 'package:openapi/src/api/fake_api.dart'; +import 'package:openapi/src/api/fake_classname_tags123_api.dart'; +import 'package:openapi/src/api/pet_api.dart'; +import 'package:openapi/src/api/store_api.dart'; +import 'package:openapi/src/api/user_api.dart'; + +class Openapi { + static const String basePath = r'http://petstore.swagger.io:80/v2'; + + final Dio dio; + final Serializers serializers; + + Openapi({ + Dio? dio, + Serializers? serializers, + String? basePathOverride, + List? interceptors, + }) : this.serializers = serializers ?? standardSerializers, + this.dio = dio ?? + Dio(BaseOptions( + baseUrl: basePathOverride ?? basePath, + connectTimeout: 5000, + receiveTimeout: 3000, + )) { + if (interceptors == null) { + this.dio.interceptors.addAll([ + OAuthInterceptor(), + BasicAuthInterceptor(), + BearerAuthInterceptor(), + ApiKeyAuthInterceptor(), + ]); + } else { + this.dio.interceptors.addAll(interceptors); + } + } + + void setOAuthToken(String name, String token) { + if (this.dio.interceptors.any((i) => i is OAuthInterceptor)) { + (this.dio.interceptors.firstWhere((i) => i is OAuthInterceptor) as OAuthInterceptor).tokens[name] = token; + } + } + + void setBearerAuth(String name, String token) { + if (this.dio.interceptors.any((i) => i is BearerAuthInterceptor)) { + (this.dio.interceptors.firstWhere((i) => i is BearerAuthInterceptor) as BearerAuthInterceptor).tokens[name] = token; + } + } + + void setBasicAuth(String name, String username, String password) { + if (this.dio.interceptors.any((i) => i is BasicAuthInterceptor)) { + (this.dio.interceptors.firstWhere((i) => i is BasicAuthInterceptor) as BasicAuthInterceptor).authInfo[name] = BasicAuthInfo(username, password); + } + } + + void setApiKey(String name, String apiKey) { + if (this.dio.interceptors.any((i) => i is ApiKeyAuthInterceptor)) { + (this.dio.interceptors.firstWhere((element) => element is ApiKeyAuthInterceptor) as ApiKeyAuthInterceptor).apiKeys[name] = apiKey; + } + } + + /// Get AnotherFakeApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + AnotherFakeApi getAnotherFakeApi() { + return AnotherFakeApi(dio, serializers); + } + + /// Get DefaultApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + DefaultApi getDefaultApi() { + return DefaultApi(dio, serializers); + } + + /// Get FakeApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + FakeApi getFakeApi() { + return FakeApi(dio, serializers); + } + + /// Get FakeClassnameTags123Api instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + FakeClassnameTags123Api getFakeClassnameTags123Api() { + return FakeClassnameTags123Api(dio, serializers); + } + + /// Get PetApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + PetApi getPetApi() { + return PetApi(dio, serializers); + } + + /// Get StoreApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + StoreApi getStoreApi() { + return StoreApi(dio, serializers); + } + + /// Get UserApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + UserApi getUserApi() { + return UserApi(dio, serializers); + } +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/another_fake_api.dart new file mode 100644 index 00000000000..d361f9ce96d --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/another_fake_api.dart @@ -0,0 +1,113 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio_http/dio_http.dart'; + +import 'package:openapi/src/model/model_client.dart'; + +class AnotherFakeApi { + + final Dio _dio; + + final Serializers _serializers; + + const AnotherFakeApi(this._dio, this._serializers); + + /// To test special tags + /// To test special tags and operation ID starting with number + /// + /// Parameters: + /// * [modelClient] - client model + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ModelClient] as data + /// Throws [DioError] if API call or serialization fails + Future> call123testSpecialTags({ + required ModelClient modelClient, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/another-fake/dummy'; + final _options = Options( + method: r'PATCH', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(ModelClient); + _bodyData = _serializers.serialize(modelClient, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ModelClient _responseData; + + try { + const _responseType = FullType(ModelClient); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as ModelClient; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/default_api.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/default_api.dart new file mode 100644 index 00000000000..87c6f0dd2fc --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/default_api.dart @@ -0,0 +1,92 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio_http/dio_http.dart'; + +import 'package:openapi/src/model/inline_response_default.dart'; + +class DefaultApi { + + final Dio _dio; + + final Serializers _serializers; + + const DefaultApi(this._dio, this._serializers); + + /// fooGet + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [InlineResponseDefault] as data + /// Throws [DioError] if API call or serialization fails + Future> fooGet({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/foo'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + InlineResponseDefault _responseData; + + try { + const _responseType = FullType(InlineResponseDefault); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as InlineResponseDefault; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/fake_api.dart new file mode 100644 index 00000000000..d8640836000 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/fake_api.dart @@ -0,0 +1,1417 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio_http/dio_http.dart'; + +import 'dart:typed_data'; +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/date.dart'; +import 'package:openapi/src/model/file_schema_test_class.dart'; +import 'package:openapi/src/model/health_check_result.dart'; +import 'package:openapi/src/model/model_client.dart'; +import 'package:openapi/src/model/outer_composite.dart'; +import 'package:openapi/src/model/outer_object_with_enum_property.dart'; +import 'package:openapi/src/model/pet.dart'; +import 'package:openapi/src/model/user.dart'; + +class FakeApi { + + final Dio _dio; + + final Serializers _serializers; + + const FakeApi(this._dio, this._serializers); + + /// Health check endpoint + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [HealthCheckResult] as data + /// Throws [DioError] if API call or serialization fails + Future> fakeHealthGet({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/health'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + HealthCheckResult _responseData; + + try { + const _responseType = FullType(HealthCheckResult); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as HealthCheckResult; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// test http signature authentication + /// + /// + /// Parameters: + /// * [pet] - Pet object that needs to be added to the store + /// * [query1] - query parameter + /// * [header1] - header parameter + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> fakeHttpSignatureTest({ + required Pet pet, + String? query1, + String? header1, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/http-signature-test'; + final _options = Options( + method: r'GET', + headers: { + if (header1 != null) r'header_1': header1, + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'http', + 'scheme': 'signature', + 'name': 'http_signature_test', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (query1 != null) r'query_1': encodeQueryParameter(_serializers, query1, const FullType(String)), + }; + + dynamic _bodyData; + + try { + const _type = FullType(Pet); + _bodyData = _serializers.serialize(pet, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + queryParameters: _queryParameters, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// fakeOuterBooleanSerialize + /// Test serialization of outer boolean types + /// + /// Parameters: + /// * [body] - Input boolean as post body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [bool] as data + /// Throws [DioError] if API call or serialization fails + Future> fakeOuterBooleanSerialize({ + bool? body, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/outer/boolean'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + _bodyData = body; + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + bool _responseData; + + try { + _responseData = _response.data as bool; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// fakeOuterCompositeSerialize + /// Test serialization of object with outer number type + /// + /// Parameters: + /// * [outerComposite] - Input composite as post body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [OuterComposite] as data + /// Throws [DioError] if API call or serialization fails + Future> fakeOuterCompositeSerialize({ + OuterComposite? outerComposite, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/outer/composite'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(OuterComposite); + _bodyData = outerComposite == null ? null : _serializers.serialize(outerComposite, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OuterComposite _responseData; + + try { + const _responseType = FullType(OuterComposite); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as OuterComposite; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// fakeOuterNumberSerialize + /// Test serialization of outer number types + /// + /// Parameters: + /// * [body] - Input number as post body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [num] as data + /// Throws [DioError] if API call or serialization fails + Future> fakeOuterNumberSerialize({ + num? body, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/outer/number'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + _bodyData = body; + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + num _responseData; + + try { + _responseData = _response.data as num; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// fakeOuterStringSerialize + /// Test serialization of outer string types + /// + /// Parameters: + /// * [body] - Input string as post body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [String] as data + /// Throws [DioError] if API call or serialization fails + Future> fakeOuterStringSerialize({ + String? body, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/outer/string'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + _bodyData = body; + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + String _responseData; + + try { + _responseData = _response.data as String; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// fakePropertyEnumIntegerSerialize + /// Test serialization of enum (int) properties with examples + /// + /// Parameters: + /// * [outerObjectWithEnumProperty] - Input enum (int) as post body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [OuterObjectWithEnumProperty] as data + /// Throws [DioError] if API call or serialization fails + Future> fakePropertyEnumIntegerSerialize({ + required OuterObjectWithEnumProperty outerObjectWithEnumProperty, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/property/enum-int'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(OuterObjectWithEnumProperty); + _bodyData = _serializers.serialize(outerObjectWithEnumProperty, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OuterObjectWithEnumProperty _responseData; + + try { + const _responseType = FullType(OuterObjectWithEnumProperty); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as OuterObjectWithEnumProperty; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// testBodyWithBinary + /// For this test, the body has to be a binary file. + /// + /// Parameters: + /// * [body] - image to upload + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> testBodyWithBinary({ + MultipartFile? body, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/body-with-binary'; + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'image/png', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + _bodyData = body?.finalize(); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// testBodyWithFileSchema + /// For this test, the body for this request must reference a schema named `File`. + /// + /// Parameters: + /// * [fileSchemaTestClass] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> testBodyWithFileSchema({ + required FileSchemaTestClass fileSchemaTestClass, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/body-with-file-schema'; + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(FileSchemaTestClass); + _bodyData = _serializers.serialize(fileSchemaTestClass, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// testBodyWithQueryParams + /// + /// + /// Parameters: + /// * [query] + /// * [user] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> testBodyWithQueryParams({ + required String query, + required User user, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/body-with-query-params'; + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'query': encodeQueryParameter(_serializers, query, const FullType(String)), + }; + + dynamic _bodyData; + + try { + const _type = FullType(User); + _bodyData = _serializers.serialize(user, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + queryParameters: _queryParameters, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// To test \"client\" model + /// To test \"client\" model + /// + /// Parameters: + /// * [modelClient] - client model + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ModelClient] as data + /// Throws [DioError] if API call or serialization fails + Future> testClientModel({ + required ModelClient modelClient, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake'; + final _options = Options( + method: r'PATCH', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(ModelClient); + _bodyData = _serializers.serialize(modelClient, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ModelClient _responseData; + + try { + const _responseType = FullType(ModelClient); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as ModelClient; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// Parameters: + /// * [number] - None + /// * [double_] - None + /// * [patternWithoutDelimiter] - None + /// * [byte] - None + /// * [integer] - None + /// * [int32] - None + /// * [int64] - None + /// * [float] - None + /// * [string] - None + /// * [binary] - None + /// * [date] - None + /// * [dateTime] - None + /// * [password] - None + /// * [callback] - None + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> testEndpointParameters({ + required num number, + required double double_, + required String patternWithoutDelimiter, + required String byte, + int? integer, + int? int32, + int? int64, + double? float, + String? string, + Uint8List? binary, + Date? date, + DateTime? dateTime, + String? password, + String? callback, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'http', + 'scheme': 'basic', + 'name': 'http_basic_test', + }, + ], + ...?extra, + }, + contentType: 'application/x-www-form-urlencoded', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + _bodyData = { + if (integer != null) r'integer': encodeQueryParameter(_serializers, integer, const FullType(int)), + if (int32 != null) r'int32': encodeQueryParameter(_serializers, int32, const FullType(int)), + if (int64 != null) r'int64': encodeQueryParameter(_serializers, int64, const FullType(int)), + r'number': encodeQueryParameter(_serializers, number, const FullType(num)), + if (float != null) r'float': encodeQueryParameter(_serializers, float, const FullType(double)), + r'double': encodeQueryParameter(_serializers, double_, const FullType(double)), + if (string != null) r'string': encodeQueryParameter(_serializers, string, const FullType(String)), + r'pattern_without_delimiter': encodeQueryParameter(_serializers, patternWithoutDelimiter, const FullType(String)), + r'byte': encodeQueryParameter(_serializers, byte, const FullType(String)), + if (binary != null) r'binary': encodeQueryParameter(_serializers, binary, const FullType(Uint8List)), + if (date != null) r'date': encodeQueryParameter(_serializers, date, const FullType(Date)), + if (dateTime != null) r'dateTime': encodeQueryParameter(_serializers, dateTime, const FullType(DateTime)), + if (password != null) r'password': encodeQueryParameter(_serializers, password, const FullType(String)), + if (callback != null) r'callback': encodeQueryParameter(_serializers, callback, const FullType(String)), + }; + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// To test enum parameters + /// To test enum parameters + /// + /// Parameters: + /// * [enumHeaderStringArray] - Header parameter enum test (string array) + /// * [enumHeaderString] - Header parameter enum test (string) + /// * [enumQueryStringArray] - Query parameter enum test (string array) + /// * [enumQueryString] - Query parameter enum test (string) + /// * [enumQueryInteger] - Query parameter enum test (double) + /// * [enumQueryDouble] - Query parameter enum test (double) + /// * [enumFormStringArray] - Form parameter enum test (string array) + /// * [enumFormString] - Form parameter enum test (string) + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> testEnumParameters({ + BuiltList? enumHeaderStringArray, + String? enumHeaderString = '-efg', + BuiltList? enumQueryStringArray, + String? enumQueryString = '-efg', + int? enumQueryInteger, + double? enumQueryDouble, + BuiltList? enumFormStringArray, + String? enumFormString, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake'; + final _options = Options( + method: r'GET', + headers: { + if (enumHeaderStringArray != null) r'enum_header_string_array': enumHeaderStringArray, + if (enumHeaderString != null) r'enum_header_string': enumHeaderString, + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/x-www-form-urlencoded', + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (enumQueryStringArray != null) r'enum_query_string_array': encodeCollectionQueryParameter(_serializers, enumQueryStringArray, const FullType(BuiltList, [FullType(String)]), format: ListFormat.multi,), + if (enumQueryString != null) r'enum_query_string': encodeQueryParameter(_serializers, enumQueryString, const FullType(String)), + if (enumQueryInteger != null) r'enum_query_integer': encodeQueryParameter(_serializers, enumQueryInteger, const FullType(int)), + if (enumQueryDouble != null) r'enum_query_double': encodeQueryParameter(_serializers, enumQueryDouble, const FullType(double)), + }; + + dynamic _bodyData; + + try { + _bodyData = { + if (enumFormStringArray != null) r'enum_form_string_array': encodeCollectionQueryParameter(_serializers, enumFormStringArray, const FullType(BuiltList, [FullType(String)]), format: ListFormat.csv,), + if (enumFormString != null) r'enum_form_string': encodeQueryParameter(_serializers, enumFormString, const FullType(String)), + }; + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + queryParameters: _queryParameters, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// Fake endpoint to test group parameters (optional) + /// Fake endpoint to test group parameters (optional) + /// + /// Parameters: + /// * [requiredStringGroup] - Required String in group parameters + /// * [requiredBooleanGroup] - Required Boolean in group parameters + /// * [requiredInt64Group] - Required Integer in group parameters + /// * [stringGroup] - String in group parameters + /// * [booleanGroup] - Boolean in group parameters + /// * [int64Group] - Integer in group parameters + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> testGroupParameters({ + required int requiredStringGroup, + required bool requiredBooleanGroup, + required int requiredInt64Group, + int? stringGroup, + bool? booleanGroup, + int? int64Group, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake'; + final _options = Options( + method: r'DELETE', + headers: { + r'required_boolean_group': requiredBooleanGroup, + if (booleanGroup != null) r'boolean_group': booleanGroup, + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'http', + 'scheme': 'bearer', + 'name': 'bearer_test', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'required_string_group': encodeQueryParameter(_serializers, requiredStringGroup, const FullType(int)), + r'required_int64_group': encodeQueryParameter(_serializers, requiredInt64Group, const FullType(int)), + if (stringGroup != null) r'string_group': encodeQueryParameter(_serializers, stringGroup, const FullType(int)), + if (int64Group != null) r'int64_group': encodeQueryParameter(_serializers, int64Group, const FullType(int)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// test inline additionalProperties + /// + /// + /// Parameters: + /// * [requestBody] - request body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> testInlineAdditionalProperties({ + required BuiltMap requestBody, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/inline-additionalProperties'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(BuiltMap, [FullType(String), FullType(String)]); + _bodyData = _serializers.serialize(requestBody, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// test json serialization of form data + /// + /// + /// Parameters: + /// * [param] - field1 + /// * [param2] - field2 + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> testJsonFormData({ + required String param, + required String param2, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/jsonFormData'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/x-www-form-urlencoded', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + _bodyData = { + r'param': encodeQueryParameter(_serializers, param, const FullType(String)), + r'param2': encodeQueryParameter(_serializers, param2, const FullType(String)), + }; + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// testQueryParameterCollectionFormat + /// To test the collection format in query parameters + /// + /// Parameters: + /// * [pipe] + /// * [ioutil] + /// * [http] + /// * [url] + /// * [context] + /// * [allowEmpty] + /// * [language] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> testQueryParameterCollectionFormat({ + required BuiltList pipe, + required BuiltList ioutil, + required BuiltList http, + required BuiltList url, + required BuiltList context, + required String allowEmpty, + BuiltMap? language, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/test-query-parameters'; + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'pipe': encodeCollectionQueryParameter(_serializers, pipe, const FullType(BuiltList, [FullType(String)]), format: ListFormat.pipes,), + r'ioutil': encodeCollectionQueryParameter(_serializers, ioutil, const FullType(BuiltList, [FullType(String)]), format: ListFormat.csv,), + r'http': encodeCollectionQueryParameter(_serializers, http, const FullType(BuiltList, [FullType(String)]), format: ListFormat.ssv,), + r'url': encodeCollectionQueryParameter(_serializers, url, const FullType(BuiltList, [FullType(String)]), format: ListFormat.csv,), + r'context': encodeCollectionQueryParameter(_serializers, context, const FullType(BuiltList, [FullType(String)]), format: ListFormat.multi,), + if (language != null) r'language': encodeQueryParameter(_serializers, language, const FullType(BuiltMap, [FullType(String), FullType(String)]), ), + r'allowEmpty': encodeQueryParameter(_serializers, allowEmpty, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/fake_classname_tags123_api.dart new file mode 100644 index 00000000000..e39c39e2f5d --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/fake_classname_tags123_api.dart @@ -0,0 +1,120 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio_http/dio_http.dart'; + +import 'package:openapi/src/model/model_client.dart'; + +class FakeClassnameTags123Api { + + final Dio _dio; + + final Serializers _serializers; + + const FakeClassnameTags123Api(this._dio, this._serializers); + + /// To test class name in snake case + /// To test class name in snake case + /// + /// Parameters: + /// * [modelClient] - client model + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ModelClient] as data + /// Throws [DioError] if API call or serialization fails + Future> testClassname({ + required ModelClient modelClient, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake_classname_test'; + final _options = Options( + method: r'PATCH', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'api_key_query', + 'keyName': 'api_key_query', + 'where': 'query', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(ModelClient); + _bodyData = _serializers.serialize(modelClient, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ModelClient _responseData; + + try { + const _responseType = FullType(ModelClient); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as ModelClient; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/pet_api.dart new file mode 100644 index 00000000000..a1d8a0fc2d7 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/pet_api.dart @@ -0,0 +1,755 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio_http/dio_http.dart'; + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/api_response.dart'; +import 'package:openapi/src/model/pet.dart'; + +class PetApi { + + final Dio _dio; + + final Serializers _serializers; + + const PetApi(this._dio, this._serializers); + + /// Add a new pet to the store + /// + /// + /// Parameters: + /// * [pet] - Pet object that needs to be added to the store + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> addPet({ + required Pet pet, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/pet'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'oauth2', + 'name': 'petstore_auth', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(Pet); + _bodyData = _serializers.serialize(pet, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// Deletes a pet + /// + /// + /// Parameters: + /// * [petId] - Pet id to delete + /// * [apiKey] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> deletePet({ + required int petId, + String? apiKey, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); + final _options = Options( + method: r'DELETE', + headers: { + if (apiKey != null) r'api_key': apiKey, + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'oauth2', + 'name': 'petstore_auth', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// Finds Pets by status + /// Multiple status values can be provided with comma separated strings + /// + /// Parameters: + /// * [status] - Status values that need to be considered for filter + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioError] if API call or serialization fails + Future>> findPetsByStatus({ + required BuiltList status, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/pet/findByStatus'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'oauth2', + 'name': 'petstore_auth', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'status': encodeCollectionQueryParameter(_serializers, status, const FullType(BuiltList, [FullType(String)]), format: ListFormat.csv,), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList _responseData; + + try { + const _responseType = FullType(BuiltList, [FullType(Pet)]); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// Finds Pets by tags + /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + /// + /// Parameters: + /// * [tags] - Tags to filter by + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltSet] as data + /// Throws [DioError] if API call or serialization fails + @Deprecated('This operation has been deprecated') + Future>> findPetsByTags({ + required BuiltSet tags, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/pet/findByTags'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'oauth2', + 'name': 'petstore_auth', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'tags': encodeCollectionQueryParameter(_serializers, tags, const FullType(BuiltSet, [FullType(String)]), format: ListFormat.csv,), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltSet _responseData; + + try { + const _responseType = FullType(BuiltSet, [FullType(Pet)]); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as BuiltSet; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// Find pet by ID + /// Returns a single pet + /// + /// Parameters: + /// * [petId] - ID of pet to return + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [Pet] as data + /// Throws [DioError] if API call or serialization fails + Future> getPetById({ + required int petId, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'api_key', + 'where': 'header', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + Pet _responseData; + + try { + const _responseType = FullType(Pet); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as Pet; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// Update an existing pet + /// + /// + /// Parameters: + /// * [pet] - Pet object that needs to be added to the store + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> updatePet({ + required Pet pet, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/pet'; + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'oauth2', + 'name': 'petstore_auth', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(Pet); + _bodyData = _serializers.serialize(pet, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// Updates a pet in the store with form data + /// + /// + /// Parameters: + /// * [petId] - ID of pet that needs to be updated + /// * [name] - Updated name of the pet + /// * [status] - Updated status of the pet + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> updatePetWithForm({ + required int petId, + String? name, + String? status, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'oauth2', + 'name': 'petstore_auth', + }, + ], + ...?extra, + }, + contentType: 'application/x-www-form-urlencoded', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + _bodyData = { + if (name != null) r'name': encodeQueryParameter(_serializers, name, const FullType(String)), + if (status != null) r'status': encodeQueryParameter(_serializers, status, const FullType(String)), + }; + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// uploads an image + /// + /// + /// Parameters: + /// * [petId] - ID of pet to update + /// * [additionalMetadata] - Additional data to pass to server + /// * [file] - file to upload + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ApiResponse] as data + /// Throws [DioError] if API call or serialization fails + Future> uploadFile({ + required int petId, + String? additionalMetadata, + MultipartFile? file, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petId.toString()); + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'oauth2', + 'name': 'petstore_auth', + }, + ], + ...?extra, + }, + contentType: 'multipart/form-data', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + _bodyData = FormData.fromMap({ + if (additionalMetadata != null) r'additionalMetadata': encodeFormParameter(_serializers, additionalMetadata, const FullType(String)), + if (file != null) r'file': file, + }); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ApiResponse _responseData; + + try { + const _responseType = FullType(ApiResponse); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as ApiResponse; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// uploads an image (required) + /// + /// + /// Parameters: + /// * [petId] - ID of pet to update + /// * [requiredFile] - file to upload + /// * [additionalMetadata] - Additional data to pass to server + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ApiResponse] as data + /// Throws [DioError] if API call or serialization fails + Future> uploadFileWithRequiredFile({ + required int petId, + required MultipartFile requiredFile, + String? additionalMetadata, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', petId.toString()); + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'oauth2', + 'name': 'petstore_auth', + }, + ], + ...?extra, + }, + contentType: 'multipart/form-data', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + _bodyData = FormData.fromMap({ + if (additionalMetadata != null) r'additionalMetadata': encodeFormParameter(_serializers, additionalMetadata, const FullType(String)), + r'requiredFile': requiredFile, + }); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ApiResponse _responseData; + + try { + const _responseType = FullType(ApiResponse); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as ApiResponse; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/store_api.dart new file mode 100644 index 00000000000..bb10a12cbe5 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/store_api.dart @@ -0,0 +1,314 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio_http/dio_http.dart'; + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/order.dart'; + +class StoreApi { + + final Dio _dio; + + final Serializers _serializers; + + const StoreApi(this._dio, this._serializers); + + /// Delete purchase order by ID + /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /// + /// Parameters: + /// * [orderId] - ID of the order that needs to be deleted + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> deleteOrder({ + required String orderId, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/store/order/{order_id}'.replaceAll('{' r'order_id' '}', orderId.toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// Returns pet inventories by status + /// Returns a map of status codes to quantities + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltMap] as data + /// Throws [DioError] if API call or serialization fails + Future>> getInventory({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/store/inventory'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'api_key', + 'where': 'header', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltMap _responseData; + + try { + const _responseType = FullType(BuiltMap, [FullType(String), FullType(int)]); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as BuiltMap; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// Find purchase order by ID + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// + /// Parameters: + /// * [orderId] - ID of pet that needs to be fetched + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [Order] as data + /// Throws [DioError] if API call or serialization fails + Future> getOrderById({ + required int orderId, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/store/order/{order_id}'.replaceAll('{' r'order_id' '}', orderId.toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + Order _responseData; + + try { + const _responseType = FullType(Order); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as Order; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// Place an order for a pet + /// + /// + /// Parameters: + /// * [order] - order placed for purchasing the pet + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [Order] as data + /// Throws [DioError] if API call or serialization fails + Future> placeOrder({ + required Order order, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/store/order'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(Order); + _bodyData = _serializers.serialize(order, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + Order _responseData; + + try { + const _responseType = FullType(Order); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as Order; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/user_api.dart new file mode 100644 index 00000000000..e628b862c02 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api/user_api.dart @@ -0,0 +1,532 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio_http/dio_http.dart'; + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/user.dart'; + +class UserApi { + + final Dio _dio; + + final Serializers _serializers; + + const UserApi(this._dio, this._serializers); + + /// Create user + /// This can only be done by the logged in user. + /// + /// Parameters: + /// * [user] - Created user object + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> createUser({ + required User user, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(User); + _bodyData = _serializers.serialize(user, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// Creates list of users with given input array + /// + /// + /// Parameters: + /// * [user] - List of user object + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> createUsersWithArrayInput({ + required BuiltList user, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user/createWithArray'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(BuiltList, [FullType(User)]); + _bodyData = _serializers.serialize(user, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// Creates list of users with given input array + /// + /// + /// Parameters: + /// * [user] - List of user object + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> createUsersWithListInput({ + required BuiltList user, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user/createWithList'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(BuiltList, [FullType(User)]); + _bodyData = _serializers.serialize(user, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// Delete user + /// This can only be done by the logged in user. + /// + /// Parameters: + /// * [username] - The name that needs to be deleted + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> deleteUser({ + required String username, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user/{username}'.replaceAll('{' r'username' '}', username.toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// Get user by user name + /// + /// + /// Parameters: + /// * [username] - The name that needs to be fetched. Use user1 for testing. + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [User] as data + /// Throws [DioError] if API call or serialization fails + Future> getUserByName({ + required String username, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user/{username}'.replaceAll('{' r'username' '}', username.toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + User _responseData; + + try { + const _responseType = FullType(User); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as User; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// Logs user into the system + /// + /// + /// Parameters: + /// * [username] - The user name for login + /// * [password] - The password for login in clear text + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [String] as data + /// Throws [DioError] if API call or serialization fails + Future> loginUser({ + required String username, + required String password, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user/login'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'username': encodeQueryParameter(_serializers, username, const FullType(String)), + r'password': encodeQueryParameter(_serializers, password, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + String _responseData; + + try { + _responseData = _response.data as String; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// Logs out current logged in user session + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> logoutUser({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user/logout'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// Updated user + /// This can only be done by the logged in user. + /// + /// Parameters: + /// * [username] - name that need to be deleted + /// * [user] - Updated user object + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> updateUser({ + required String username, + required User user, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user/{username}'.replaceAll('{' r'username' '}', username.toString()); + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(User); + _bodyData = _serializers.serialize(user, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api_util.dart new file mode 100644 index 00000000000..5841689c379 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/api_util.dart @@ -0,0 +1,78 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:convert'; +import 'dart:typed_data'; + +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/serializer.dart'; +import 'package:dio_http/dio_http.dart'; +import 'package:dio_http/src/parameter.dart'; + +/// Format the given form parameter object into something that Dio can handle. +/// Returns primitive or String. +/// Returns List/Map if the value is BuildList/BuiltMap. +dynamic encodeFormParameter(Serializers serializers, dynamic value, FullType type) { + if (value == null) { + return ''; + } + if (value is String || value is num || value is bool) { + return value; + } + final serialized = serializers.serialize( + value as Object, + specifiedType: type, + ); + if (serialized is String) { + return serialized; + } + if (value is BuiltList || value is BuiltSet || value is BuiltMap) { + return serialized; + } + return json.encode(serialized); +} + +dynamic encodeQueryParameter( + Serializers serializers, + dynamic value, + FullType type, +) { + if (value == null) { + return ''; + } + if (value is String || value is num || value is bool) { + return value; + } + if (value is Uint8List) { + // Currently not sure how to serialize this + return value; + } + final serialized = serializers.serialize( + value as Object, + specifiedType: type, + ); + if (serialized == null) { + return ''; + } + if (serialized is String) { + return serialized; + } + return serialized; +} + +ListParam encodeCollectionQueryParameter( + Serializers serializers, + dynamic value, + FullType type, { + ListFormat format = ListFormat.multi, +}) { + final serialized = serializers.serialize( + value as Object, + specifiedType: type, + ); + if (value is BuiltList || value is BuiltSet) { + return ListParam(List.of((serialized as Iterable).cast()), format); + } + throw ArgumentError('Invalid value passed to encodeCollectionQueryParameter'); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/api_key_auth.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/api_key_auth.dart new file mode 100644 index 00000000000..ba24d7a2bc8 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/api_key_auth.dart @@ -0,0 +1,30 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + + +import 'package:dio_http/dio_http.dart'; +import 'package:openapi/src/auth/auth.dart'; + +class ApiKeyAuthInterceptor extends AuthInterceptor { + final Map apiKeys = {}; + + @override + void onRequest(RequestOptions options, RequestInterceptorHandler handler) { + final authInfo = getAuthInfo(options, (secure) => secure['type'] == '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') { + options.queryParameters[authKeyName] = apiKey; + } else { + options.headers[authKeyName] = apiKey; + } + } + } + super.onRequest(options, handler); + } +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/auth.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/auth.dart new file mode 100644 index 00000000000..e6dd5c4f6f8 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/auth.dart @@ -0,0 +1,18 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:dio_http/dio_http.dart'; + +abstract class AuthInterceptor extends Interceptor { + /// Get auth information on given route for the given type. + /// Can return an empty list if type is not present on auth data or + /// if route doesn't need authentication. + List> getAuthInfo(RequestOptions route, bool Function(Map secure) handles) { + if (route.extra.containsKey('secure')) { + final auth = route.extra['secure'] as List>; + return auth.where((secure) => handles(secure)).toList(); + } + return []; + } +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/basic_auth.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/basic_auth.dart new file mode 100644 index 00000000000..18ba52cefc3 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/basic_auth.dart @@ -0,0 +1,37 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:convert'; + +import 'package:dio_http/dio_http.dart'; +import 'package:openapi/src/auth/auth.dart'; + +class BasicAuthInfo { + final String username; + final String password; + + const BasicAuthInfo(this.username, this.password); +} + +class BasicAuthInterceptor extends AuthInterceptor { + final Map authInfo = {}; + + @override + void onRequest( + RequestOptions options, + RequestInterceptorHandler handler, + ) { + final metadataAuthInfo = getAuthInfo(options, (secure) => (secure['type'] == 'http' && secure['scheme'] == 'basic') || secure['type'] == 'basic'); + for (final info in metadataAuthInfo) { + final authName = info['name'] as String; + final basicAuthInfo = authInfo[authName]; + if (basicAuthInfo != null) { + final basicAuth = 'Basic ${base64Encode(utf8.encode('${basicAuthInfo.username}:${basicAuthInfo.password}'))}'; + options.headers['Authorization'] = basicAuth; + break; + } + } + super.onRequest(options, handler); + } +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/bearer_auth.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/bearer_auth.dart new file mode 100644 index 00000000000..daa81713008 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/bearer_auth.dart @@ -0,0 +1,26 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:dio_http/dio_http.dart'; +import 'package:openapi/src/auth/auth.dart'; + +class BearerAuthInterceptor extends AuthInterceptor { + final Map tokens = {}; + + @override + void onRequest( + RequestOptions options, + RequestInterceptorHandler handler, + ) { + final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'http' && secure['scheme'] == 'bearer'); + for (final info in authInfo) { + final token = tokens[info['name']]; + if (token != null) { + options.headers['Authorization'] = 'Bearer ${token}'; + break; + } + } + super.onRequest(options, handler); + } +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/oauth.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/oauth.dart new file mode 100644 index 00000000000..82140409b32 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/auth/oauth.dart @@ -0,0 +1,26 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:dio_http/dio_http.dart'; +import 'package:openapi/src/auth/auth.dart'; + +class OAuthInterceptor extends AuthInterceptor { + final Map tokens = {}; + + @override + void onRequest( + RequestOptions options, + RequestInterceptorHandler handler, + ) { + final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'oauth' || secure['type'] == 'oauth2'); + for (final info in authInfo) { + final token = tokens[info['name']]; + if (token != null) { + options.headers['Authorization'] = 'Bearer ${token}'; + break; + } + } + super.onRequest(options, handler); + } +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/date_serializer.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/date_serializer.dart new file mode 100644 index 00000000000..db3c5c437db --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/date_serializer.dart @@ -0,0 +1,31 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/serializer.dart'; +import 'package:openapi/src/model/date.dart'; + +class DateSerializer implements PrimitiveSerializer { + + const DateSerializer(); + + @override + Iterable get types => BuiltList.of([Date]); + + @override + String get wireName => 'Date'; + + @override + Date deserialize(Serializers serializers, Object serialized, + {FullType specifiedType = FullType.unspecified}) { + final parsed = DateTime.parse(serialized as String); + return Date(parsed.year, parsed.month, parsed.day); + } + + @override + Object serialize(Serializers serializers, Date date, + {FullType specifiedType = FullType.unspecified}) { + return date.toString(); + } +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/additional_properties_class.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/additional_properties_class.dart new file mode 100644 index 00000000000..4d45be3abbf --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/additional_properties_class.dart @@ -0,0 +1,87 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'additional_properties_class.g.dart'; + +/// AdditionalPropertiesClass +/// +/// Properties: +/// * [mapProperty] +/// * [mapOfMapProperty] +abstract class AdditionalPropertiesClass implements Built { + @BuiltValueField(wireName: r'map_property') + BuiltMap? get mapProperty; + + @BuiltValueField(wireName: r'map_of_map_property') + BuiltMap>? get mapOfMapProperty; + + AdditionalPropertiesClass._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AdditionalPropertiesClassBuilder b) => b; + + factory AdditionalPropertiesClass([void updates(AdditionalPropertiesClassBuilder b)]) = _$AdditionalPropertiesClass; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AdditionalPropertiesClassSerializer(); +} + +class _$AdditionalPropertiesClassSerializer implements StructuredSerializer { + @override + final Iterable types = const [AdditionalPropertiesClass, _$AdditionalPropertiesClass]; + + @override + final String wireName = r'AdditionalPropertiesClass'; + + @override + Iterable serialize(Serializers serializers, AdditionalPropertiesClass object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.mapProperty != null) { + result + ..add(r'map_property') + ..add(serializers.serialize(object.mapProperty, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)]))); + } + if (object.mapOfMapProperty != null) { + result + ..add(r'map_of_map_property') + ..add(serializers.serialize(object.mapOfMapProperty, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType(BuiltMap, [FullType(String), FullType(String)])]))); + } + return result; + } + + @override + AdditionalPropertiesClass deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = AdditionalPropertiesClassBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'map_property': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)])) as BuiltMap; + result.mapProperty.replace(valueDes); + break; + case r'map_of_map_property': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType(BuiltMap, [FullType(String), FullType(String)])])) as BuiltMap>; + result.mapOfMapProperty.replace(valueDes); + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/animal.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/animal.dart new file mode 100644 index 00000000000..cd9084ceb28 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/animal.dart @@ -0,0 +1,85 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'animal.g.dart'; + +/// Animal +/// +/// Properties: +/// * [className] +/// * [color] +abstract class Animal implements Built { + @BuiltValueField(wireName: r'className') + String get className; + + @BuiltValueField(wireName: r'color') + String? get color; + + Animal._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AnimalBuilder b) => b + ..color = 'red'; + + factory Animal([void updates(AnimalBuilder b)]) = _$Animal; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AnimalSerializer(); +} + +class _$AnimalSerializer implements StructuredSerializer { + @override + final Iterable types = const [Animal, _$Animal]; + + @override + final String wireName = r'Animal'; + + @override + Iterable serialize(Serializers serializers, Animal object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + result + ..add(r'className') + ..add(serializers.serialize(object.className, + specifiedType: const FullType(String))); + if (object.color != null) { + result + ..add(r'color') + ..add(serializers.serialize(object.color, + specifiedType: const FullType(String))); + } + return result; + } + + @override + Animal deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = AnimalBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'className': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.className = valueDes; + break; + case r'color': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.color = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/api_response.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/api_response.dart new file mode 100644 index 00000000000..c2ebff7ffea --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/api_response.dart @@ -0,0 +1,101 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'api_response.g.dart'; + +/// ApiResponse +/// +/// Properties: +/// * [code] +/// * [type] +/// * [message] +abstract class ApiResponse implements Built { + @BuiltValueField(wireName: r'code') + int? get code; + + @BuiltValueField(wireName: r'type') + String? get type; + + @BuiltValueField(wireName: r'message') + String? get message; + + ApiResponse._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ApiResponseBuilder b) => b; + + factory ApiResponse([void updates(ApiResponseBuilder b)]) = _$ApiResponse; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ApiResponseSerializer(); +} + +class _$ApiResponseSerializer implements StructuredSerializer { + @override + final Iterable types = const [ApiResponse, _$ApiResponse]; + + @override + final String wireName = r'ApiResponse'; + + @override + Iterable serialize(Serializers serializers, ApiResponse object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.code != null) { + result + ..add(r'code') + ..add(serializers.serialize(object.code, + specifiedType: const FullType(int))); + } + if (object.type != null) { + result + ..add(r'type') + ..add(serializers.serialize(object.type, + specifiedType: const FullType(String))); + } + if (object.message != null) { + result + ..add(r'message') + ..add(serializers.serialize(object.message, + specifiedType: const FullType(String))); + } + return result; + } + + @override + ApiResponse deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = ApiResponseBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'code': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + result.code = valueDes; + break; + case r'type': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.type = valueDes; + break; + case r'message': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.message = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart new file mode 100644 index 00000000000..1fa583bccc1 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart @@ -0,0 +1,72 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'array_of_array_of_number_only.g.dart'; + +/// ArrayOfArrayOfNumberOnly +/// +/// Properties: +/// * [arrayArrayNumber] +abstract class ArrayOfArrayOfNumberOnly implements Built { + @BuiltValueField(wireName: r'ArrayArrayNumber') + BuiltList>? get arrayArrayNumber; + + ArrayOfArrayOfNumberOnly._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ArrayOfArrayOfNumberOnlyBuilder b) => b; + + factory ArrayOfArrayOfNumberOnly([void updates(ArrayOfArrayOfNumberOnlyBuilder b)]) = _$ArrayOfArrayOfNumberOnly; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ArrayOfArrayOfNumberOnlySerializer(); +} + +class _$ArrayOfArrayOfNumberOnlySerializer implements StructuredSerializer { + @override + final Iterable types = const [ArrayOfArrayOfNumberOnly, _$ArrayOfArrayOfNumberOnly]; + + @override + final String wireName = r'ArrayOfArrayOfNumberOnly'; + + @override + Iterable serialize(Serializers serializers, ArrayOfArrayOfNumberOnly object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.arrayArrayNumber != null) { + result + ..add(r'ArrayArrayNumber') + ..add(serializers.serialize(object.arrayArrayNumber, + specifiedType: const FullType(BuiltList, [FullType(BuiltList, [FullType(num)])]))); + } + return result; + } + + @override + ArrayOfArrayOfNumberOnly deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = ArrayOfArrayOfNumberOnlyBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'ArrayArrayNumber': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(BuiltList, [FullType(BuiltList, [FullType(num)])])) as BuiltList>; + result.arrayArrayNumber.replace(valueDes); + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_of_number_only.dart new file mode 100644 index 00000000000..fcbd7d393be --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_of_number_only.dart @@ -0,0 +1,72 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'array_of_number_only.g.dart'; + +/// ArrayOfNumberOnly +/// +/// Properties: +/// * [arrayNumber] +abstract class ArrayOfNumberOnly implements Built { + @BuiltValueField(wireName: r'ArrayNumber') + BuiltList? get arrayNumber; + + ArrayOfNumberOnly._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ArrayOfNumberOnlyBuilder b) => b; + + factory ArrayOfNumberOnly([void updates(ArrayOfNumberOnlyBuilder b)]) = _$ArrayOfNumberOnly; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ArrayOfNumberOnlySerializer(); +} + +class _$ArrayOfNumberOnlySerializer implements StructuredSerializer { + @override + final Iterable types = const [ArrayOfNumberOnly, _$ArrayOfNumberOnly]; + + @override + final String wireName = r'ArrayOfNumberOnly'; + + @override + Iterable serialize(Serializers serializers, ArrayOfNumberOnly object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.arrayNumber != null) { + result + ..add(r'ArrayNumber') + ..add(serializers.serialize(object.arrayNumber, + specifiedType: const FullType(BuiltList, [FullType(num)]))); + } + return result; + } + + @override + ArrayOfNumberOnly deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = ArrayOfNumberOnlyBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'ArrayNumber': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(BuiltList, [FullType(num)])) as BuiltList; + result.arrayNumber.replace(valueDes); + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_test.dart new file mode 100644 index 00000000000..8025d141c12 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/array_test.dart @@ -0,0 +1,103 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/read_only_first.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'array_test.g.dart'; + +/// ArrayTest +/// +/// Properties: +/// * [arrayOfString] +/// * [arrayArrayOfInteger] +/// * [arrayArrayOfModel] +abstract class ArrayTest implements Built { + @BuiltValueField(wireName: r'array_of_string') + BuiltList? get arrayOfString; + + @BuiltValueField(wireName: r'array_array_of_integer') + BuiltList>? get arrayArrayOfInteger; + + @BuiltValueField(wireName: r'array_array_of_model') + BuiltList>? get arrayArrayOfModel; + + ArrayTest._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ArrayTestBuilder b) => b; + + factory ArrayTest([void updates(ArrayTestBuilder b)]) = _$ArrayTest; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ArrayTestSerializer(); +} + +class _$ArrayTestSerializer implements StructuredSerializer { + @override + final Iterable types = const [ArrayTest, _$ArrayTest]; + + @override + final String wireName = r'ArrayTest'; + + @override + Iterable serialize(Serializers serializers, ArrayTest object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.arrayOfString != null) { + result + ..add(r'array_of_string') + ..add(serializers.serialize(object.arrayOfString, + specifiedType: const FullType(BuiltList, [FullType(String)]))); + } + if (object.arrayArrayOfInteger != null) { + result + ..add(r'array_array_of_integer') + ..add(serializers.serialize(object.arrayArrayOfInteger, + specifiedType: const FullType(BuiltList, [FullType(BuiltList, [FullType(int)])]))); + } + if (object.arrayArrayOfModel != null) { + result + ..add(r'array_array_of_model') + ..add(serializers.serialize(object.arrayArrayOfModel, + specifiedType: const FullType(BuiltList, [FullType(BuiltList, [FullType(ReadOnlyFirst)])]))); + } + return result; + } + + @override + ArrayTest deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = ArrayTestBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'array_of_string': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList; + result.arrayOfString.replace(valueDes); + break; + case r'array_array_of_integer': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(BuiltList, [FullType(BuiltList, [FullType(int)])])) as BuiltList>; + result.arrayArrayOfInteger.replace(valueDes); + break; + case r'array_array_of_model': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(BuiltList, [FullType(BuiltList, [FullType(ReadOnlyFirst)])])) as BuiltList>; + result.arrayArrayOfModel.replace(valueDes); + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/capitalization.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/capitalization.dart new file mode 100644 index 00000000000..15a8f080e9b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/capitalization.dart @@ -0,0 +1,147 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'capitalization.g.dart'; + +/// Capitalization +/// +/// Properties: +/// * [smallCamel] +/// * [capitalCamel] +/// * [smallSnake] +/// * [capitalSnake] +/// * [sCAETHFlowPoints] +/// * [ATT_NAME] - Name of the pet +abstract class Capitalization implements Built { + @BuiltValueField(wireName: r'smallCamel') + String? get smallCamel; + + @BuiltValueField(wireName: r'CapitalCamel') + String? get capitalCamel; + + @BuiltValueField(wireName: r'small_Snake') + String? get smallSnake; + + @BuiltValueField(wireName: r'Capital_Snake') + String? get capitalSnake; + + @BuiltValueField(wireName: r'SCA_ETH_Flow_Points') + String? get sCAETHFlowPoints; + + /// Name of the pet + @BuiltValueField(wireName: r'ATT_NAME') + String? get ATT_NAME; + + Capitalization._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(CapitalizationBuilder b) => b; + + factory Capitalization([void updates(CapitalizationBuilder b)]) = _$Capitalization; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$CapitalizationSerializer(); +} + +class _$CapitalizationSerializer implements StructuredSerializer { + @override + final Iterable types = const [Capitalization, _$Capitalization]; + + @override + final String wireName = r'Capitalization'; + + @override + Iterable serialize(Serializers serializers, Capitalization object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.smallCamel != null) { + result + ..add(r'smallCamel') + ..add(serializers.serialize(object.smallCamel, + specifiedType: const FullType(String))); + } + if (object.capitalCamel != null) { + result + ..add(r'CapitalCamel') + ..add(serializers.serialize(object.capitalCamel, + specifiedType: const FullType(String))); + } + if (object.smallSnake != null) { + result + ..add(r'small_Snake') + ..add(serializers.serialize(object.smallSnake, + specifiedType: const FullType(String))); + } + if (object.capitalSnake != null) { + result + ..add(r'Capital_Snake') + ..add(serializers.serialize(object.capitalSnake, + specifiedType: const FullType(String))); + } + if (object.sCAETHFlowPoints != null) { + result + ..add(r'SCA_ETH_Flow_Points') + ..add(serializers.serialize(object.sCAETHFlowPoints, + specifiedType: const FullType(String))); + } + if (object.ATT_NAME != null) { + result + ..add(r'ATT_NAME') + ..add(serializers.serialize(object.ATT_NAME, + specifiedType: const FullType(String))); + } + return result; + } + + @override + Capitalization deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = CapitalizationBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'smallCamel': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.smallCamel = valueDes; + break; + case r'CapitalCamel': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.capitalCamel = valueDes; + break; + case r'small_Snake': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.smallSnake = valueDes; + break; + case r'Capital_Snake': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.capitalSnake = valueDes; + break; + case r'SCA_ETH_Flow_Points': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.sCAETHFlowPoints = valueDes; + break; + case r'ATT_NAME': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.ATT_NAME = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/cat.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/cat.dart new file mode 100644 index 00000000000..2c905783610 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/cat.dart @@ -0,0 +1,104 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:openapi/src/model/animal.dart'; +import 'package:openapi/src/model/cat_all_of.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'cat.g.dart'; + +// ignore_for_file: unused_import + +/// Cat +/// +/// Properties: +/// * [className] +/// * [color] +/// * [declawed] +abstract class Cat implements Built { + @BuiltValueField(wireName: r'className') + String get className; + + @BuiltValueField(wireName: r'color') + String? get color; + + @BuiltValueField(wireName: r'declawed') + bool? get declawed; + + Cat._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(CatBuilder b) => b + ..color = 'red'; + + factory Cat([void updates(CatBuilder b)]) = _$Cat; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$CatSerializer(); +} + +class _$CatSerializer implements StructuredSerializer { + @override + final Iterable types = const [Cat, _$Cat]; + + @override + final String wireName = r'Cat'; + + @override + Iterable serialize(Serializers serializers, Cat object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + result + ..add(r'className') + ..add(serializers.serialize(object.className, + specifiedType: const FullType(String))); + if (object.color != null) { + result + ..add(r'color') + ..add(serializers.serialize(object.color, + specifiedType: const FullType(String))); + } + if (object.declawed != null) { + result + ..add(r'declawed') + ..add(serializers.serialize(object.declawed, + specifiedType: const FullType(bool))); + } + return result; + } + + @override + Cat deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = CatBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'className': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.className = valueDes; + break; + case r'color': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.color = valueDes; + break; + case r'declawed': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(bool)) as bool; + result.declawed = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/cat_all_of.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/cat_all_of.dart new file mode 100644 index 00000000000..1734098fe22 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/cat_all_of.dart @@ -0,0 +1,71 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'cat_all_of.g.dart'; + +/// CatAllOf +/// +/// Properties: +/// * [declawed] +abstract class CatAllOf implements Built { + @BuiltValueField(wireName: r'declawed') + bool? get declawed; + + CatAllOf._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(CatAllOfBuilder b) => b; + + factory CatAllOf([void updates(CatAllOfBuilder b)]) = _$CatAllOf; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$CatAllOfSerializer(); +} + +class _$CatAllOfSerializer implements StructuredSerializer { + @override + final Iterable types = const [CatAllOf, _$CatAllOf]; + + @override + final String wireName = r'CatAllOf'; + + @override + Iterable serialize(Serializers serializers, CatAllOf object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.declawed != null) { + result + ..add(r'declawed') + ..add(serializers.serialize(object.declawed, + specifiedType: const FullType(bool))); + } + return result; + } + + @override + CatAllOf deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = CatAllOfBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'declawed': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(bool)) as bool; + result.declawed = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/category.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/category.dart new file mode 100644 index 00000000000..9ee9a94a3e7 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/category.dart @@ -0,0 +1,85 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'category.g.dart'; + +/// Category +/// +/// Properties: +/// * [id] +/// * [name] +abstract class Category implements Built { + @BuiltValueField(wireName: r'id') + int? get id; + + @BuiltValueField(wireName: r'name') + String get name; + + Category._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(CategoryBuilder b) => b + ..name = 'default-name'; + + factory Category([void updates(CategoryBuilder b)]) = _$Category; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$CategorySerializer(); +} + +class _$CategorySerializer implements StructuredSerializer { + @override + final Iterable types = const [Category, _$Category]; + + @override + final String wireName = r'Category'; + + @override + Iterable serialize(Serializers serializers, Category object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.id != null) { + result + ..add(r'id') + ..add(serializers.serialize(object.id, + specifiedType: const FullType(int))); + } + result + ..add(r'name') + ..add(serializers.serialize(object.name, + specifiedType: const FullType(String))); + return result; + } + + @override + Category deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = CategoryBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'id': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + result.id = valueDes; + break; + case r'name': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.name = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/class_model.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/class_model.dart new file mode 100644 index 00000000000..ca90835c83d --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/class_model.dart @@ -0,0 +1,71 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'class_model.g.dart'; + +/// Model for testing model with \"_class\" property +/// +/// Properties: +/// * [class_] +abstract class ClassModel implements Built { + @BuiltValueField(wireName: r'_class') + String? get class_; + + ClassModel._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ClassModelBuilder b) => b; + + factory ClassModel([void updates(ClassModelBuilder b)]) = _$ClassModel; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ClassModelSerializer(); +} + +class _$ClassModelSerializer implements StructuredSerializer { + @override + final Iterable types = const [ClassModel, _$ClassModel]; + + @override + final String wireName = r'ClassModel'; + + @override + Iterable serialize(Serializers serializers, ClassModel object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.class_ != null) { + result + ..add(r'_class') + ..add(serializers.serialize(object.class_, + specifiedType: const FullType(String))); + } + return result; + } + + @override + ClassModel deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = ClassModelBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'_class': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.class_ = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/date.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/date.dart new file mode 100644 index 00000000000..b21c7f544be --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/date.dart @@ -0,0 +1,70 @@ +/// A gregorian calendar date generated by +/// OpenAPI generator to differentiate +/// between [DateTime] and [Date] formats. +class Date implements Comparable { + final int year; + + /// January is 1. + final int month; + + /// First day is 1. + final int day; + + Date(this.year, this.month, this.day); + + /// The current date + static Date now({bool utc = false}) { + var now = DateTime.now(); + if (utc) { + now = now.toUtc(); + } + return now.toDate(); + } + + /// Convert to a [DateTime]. + DateTime toDateTime({bool utc = false}) { + if (utc) { + return DateTime.utc(year, month, day); + } else { + return DateTime(year, month, day); + } + } + + @override + int compareTo(Date other) { + int d = year.compareTo(other.year); + if (d != 0) { + return d; + } + d = month.compareTo(other.month); + if (d != 0) { + return d; + } + return day.compareTo(other.day); + } + + @override + bool operator ==(Object other) => + identical(this, other) || + other is Date && + runtimeType == other.runtimeType && + year == other.year && + month == other.month && + day == other.day; + + @override + int get hashCode => year.hashCode ^ month.hashCode ^ day.hashCode; + + @override + String toString() { + final yyyy = year.toString(); + final mm = month.toString().padLeft(2, '0'); + final dd = day.toString().padLeft(2, '0'); + + return '$yyyy-$mm-$dd'; + } +} + +extension DateTimeToDate on DateTime { + Date toDate() => Date(year, month, day); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/deprecated_object.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/deprecated_object.dart new file mode 100644 index 00000000000..98db39b4f44 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/deprecated_object.dart @@ -0,0 +1,71 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'deprecated_object.g.dart'; + +/// DeprecatedObject +/// +/// Properties: +/// * [name] +abstract class DeprecatedObject implements Built { + @BuiltValueField(wireName: r'name') + String? get name; + + DeprecatedObject._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(DeprecatedObjectBuilder b) => b; + + factory DeprecatedObject([void updates(DeprecatedObjectBuilder b)]) = _$DeprecatedObject; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$DeprecatedObjectSerializer(); +} + +class _$DeprecatedObjectSerializer implements StructuredSerializer { + @override + final Iterable types = const [DeprecatedObject, _$DeprecatedObject]; + + @override + final String wireName = r'DeprecatedObject'; + + @override + Iterable serialize(Serializers serializers, DeprecatedObject object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.name != null) { + result + ..add(r'name') + ..add(serializers.serialize(object.name, + specifiedType: const FullType(String))); + } + return result; + } + + @override + DeprecatedObject deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = DeprecatedObjectBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'name': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.name = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/dog.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/dog.dart new file mode 100644 index 00000000000..9e36ec77bd8 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/dog.dart @@ -0,0 +1,104 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:openapi/src/model/dog_all_of.dart'; +import 'package:openapi/src/model/animal.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'dog.g.dart'; + +// ignore_for_file: unused_import + +/// Dog +/// +/// Properties: +/// * [className] +/// * [color] +/// * [breed] +abstract class Dog implements Built { + @BuiltValueField(wireName: r'className') + String get className; + + @BuiltValueField(wireName: r'color') + String? get color; + + @BuiltValueField(wireName: r'breed') + String? get breed; + + Dog._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(DogBuilder b) => b + ..color = 'red'; + + factory Dog([void updates(DogBuilder b)]) = _$Dog; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$DogSerializer(); +} + +class _$DogSerializer implements StructuredSerializer { + @override + final Iterable types = const [Dog, _$Dog]; + + @override + final String wireName = r'Dog'; + + @override + Iterable serialize(Serializers serializers, Dog object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + result + ..add(r'className') + ..add(serializers.serialize(object.className, + specifiedType: const FullType(String))); + if (object.color != null) { + result + ..add(r'color') + ..add(serializers.serialize(object.color, + specifiedType: const FullType(String))); + } + if (object.breed != null) { + result + ..add(r'breed') + ..add(serializers.serialize(object.breed, + specifiedType: const FullType(String))); + } + return result; + } + + @override + Dog deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = DogBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'className': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.className = valueDes; + break; + case r'color': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.color = valueDes; + break; + case r'breed': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.breed = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/dog_all_of.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/dog_all_of.dart new file mode 100644 index 00000000000..23387e4da75 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/dog_all_of.dart @@ -0,0 +1,71 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'dog_all_of.g.dart'; + +/// DogAllOf +/// +/// Properties: +/// * [breed] +abstract class DogAllOf implements Built { + @BuiltValueField(wireName: r'breed') + String? get breed; + + DogAllOf._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(DogAllOfBuilder b) => b; + + factory DogAllOf([void updates(DogAllOfBuilder b)]) = _$DogAllOf; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$DogAllOfSerializer(); +} + +class _$DogAllOfSerializer implements StructuredSerializer { + @override + final Iterable types = const [DogAllOf, _$DogAllOf]; + + @override + final String wireName = r'DogAllOf'; + + @override + Iterable serialize(Serializers serializers, DogAllOf object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.breed != null) { + result + ..add(r'breed') + ..add(serializers.serialize(object.breed, + specifiedType: const FullType(String))); + } + return result; + } + + @override + DogAllOf deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = DogAllOfBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'breed': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.breed = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/enum_arrays.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/enum_arrays.dart new file mode 100644 index 00000000000..bda9790c104 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/enum_arrays.dart @@ -0,0 +1,119 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'enum_arrays.g.dart'; + +/// EnumArrays +/// +/// Properties: +/// * [justSymbol] +/// * [arrayEnum] +abstract class EnumArrays implements Built { + @BuiltValueField(wireName: r'just_symbol') + EnumArraysJustSymbolEnum? get justSymbol; + // enum justSymbolEnum { >=, $, }; + + @BuiltValueField(wireName: r'array_enum') + BuiltList? get arrayEnum; + // enum arrayEnumEnum { fish, crab, }; + + EnumArrays._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(EnumArraysBuilder b) => b; + + factory EnumArrays([void updates(EnumArraysBuilder b)]) = _$EnumArrays; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$EnumArraysSerializer(); +} + +class _$EnumArraysSerializer implements StructuredSerializer { + @override + final Iterable types = const [EnumArrays, _$EnumArrays]; + + @override + final String wireName = r'EnumArrays'; + + @override + Iterable serialize(Serializers serializers, EnumArrays object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.justSymbol != null) { + result + ..add(r'just_symbol') + ..add(serializers.serialize(object.justSymbol, + specifiedType: const FullType(EnumArraysJustSymbolEnum))); + } + if (object.arrayEnum != null) { + result + ..add(r'array_enum') + ..add(serializers.serialize(object.arrayEnum, + specifiedType: const FullType(BuiltList, [FullType(EnumArraysArrayEnumEnum)]))); + } + return result; + } + + @override + EnumArrays deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = EnumArraysBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'just_symbol': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(EnumArraysJustSymbolEnum)) as EnumArraysJustSymbolEnum; + result.justSymbol = valueDes; + break; + case r'array_enum': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(BuiltList, [FullType(EnumArraysArrayEnumEnum)])) as BuiltList; + result.arrayEnum.replace(valueDes); + break; + } + } + return result.build(); + } +} + +class EnumArraysJustSymbolEnum extends EnumClass { + + @BuiltValueEnumConst(wireName: r'>=') + static const EnumArraysJustSymbolEnum greaterThanEqual = _$enumArraysJustSymbolEnum_greaterThanEqual; + @BuiltValueEnumConst(wireName: r'$') + static const EnumArraysJustSymbolEnum dollar = _$enumArraysJustSymbolEnum_dollar; + + static Serializer get serializer => _$enumArraysJustSymbolEnumSerializer; + + const EnumArraysJustSymbolEnum._(String name): super(name); + + static BuiltSet get values => _$enumArraysJustSymbolEnumValues; + static EnumArraysJustSymbolEnum valueOf(String name) => _$enumArraysJustSymbolEnumValueOf(name); +} + +class EnumArraysArrayEnumEnum extends EnumClass { + + @BuiltValueEnumConst(wireName: r'fish') + static const EnumArraysArrayEnumEnum fish = _$enumArraysArrayEnumEnum_fish; + @BuiltValueEnumConst(wireName: r'crab') + static const EnumArraysArrayEnumEnum crab = _$enumArraysArrayEnumEnum_crab; + + static Serializer get serializer => _$enumArraysArrayEnumEnumSerializer; + + const EnumArraysArrayEnumEnum._(String name): super(name); + + static BuiltSet get values => _$enumArraysArrayEnumEnumValues; + static EnumArraysArrayEnumEnum valueOf(String name) => _$enumArraysArrayEnumEnumValueOf(name); +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/enum_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/enum_test.dart new file mode 100644 index 00000000000..7ca76d22fe0 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/enum_test.dart @@ -0,0 +1,252 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:openapi/src/model/outer_enum.dart'; +import 'package:openapi/src/model/outer_enum_default_value.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/outer_enum_integer.dart'; +import 'package:openapi/src/model/outer_enum_integer_default_value.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'enum_test.g.dart'; + +/// EnumTest +/// +/// Properties: +/// * [enumString] +/// * [enumStringRequired] +/// * [enumInteger] +/// * [enumNumber] +/// * [outerEnum] +/// * [outerEnumInteger] +/// * [outerEnumDefaultValue] +/// * [outerEnumIntegerDefaultValue] +abstract class EnumTest implements Built { + @BuiltValueField(wireName: r'enum_string') + EnumTestEnumStringEnum? get enumString; + // enum enumStringEnum { UPPER, lower, , }; + + @BuiltValueField(wireName: r'enum_string_required') + EnumTestEnumStringRequiredEnum get enumStringRequired; + // enum enumStringRequiredEnum { UPPER, lower, , }; + + @BuiltValueField(wireName: r'enum_integer') + EnumTestEnumIntegerEnum? get enumInteger; + // enum enumIntegerEnum { 1, -1, }; + + @BuiltValueField(wireName: r'enum_number') + EnumTestEnumNumberEnum? get enumNumber; + // enum enumNumberEnum { 1.1, -1.2, }; + + @BuiltValueField(wireName: r'outerEnum') + OuterEnum? get outerEnum; + // enum outerEnumEnum { placed, approved, delivered, }; + + @BuiltValueField(wireName: r'outerEnumInteger') + OuterEnumInteger? get outerEnumInteger; + // enum outerEnumIntegerEnum { 0, 1, 2, }; + + @BuiltValueField(wireName: r'outerEnumDefaultValue') + OuterEnumDefaultValue? get outerEnumDefaultValue; + // enum outerEnumDefaultValueEnum { placed, approved, delivered, }; + + @BuiltValueField(wireName: r'outerEnumIntegerDefaultValue') + OuterEnumIntegerDefaultValue? get outerEnumIntegerDefaultValue; + // enum outerEnumIntegerDefaultValueEnum { 0, 1, 2, }; + + EnumTest._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(EnumTestBuilder b) => b; + + factory EnumTest([void updates(EnumTestBuilder b)]) = _$EnumTest; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$EnumTestSerializer(); +} + +class _$EnumTestSerializer implements StructuredSerializer { + @override + final Iterable types = const [EnumTest, _$EnumTest]; + + @override + final String wireName = r'EnumTest'; + + @override + Iterable serialize(Serializers serializers, EnumTest object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.enumString != null) { + result + ..add(r'enum_string') + ..add(serializers.serialize(object.enumString, + specifiedType: const FullType(EnumTestEnumStringEnum))); + } + result + ..add(r'enum_string_required') + ..add(serializers.serialize(object.enumStringRequired, + specifiedType: const FullType(EnumTestEnumStringRequiredEnum))); + if (object.enumInteger != null) { + result + ..add(r'enum_integer') + ..add(serializers.serialize(object.enumInteger, + specifiedType: const FullType(EnumTestEnumIntegerEnum))); + } + if (object.enumNumber != null) { + result + ..add(r'enum_number') + ..add(serializers.serialize(object.enumNumber, + specifiedType: const FullType(EnumTestEnumNumberEnum))); + } + if (object.outerEnum != null) { + result + ..add(r'outerEnum') + ..add(serializers.serialize(object.outerEnum, + specifiedType: const FullType.nullable(OuterEnum))); + } + if (object.outerEnumInteger != null) { + result + ..add(r'outerEnumInteger') + ..add(serializers.serialize(object.outerEnumInteger, + specifiedType: const FullType(OuterEnumInteger))); + } + if (object.outerEnumDefaultValue != null) { + result + ..add(r'outerEnumDefaultValue') + ..add(serializers.serialize(object.outerEnumDefaultValue, + specifiedType: const FullType(OuterEnumDefaultValue))); + } + if (object.outerEnumIntegerDefaultValue != null) { + result + ..add(r'outerEnumIntegerDefaultValue') + ..add(serializers.serialize(object.outerEnumIntegerDefaultValue, + specifiedType: const FullType(OuterEnumIntegerDefaultValue))); + } + return result; + } + + @override + EnumTest deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = EnumTestBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'enum_string': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(EnumTestEnumStringEnum)) as EnumTestEnumStringEnum; + result.enumString = valueDes; + break; + case r'enum_string_required': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(EnumTestEnumStringRequiredEnum)) as EnumTestEnumStringRequiredEnum; + result.enumStringRequired = valueDes; + break; + case r'enum_integer': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(EnumTestEnumIntegerEnum)) as EnumTestEnumIntegerEnum; + result.enumInteger = valueDes; + break; + case r'enum_number': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(EnumTestEnumNumberEnum)) as EnumTestEnumNumberEnum; + result.enumNumber = valueDes; + break; + case r'outerEnum': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType.nullable(OuterEnum)) as OuterEnum?; + if (valueDes == null) continue; + result.outerEnum = valueDes; + break; + case r'outerEnumInteger': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(OuterEnumInteger)) as OuterEnumInteger; + result.outerEnumInteger = valueDes; + break; + case r'outerEnumDefaultValue': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(OuterEnumDefaultValue)) as OuterEnumDefaultValue; + result.outerEnumDefaultValue = valueDes; + break; + case r'outerEnumIntegerDefaultValue': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(OuterEnumIntegerDefaultValue)) as OuterEnumIntegerDefaultValue; + result.outerEnumIntegerDefaultValue = valueDes; + break; + } + } + return result.build(); + } +} + +class EnumTestEnumStringEnum extends EnumClass { + + @BuiltValueEnumConst(wireName: r'UPPER') + static const EnumTestEnumStringEnum UPPER = _$enumTestEnumStringEnum_UPPER; + @BuiltValueEnumConst(wireName: r'lower') + static const EnumTestEnumStringEnum lower = _$enumTestEnumStringEnum_lower; + @BuiltValueEnumConst(wireName: r'') + static const EnumTestEnumStringEnum empty = _$enumTestEnumStringEnum_empty; + + static Serializer get serializer => _$enumTestEnumStringEnumSerializer; + + const EnumTestEnumStringEnum._(String name): super(name); + + static BuiltSet get values => _$enumTestEnumStringEnumValues; + static EnumTestEnumStringEnum valueOf(String name) => _$enumTestEnumStringEnumValueOf(name); +} + +class EnumTestEnumStringRequiredEnum extends EnumClass { + + @BuiltValueEnumConst(wireName: r'UPPER') + static const EnumTestEnumStringRequiredEnum UPPER = _$enumTestEnumStringRequiredEnum_UPPER; + @BuiltValueEnumConst(wireName: r'lower') + static const EnumTestEnumStringRequiredEnum lower = _$enumTestEnumStringRequiredEnum_lower; + @BuiltValueEnumConst(wireName: r'') + static const EnumTestEnumStringRequiredEnum empty = _$enumTestEnumStringRequiredEnum_empty; + + static Serializer get serializer => _$enumTestEnumStringRequiredEnumSerializer; + + const EnumTestEnumStringRequiredEnum._(String name): super(name); + + static BuiltSet get values => _$enumTestEnumStringRequiredEnumValues; + static EnumTestEnumStringRequiredEnum valueOf(String name) => _$enumTestEnumStringRequiredEnumValueOf(name); +} + +class EnumTestEnumIntegerEnum extends EnumClass { + + @BuiltValueEnumConst(wireNumber: 1) + static const EnumTestEnumIntegerEnum number1 = _$enumTestEnumIntegerEnum_number1; + @BuiltValueEnumConst(wireNumber: -1) + static const EnumTestEnumIntegerEnum numberNegative1 = _$enumTestEnumIntegerEnum_numberNegative1; + + static Serializer get serializer => _$enumTestEnumIntegerEnumSerializer; + + const EnumTestEnumIntegerEnum._(String name): super(name); + + static BuiltSet get values => _$enumTestEnumIntegerEnumValues; + static EnumTestEnumIntegerEnum valueOf(String name) => _$enumTestEnumIntegerEnumValueOf(name); +} + +class EnumTestEnumNumberEnum extends EnumClass { + + @BuiltValueEnumConst(wireName: r'1.1') + static const EnumTestEnumNumberEnum number1Period1 = _$enumTestEnumNumberEnum_number1Period1; + @BuiltValueEnumConst(wireName: r'-1.2') + static const EnumTestEnumNumberEnum numberNegative1Period2 = _$enumTestEnumNumberEnum_numberNegative1Period2; + + static Serializer get serializer => _$enumTestEnumNumberEnumSerializer; + + const EnumTestEnumNumberEnum._(String name): super(name); + + static BuiltSet get values => _$enumTestEnumNumberEnumValues; + static EnumTestEnumNumberEnum valueOf(String name) => _$enumTestEnumNumberEnumValueOf(name); +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/file_schema_test_class.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/file_schema_test_class.dart new file mode 100644 index 00000000000..7a2090e87da --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/file_schema_test_class.dart @@ -0,0 +1,88 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/model_file.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'file_schema_test_class.g.dart'; + +/// FileSchemaTestClass +/// +/// Properties: +/// * [file] +/// * [files] +abstract class FileSchemaTestClass implements Built { + @BuiltValueField(wireName: r'file') + ModelFile? get file; + + @BuiltValueField(wireName: r'files') + BuiltList? get files; + + FileSchemaTestClass._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(FileSchemaTestClassBuilder b) => b; + + factory FileSchemaTestClass([void updates(FileSchemaTestClassBuilder b)]) = _$FileSchemaTestClass; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$FileSchemaTestClassSerializer(); +} + +class _$FileSchemaTestClassSerializer implements StructuredSerializer { + @override + final Iterable types = const [FileSchemaTestClass, _$FileSchemaTestClass]; + + @override + final String wireName = r'FileSchemaTestClass'; + + @override + Iterable serialize(Serializers serializers, FileSchemaTestClass object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.file != null) { + result + ..add(r'file') + ..add(serializers.serialize(object.file, + specifiedType: const FullType(ModelFile))); + } + if (object.files != null) { + result + ..add(r'files') + ..add(serializers.serialize(object.files, + specifiedType: const FullType(BuiltList, [FullType(ModelFile)]))); + } + return result; + } + + @override + FileSchemaTestClass deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = FileSchemaTestClassBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'file': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(ModelFile)) as ModelFile; + result.file.replace(valueDes); + break; + case r'files': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(BuiltList, [FullType(ModelFile)])) as BuiltList; + result.files.replace(valueDes); + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/foo.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/foo.dart new file mode 100644 index 00000000000..dd3691968d4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/foo.dart @@ -0,0 +1,72 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'foo.g.dart'; + +/// Foo +/// +/// Properties: +/// * [bar] +abstract class Foo implements Built { + @BuiltValueField(wireName: r'bar') + String? get bar; + + Foo._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(FooBuilder b) => b + ..bar = 'bar'; + + factory Foo([void updates(FooBuilder b)]) = _$Foo; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$FooSerializer(); +} + +class _$FooSerializer implements StructuredSerializer { + @override + final Iterable types = const [Foo, _$Foo]; + + @override + final String wireName = r'Foo'; + + @override + Iterable serialize(Serializers serializers, Foo object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.bar != null) { + result + ..add(r'bar') + ..add(serializers.serialize(object.bar, + specifiedType: const FullType(String))); + } + return result; + } + + @override + Foo deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = FooBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'bar': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.bar = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/format_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/format_test.dart new file mode 100644 index 00000000000..cf1be44ab5b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/format_test.dart @@ -0,0 +1,292 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:typed_data'; +import 'package:openapi/src/model/date.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'format_test.g.dart'; + +/// FormatTest +/// +/// Properties: +/// * [integer] +/// * [int32] +/// * [int64] +/// * [number] +/// * [float] +/// * [double_] +/// * [decimal] +/// * [string] +/// * [byte] +/// * [binary] +/// * [date] +/// * [dateTime] +/// * [uuid] +/// * [password] +/// * [patternWithDigits] - A string that is a 10 digit number. Can have leading zeros. +/// * [patternWithDigitsAndDelimiter] - A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. +abstract class FormatTest implements Built { + @BuiltValueField(wireName: r'integer') + int? get integer; + + @BuiltValueField(wireName: r'int32') + int? get int32; + + @BuiltValueField(wireName: r'int64') + int? get int64; + + @BuiltValueField(wireName: r'number') + num get number; + + @BuiltValueField(wireName: r'float') + double? get float; + + @BuiltValueField(wireName: r'double') + double? get double_; + + @BuiltValueField(wireName: r'decimal') + double? get decimal; + + @BuiltValueField(wireName: r'string') + String? get string; + + @BuiltValueField(wireName: r'byte') + String get byte; + + @BuiltValueField(wireName: r'binary') + Uint8List? get binary; + + @BuiltValueField(wireName: r'date') + Date get date; + + @BuiltValueField(wireName: r'dateTime') + DateTime? get dateTime; + + @BuiltValueField(wireName: r'uuid') + String? get uuid; + + @BuiltValueField(wireName: r'password') + String get password; + + /// A string that is a 10 digit number. Can have leading zeros. + @BuiltValueField(wireName: r'pattern_with_digits') + String? get patternWithDigits; + + /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + @BuiltValueField(wireName: r'pattern_with_digits_and_delimiter') + String? get patternWithDigitsAndDelimiter; + + FormatTest._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(FormatTestBuilder b) => b; + + factory FormatTest([void updates(FormatTestBuilder b)]) = _$FormatTest; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$FormatTestSerializer(); +} + +class _$FormatTestSerializer implements StructuredSerializer { + @override + final Iterable types = const [FormatTest, _$FormatTest]; + + @override + final String wireName = r'FormatTest'; + + @override + Iterable serialize(Serializers serializers, FormatTest object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.integer != null) { + result + ..add(r'integer') + ..add(serializers.serialize(object.integer, + specifiedType: const FullType(int))); + } + if (object.int32 != null) { + result + ..add(r'int32') + ..add(serializers.serialize(object.int32, + specifiedType: const FullType(int))); + } + if (object.int64 != null) { + result + ..add(r'int64') + ..add(serializers.serialize(object.int64, + specifiedType: const FullType(int))); + } + result + ..add(r'number') + ..add(serializers.serialize(object.number, + specifiedType: const FullType(num))); + if (object.float != null) { + result + ..add(r'float') + ..add(serializers.serialize(object.float, + specifiedType: const FullType(double))); + } + if (object.double_ != null) { + result + ..add(r'double') + ..add(serializers.serialize(object.double_, + specifiedType: const FullType(double))); + } + if (object.decimal != null) { + result + ..add(r'decimal') + ..add(serializers.serialize(object.decimal, + specifiedType: const FullType(double))); + } + if (object.string != null) { + result + ..add(r'string') + ..add(serializers.serialize(object.string, + specifiedType: const FullType(String))); + } + result + ..add(r'byte') + ..add(serializers.serialize(object.byte, + specifiedType: const FullType(String))); + if (object.binary != null) { + result + ..add(r'binary') + ..add(serializers.serialize(object.binary, + specifiedType: const FullType(Uint8List))); + } + result + ..add(r'date') + ..add(serializers.serialize(object.date, + specifiedType: const FullType(Date))); + if (object.dateTime != null) { + result + ..add(r'dateTime') + ..add(serializers.serialize(object.dateTime, + specifiedType: const FullType(DateTime))); + } + if (object.uuid != null) { + result + ..add(r'uuid') + ..add(serializers.serialize(object.uuid, + specifiedType: const FullType(String))); + } + result + ..add(r'password') + ..add(serializers.serialize(object.password, + specifiedType: const FullType(String))); + if (object.patternWithDigits != null) { + result + ..add(r'pattern_with_digits') + ..add(serializers.serialize(object.patternWithDigits, + specifiedType: const FullType(String))); + } + if (object.patternWithDigitsAndDelimiter != null) { + result + ..add(r'pattern_with_digits_and_delimiter') + ..add(serializers.serialize(object.patternWithDigitsAndDelimiter, + specifiedType: const FullType(String))); + } + return result; + } + + @override + FormatTest deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = FormatTestBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'integer': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + result.integer = valueDes; + break; + case r'int32': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + result.int32 = valueDes; + break; + case r'int64': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + result.int64 = valueDes; + break; + case r'number': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(num)) as num; + result.number = valueDes; + break; + case r'float': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(double)) as double; + result.float = valueDes; + break; + case r'double': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(double)) as double; + result.double_ = valueDes; + break; + case r'decimal': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(double)) as double; + result.decimal = valueDes; + break; + case r'string': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.string = valueDes; + break; + case r'byte': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.byte = valueDes; + break; + case r'binary': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(Uint8List)) as Uint8List; + result.binary = valueDes; + break; + case r'date': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(Date)) as Date; + result.date = valueDes; + break; + case r'dateTime': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(DateTime)) as DateTime; + result.dateTime = valueDes; + break; + case r'uuid': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.uuid = valueDes; + break; + case r'password': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.password = valueDes; + break; + case r'pattern_with_digits': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.patternWithDigits = valueDes; + break; + case r'pattern_with_digits_and_delimiter': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.patternWithDigitsAndDelimiter = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/has_only_read_only.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/has_only_read_only.dart new file mode 100644 index 00000000000..21b44ece26e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/has_only_read_only.dart @@ -0,0 +1,86 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'has_only_read_only.g.dart'; + +/// HasOnlyReadOnly +/// +/// Properties: +/// * [bar] +/// * [foo] +abstract class HasOnlyReadOnly implements Built { + @BuiltValueField(wireName: r'bar') + String? get bar; + + @BuiltValueField(wireName: r'foo') + String? get foo; + + HasOnlyReadOnly._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(HasOnlyReadOnlyBuilder b) => b; + + factory HasOnlyReadOnly([void updates(HasOnlyReadOnlyBuilder b)]) = _$HasOnlyReadOnly; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$HasOnlyReadOnlySerializer(); +} + +class _$HasOnlyReadOnlySerializer implements StructuredSerializer { + @override + final Iterable types = const [HasOnlyReadOnly, _$HasOnlyReadOnly]; + + @override + final String wireName = r'HasOnlyReadOnly'; + + @override + Iterable serialize(Serializers serializers, HasOnlyReadOnly object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.bar != null) { + result + ..add(r'bar') + ..add(serializers.serialize(object.bar, + specifiedType: const FullType(String))); + } + if (object.foo != null) { + result + ..add(r'foo') + ..add(serializers.serialize(object.foo, + specifiedType: const FullType(String))); + } + return result; + } + + @override + HasOnlyReadOnly deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = HasOnlyReadOnlyBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'bar': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.bar = valueDes; + break; + case r'foo': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.foo = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/health_check_result.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/health_check_result.dart new file mode 100644 index 00000000000..e589cb7bd35 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/health_check_result.dart @@ -0,0 +1,72 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'health_check_result.g.dart'; + +/// Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. +/// +/// Properties: +/// * [nullableMessage] +abstract class HealthCheckResult implements Built { + @BuiltValueField(wireName: r'NullableMessage') + String? get nullableMessage; + + HealthCheckResult._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(HealthCheckResultBuilder b) => b; + + factory HealthCheckResult([void updates(HealthCheckResultBuilder b)]) = _$HealthCheckResult; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$HealthCheckResultSerializer(); +} + +class _$HealthCheckResultSerializer implements StructuredSerializer { + @override + final Iterable types = const [HealthCheckResult, _$HealthCheckResult]; + + @override + final String wireName = r'HealthCheckResult'; + + @override + Iterable serialize(Serializers serializers, HealthCheckResult object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.nullableMessage != null) { + result + ..add(r'NullableMessage') + ..add(serializers.serialize(object.nullableMessage, + specifiedType: const FullType.nullable(String))); + } + return result; + } + + @override + HealthCheckResult deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = HealthCheckResultBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'NullableMessage': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType.nullable(String)) as String?; + if (valueDes == null) continue; + result.nullableMessage = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/inline_response_default.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/inline_response_default.dart new file mode 100644 index 00000000000..b611f8beb6a --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/inline_response_default.dart @@ -0,0 +1,72 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:openapi/src/model/foo.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'inline_response_default.g.dart'; + +/// InlineResponseDefault +/// +/// Properties: +/// * [string] +abstract class InlineResponseDefault implements Built { + @BuiltValueField(wireName: r'string') + Foo? get string; + + InlineResponseDefault._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(InlineResponseDefaultBuilder b) => b; + + factory InlineResponseDefault([void updates(InlineResponseDefaultBuilder b)]) = _$InlineResponseDefault; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$InlineResponseDefaultSerializer(); +} + +class _$InlineResponseDefaultSerializer implements StructuredSerializer { + @override + final Iterable types = const [InlineResponseDefault, _$InlineResponseDefault]; + + @override + final String wireName = r'InlineResponseDefault'; + + @override + Iterable serialize(Serializers serializers, InlineResponseDefault object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.string != null) { + result + ..add(r'string') + ..add(serializers.serialize(object.string, + specifiedType: const FullType(Foo))); + } + return result; + } + + @override + InlineResponseDefault deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = InlineResponseDefaultBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'string': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(Foo)) as Foo; + result.string.replace(valueDes); + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/map_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/map_test.dart new file mode 100644 index 00000000000..e5ae30f2290 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/map_test.dart @@ -0,0 +1,133 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'map_test.g.dart'; + +/// MapTest +/// +/// Properties: +/// * [mapMapOfString] +/// * [mapOfEnumString] +/// * [directMap] +/// * [indirectMap] +abstract class MapTest implements Built { + @BuiltValueField(wireName: r'map_map_of_string') + BuiltMap>? get mapMapOfString; + + @BuiltValueField(wireName: r'map_of_enum_string') + BuiltMap? get mapOfEnumString; + // enum mapOfEnumStringEnum { UPPER, lower, }; + + @BuiltValueField(wireName: r'direct_map') + BuiltMap? get directMap; + + @BuiltValueField(wireName: r'indirect_map') + BuiltMap? get indirectMap; + + MapTest._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(MapTestBuilder b) => b; + + factory MapTest([void updates(MapTestBuilder b)]) = _$MapTest; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$MapTestSerializer(); +} + +class _$MapTestSerializer implements StructuredSerializer { + @override + final Iterable types = const [MapTest, _$MapTest]; + + @override + final String wireName = r'MapTest'; + + @override + Iterable serialize(Serializers serializers, MapTest object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.mapMapOfString != null) { + result + ..add(r'map_map_of_string') + ..add(serializers.serialize(object.mapMapOfString, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType(BuiltMap, [FullType(String), FullType(String)])]))); + } + if (object.mapOfEnumString != null) { + result + ..add(r'map_of_enum_string') + ..add(serializers.serialize(object.mapOfEnumString, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType(MapTestMapOfEnumStringEnum)]))); + } + if (object.directMap != null) { + result + ..add(r'direct_map') + ..add(serializers.serialize(object.directMap, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType(bool)]))); + } + if (object.indirectMap != null) { + result + ..add(r'indirect_map') + ..add(serializers.serialize(object.indirectMap, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType(bool)]))); + } + return result; + } + + @override + MapTest deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = MapTestBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'map_map_of_string': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType(BuiltMap, [FullType(String), FullType(String)])])) as BuiltMap>; + result.mapMapOfString.replace(valueDes); + break; + case r'map_of_enum_string': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType(MapTestMapOfEnumStringEnum)])) as BuiltMap; + result.mapOfEnumString.replace(valueDes); + break; + case r'direct_map': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType(bool)])) as BuiltMap; + result.directMap.replace(valueDes); + break; + case r'indirect_map': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType(bool)])) as BuiltMap; + result.indirectMap.replace(valueDes); + break; + } + } + return result.build(); + } +} + +class MapTestMapOfEnumStringEnum extends EnumClass { + + @BuiltValueEnumConst(wireName: r'UPPER') + static const MapTestMapOfEnumStringEnum UPPER = _$mapTestMapOfEnumStringEnum_UPPER; + @BuiltValueEnumConst(wireName: r'lower') + static const MapTestMapOfEnumStringEnum lower = _$mapTestMapOfEnumStringEnum_lower; + + static Serializer get serializer => _$mapTestMapOfEnumStringEnumSerializer; + + const MapTestMapOfEnumStringEnum._(String name): super(name); + + static BuiltSet get values => _$mapTestMapOfEnumStringEnumValues; + static MapTestMapOfEnumStringEnum valueOf(String name) => _$mapTestMapOfEnumStringEnumValueOf(name); +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart new file mode 100644 index 00000000000..27c6993cc70 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart @@ -0,0 +1,103 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/animal.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'mixed_properties_and_additional_properties_class.g.dart'; + +/// MixedPropertiesAndAdditionalPropertiesClass +/// +/// Properties: +/// * [uuid] +/// * [dateTime] +/// * [map] +abstract class MixedPropertiesAndAdditionalPropertiesClass implements Built { + @BuiltValueField(wireName: r'uuid') + String? get uuid; + + @BuiltValueField(wireName: r'dateTime') + DateTime? get dateTime; + + @BuiltValueField(wireName: r'map') + BuiltMap? get map; + + MixedPropertiesAndAdditionalPropertiesClass._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(MixedPropertiesAndAdditionalPropertiesClassBuilder b) => b; + + factory MixedPropertiesAndAdditionalPropertiesClass([void updates(MixedPropertiesAndAdditionalPropertiesClassBuilder b)]) = _$MixedPropertiesAndAdditionalPropertiesClass; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$MixedPropertiesAndAdditionalPropertiesClassSerializer(); +} + +class _$MixedPropertiesAndAdditionalPropertiesClassSerializer implements StructuredSerializer { + @override + final Iterable types = const [MixedPropertiesAndAdditionalPropertiesClass, _$MixedPropertiesAndAdditionalPropertiesClass]; + + @override + final String wireName = r'MixedPropertiesAndAdditionalPropertiesClass'; + + @override + Iterable serialize(Serializers serializers, MixedPropertiesAndAdditionalPropertiesClass object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.uuid != null) { + result + ..add(r'uuid') + ..add(serializers.serialize(object.uuid, + specifiedType: const FullType(String))); + } + if (object.dateTime != null) { + result + ..add(r'dateTime') + ..add(serializers.serialize(object.dateTime, + specifiedType: const FullType(DateTime))); + } + if (object.map != null) { + result + ..add(r'map') + ..add(serializers.serialize(object.map, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType(Animal)]))); + } + return result; + } + + @override + MixedPropertiesAndAdditionalPropertiesClass deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = MixedPropertiesAndAdditionalPropertiesClassBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'uuid': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.uuid = valueDes; + break; + case r'dateTime': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(DateTime)) as DateTime; + result.dateTime = valueDes; + break; + case r'map': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType(Animal)])) as BuiltMap; + result.map.replace(valueDes); + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model200_response.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model200_response.dart new file mode 100644 index 00000000000..7392f71fe84 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model200_response.dart @@ -0,0 +1,86 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'model200_response.g.dart'; + +/// Model for testing model name starting with number +/// +/// Properties: +/// * [name] +/// * [class_] +abstract class Model200Response implements Built { + @BuiltValueField(wireName: r'name') + int? get name; + + @BuiltValueField(wireName: r'class') + String? get class_; + + Model200Response._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(Model200ResponseBuilder b) => b; + + factory Model200Response([void updates(Model200ResponseBuilder b)]) = _$Model200Response; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$Model200ResponseSerializer(); +} + +class _$Model200ResponseSerializer implements StructuredSerializer { + @override + final Iterable types = const [Model200Response, _$Model200Response]; + + @override + final String wireName = r'Model200Response'; + + @override + Iterable serialize(Serializers serializers, Model200Response object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.name != null) { + result + ..add(r'name') + ..add(serializers.serialize(object.name, + specifiedType: const FullType(int))); + } + if (object.class_ != null) { + result + ..add(r'class') + ..add(serializers.serialize(object.class_, + specifiedType: const FullType(String))); + } + return result; + } + + @override + Model200Response deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = Model200ResponseBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'name': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + result.name = valueDes; + break; + case r'class': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.class_ = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_client.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_client.dart new file mode 100644 index 00000000000..23c30a77f2b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_client.dart @@ -0,0 +1,71 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'model_client.g.dart'; + +/// ModelClient +/// +/// Properties: +/// * [client] +abstract class ModelClient implements Built { + @BuiltValueField(wireName: r'client') + String? get client; + + ModelClient._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ModelClientBuilder b) => b; + + factory ModelClient([void updates(ModelClientBuilder b)]) = _$ModelClient; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ModelClientSerializer(); +} + +class _$ModelClientSerializer implements StructuredSerializer { + @override + final Iterable types = const [ModelClient, _$ModelClient]; + + @override + final String wireName = r'ModelClient'; + + @override + Iterable serialize(Serializers serializers, ModelClient object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.client != null) { + result + ..add(r'client') + ..add(serializers.serialize(object.client, + specifiedType: const FullType(String))); + } + return result; + } + + @override + ModelClient deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = ModelClientBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'client': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.client = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_enum_class.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_enum_class.dart new file mode 100644 index 00000000000..ba6ca8c45dd --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_enum_class.dart @@ -0,0 +1,35 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'model_enum_class.g.dart'; + +class ModelEnumClass extends EnumClass { + + @BuiltValueEnumConst(wireName: r'_abc') + static const ModelEnumClass abc = _$abc; + @BuiltValueEnumConst(wireName: r'-efg') + static const ModelEnumClass efg = _$efg; + @BuiltValueEnumConst(wireName: r'(xyz)') + static const ModelEnumClass leftParenthesisXyzRightParenthesis = _$leftParenthesisXyzRightParenthesis; + + static Serializer get serializer => _$modelEnumClassSerializer; + + const ModelEnumClass._(String name): super(name); + + static BuiltSet get values => _$values; + static ModelEnumClass valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class ModelEnumClassMixin = Object with _$ModelEnumClassMixin; + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_file.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_file.dart new file mode 100644 index 00000000000..aa7b5ecfedd --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_file.dart @@ -0,0 +1,72 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'model_file.g.dart'; + +/// Must be named `File` for test. +/// +/// Properties: +/// * [sourceURI] - Test capitalization +abstract class ModelFile implements Built { + /// Test capitalization + @BuiltValueField(wireName: r'sourceURI') + String? get sourceURI; + + ModelFile._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ModelFileBuilder b) => b; + + factory ModelFile([void updates(ModelFileBuilder b)]) = _$ModelFile; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ModelFileSerializer(); +} + +class _$ModelFileSerializer implements StructuredSerializer { + @override + final Iterable types = const [ModelFile, _$ModelFile]; + + @override + final String wireName = r'ModelFile'; + + @override + Iterable serialize(Serializers serializers, ModelFile object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.sourceURI != null) { + result + ..add(r'sourceURI') + ..add(serializers.serialize(object.sourceURI, + specifiedType: const FullType(String))); + } + return result; + } + + @override + ModelFile deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = ModelFileBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'sourceURI': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.sourceURI = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_list.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_list.dart new file mode 100644 index 00000000000..87e10153b1a --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_list.dart @@ -0,0 +1,71 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'model_list.g.dart'; + +/// ModelList +/// +/// Properties: +/// * [n123list] +abstract class ModelList implements Built { + @BuiltValueField(wireName: r'123-list') + String? get n123list; + + ModelList._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ModelListBuilder b) => b; + + factory ModelList([void updates(ModelListBuilder b)]) = _$ModelList; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ModelListSerializer(); +} + +class _$ModelListSerializer implements StructuredSerializer { + @override + final Iterable types = const [ModelList, _$ModelList]; + + @override + final String wireName = r'ModelList'; + + @override + Iterable serialize(Serializers serializers, ModelList object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.n123list != null) { + result + ..add(r'123-list') + ..add(serializers.serialize(object.n123list, + specifiedType: const FullType(String))); + } + return result; + } + + @override + ModelList deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = ModelListBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'123-list': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.n123list = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_return.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_return.dart new file mode 100644 index 00000000000..c63e0464faa --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/model_return.dart @@ -0,0 +1,71 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'model_return.g.dart'; + +/// Model for testing reserved words +/// +/// Properties: +/// * [return_] +abstract class ModelReturn implements Built { + @BuiltValueField(wireName: r'return') + int? get return_; + + ModelReturn._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ModelReturnBuilder b) => b; + + factory ModelReturn([void updates(ModelReturnBuilder b)]) = _$ModelReturn; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ModelReturnSerializer(); +} + +class _$ModelReturnSerializer implements StructuredSerializer { + @override + final Iterable types = const [ModelReturn, _$ModelReturn]; + + @override + final String wireName = r'ModelReturn'; + + @override + Iterable serialize(Serializers serializers, ModelReturn object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.return_ != null) { + result + ..add(r'return') + ..add(serializers.serialize(object.return_, + specifiedType: const FullType(int))); + } + return result; + } + + @override + ModelReturn deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = ModelReturnBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'return': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + result.return_ = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/name.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/name.dart new file mode 100644 index 00000000000..78f9f8e545e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/name.dart @@ -0,0 +1,114 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'name.g.dart'; + +/// Model for testing model name same as property name +/// +/// Properties: +/// * [name] +/// * [snakeCase] +/// * [property] +/// * [n123number] +abstract class Name implements Built { + @BuiltValueField(wireName: r'name') + int get name; + + @BuiltValueField(wireName: r'snake_case') + int? get snakeCase; + + @BuiltValueField(wireName: r'property') + String? get property; + + @BuiltValueField(wireName: r'123Number') + int? get n123number; + + Name._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(NameBuilder b) => b; + + factory Name([void updates(NameBuilder b)]) = _$Name; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$NameSerializer(); +} + +class _$NameSerializer implements StructuredSerializer { + @override + final Iterable types = const [Name, _$Name]; + + @override + final String wireName = r'Name'; + + @override + Iterable serialize(Serializers serializers, Name object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + result + ..add(r'name') + ..add(serializers.serialize(object.name, + specifiedType: const FullType(int))); + if (object.snakeCase != null) { + result + ..add(r'snake_case') + ..add(serializers.serialize(object.snakeCase, + specifiedType: const FullType(int))); + } + if (object.property != null) { + result + ..add(r'property') + ..add(serializers.serialize(object.property, + specifiedType: const FullType(String))); + } + if (object.n123number != null) { + result + ..add(r'123Number') + ..add(serializers.serialize(object.n123number, + specifiedType: const FullType(int))); + } + return result; + } + + @override + Name deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = NameBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'name': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + result.name = valueDes; + break; + case r'snake_case': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + result.snakeCase = valueDes; + break; + case r'property': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.property = valueDes; + break; + case r'123Number': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + result.n123number = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/nullable_class.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/nullable_class.dart new file mode 100644 index 00000000000..efddc42e307 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/nullable_class.dart @@ -0,0 +1,249 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/date.dart'; +import 'package:built_value/json_object.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'nullable_class.g.dart'; + +/// NullableClass +/// +/// Properties: +/// * [integerProp] +/// * [numberProp] +/// * [booleanProp] +/// * [stringProp] +/// * [dateProp] +/// * [datetimeProp] +/// * [arrayNullableProp] +/// * [arrayAndItemsNullableProp] +/// * [arrayItemsNullable] +/// * [objectNullableProp] +/// * [objectAndItemsNullableProp] +/// * [objectItemsNullable] +abstract class NullableClass implements Built { + @BuiltValueField(wireName: r'integer_prop') + int? get integerProp; + + @BuiltValueField(wireName: r'number_prop') + num? get numberProp; + + @BuiltValueField(wireName: r'boolean_prop') + bool? get booleanProp; + + @BuiltValueField(wireName: r'string_prop') + String? get stringProp; + + @BuiltValueField(wireName: r'date_prop') + Date? get dateProp; + + @BuiltValueField(wireName: r'datetime_prop') + DateTime? get datetimeProp; + + @BuiltValueField(wireName: r'array_nullable_prop') + BuiltList? get arrayNullableProp; + + @BuiltValueField(wireName: r'array_and_items_nullable_prop') + BuiltList? get arrayAndItemsNullableProp; + + @BuiltValueField(wireName: r'array_items_nullable') + BuiltList? get arrayItemsNullable; + + @BuiltValueField(wireName: r'object_nullable_prop') + BuiltMap? get objectNullableProp; + + @BuiltValueField(wireName: r'object_and_items_nullable_prop') + BuiltMap? get objectAndItemsNullableProp; + + @BuiltValueField(wireName: r'object_items_nullable') + BuiltMap? get objectItemsNullable; + + NullableClass._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(NullableClassBuilder b) => b; + + factory NullableClass([void updates(NullableClassBuilder b)]) = _$NullableClass; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$NullableClassSerializer(); +} + +class _$NullableClassSerializer implements StructuredSerializer { + @override + final Iterable types = const [NullableClass, _$NullableClass]; + + @override + final String wireName = r'NullableClass'; + + @override + Iterable serialize(Serializers serializers, NullableClass object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.integerProp != null) { + result + ..add(r'integer_prop') + ..add(serializers.serialize(object.integerProp, + specifiedType: const FullType.nullable(int))); + } + if (object.numberProp != null) { + result + ..add(r'number_prop') + ..add(serializers.serialize(object.numberProp, + specifiedType: const FullType.nullable(num))); + } + if (object.booleanProp != null) { + result + ..add(r'boolean_prop') + ..add(serializers.serialize(object.booleanProp, + specifiedType: const FullType.nullable(bool))); + } + if (object.stringProp != null) { + result + ..add(r'string_prop') + ..add(serializers.serialize(object.stringProp, + specifiedType: const FullType.nullable(String))); + } + if (object.dateProp != null) { + result + ..add(r'date_prop') + ..add(serializers.serialize(object.dateProp, + specifiedType: const FullType.nullable(Date))); + } + if (object.datetimeProp != null) { + result + ..add(r'datetime_prop') + ..add(serializers.serialize(object.datetimeProp, + specifiedType: const FullType.nullable(DateTime))); + } + if (object.arrayNullableProp != null) { + result + ..add(r'array_nullable_prop') + ..add(serializers.serialize(object.arrayNullableProp, + specifiedType: const FullType.nullable(BuiltList, [FullType(JsonObject)]))); + } + if (object.arrayAndItemsNullableProp != null) { + result + ..add(r'array_and_items_nullable_prop') + ..add(serializers.serialize(object.arrayAndItemsNullableProp, + specifiedType: const FullType.nullable(BuiltList, [FullType.nullable(JsonObject)]))); + } + if (object.arrayItemsNullable != null) { + result + ..add(r'array_items_nullable') + ..add(serializers.serialize(object.arrayItemsNullable, + specifiedType: const FullType(BuiltList, [FullType.nullable(JsonObject)]))); + } + if (object.objectNullableProp != null) { + result + ..add(r'object_nullable_prop') + ..add(serializers.serialize(object.objectNullableProp, + specifiedType: const FullType.nullable(BuiltMap, [FullType(String), FullType(JsonObject)]))); + } + if (object.objectAndItemsNullableProp != null) { + result + ..add(r'object_and_items_nullable_prop') + ..add(serializers.serialize(object.objectAndItemsNullableProp, + specifiedType: const FullType.nullable(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]))); + } + if (object.objectItemsNullable != null) { + result + ..add(r'object_items_nullable') + ..add(serializers.serialize(object.objectItemsNullable, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]))); + } + return result; + } + + @override + NullableClass deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = NullableClassBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'integer_prop': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType.nullable(int)) as int?; + if (valueDes == null) continue; + result.integerProp = valueDes; + break; + case r'number_prop': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType.nullable(num)) as num?; + if (valueDes == null) continue; + result.numberProp = valueDes; + break; + case r'boolean_prop': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType.nullable(bool)) as bool?; + if (valueDes == null) continue; + result.booleanProp = valueDes; + break; + case r'string_prop': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType.nullable(String)) as String?; + if (valueDes == null) continue; + result.stringProp = valueDes; + break; + case r'date_prop': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType.nullable(Date)) as Date?; + if (valueDes == null) continue; + result.dateProp = valueDes; + break; + case r'datetime_prop': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType.nullable(DateTime)) as DateTime?; + if (valueDes == null) continue; + result.datetimeProp = valueDes; + break; + case r'array_nullable_prop': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType.nullable(BuiltList, [FullType(JsonObject)])) as BuiltList?; + if (valueDes == null) continue; + result.arrayNullableProp.replace(valueDes); + break; + case r'array_and_items_nullable_prop': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType.nullable(BuiltList, [FullType.nullable(JsonObject)])) as BuiltList?; + if (valueDes == null) continue; + result.arrayAndItemsNullableProp.replace(valueDes); + break; + case r'array_items_nullable': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(BuiltList, [FullType.nullable(JsonObject)])) as BuiltList; + result.arrayItemsNullable.replace(valueDes); + break; + case r'object_nullable_prop': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType.nullable(BuiltMap, [FullType(String), FullType(JsonObject)])) as BuiltMap?; + if (valueDes == null) continue; + result.objectNullableProp.replace(valueDes); + break; + case r'object_and_items_nullable_prop': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType.nullable(BuiltMap, [FullType(String), FullType.nullable(JsonObject)])) as BuiltMap?; + if (valueDes == null) continue; + result.objectAndItemsNullableProp.replace(valueDes); + break; + case r'object_items_nullable': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)])) as BuiltMap; + result.objectItemsNullable.replace(valueDes); + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/number_only.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/number_only.dart new file mode 100644 index 00000000000..e90cc9b9340 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/number_only.dart @@ -0,0 +1,71 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'number_only.g.dart'; + +/// NumberOnly +/// +/// Properties: +/// * [justNumber] +abstract class NumberOnly implements Built { + @BuiltValueField(wireName: r'JustNumber') + num? get justNumber; + + NumberOnly._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(NumberOnlyBuilder b) => b; + + factory NumberOnly([void updates(NumberOnlyBuilder b)]) = _$NumberOnly; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$NumberOnlySerializer(); +} + +class _$NumberOnlySerializer implements StructuredSerializer { + @override + final Iterable types = const [NumberOnly, _$NumberOnly]; + + @override + final String wireName = r'NumberOnly'; + + @override + Iterable serialize(Serializers serializers, NumberOnly object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.justNumber != null) { + result + ..add(r'JustNumber') + ..add(serializers.serialize(object.justNumber, + specifiedType: const FullType(num))); + } + return result; + } + + @override + NumberOnly deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = NumberOnlyBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'JustNumber': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(num)) as num; + result.justNumber = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart new file mode 100644 index 00000000000..881ede54d0d --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/deprecated_object.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'object_with_deprecated_fields.g.dart'; + +/// ObjectWithDeprecatedFields +/// +/// Properties: +/// * [uuid] +/// * [id] +/// * [deprecatedRef] +/// * [bars] +abstract class ObjectWithDeprecatedFields implements Built { + @BuiltValueField(wireName: r'uuid') + String? get uuid; + + @BuiltValueField(wireName: r'id') + num? get id; + + @BuiltValueField(wireName: r'deprecatedRef') + DeprecatedObject? get deprecatedRef; + + @BuiltValueField(wireName: r'bars') + BuiltList? get bars; + + ObjectWithDeprecatedFields._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ObjectWithDeprecatedFieldsBuilder b) => b; + + factory ObjectWithDeprecatedFields([void updates(ObjectWithDeprecatedFieldsBuilder b)]) = _$ObjectWithDeprecatedFields; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ObjectWithDeprecatedFieldsSerializer(); +} + +class _$ObjectWithDeprecatedFieldsSerializer implements StructuredSerializer { + @override + final Iterable types = const [ObjectWithDeprecatedFields, _$ObjectWithDeprecatedFields]; + + @override + final String wireName = r'ObjectWithDeprecatedFields'; + + @override + Iterable serialize(Serializers serializers, ObjectWithDeprecatedFields object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.uuid != null) { + result + ..add(r'uuid') + ..add(serializers.serialize(object.uuid, + specifiedType: const FullType(String))); + } + if (object.id != null) { + result + ..add(r'id') + ..add(serializers.serialize(object.id, + specifiedType: const FullType(num))); + } + if (object.deprecatedRef != null) { + result + ..add(r'deprecatedRef') + ..add(serializers.serialize(object.deprecatedRef, + specifiedType: const FullType(DeprecatedObject))); + } + if (object.bars != null) { + result + ..add(r'bars') + ..add(serializers.serialize(object.bars, + specifiedType: const FullType(BuiltList, [FullType(String)]))); + } + return result; + } + + @override + ObjectWithDeprecatedFields deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = ObjectWithDeprecatedFieldsBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'uuid': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.uuid = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(num)) as num; + result.id = valueDes; + break; + case r'deprecatedRef': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(DeprecatedObject)) as DeprecatedObject; + result.deprecatedRef.replace(valueDes); + break; + case r'bars': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList; + result.bars.replace(valueDes); + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/order.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/order.dart new file mode 100644 index 00000000000..3f9aed72655 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/order.dart @@ -0,0 +1,170 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'order.g.dart'; + +/// Order +/// +/// Properties: +/// * [id] +/// * [petId] +/// * [quantity] +/// * [shipDate] +/// * [status] - Order Status +/// * [complete] +abstract class Order implements Built { + @BuiltValueField(wireName: r'id') + int? get id; + + @BuiltValueField(wireName: r'petId') + int? get petId; + + @BuiltValueField(wireName: r'quantity') + int? get quantity; + + @BuiltValueField(wireName: r'shipDate') + DateTime? get shipDate; + + /// Order Status + @BuiltValueField(wireName: r'status') + OrderStatusEnum? get status; + // enum statusEnum { placed, approved, delivered, }; + + @BuiltValueField(wireName: r'complete') + bool? get complete; + + Order._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OrderBuilder b) => b + ..complete = false; + + factory Order([void updates(OrderBuilder b)]) = _$Order; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OrderSerializer(); +} + +class _$OrderSerializer implements StructuredSerializer { + @override + final Iterable types = const [Order, _$Order]; + + @override + final String wireName = r'Order'; + + @override + Iterable serialize(Serializers serializers, Order object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.id != null) { + result + ..add(r'id') + ..add(serializers.serialize(object.id, + specifiedType: const FullType(int))); + } + if (object.petId != null) { + result + ..add(r'petId') + ..add(serializers.serialize(object.petId, + specifiedType: const FullType(int))); + } + if (object.quantity != null) { + result + ..add(r'quantity') + ..add(serializers.serialize(object.quantity, + specifiedType: const FullType(int))); + } + if (object.shipDate != null) { + result + ..add(r'shipDate') + ..add(serializers.serialize(object.shipDate, + specifiedType: const FullType(DateTime))); + } + if (object.status != null) { + result + ..add(r'status') + ..add(serializers.serialize(object.status, + specifiedType: const FullType(OrderStatusEnum))); + } + if (object.complete != null) { + result + ..add(r'complete') + ..add(serializers.serialize(object.complete, + specifiedType: const FullType(bool))); + } + return result; + } + + @override + Order deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = OrderBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'id': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + result.id = valueDes; + break; + case r'petId': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + result.petId = valueDes; + break; + case r'quantity': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + result.quantity = valueDes; + break; + case r'shipDate': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(DateTime)) as DateTime; + result.shipDate = valueDes; + break; + case r'status': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(OrderStatusEnum)) as OrderStatusEnum; + result.status = valueDes; + break; + case r'complete': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(bool)) as bool; + result.complete = valueDes; + break; + } + } + return result.build(); + } +} + +class OrderStatusEnum extends EnumClass { + + /// Order Status + @BuiltValueEnumConst(wireName: r'placed') + static const OrderStatusEnum placed = _$orderStatusEnum_placed; + /// Order Status + @BuiltValueEnumConst(wireName: r'approved') + static const OrderStatusEnum approved = _$orderStatusEnum_approved; + /// Order Status + @BuiltValueEnumConst(wireName: r'delivered') + static const OrderStatusEnum delivered = _$orderStatusEnum_delivered; + + static Serializer get serializer => _$orderStatusEnumSerializer; + + const OrderStatusEnum._(String name): super(name); + + static BuiltSet get values => _$orderStatusEnumValues; + static OrderStatusEnum valueOf(String name) => _$orderStatusEnumValueOf(name); +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_composite.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_composite.dart new file mode 100644 index 00000000000..0715bdff305 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_composite.dart @@ -0,0 +1,101 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'outer_composite.g.dart'; + +/// OuterComposite +/// +/// Properties: +/// * [myNumber] +/// * [myString] +/// * [myBoolean] +abstract class OuterComposite implements Built { + @BuiltValueField(wireName: r'my_number') + num? get myNumber; + + @BuiltValueField(wireName: r'my_string') + String? get myString; + + @BuiltValueField(wireName: r'my_boolean') + bool? get myBoolean; + + OuterComposite._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OuterCompositeBuilder b) => b; + + factory OuterComposite([void updates(OuterCompositeBuilder b)]) = _$OuterComposite; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OuterCompositeSerializer(); +} + +class _$OuterCompositeSerializer implements StructuredSerializer { + @override + final Iterable types = const [OuterComposite, _$OuterComposite]; + + @override + final String wireName = r'OuterComposite'; + + @override + Iterable serialize(Serializers serializers, OuterComposite object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.myNumber != null) { + result + ..add(r'my_number') + ..add(serializers.serialize(object.myNumber, + specifiedType: const FullType(num))); + } + if (object.myString != null) { + result + ..add(r'my_string') + ..add(serializers.serialize(object.myString, + specifiedType: const FullType(String))); + } + if (object.myBoolean != null) { + result + ..add(r'my_boolean') + ..add(serializers.serialize(object.myBoolean, + specifiedType: const FullType(bool))); + } + return result; + } + + @override + OuterComposite deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = OuterCompositeBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'my_number': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(num)) as num; + result.myNumber = valueDes; + break; + case r'my_string': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.myString = valueDes; + break; + case r'my_boolean': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(bool)) as bool; + result.myBoolean = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum.dart new file mode 100644 index 00000000000..6476ca57d46 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum.dart @@ -0,0 +1,35 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'outer_enum.g.dart'; + +class OuterEnum extends EnumClass { + + @BuiltValueEnumConst(wireName: r'placed') + static const OuterEnum placed = _$placed; + @BuiltValueEnumConst(wireName: r'approved') + static const OuterEnum approved = _$approved; + @BuiltValueEnumConst(wireName: r'delivered') + static const OuterEnum delivered = _$delivered; + + static Serializer get serializer => _$outerEnumSerializer; + + const OuterEnum._(String name): super(name); + + static BuiltSet get values => _$values; + static OuterEnum valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class OuterEnumMixin = Object with _$OuterEnumMixin; + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_default_value.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_default_value.dart new file mode 100644 index 00000000000..af04c76ed44 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_default_value.dart @@ -0,0 +1,35 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'outer_enum_default_value.g.dart'; + +class OuterEnumDefaultValue extends EnumClass { + + @BuiltValueEnumConst(wireName: r'placed') + static const OuterEnumDefaultValue placed = _$placed; + @BuiltValueEnumConst(wireName: r'approved') + static const OuterEnumDefaultValue approved = _$approved; + @BuiltValueEnumConst(wireName: r'delivered') + static const OuterEnumDefaultValue delivered = _$delivered; + + static Serializer get serializer => _$outerEnumDefaultValueSerializer; + + const OuterEnumDefaultValue._(String name): super(name); + + static BuiltSet get values => _$values; + static OuterEnumDefaultValue valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class OuterEnumDefaultValueMixin = Object with _$OuterEnumDefaultValueMixin; + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_integer.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_integer.dart new file mode 100644 index 00000000000..c3b4b7d8f5d --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_integer.dart @@ -0,0 +1,35 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'outer_enum_integer.g.dart'; + +class OuterEnumInteger extends EnumClass { + + @BuiltValueEnumConst(wireNumber: 0) + static const OuterEnumInteger number0 = _$number0; + @BuiltValueEnumConst(wireNumber: 1) + static const OuterEnumInteger number1 = _$number1; + @BuiltValueEnumConst(wireNumber: 2) + static const OuterEnumInteger number2 = _$number2; + + static Serializer get serializer => _$outerEnumIntegerSerializer; + + const OuterEnumInteger._(String name): super(name); + + static BuiltSet get values => _$values; + static OuterEnumInteger valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class OuterEnumIntegerMixin = Object with _$OuterEnumIntegerMixin; + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_integer_default_value.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_integer_default_value.dart new file mode 100644 index 00000000000..cf71a021765 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_enum_integer_default_value.dart @@ -0,0 +1,35 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'outer_enum_integer_default_value.g.dart'; + +class OuterEnumIntegerDefaultValue extends EnumClass { + + @BuiltValueEnumConst(wireNumber: 0) + static const OuterEnumIntegerDefaultValue number0 = _$number0; + @BuiltValueEnumConst(wireNumber: 1) + static const OuterEnumIntegerDefaultValue number1 = _$number1; + @BuiltValueEnumConst(wireNumber: 2) + static const OuterEnumIntegerDefaultValue number2 = _$number2; + + static Serializer get serializer => _$outerEnumIntegerDefaultValueSerializer; + + const OuterEnumIntegerDefaultValue._(String name): super(name); + + static BuiltSet get values => _$values; + static OuterEnumIntegerDefaultValue valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class OuterEnumIntegerDefaultValueMixin = Object with _$OuterEnumIntegerDefaultValueMixin; + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_object_with_enum_property.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_object_with_enum_property.dart new file mode 100644 index 00000000000..91524a285b8 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/outer_object_with_enum_property.dart @@ -0,0 +1,71 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:openapi/src/model/outer_enum_integer.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'outer_object_with_enum_property.g.dart'; + +/// OuterObjectWithEnumProperty +/// +/// Properties: +/// * [value] +abstract class OuterObjectWithEnumProperty implements Built { + @BuiltValueField(wireName: r'value') + OuterEnumInteger get value; + // enum valueEnum { 0, 1, 2, }; + + OuterObjectWithEnumProperty._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OuterObjectWithEnumPropertyBuilder b) => b; + + factory OuterObjectWithEnumProperty([void updates(OuterObjectWithEnumPropertyBuilder b)]) = _$OuterObjectWithEnumProperty; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OuterObjectWithEnumPropertySerializer(); +} + +class _$OuterObjectWithEnumPropertySerializer implements StructuredSerializer { + @override + final Iterable types = const [OuterObjectWithEnumProperty, _$OuterObjectWithEnumProperty]; + + @override + final String wireName = r'OuterObjectWithEnumProperty'; + + @override + Iterable serialize(Serializers serializers, OuterObjectWithEnumProperty object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + result + ..add(r'value') + ..add(serializers.serialize(object.value, + specifiedType: const FullType(OuterEnumInteger))); + return result; + } + + @override + OuterObjectWithEnumProperty deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = OuterObjectWithEnumPropertyBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'value': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(OuterEnumInteger)) as OuterEnumInteger; + result.value = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/pet.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/pet.dart new file mode 100644 index 00000000000..4aea3f370f9 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/pet.dart @@ -0,0 +1,167 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/category.dart'; +import 'package:openapi/src/model/tag.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'pet.g.dart'; + +/// Pet +/// +/// Properties: +/// * [id] +/// * [category] +/// * [name] +/// * [photoUrls] +/// * [tags] +/// * [status] - pet status in the store +abstract class Pet implements Built { + @BuiltValueField(wireName: r'id') + int? get id; + + @BuiltValueField(wireName: r'category') + Category? get category; + + @BuiltValueField(wireName: r'name') + String get name; + + @BuiltValueField(wireName: r'photoUrls') + BuiltSet get photoUrls; + + @BuiltValueField(wireName: r'tags') + BuiltList? get tags; + + /// pet status in the store + @BuiltValueField(wireName: r'status') + PetStatusEnum? get status; + // enum statusEnum { available, pending, sold, }; + + Pet._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(PetBuilder b) => b; + + factory Pet([void updates(PetBuilder b)]) = _$Pet; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$PetSerializer(); +} + +class _$PetSerializer implements StructuredSerializer { + @override + final Iterable types = const [Pet, _$Pet]; + + @override + final String wireName = r'Pet'; + + @override + Iterable serialize(Serializers serializers, Pet object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.id != null) { + result + ..add(r'id') + ..add(serializers.serialize(object.id, + specifiedType: const FullType(int))); + } + if (object.category != null) { + result + ..add(r'category') + ..add(serializers.serialize(object.category, + specifiedType: const FullType(Category))); + } + result + ..add(r'name') + ..add(serializers.serialize(object.name, + specifiedType: const FullType(String))); + result + ..add(r'photoUrls') + ..add(serializers.serialize(object.photoUrls, + specifiedType: const FullType(BuiltSet, [FullType(String)]))); + if (object.tags != null) { + result + ..add(r'tags') + ..add(serializers.serialize(object.tags, + specifiedType: const FullType(BuiltList, [FullType(Tag)]))); + } + if (object.status != null) { + result + ..add(r'status') + ..add(serializers.serialize(object.status, + specifiedType: const FullType(PetStatusEnum))); + } + return result; + } + + @override + Pet deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = PetBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'id': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + result.id = valueDes; + break; + case r'category': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(Category)) as Category; + result.category.replace(valueDes); + break; + case r'name': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.name = valueDes; + break; + case r'photoUrls': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(BuiltSet, [FullType(String)])) as BuiltSet; + result.photoUrls.replace(valueDes); + break; + case r'tags': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(BuiltList, [FullType(Tag)])) as BuiltList; + result.tags.replace(valueDes); + break; + case r'status': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(PetStatusEnum)) as PetStatusEnum; + result.status = valueDes; + break; + } + } + return result.build(); + } +} + +class PetStatusEnum extends EnumClass { + + /// pet status in the store + @BuiltValueEnumConst(wireName: r'available') + static const PetStatusEnum available = _$petStatusEnum_available; + /// pet status in the store + @BuiltValueEnumConst(wireName: r'pending') + static const PetStatusEnum pending = _$petStatusEnum_pending; + /// pet status in the store + @BuiltValueEnumConst(wireName: r'sold') + static const PetStatusEnum sold = _$petStatusEnum_sold; + + static Serializer get serializer => _$petStatusEnumSerializer; + + const PetStatusEnum._(String name): super(name); + + static BuiltSet get values => _$petStatusEnumValues; + static PetStatusEnum valueOf(String name) => _$petStatusEnumValueOf(name); +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/read_only_first.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/read_only_first.dart new file mode 100644 index 00000000000..b9f108fb625 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/read_only_first.dart @@ -0,0 +1,86 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'read_only_first.g.dart'; + +/// ReadOnlyFirst +/// +/// Properties: +/// * [bar] +/// * [baz] +abstract class ReadOnlyFirst implements Built { + @BuiltValueField(wireName: r'bar') + String? get bar; + + @BuiltValueField(wireName: r'baz') + String? get baz; + + ReadOnlyFirst._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ReadOnlyFirstBuilder b) => b; + + factory ReadOnlyFirst([void updates(ReadOnlyFirstBuilder b)]) = _$ReadOnlyFirst; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ReadOnlyFirstSerializer(); +} + +class _$ReadOnlyFirstSerializer implements StructuredSerializer { + @override + final Iterable types = const [ReadOnlyFirst, _$ReadOnlyFirst]; + + @override + final String wireName = r'ReadOnlyFirst'; + + @override + Iterable serialize(Serializers serializers, ReadOnlyFirst object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.bar != null) { + result + ..add(r'bar') + ..add(serializers.serialize(object.bar, + specifiedType: const FullType(String))); + } + if (object.baz != null) { + result + ..add(r'baz') + ..add(serializers.serialize(object.baz, + specifiedType: const FullType(String))); + } + return result; + } + + @override + ReadOnlyFirst deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = ReadOnlyFirstBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'bar': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.bar = valueDes; + break; + case r'baz': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.baz = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/special_model_name.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/special_model_name.dart new file mode 100644 index 00000000000..dcfe12bb066 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/special_model_name.dart @@ -0,0 +1,71 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'special_model_name.g.dart'; + +/// SpecialModelName +/// +/// Properties: +/// * [dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket] +abstract class SpecialModelName implements Built { + @BuiltValueField(wireName: r'$special[property.name]') + int? get dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; + + SpecialModelName._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SpecialModelNameBuilder b) => b; + + factory SpecialModelName([void updates(SpecialModelNameBuilder b)]) = _$SpecialModelName; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SpecialModelNameSerializer(); +} + +class _$SpecialModelNameSerializer implements StructuredSerializer { + @override + final Iterable types = const [SpecialModelName, _$SpecialModelName]; + + @override + final String wireName = r'SpecialModelName'; + + @override + Iterable serialize(Serializers serializers, SpecialModelName object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket != null) { + result + ..add(r'$special[property.name]') + ..add(serializers.serialize(object.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket, + specifiedType: const FullType(int))); + } + return result; + } + + @override + SpecialModelName deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = SpecialModelNameBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'$special[property.name]': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + result.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/tag.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/tag.dart new file mode 100644 index 00000000000..5a7ed38d94c --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/tag.dart @@ -0,0 +1,86 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'tag.g.dart'; + +/// Tag +/// +/// Properties: +/// * [id] +/// * [name] +abstract class Tag implements Built { + @BuiltValueField(wireName: r'id') + int? get id; + + @BuiltValueField(wireName: r'name') + String? get name; + + Tag._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(TagBuilder b) => b; + + factory Tag([void updates(TagBuilder b)]) = _$Tag; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$TagSerializer(); +} + +class _$TagSerializer implements StructuredSerializer { + @override + final Iterable types = const [Tag, _$Tag]; + + @override + final String wireName = r'Tag'; + + @override + Iterable serialize(Serializers serializers, Tag object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.id != null) { + result + ..add(r'id') + ..add(serializers.serialize(object.id, + specifiedType: const FullType(int))); + } + if (object.name != null) { + result + ..add(r'name') + ..add(serializers.serialize(object.name, + specifiedType: const FullType(String))); + } + return result; + } + + @override + Tag deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = TagBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'id': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + result.id = valueDes; + break; + case r'name': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.name = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/user.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/user.dart new file mode 100644 index 00000000000..d590c20bdc7 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/model/user.dart @@ -0,0 +1,177 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'user.g.dart'; + +/// User +/// +/// Properties: +/// * [id] +/// * [username] +/// * [firstName] +/// * [lastName] +/// * [email] +/// * [password] +/// * [phone] +/// * [userStatus] - User Status +abstract class User implements Built { + @BuiltValueField(wireName: r'id') + int? get id; + + @BuiltValueField(wireName: r'username') + String? get username; + + @BuiltValueField(wireName: r'firstName') + String? get firstName; + + @BuiltValueField(wireName: r'lastName') + String? get lastName; + + @BuiltValueField(wireName: r'email') + String? get email; + + @BuiltValueField(wireName: r'password') + String? get password; + + @BuiltValueField(wireName: r'phone') + String? get phone; + + /// User Status + @BuiltValueField(wireName: r'userStatus') + int? get userStatus; + + User._(); + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(UserBuilder b) => b; + + factory User([void updates(UserBuilder b)]) = _$User; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$UserSerializer(); +} + +class _$UserSerializer implements StructuredSerializer { + @override + final Iterable types = const [User, _$User]; + + @override + final String wireName = r'User'; + + @override + Iterable serialize(Serializers serializers, User object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + if (object.id != null) { + result + ..add(r'id') + ..add(serializers.serialize(object.id, + specifiedType: const FullType(int))); + } + if (object.username != null) { + result + ..add(r'username') + ..add(serializers.serialize(object.username, + specifiedType: const FullType(String))); + } + if (object.firstName != null) { + result + ..add(r'firstName') + ..add(serializers.serialize(object.firstName, + specifiedType: const FullType(String))); + } + if (object.lastName != null) { + result + ..add(r'lastName') + ..add(serializers.serialize(object.lastName, + specifiedType: const FullType(String))); + } + if (object.email != null) { + result + ..add(r'email') + ..add(serializers.serialize(object.email, + specifiedType: const FullType(String))); + } + if (object.password != null) { + result + ..add(r'password') + ..add(serializers.serialize(object.password, + specifiedType: const FullType(String))); + } + if (object.phone != null) { + result + ..add(r'phone') + ..add(serializers.serialize(object.phone, + specifiedType: const FullType(String))); + } + if (object.userStatus != null) { + result + ..add(r'userStatus') + ..add(serializers.serialize(object.userStatus, + specifiedType: const FullType(int))); + } + return result; + } + + @override + User deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = UserBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current as String; + iterator.moveNext(); + final Object? value = iterator.current; + + switch (key) { + case r'id': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + result.id = valueDes; + break; + case r'username': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.username = valueDes; + break; + case r'firstName': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.firstName = valueDes; + break; + case r'lastName': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.lastName = valueDes; + break; + case r'email': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.email = valueDes; + break; + case r'password': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.password = valueDes; + break; + case r'phone': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + result.phone = valueDes; + break; + case r'userStatus': + final valueDes = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + result.userStatus = valueDes; + break; + } + } + return result.build(); + } +} + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/serializers.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/serializers.dart new file mode 100644 index 00000000000..1b807addf9e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/lib/src/serializers.dart @@ -0,0 +1,150 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_import + +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/json_object.dart'; +import 'package:built_value/serializer.dart'; +import 'package:built_value/standard_json_plugin.dart'; +import 'package:built_value/iso_8601_date_time_serializer.dart'; +import 'package:openapi/src/date_serializer.dart'; +import 'package:openapi/src/model/date.dart'; + +import 'package:openapi/src/model/additional_properties_class.dart'; +import 'package:openapi/src/model/animal.dart'; +import 'package:openapi/src/model/api_response.dart'; +import 'package:openapi/src/model/array_of_array_of_number_only.dart'; +import 'package:openapi/src/model/array_of_number_only.dart'; +import 'package:openapi/src/model/array_test.dart'; +import 'package:openapi/src/model/capitalization.dart'; +import 'package:openapi/src/model/cat.dart'; +import 'package:openapi/src/model/cat_all_of.dart'; +import 'package:openapi/src/model/category.dart'; +import 'package:openapi/src/model/class_model.dart'; +import 'package:openapi/src/model/deprecated_object.dart'; +import 'package:openapi/src/model/dog.dart'; +import 'package:openapi/src/model/dog_all_of.dart'; +import 'package:openapi/src/model/enum_arrays.dart'; +import 'package:openapi/src/model/enum_test.dart'; +import 'package:openapi/src/model/file_schema_test_class.dart'; +import 'package:openapi/src/model/foo.dart'; +import 'package:openapi/src/model/format_test.dart'; +import 'package:openapi/src/model/has_only_read_only.dart'; +import 'package:openapi/src/model/health_check_result.dart'; +import 'package:openapi/src/model/inline_response_default.dart'; +import 'package:openapi/src/model/map_test.dart'; +import 'package:openapi/src/model/mixed_properties_and_additional_properties_class.dart'; +import 'package:openapi/src/model/model200_response.dart'; +import 'package:openapi/src/model/model_client.dart'; +import 'package:openapi/src/model/model_enum_class.dart'; +import 'package:openapi/src/model/model_file.dart'; +import 'package:openapi/src/model/model_list.dart'; +import 'package:openapi/src/model/model_return.dart'; +import 'package:openapi/src/model/name.dart'; +import 'package:openapi/src/model/nullable_class.dart'; +import 'package:openapi/src/model/number_only.dart'; +import 'package:openapi/src/model/object_with_deprecated_fields.dart'; +import 'package:openapi/src/model/order.dart'; +import 'package:openapi/src/model/outer_composite.dart'; +import 'package:openapi/src/model/outer_enum.dart'; +import 'package:openapi/src/model/outer_enum_default_value.dart'; +import 'package:openapi/src/model/outer_enum_integer.dart'; +import 'package:openapi/src/model/outer_enum_integer_default_value.dart'; +import 'package:openapi/src/model/outer_object_with_enum_property.dart'; +import 'package:openapi/src/model/pet.dart'; +import 'package:openapi/src/model/read_only_first.dart'; +import 'package:openapi/src/model/special_model_name.dart'; +import 'package:openapi/src/model/tag.dart'; +import 'package:openapi/src/model/user.dart'; + +part 'serializers.g.dart'; + +@SerializersFor([ + AdditionalPropertiesClass, + Animal, + ApiResponse, + ArrayOfArrayOfNumberOnly, + ArrayOfNumberOnly, + ArrayTest, + Capitalization, + Cat, + CatAllOf, + Category, + ClassModel, + DeprecatedObject, + Dog, + DogAllOf, + EnumArrays, + EnumTest, + FileSchemaTestClass, + Foo, + FormatTest, + HasOnlyReadOnly, + HealthCheckResult, + InlineResponseDefault, + MapTest, + MixedPropertiesAndAdditionalPropertiesClass, + Model200Response, + ModelClient, + ModelEnumClass, + ModelFile, + ModelList, + ModelReturn, + Name, + NullableClass, + NumberOnly, + ObjectWithDeprecatedFields, + Order, + OuterComposite, + OuterEnum, + OuterEnumDefaultValue, + OuterEnumInteger, + OuterEnumIntegerDefaultValue, + OuterObjectWithEnumProperty, + Pet, + ReadOnlyFirst, + SpecialModelName, + Tag, + User, +]) +Serializers serializers = (_$serializers.toBuilder() + ..addBuilderFactory( + const FullType(BuiltList, [FullType(String)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltMap, [FullType(String), FullType(String)]), + () => MapBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(String)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltSet, [FullType(Pet)]), + () => SetBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltSet, [FullType(String)]), + () => SetBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(Pet)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltMap, [FullType(String), FullType(int)]), + () => MapBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(User)]), + () => ListBuilder(), + ) + ..add(const DateSerializer()) + ..add(Iso8601DateTimeSerializer())) + .build(); + +Serializers standardSerializers = + (serializers.toBuilder()..addPlugin(StandardJsonPlugin())).build(); diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/pom.xml b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/pom.xml new file mode 100644 index 00000000000..6963cf3c0f9 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/pom.xml @@ -0,0 +1,88 @@ + + 4.0.0 + org.openapitools + DartDioNextDioHttpPetstoreClientLibFakeTests + pom + 1.0.0-SNAPSHOT + DartDioNext DioHttp Petstore Client Lib Fake + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + pub-get + pre-integration-test + + exec + + + pub + + get + + + + + pub-run-build-runner + pre-integration-test + + exec + + + pub + + run + build_runner + build + + + + + dart-analyze + integration-test + + exec + + + dart + + analyze + --fatal-infos + + + + + dart-test + integration-test + + exec + + + dart + + test + + + + + + + + diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/pubspec.yaml b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/pubspec.yaml new file mode 100644 index 00000000000..1ba7418109e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/pubspec.yaml @@ -0,0 +1,17 @@ +name: openapi +version: 1.0.0 +description: OpenAPI API client +homepage: homepage + +environment: + sdk: '>=2.12.0 <3.0.0' + +dependencies: + dio_http: '>=5.0.0 <6.0.0' + built_value: '>=8.1.0 <9.0.0' + built_collection: '>=5.1.0 <6.0.0' + +dev_dependencies: + built_value_generator: '>=8.1.0 <9.0.0' + build_runner: any + test: '>=1.16.0 <1.17.0' diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/additional_properties_class_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/additional_properties_class_test.dart new file mode 100644 index 00000000000..c231e6dc280 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/additional_properties_class_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for AdditionalPropertiesClass +void main() { + final instance = AdditionalPropertiesClassBuilder(); + // TODO add properties to the builder and call build() + + group(AdditionalPropertiesClass, () { + // BuiltMap mapProperty + test('to test the property `mapProperty`', () async { + // TODO + }); + + // BuiltMap> mapOfMapProperty + test('to test the property `mapOfMapProperty`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/animal_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/animal_test.dart new file mode 100644 index 00000000000..875bb42a106 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/animal_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Animal +void main() { + final instance = AnimalBuilder(); + // TODO add properties to the builder and call build() + + group(Animal, () { + // String className + test('to test the property `className`', () async { + // TODO + }); + + // String color (default value: 'red') + test('to test the property `color`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/another_fake_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/another_fake_api_test.dart new file mode 100644 index 00000000000..ddafef2a831 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/another_fake_api_test.dart @@ -0,0 +1,20 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + + +/// tests for AnotherFakeApi +void main() { + final instance = Openapi().getAnotherFakeApi(); + + group(AnotherFakeApi, () { + // To test special tags + // + // To test special tags and operation ID starting with number + // + //Future call123testSpecialTags(ModelClient modelClient) async + test('test call123testSpecialTags', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/api_response_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/api_response_test.dart new file mode 100644 index 00000000000..cf1a744cd62 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/api_response_test.dart @@ -0,0 +1,26 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ApiResponse +void main() { + final instance = ApiResponseBuilder(); + // TODO add properties to the builder and call build() + + group(ApiResponse, () { + // int code + test('to test the property `code`', () async { + // TODO + }); + + // String type + test('to test the property `type`', () async { + // TODO + }); + + // String message + test('to test the property `message`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_of_array_of_number_only_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_of_array_of_number_only_test.dart new file mode 100644 index 00000000000..a679a6c4223 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_of_array_of_number_only_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ArrayOfArrayOfNumberOnly +void main() { + final instance = ArrayOfArrayOfNumberOnlyBuilder(); + // TODO add properties to the builder and call build() + + group(ArrayOfArrayOfNumberOnly, () { + // BuiltList> arrayArrayNumber + test('to test the property `arrayArrayNumber`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_of_number_only_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_of_number_only_test.dart new file mode 100644 index 00000000000..cc648bc115c --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_of_number_only_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ArrayOfNumberOnly +void main() { + final instance = ArrayOfNumberOnlyBuilder(); + // TODO add properties to the builder and call build() + + group(ArrayOfNumberOnly, () { + // BuiltList arrayNumber + test('to test the property `arrayNumber`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_test_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_test_test.dart new file mode 100644 index 00000000000..210216f224b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/array_test_test.dart @@ -0,0 +1,26 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ArrayTest +void main() { + final instance = ArrayTestBuilder(); + // TODO add properties to the builder and call build() + + group(ArrayTest, () { + // BuiltList arrayOfString + test('to test the property `arrayOfString`', () async { + // TODO + }); + + // BuiltList> arrayArrayOfInteger + test('to test the property `arrayArrayOfInteger`', () async { + // TODO + }); + + // BuiltList> arrayArrayOfModel + test('to test the property `arrayArrayOfModel`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/capitalization_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/capitalization_test.dart new file mode 100644 index 00000000000..23e04b0001b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/capitalization_test.dart @@ -0,0 +1,42 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Capitalization +void main() { + final instance = CapitalizationBuilder(); + // TODO add properties to the builder and call build() + + group(Capitalization, () { + // String smallCamel + test('to test the property `smallCamel`', () async { + // TODO + }); + + // String capitalCamel + test('to test the property `capitalCamel`', () async { + // TODO + }); + + // String smallSnake + test('to test the property `smallSnake`', () async { + // TODO + }); + + // String capitalSnake + test('to test the property `capitalSnake`', () async { + // TODO + }); + + // String sCAETHFlowPoints + test('to test the property `sCAETHFlowPoints`', () async { + // TODO + }); + + // Name of the pet + // String ATT_NAME + test('to test the property `ATT_NAME`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/cat_all_of_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/cat_all_of_test.dart new file mode 100644 index 00000000000..afdac82ad18 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/cat_all_of_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for CatAllOf +void main() { + final instance = CatAllOfBuilder(); + // TODO add properties to the builder and call build() + + group(CatAllOf, () { + // bool declawed + test('to test the property `declawed`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/cat_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/cat_test.dart new file mode 100644 index 00000000000..b8fc252acc6 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/cat_test.dart @@ -0,0 +1,26 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Cat +void main() { + final instance = CatBuilder(); + // TODO add properties to the builder and call build() + + group(Cat, () { + // String className + test('to test the property `className`', () async { + // TODO + }); + + // String color (default value: 'red') + test('to test the property `color`', () async { + // TODO + }); + + // bool declawed + test('to test the property `declawed`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/category_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/category_test.dart new file mode 100644 index 00000000000..70f5fb5e02a --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/category_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Category +void main() { + final instance = CategoryBuilder(); + // TODO add properties to the builder and call build() + + group(Category, () { + // int id + test('to test the property `id`', () async { + // TODO + }); + + // String name (default value: 'default-name') + test('to test the property `name`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/class_model_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/class_model_test.dart new file mode 100644 index 00000000000..92f95f186c9 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/class_model_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ClassModel +void main() { + final instance = ClassModelBuilder(); + // TODO add properties to the builder and call build() + + group(ClassModel, () { + // String class_ + test('to test the property `class_`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/default_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/default_api_test.dart new file mode 100644 index 00000000000..eef4c41652e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/default_api_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + + +/// tests for DefaultApi +void main() { + final instance = Openapi().getDefaultApi(); + + group(DefaultApi, () { + //Future fooGet() async + test('test fooGet', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/deprecated_object_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/deprecated_object_test.dart new file mode 100644 index 00000000000..98ab991b2b1 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/deprecated_object_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for DeprecatedObject +void main() { + final instance = DeprecatedObjectBuilder(); + // TODO add properties to the builder and call build() + + group(DeprecatedObject, () { + // String name + test('to test the property `name`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/dog_all_of_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/dog_all_of_test.dart new file mode 100644 index 00000000000..7b58b3a2755 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/dog_all_of_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for DogAllOf +void main() { + final instance = DogAllOfBuilder(); + // TODO add properties to the builder and call build() + + group(DogAllOf, () { + // String breed + test('to test the property `breed`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/dog_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/dog_test.dart new file mode 100644 index 00000000000..f57fcdc413d --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/dog_test.dart @@ -0,0 +1,26 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Dog +void main() { + final instance = DogBuilder(); + // TODO add properties to the builder and call build() + + group(Dog, () { + // String className + test('to test the property `className`', () async { + // TODO + }); + + // String color (default value: 'red') + test('to test the property `color`', () async { + // TODO + }); + + // String breed + test('to test the property `breed`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/enum_arrays_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/enum_arrays_test.dart new file mode 100644 index 00000000000..438c36db074 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/enum_arrays_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for EnumArrays +void main() { + final instance = EnumArraysBuilder(); + // TODO add properties to the builder and call build() + + group(EnumArrays, () { + // String justSymbol + test('to test the property `justSymbol`', () async { + // TODO + }); + + // BuiltList arrayEnum + test('to test the property `arrayEnum`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/enum_test_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/enum_test_test.dart new file mode 100644 index 00000000000..b5f3aeb7fbd --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/enum_test_test.dart @@ -0,0 +1,51 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for EnumTest +void main() { + final instance = EnumTestBuilder(); + // TODO add properties to the builder and call build() + + group(EnumTest, () { + // String enumString + test('to test the property `enumString`', () async { + // TODO + }); + + // String enumStringRequired + test('to test the property `enumStringRequired`', () async { + // TODO + }); + + // int enumInteger + test('to test the property `enumInteger`', () async { + // TODO + }); + + // double enumNumber + test('to test the property `enumNumber`', () async { + // TODO + }); + + // OuterEnum outerEnum + test('to test the property `outerEnum`', () async { + // TODO + }); + + // OuterEnumInteger outerEnumInteger + test('to test the property `outerEnumInteger`', () async { + // TODO + }); + + // OuterEnumDefaultValue outerEnumDefaultValue + test('to test the property `outerEnumDefaultValue`', () async { + // TODO + }); + + // OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue + test('to test the property `outerEnumIntegerDefaultValue`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/fake_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/fake_api_test.dart new file mode 100644 index 00000000000..1eff7d0447b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/fake_api_test.dart @@ -0,0 +1,136 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + + +/// tests for FakeApi +void main() { + final instance = Openapi().getFakeApi(); + + group(FakeApi, () { + // Health check endpoint + // + //Future fakeHealthGet() async + test('test fakeHealthGet', () async { + // TODO + }); + + // test http signature authentication + // + //Future fakeHttpSignatureTest(Pet pet, { String query1, String header1 }) async + test('test fakeHttpSignatureTest', () async { + // TODO + }); + + // Test serialization of outer boolean types + // + //Future fakeOuterBooleanSerialize({ bool body }) async + test('test fakeOuterBooleanSerialize', () async { + // TODO + }); + + // Test serialization of object with outer number type + // + //Future fakeOuterCompositeSerialize({ OuterComposite outerComposite }) async + test('test fakeOuterCompositeSerialize', () async { + // TODO + }); + + // Test serialization of outer number types + // + //Future fakeOuterNumberSerialize({ num body }) async + test('test fakeOuterNumberSerialize', () async { + // TODO + }); + + // Test serialization of outer string types + // + //Future fakeOuterStringSerialize({ String body }) async + test('test fakeOuterStringSerialize', () async { + // TODO + }); + + // Test serialization of enum (int) properties with examples + // + //Future fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) async + test('test fakePropertyEnumIntegerSerialize', () async { + // TODO + }); + + // For this test, the body has to be a binary file. + // + //Future testBodyWithBinary(MultipartFile body) async + test('test testBodyWithBinary', () async { + // TODO + }); + + // For this test, the body for this request must reference a schema named `File`. + // + //Future testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) async + test('test testBodyWithFileSchema', () async { + // TODO + }); + + //Future testBodyWithQueryParams(String query, User user) async + test('test testBodyWithQueryParams', () async { + // TODO + }); + + // To test \"client\" model + // + // To test \"client\" model + // + //Future testClientModel(ModelClient modelClient) async + test('test testClientModel', () async { + // TODO + }); + + // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + // + // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + // + //Future testEndpointParameters(num number, double double_, String patternWithoutDelimiter, String byte, { int integer, int int32, int int64, double float, String string, Uint8List binary, Date date, DateTime dateTime, String password, String callback }) async + test('test testEndpointParameters', () async { + // TODO + }); + + // To test enum parameters + // + // To test enum parameters + // + //Future testEnumParameters({ BuiltList enumHeaderStringArray, String enumHeaderString, BuiltList enumQueryStringArray, String enumQueryString, int enumQueryInteger, double enumQueryDouble, BuiltList enumFormStringArray, String enumFormString }) async + test('test testEnumParameters', () async { + // TODO + }); + + // Fake endpoint to test group parameters (optional) + // + // Fake endpoint to test group parameters (optional) + // + //Future testGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, int requiredInt64Group, { int stringGroup, bool booleanGroup, int int64Group }) async + test('test testGroupParameters', () async { + // TODO + }); + + // test inline additionalProperties + // + //Future testInlineAdditionalProperties(BuiltMap requestBody) async + test('test testInlineAdditionalProperties', () async { + // TODO + }); + + // test json serialization of form data + // + //Future testJsonFormData(String param, String param2) async + test('test testJsonFormData', () async { + // TODO + }); + + // To test the collection format in query parameters + // + //Future testQueryParameterCollectionFormat(BuiltList pipe, BuiltList ioutil, BuiltList http, BuiltList url, BuiltList context, String allowEmpty, { BuiltMap language }) async + test('test testQueryParameterCollectionFormat', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/fake_classname_tags123_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/fake_classname_tags123_api_test.dart new file mode 100644 index 00000000000..3075147f52f --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/fake_classname_tags123_api_test.dart @@ -0,0 +1,20 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + + +/// tests for FakeClassnameTags123Api +void main() { + final instance = Openapi().getFakeClassnameTags123Api(); + + group(FakeClassnameTags123Api, () { + // To test class name in snake case + // + // To test class name in snake case + // + //Future testClassname(ModelClient modelClient) async + test('test testClassname', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/file_schema_test_class_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/file_schema_test_class_test.dart new file mode 100644 index 00000000000..ca8695bd4a4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/file_schema_test_class_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for FileSchemaTestClass +void main() { + final instance = FileSchemaTestClassBuilder(); + // TODO add properties to the builder and call build() + + group(FileSchemaTestClass, () { + // ModelFile file + test('to test the property `file`', () async { + // TODO + }); + + // BuiltList files + test('to test the property `files`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/foo_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/foo_test.dart new file mode 100644 index 00000000000..205237788ae --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/foo_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Foo +void main() { + final instance = FooBuilder(); + // TODO add properties to the builder and call build() + + group(Foo, () { + // String bar (default value: 'bar') + test('to test the property `bar`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/format_test_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/format_test_test.dart new file mode 100644 index 00000000000..558c3aa4b65 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/format_test_test.dart @@ -0,0 +1,93 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for FormatTest +void main() { + final instance = FormatTestBuilder(); + // TODO add properties to the builder and call build() + + group(FormatTest, () { + // int integer + test('to test the property `integer`', () async { + // TODO + }); + + // int int32 + test('to test the property `int32`', () async { + // TODO + }); + + // int int64 + test('to test the property `int64`', () async { + // TODO + }); + + // num number + test('to test the property `number`', () async { + // TODO + }); + + // double float + test('to test the property `float`', () async { + // TODO + }); + + // double double_ + test('to test the property `double_`', () async { + // TODO + }); + + // double decimal + test('to test the property `decimal`', () async { + // TODO + }); + + // String string + test('to test the property `string`', () async { + // TODO + }); + + // String byte + test('to test the property `byte`', () async { + // TODO + }); + + // Uint8List binary + test('to test the property `binary`', () async { + // TODO + }); + + // Date date + test('to test the property `date`', () async { + // TODO + }); + + // DateTime dateTime + test('to test the property `dateTime`', () async { + // TODO + }); + + // String uuid + test('to test the property `uuid`', () async { + // TODO + }); + + // String password + test('to test the property `password`', () async { + // TODO + }); + + // A string that is a 10 digit number. Can have leading zeros. + // String patternWithDigits + test('to test the property `patternWithDigits`', () async { + // TODO + }); + + // A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + // String patternWithDigitsAndDelimiter + test('to test the property `patternWithDigitsAndDelimiter`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/has_only_read_only_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/has_only_read_only_test.dart new file mode 100644 index 00000000000..c3452221475 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/has_only_read_only_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for HasOnlyReadOnly +void main() { + final instance = HasOnlyReadOnlyBuilder(); + // TODO add properties to the builder and call build() + + group(HasOnlyReadOnly, () { + // String bar + test('to test the property `bar`', () async { + // TODO + }); + + // String foo + test('to test the property `foo`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/health_check_result_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/health_check_result_test.dart new file mode 100644 index 00000000000..fda0c921821 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/health_check_result_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for HealthCheckResult +void main() { + final instance = HealthCheckResultBuilder(); + // TODO add properties to the builder and call build() + + group(HealthCheckResult, () { + // String nullableMessage + test('to test the property `nullableMessage`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/inline_response_default_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/inline_response_default_test.dart new file mode 100644 index 00000000000..56fbf1d0b1a --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/inline_response_default_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for InlineResponseDefault +void main() { + final instance = InlineResponseDefaultBuilder(); + // TODO add properties to the builder and call build() + + group(InlineResponseDefault, () { + // Foo string + test('to test the property `string`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/map_test_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/map_test_test.dart new file mode 100644 index 00000000000..56a27610ee5 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/map_test_test.dart @@ -0,0 +1,31 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for MapTest +void main() { + final instance = MapTestBuilder(); + // TODO add properties to the builder and call build() + + group(MapTest, () { + // BuiltMap> mapMapOfString + test('to test the property `mapMapOfString`', () async { + // TODO + }); + + // BuiltMap mapOfEnumString + test('to test the property `mapOfEnumString`', () async { + // TODO + }); + + // BuiltMap directMap + test('to test the property `directMap`', () async { + // TODO + }); + + // BuiltMap indirectMap + test('to test the property `indirectMap`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/mixed_properties_and_additional_properties_class_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/mixed_properties_and_additional_properties_class_test.dart new file mode 100644 index 00000000000..85b113387a0 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/mixed_properties_and_additional_properties_class_test.dart @@ -0,0 +1,26 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for MixedPropertiesAndAdditionalPropertiesClass +void main() { + final instance = MixedPropertiesAndAdditionalPropertiesClassBuilder(); + // TODO add properties to the builder and call build() + + group(MixedPropertiesAndAdditionalPropertiesClass, () { + // String uuid + test('to test the property `uuid`', () async { + // TODO + }); + + // DateTime dateTime + test('to test the property `dateTime`', () async { + // TODO + }); + + // BuiltMap map + test('to test the property `map`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model200_response_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model200_response_test.dart new file mode 100644 index 00000000000..39ff6ec59c0 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model200_response_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Model200Response +void main() { + final instance = Model200ResponseBuilder(); + // TODO add properties to the builder and call build() + + group(Model200Response, () { + // int name + test('to test the property `name`', () async { + // TODO + }); + + // String class_ + test('to test the property `class_`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_client_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_client_test.dart new file mode 100644 index 00000000000..f494dfd0849 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_client_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ModelClient +void main() { + final instance = ModelClientBuilder(); + // TODO add properties to the builder and call build() + + group(ModelClient, () { + // String client + test('to test the property `client`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_enum_class_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_enum_class_test.dart new file mode 100644 index 00000000000..03e5855bf00 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_enum_class_test.dart @@ -0,0 +1,9 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ModelEnumClass +void main() { + + group(ModelEnumClass, () { + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_file_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_file_test.dart new file mode 100644 index 00000000000..4f139772622 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_file_test.dart @@ -0,0 +1,17 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ModelFile +void main() { + final instance = ModelFileBuilder(); + // TODO add properties to the builder and call build() + + group(ModelFile, () { + // Test capitalization + // String sourceURI + test('to test the property `sourceURI`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_list_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_list_test.dart new file mode 100644 index 00000000000..d35e02fe0c9 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_list_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ModelList +void main() { + final instance = ModelListBuilder(); + // TODO add properties to the builder and call build() + + group(ModelList, () { + // String n123list + test('to test the property `n123list`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_return_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_return_test.dart new file mode 100644 index 00000000000..eedfe7eb281 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/model_return_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ModelReturn +void main() { + final instance = ModelReturnBuilder(); + // TODO add properties to the builder and call build() + + group(ModelReturn, () { + // int return_ + test('to test the property `return_`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/name_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/name_test.dart new file mode 100644 index 00000000000..6b2329bb081 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/name_test.dart @@ -0,0 +1,31 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Name +void main() { + final instance = NameBuilder(); + // TODO add properties to the builder and call build() + + group(Name, () { + // int name + test('to test the property `name`', () async { + // TODO + }); + + // int snakeCase + test('to test the property `snakeCase`', () async { + // TODO + }); + + // String property + test('to test the property `property`', () async { + // TODO + }); + + // int n123number + test('to test the property `n123number`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/nullable_class_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/nullable_class_test.dart new file mode 100644 index 00000000000..1a6767dbb2a --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/nullable_class_test.dart @@ -0,0 +1,71 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for NullableClass +void main() { + final instance = NullableClassBuilder(); + // TODO add properties to the builder and call build() + + group(NullableClass, () { + // int integerProp + test('to test the property `integerProp`', () async { + // TODO + }); + + // num numberProp + test('to test the property `numberProp`', () async { + // TODO + }); + + // bool booleanProp + test('to test the property `booleanProp`', () async { + // TODO + }); + + // String stringProp + test('to test the property `stringProp`', () async { + // TODO + }); + + // Date dateProp + test('to test the property `dateProp`', () async { + // TODO + }); + + // DateTime datetimeProp + test('to test the property `datetimeProp`', () async { + // TODO + }); + + // BuiltList arrayNullableProp + test('to test the property `arrayNullableProp`', () async { + // TODO + }); + + // BuiltList arrayAndItemsNullableProp + test('to test the property `arrayAndItemsNullableProp`', () async { + // TODO + }); + + // BuiltList arrayItemsNullable + test('to test the property `arrayItemsNullable`', () async { + // TODO + }); + + // BuiltMap objectNullableProp + test('to test the property `objectNullableProp`', () async { + // TODO + }); + + // BuiltMap objectAndItemsNullableProp + test('to test the property `objectAndItemsNullableProp`', () async { + // TODO + }); + + // BuiltMap objectItemsNullable + test('to test the property `objectItemsNullable`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/number_only_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/number_only_test.dart new file mode 100644 index 00000000000..7167d78a496 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/number_only_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for NumberOnly +void main() { + final instance = NumberOnlyBuilder(); + // TODO add properties to the builder and call build() + + group(NumberOnly, () { + // num justNumber + test('to test the property `justNumber`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/object_with_deprecated_fields_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/object_with_deprecated_fields_test.dart new file mode 100644 index 00000000000..cd04ed4d48e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/object_with_deprecated_fields_test.dart @@ -0,0 +1,31 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ObjectWithDeprecatedFields +void main() { + final instance = ObjectWithDeprecatedFieldsBuilder(); + // TODO add properties to the builder and call build() + + group(ObjectWithDeprecatedFields, () { + // String uuid + test('to test the property `uuid`', () async { + // TODO + }); + + // num id + test('to test the property `id`', () async { + // TODO + }); + + // DeprecatedObject deprecatedRef + test('to test the property `deprecatedRef`', () async { + // TODO + }); + + // BuiltList bars + test('to test the property `bars`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/order_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/order_test.dart new file mode 100644 index 00000000000..7ff992230bf --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/order_test.dart @@ -0,0 +1,42 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Order +void main() { + final instance = OrderBuilder(); + // TODO add properties to the builder and call build() + + group(Order, () { + // int id + test('to test the property `id`', () async { + // TODO + }); + + // int petId + test('to test the property `petId`', () async { + // TODO + }); + + // int quantity + test('to test the property `quantity`', () async { + // TODO + }); + + // DateTime shipDate + test('to test the property `shipDate`', () async { + // TODO + }); + + // Order Status + // String status + test('to test the property `status`', () async { + // TODO + }); + + // bool complete (default value: false) + test('to test the property `complete`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_composite_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_composite_test.dart new file mode 100644 index 00000000000..dac257d9a0d --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_composite_test.dart @@ -0,0 +1,26 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for OuterComposite +void main() { + final instance = OuterCompositeBuilder(); + // TODO add properties to the builder and call build() + + group(OuterComposite, () { + // num myNumber + test('to test the property `myNumber`', () async { + // TODO + }); + + // String myString + test('to test the property `myString`', () async { + // TODO + }); + + // bool myBoolean + test('to test the property `myBoolean`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_default_value_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_default_value_test.dart new file mode 100644 index 00000000000..502c8326be5 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_default_value_test.dart @@ -0,0 +1,9 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for OuterEnumDefaultValue +void main() { + + group(OuterEnumDefaultValue, () { + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_integer_default_value_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_integer_default_value_test.dart new file mode 100644 index 00000000000..c535fe8ac35 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_integer_default_value_test.dart @@ -0,0 +1,9 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for OuterEnumIntegerDefaultValue +void main() { + + group(OuterEnumIntegerDefaultValue, () { + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_integer_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_integer_test.dart new file mode 100644 index 00000000000..d945bc8c489 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_integer_test.dart @@ -0,0 +1,9 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for OuterEnumInteger +void main() { + + group(OuterEnumInteger, () { + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_test.dart new file mode 100644 index 00000000000..8e11eb02fb8 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_enum_test.dart @@ -0,0 +1,9 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for OuterEnum +void main() { + + group(OuterEnum, () { + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_object_with_enum_property_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_object_with_enum_property_test.dart new file mode 100644 index 00000000000..d6d763c5d93 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/outer_object_with_enum_property_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for OuterObjectWithEnumProperty +void main() { + final instance = OuterObjectWithEnumPropertyBuilder(); + // TODO add properties to the builder and call build() + + group(OuterObjectWithEnumProperty, () { + // OuterEnumInteger value + test('to test the property `value`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/pet_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/pet_api_test.dart new file mode 100644 index 00000000000..c4bf8d69968 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/pet_api_test.dart @@ -0,0 +1,80 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + + +/// tests for PetApi +void main() { + final instance = Openapi().getPetApi(); + + group(PetApi, () { + // Add a new pet to the store + // + //Future addPet(Pet pet) async + test('test addPet', () async { + // TODO + }); + + // Deletes a pet + // + //Future deletePet(int petId, { String apiKey }) async + test('test deletePet', () async { + // TODO + }); + + // Finds Pets by status + // + // Multiple status values can be provided with comma separated strings + // + //Future> findPetsByStatus(BuiltList status) async + test('test findPetsByStatus', () async { + // TODO + }); + + // Finds Pets by tags + // + // Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + // + //Future> findPetsByTags(BuiltSet tags) async + test('test findPetsByTags', () async { + // TODO + }); + + // Find pet by ID + // + // Returns a single pet + // + //Future getPetById(int petId) async + test('test getPetById', () async { + // TODO + }); + + // Update an existing pet + // + //Future updatePet(Pet pet) async + test('test updatePet', () async { + // TODO + }); + + // Updates a pet in the store with form data + // + //Future updatePetWithForm(int petId, { String name, String status }) async + test('test updatePetWithForm', () async { + // TODO + }); + + // uploads an image + // + //Future uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async + test('test uploadFile', () async { + // TODO + }); + + // uploads an image (required) + // + //Future uploadFileWithRequiredFile(int petId, MultipartFile requiredFile, { String additionalMetadata }) async + test('test uploadFileWithRequiredFile', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/pet_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/pet_test.dart new file mode 100644 index 00000000000..b2bac5351d2 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/pet_test.dart @@ -0,0 +1,42 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Pet +void main() { + final instance = PetBuilder(); + // TODO add properties to the builder and call build() + + group(Pet, () { + // int id + test('to test the property `id`', () async { + // TODO + }); + + // Category category + test('to test the property `category`', () async { + // TODO + }); + + // String name + test('to test the property `name`', () async { + // TODO + }); + + // BuiltSet photoUrls + test('to test the property `photoUrls`', () async { + // TODO + }); + + // BuiltList tags + test('to test the property `tags`', () async { + // TODO + }); + + // pet status in the store + // String status + test('to test the property `status`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/read_only_first_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/read_only_first_test.dart new file mode 100644 index 00000000000..550d3d793ec --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/read_only_first_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ReadOnlyFirst +void main() { + final instance = ReadOnlyFirstBuilder(); + // TODO add properties to the builder and call build() + + group(ReadOnlyFirst, () { + // String bar + test('to test the property `bar`', () async { + // TODO + }); + + // String baz + test('to test the property `baz`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/special_model_name_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/special_model_name_test.dart new file mode 100644 index 00000000000..08a4592a1ed --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/special_model_name_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for SpecialModelName +void main() { + final instance = SpecialModelNameBuilder(); + // TODO add properties to the builder and call build() + + group(SpecialModelName, () { + // int dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket + test('to test the property `dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/store_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/store_api_test.dart new file mode 100644 index 00000000000..9eac725762b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/store_api_test.dart @@ -0,0 +1,45 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + + +/// tests for StoreApi +void main() { + final instance = Openapi().getStoreApi(); + + group(StoreApi, () { + // Delete purchase order by ID + // + // For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + // + //Future deleteOrder(String orderId) async + test('test deleteOrder', () async { + // TODO + }); + + // Returns pet inventories by status + // + // Returns a map of status codes to quantities + // + //Future> getInventory() async + test('test getInventory', () async { + // TODO + }); + + // Find purchase order by ID + // + // For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + // + //Future getOrderById(int orderId) async + test('test getOrderById', () async { + // TODO + }); + + // Place an order for a pet + // + //Future placeOrder(Order order) async + test('test placeOrder', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/tag_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/tag_test.dart new file mode 100644 index 00000000000..6f7c63b8f0c --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/tag_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Tag +void main() { + final instance = TagBuilder(); + // TODO add properties to the builder and call build() + + group(Tag, () { + // int id + test('to test the property `id`', () async { + // TODO + }); + + // String name + test('to test the property `name`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/user_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/user_api_test.dart new file mode 100644 index 00000000000..01eaad61fc2 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/user_api_test.dart @@ -0,0 +1,73 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + + +/// tests for UserApi +void main() { + final instance = Openapi().getUserApi(); + + group(UserApi, () { + // Create user + // + // This can only be done by the logged in user. + // + //Future createUser(User user) async + test('test createUser', () async { + // TODO + }); + + // Creates list of users with given input array + // + //Future createUsersWithArrayInput(BuiltList user) async + test('test createUsersWithArrayInput', () async { + // TODO + }); + + // Creates list of users with given input array + // + //Future createUsersWithListInput(BuiltList user) async + test('test createUsersWithListInput', () async { + // TODO + }); + + // Delete user + // + // This can only be done by the logged in user. + // + //Future deleteUser(String username) async + test('test deleteUser', () async { + // TODO + }); + + // Get user by user name + // + //Future getUserByName(String username) async + test('test getUserByName', () async { + // TODO + }); + + // Logs user into the system + // + //Future loginUser(String username, String password) async + test('test loginUser', () async { + // TODO + }); + + // Logs out current logged in user session + // + //Future logoutUser() async + test('test logoutUser', () async { + // TODO + }); + + // Updated user + // + // This can only be done by the logged in user. + // + //Future updateUser(String username, User user) async + test('test updateUser', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/user_test.dart b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/user_test.dart new file mode 100644 index 00000000000..1e6a1bc23fa --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio-next/dio_http_petstore_client_lib_fake/test/user_test.dart @@ -0,0 +1,52 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for User +void main() { + final instance = UserBuilder(); + // TODO add properties to the builder and call build() + + group(User, () { + // int id + test('to test the property `id`', () async { + // TODO + }); + + // String username + test('to test the property `username`', () async { + // TODO + }); + + // String firstName + test('to test the property `firstName`', () async { + // TODO + }); + + // String lastName + test('to test the property `lastName`', () async { + // TODO + }); + + // String email + test('to test the property `email`', () async { + // TODO + }); + + // String password + test('to test the property `password`', () async { + // TODO + }); + + // String phone + test('to test the property `phone`', () async { + // TODO + }); + + // User Status + // int userStatus + test('to test the property `userStatus`', () async { + // TODO + }); + + }); +} From 22d98c177dde1b500836784e0ece1f2bc0f08ca4 Mon Sep 17 00:00:00 2001 From: andrew-matteson Date: Tue, 5 Oct 2021 04:14:58 -0400 Subject: [PATCH 47/50] Correct a dependency resolution failure in generated angular typescript packages for Angular 12 (#10525) * Update version * Rebuild sample --- .../codegen/languages/TypeScriptAngularClientCodegen.java | 2 +- .../builds/with-npm/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java index 0c83302f7c4..a00b28395f6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java @@ -293,7 +293,7 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode // Set the typescript version compatible to the Angular version if (ngVersion.atLeast("12.0.0")) { - additionalProperties.put("tsVersion", ">=4.2.3 <4.3.0"); + additionalProperties.put("tsVersion", ">=4.3.0 <4.4.0"); } else if (ngVersion.atLeast("11.0.0")) { additionalProperties.put("tsVersion", ">=4.0.0 <4.1.0"); } else if (ngVersion.atLeast("10.0.0")) { diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/package.json b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/package.json index 8c565707886..69a4fcbf2b3 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/package.json +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/package.json @@ -25,7 +25,7 @@ "reflect-metadata": "^0.1.3", "rxjs": "^6.6.0", "tsickle": "^0.43.0", - "typescript": ">=4.2.3 <4.3.0", + "typescript": ">=4.3.0 <4.4.0", "zone.js": "^0.11.4" }, "publishConfig": { From 9aadd7724c6bfc3e0519e56d52a79a5a1fe2090a Mon Sep 17 00:00:00 2001 From: Bodo Graumann Date: Tue, 5 Oct 2021 12:41:49 +0200 Subject: [PATCH 48/50] Add message and more context to RequiredError (#10530) --- .../main/resources/typescript/api/api.mustache | 2 +- .../resources/typescript/api/baseapi.mustache | 4 ++-- .../builds/composed-schemas/apis/baseapi.ts | 4 ++-- .../typescript/builds/default/apis/PetApi.ts | 16 ++++++++-------- .../typescript/builds/default/apis/StoreApi.ts | 6 +++--- .../typescript/builds/default/apis/UserApi.ts | 18 +++++++++--------- .../typescript/builds/default/apis/baseapi.ts | 4 ++-- .../typescript/builds/deno/apis/PetApi.ts | 16 ++++++++-------- .../typescript/builds/deno/apis/StoreApi.ts | 6 +++--- .../typescript/builds/deno/apis/UserApi.ts | 18 +++++++++--------- .../typescript/builds/deno/apis/baseapi.ts | 4 ++-- .../typescript/builds/inversify/apis/PetApi.ts | 16 ++++++++-------- .../builds/inversify/apis/StoreApi.ts | 6 +++--- .../builds/inversify/apis/UserApi.ts | 18 +++++++++--------- .../builds/inversify/apis/baseapi.ts | 4 ++-- .../typescript/builds/jquery/apis/PetApi.ts | 16 ++++++++-------- .../typescript/builds/jquery/apis/StoreApi.ts | 6 +++--- .../typescript/builds/jquery/apis/UserApi.ts | 18 +++++++++--------- .../typescript/builds/jquery/apis/baseapi.ts | 4 ++-- .../builds/object_params/apis/PetApi.ts | 16 ++++++++-------- .../builds/object_params/apis/StoreApi.ts | 6 +++--- .../builds/object_params/apis/UserApi.ts | 18 +++++++++--------- .../builds/object_params/apis/baseapi.ts | 4 ++-- .../tests/default/test/api/PetApi.test.ts | 15 +++++++++++++++ 24 files changed, 130 insertions(+), 115 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache index 1252a5451e6..e128db13904 100644 --- a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache @@ -48,7 +48,7 @@ export class {{classname}}RequestFactory extends BaseAPIRequestFactory { {{#required}} // verify required parameter '{{paramName}}' is not null or undefined if ({{paramName}} === null || {{paramName}} === undefined) { - throw new RequiredError('Required parameter {{paramName}} was null or undefined when calling {{nickname}}.'); + throw new RequiredError("{{classname}}", "{{nickname}}", "{{paramName}}"); } {{/required}} diff --git a/modules/openapi-generator/src/main/resources/typescript/api/baseapi.mustache b/modules/openapi-generator/src/main/resources/typescript/api/baseapi.mustache index aeb3f5207cd..d2ee2290fb2 100644 --- a/modules/openapi-generator/src/main/resources/typescript/api/baseapi.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/api/baseapi.mustache @@ -38,7 +38,7 @@ export class BaseAPIRequestFactory { */ export class RequiredError extends Error { name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); + constructor(public api: string, public method: string, public field: string) { + super("Required parameter " + field + " was null or undefined when calling " + api + "." + method + "."); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/baseapi.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/baseapi.ts index 4c9d3794034..ce1e2dbc47e 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/baseapi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/baseapi.ts @@ -31,7 +31,7 @@ export class BaseAPIRequestFactory { */ export class RequiredError extends Error { name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); + constructor(public api: string, public method: string, public field: string) { + super("Required parameter " + field + " was null or undefined when calling " + api + "." + method + "."); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts index 469e0d17426..dc53ef953c3 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts @@ -26,7 +26,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'pet' is not null or undefined if (pet === null || pet === undefined) { - throw new RequiredError('Required parameter pet was null or undefined when calling addPet.'); + throw new RequiredError("PetApi", "addPet", "pet"); } @@ -71,7 +71,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'petId' is not null or undefined if (petId === null || petId === undefined) { - throw new RequiredError('Required parameter petId was null or undefined when calling deletePet.'); + throw new RequiredError("PetApi", "deletePet", "petId"); } @@ -108,7 +108,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'status' is not null or undefined if (status === null || status === undefined) { - throw new RequiredError('Required parameter status was null or undefined when calling findPetsByStatus.'); + throw new RequiredError("PetApi", "findPetsByStatus", "status"); } @@ -145,7 +145,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'tags' is not null or undefined if (tags === null || tags === undefined) { - throw new RequiredError('Required parameter tags was null or undefined when calling findPetsByTags.'); + throw new RequiredError("PetApi", "findPetsByTags", "tags"); } @@ -182,7 +182,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'petId' is not null or undefined if (petId === null || petId === undefined) { - throw new RequiredError('Required parameter petId was null or undefined when calling getPetById.'); + throw new RequiredError("PetApi", "getPetById", "petId"); } @@ -214,7 +214,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'pet' is not null or undefined if (pet === null || pet === undefined) { - throw new RequiredError('Required parameter pet was null or undefined when calling updatePet.'); + throw new RequiredError("PetApi", "updatePet", "pet"); } @@ -260,7 +260,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'petId' is not null or undefined if (petId === null || petId === undefined) { - throw new RequiredError('Required parameter petId was null or undefined when calling updatePetWithForm.'); + throw new RequiredError("PetApi", "updatePetWithForm", "petId"); } @@ -325,7 +325,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'petId' is not null or undefined if (petId === null || petId === undefined) { - throw new RequiredError('Required parameter petId was null or undefined when calling uploadFile.'); + throw new RequiredError("PetApi", "uploadFile", "petId"); } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts index 1a6d8de0c9b..ec9b8046595 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts @@ -26,7 +26,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'orderId' is not null or undefined if (orderId === null || orderId === undefined) { - throw new RequiredError('Required parameter orderId was null or undefined when calling deleteOrder.'); + throw new RequiredError("StoreApi", "deleteOrder", "orderId"); } @@ -78,7 +78,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'orderId' is not null or undefined if (orderId === null || orderId === undefined) { - throw new RequiredError('Required parameter orderId was null or undefined when calling getOrderById.'); + throw new RequiredError("StoreApi", "getOrderById", "orderId"); } @@ -104,7 +104,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'order' is not null or undefined if (order === null || order === undefined) { - throw new RequiredError('Required parameter order was null or undefined when calling placeOrder.'); + throw new RequiredError("StoreApi", "placeOrder", "order"); } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts index 642cdaac90b..29b98b35ad0 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts @@ -26,7 +26,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'user' is not null or undefined if (user === null || user === undefined) { - throw new RequiredError('Required parameter user was null or undefined when calling createUser.'); + throw new RequiredError("UserApi", "createUser", "user"); } @@ -68,7 +68,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'user' is not null or undefined if (user === null || user === undefined) { - throw new RequiredError('Required parameter user was null or undefined when calling createUsersWithArrayInput.'); + throw new RequiredError("UserApi", "createUsersWithArrayInput", "user"); } @@ -110,7 +110,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'user' is not null or undefined if (user === null || user === undefined) { - throw new RequiredError('Required parameter user was null or undefined when calling createUsersWithListInput.'); + throw new RequiredError("UserApi", "createUsersWithListInput", "user"); } @@ -153,7 +153,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { - throw new RequiredError('Required parameter username was null or undefined when calling deleteUser.'); + throw new RequiredError("UserApi", "deleteUser", "username"); } @@ -185,7 +185,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { - throw new RequiredError('Required parameter username was null or undefined when calling getUserByName.'); + throw new RequiredError("UserApi", "getUserByName", "username"); } @@ -212,13 +212,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { - throw new RequiredError('Required parameter username was null or undefined when calling loginUser.'); + throw new RequiredError("UserApi", "loginUser", "username"); } // verify required parameter 'password' is not null or undefined if (password === null || password === undefined) { - throw new RequiredError('Required parameter password was null or undefined when calling loginUser.'); + throw new RequiredError("UserApi", "loginUser", "password"); } @@ -279,13 +279,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { - throw new RequiredError('Required parameter username was null or undefined when calling updateUser.'); + throw new RequiredError("UserApi", "updateUser", "username"); } // verify required parameter 'user' is not null or undefined if (user === null || user === undefined) { - throw new RequiredError('Required parameter user was null or undefined when calling updateUser.'); + throw new RequiredError("UserApi", "updateUser", "user"); } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/baseapi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/baseapi.ts index 4c9d3794034..ce1e2dbc47e 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/baseapi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/baseapi.ts @@ -31,7 +31,7 @@ export class BaseAPIRequestFactory { */ export class RequiredError extends Error { name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); + constructor(public api: string, public method: string, public field: string) { + super("Required parameter " + field + " was null or undefined when calling " + api + "." + method + "."); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts index b9be2b7fede..559a1891e39 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts @@ -24,7 +24,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'pet' is not null or undefined if (pet === null || pet === undefined) { - throw new RequiredError('Required parameter pet was null or undefined when calling addPet.'); + throw new RequiredError("PetApi", "addPet", "pet"); } @@ -69,7 +69,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'petId' is not null or undefined if (petId === null || petId === undefined) { - throw new RequiredError('Required parameter petId was null or undefined when calling deletePet.'); + throw new RequiredError("PetApi", "deletePet", "petId"); } @@ -106,7 +106,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'status' is not null or undefined if (status === null || status === undefined) { - throw new RequiredError('Required parameter status was null or undefined when calling findPetsByStatus.'); + throw new RequiredError("PetApi", "findPetsByStatus", "status"); } @@ -143,7 +143,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'tags' is not null or undefined if (tags === null || tags === undefined) { - throw new RequiredError('Required parameter tags was null or undefined when calling findPetsByTags.'); + throw new RequiredError("PetApi", "findPetsByTags", "tags"); } @@ -180,7 +180,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'petId' is not null or undefined if (petId === null || petId === undefined) { - throw new RequiredError('Required parameter petId was null or undefined when calling getPetById.'); + throw new RequiredError("PetApi", "getPetById", "petId"); } @@ -212,7 +212,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'pet' is not null or undefined if (pet === null || pet === undefined) { - throw new RequiredError('Required parameter pet was null or undefined when calling updatePet.'); + throw new RequiredError("PetApi", "updatePet", "pet"); } @@ -258,7 +258,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'petId' is not null or undefined if (petId === null || petId === undefined) { - throw new RequiredError('Required parameter petId was null or undefined when calling updatePetWithForm.'); + throw new RequiredError("PetApi", "updatePetWithForm", "petId"); } @@ -323,7 +323,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'petId' is not null or undefined if (petId === null || petId === undefined) { - throw new RequiredError('Required parameter petId was null or undefined when calling uploadFile.'); + throw new RequiredError("PetApi", "uploadFile", "petId"); } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts index d7c7b610935..77f70936d14 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts @@ -24,7 +24,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'orderId' is not null or undefined if (orderId === null || orderId === undefined) { - throw new RequiredError('Required parameter orderId was null or undefined when calling deleteOrder.'); + throw new RequiredError("StoreApi", "deleteOrder", "orderId"); } @@ -76,7 +76,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'orderId' is not null or undefined if (orderId === null || orderId === undefined) { - throw new RequiredError('Required parameter orderId was null or undefined when calling getOrderById.'); + throw new RequiredError("StoreApi", "getOrderById", "orderId"); } @@ -102,7 +102,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'order' is not null or undefined if (order === null || order === undefined) { - throw new RequiredError('Required parameter order was null or undefined when calling placeOrder.'); + throw new RequiredError("StoreApi", "placeOrder", "order"); } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts index 6ec2dbe6597..2b0633cfd20 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts @@ -24,7 +24,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'user' is not null or undefined if (user === null || user === undefined) { - throw new RequiredError('Required parameter user was null or undefined when calling createUser.'); + throw new RequiredError("UserApi", "createUser", "user"); } @@ -66,7 +66,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'user' is not null or undefined if (user === null || user === undefined) { - throw new RequiredError('Required parameter user was null or undefined when calling createUsersWithArrayInput.'); + throw new RequiredError("UserApi", "createUsersWithArrayInput", "user"); } @@ -108,7 +108,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'user' is not null or undefined if (user === null || user === undefined) { - throw new RequiredError('Required parameter user was null or undefined when calling createUsersWithListInput.'); + throw new RequiredError("UserApi", "createUsersWithListInput", "user"); } @@ -151,7 +151,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { - throw new RequiredError('Required parameter username was null or undefined when calling deleteUser.'); + throw new RequiredError("UserApi", "deleteUser", "username"); } @@ -183,7 +183,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { - throw new RequiredError('Required parameter username was null or undefined when calling getUserByName.'); + throw new RequiredError("UserApi", "getUserByName", "username"); } @@ -210,13 +210,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { - throw new RequiredError('Required parameter username was null or undefined when calling loginUser.'); + throw new RequiredError("UserApi", "loginUser", "username"); } // verify required parameter 'password' is not null or undefined if (password === null || password === undefined) { - throw new RequiredError('Required parameter password was null or undefined when calling loginUser.'); + throw new RequiredError("UserApi", "loginUser", "password"); } @@ -277,13 +277,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { - throw new RequiredError('Required parameter username was null or undefined when calling updateUser.'); + throw new RequiredError("UserApi", "updateUser", "username"); } // verify required parameter 'user' is not null or undefined if (user === null || user === undefined) { - throw new RequiredError('Required parameter user was null or undefined when calling updateUser.'); + throw new RequiredError("UserApi", "updateUser", "user"); } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/baseapi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/baseapi.ts index 757500b1e0a..46ed74bb556 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/baseapi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/baseapi.ts @@ -31,7 +31,7 @@ export class BaseAPIRequestFactory { */ export class RequiredError extends Error { name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); + constructor(public api: string, public method: string, public field: string) { + super("Required parameter " + field + " was null or undefined when calling " + api + "." + method + "."); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts index 3ed430e9c26..67829b24646 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts @@ -28,7 +28,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'pet' is not null or undefined if (pet === null || pet === undefined) { - throw new RequiredError('Required parameter pet was null or undefined when calling addPet.'); + throw new RequiredError("PetApi", "addPet", "pet"); } @@ -73,7 +73,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'petId' is not null or undefined if (petId === null || petId === undefined) { - throw new RequiredError('Required parameter petId was null or undefined when calling deletePet.'); + throw new RequiredError("PetApi", "deletePet", "petId"); } @@ -110,7 +110,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'status' is not null or undefined if (status === null || status === undefined) { - throw new RequiredError('Required parameter status was null or undefined when calling findPetsByStatus.'); + throw new RequiredError("PetApi", "findPetsByStatus", "status"); } @@ -147,7 +147,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'tags' is not null or undefined if (tags === null || tags === undefined) { - throw new RequiredError('Required parameter tags was null or undefined when calling findPetsByTags.'); + throw new RequiredError("PetApi", "findPetsByTags", "tags"); } @@ -184,7 +184,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'petId' is not null or undefined if (petId === null || petId === undefined) { - throw new RequiredError('Required parameter petId was null or undefined when calling getPetById.'); + throw new RequiredError("PetApi", "getPetById", "petId"); } @@ -216,7 +216,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'pet' is not null or undefined if (pet === null || pet === undefined) { - throw new RequiredError('Required parameter pet was null or undefined when calling updatePet.'); + throw new RequiredError("PetApi", "updatePet", "pet"); } @@ -262,7 +262,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'petId' is not null or undefined if (petId === null || petId === undefined) { - throw new RequiredError('Required parameter petId was null or undefined when calling updatePetWithForm.'); + throw new RequiredError("PetApi", "updatePetWithForm", "petId"); } @@ -327,7 +327,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'petId' is not null or undefined if (petId === null || petId === undefined) { - throw new RequiredError('Required parameter petId was null or undefined when calling uploadFile.'); + throw new RequiredError("PetApi", "uploadFile", "petId"); } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts index 23f1ea1b5d5..c0debef65d5 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts @@ -28,7 +28,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'orderId' is not null or undefined if (orderId === null || orderId === undefined) { - throw new RequiredError('Required parameter orderId was null or undefined when calling deleteOrder.'); + throw new RequiredError("StoreApi", "deleteOrder", "orderId"); } @@ -80,7 +80,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'orderId' is not null or undefined if (orderId === null || orderId === undefined) { - throw new RequiredError('Required parameter orderId was null or undefined when calling getOrderById.'); + throw new RequiredError("StoreApi", "getOrderById", "orderId"); } @@ -106,7 +106,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'order' is not null or undefined if (order === null || order === undefined) { - throw new RequiredError('Required parameter order was null or undefined when calling placeOrder.'); + throw new RequiredError("StoreApi", "placeOrder", "order"); } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts index dc625dfd3ae..c02aa71b33d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts @@ -28,7 +28,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'user' is not null or undefined if (user === null || user === undefined) { - throw new RequiredError('Required parameter user was null or undefined when calling createUser.'); + throw new RequiredError("UserApi", "createUser", "user"); } @@ -70,7 +70,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'user' is not null or undefined if (user === null || user === undefined) { - throw new RequiredError('Required parameter user was null or undefined when calling createUsersWithArrayInput.'); + throw new RequiredError("UserApi", "createUsersWithArrayInput", "user"); } @@ -112,7 +112,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'user' is not null or undefined if (user === null || user === undefined) { - throw new RequiredError('Required parameter user was null or undefined when calling createUsersWithListInput.'); + throw new RequiredError("UserApi", "createUsersWithListInput", "user"); } @@ -155,7 +155,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { - throw new RequiredError('Required parameter username was null or undefined when calling deleteUser.'); + throw new RequiredError("UserApi", "deleteUser", "username"); } @@ -187,7 +187,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { - throw new RequiredError('Required parameter username was null or undefined when calling getUserByName.'); + throw new RequiredError("UserApi", "getUserByName", "username"); } @@ -214,13 +214,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { - throw new RequiredError('Required parameter username was null or undefined when calling loginUser.'); + throw new RequiredError("UserApi", "loginUser", "username"); } // verify required parameter 'password' is not null or undefined if (password === null || password === undefined) { - throw new RequiredError('Required parameter password was null or undefined when calling loginUser.'); + throw new RequiredError("UserApi", "loginUser", "password"); } @@ -281,13 +281,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { - throw new RequiredError('Required parameter username was null or undefined when calling updateUser.'); + throw new RequiredError("UserApi", "updateUser", "username"); } // verify required parameter 'user' is not null or undefined if (user === null || user === undefined) { - throw new RequiredError('Required parameter user was null or undefined when calling updateUser.'); + throw new RequiredError("UserApi", "updateUser", "user"); } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/baseapi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/baseapi.ts index ba19cb13c43..308d3aa5717 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/baseapi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/baseapi.ts @@ -34,7 +34,7 @@ export class BaseAPIRequestFactory { */ export class RequiredError extends Error { name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); + constructor(public api: string, public method: string, public field: string) { + super("Required parameter " + field + " was null or undefined when calling " + api + "." + method + "."); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts index 8d427ab3ec6..09e6971dd13 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts @@ -24,7 +24,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'pet' is not null or undefined if (pet === null || pet === undefined) { - throw new RequiredError('Required parameter pet was null or undefined when calling addPet.'); + throw new RequiredError("PetApi", "addPet", "pet"); } @@ -69,7 +69,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'petId' is not null or undefined if (petId === null || petId === undefined) { - throw new RequiredError('Required parameter petId was null or undefined when calling deletePet.'); + throw new RequiredError("PetApi", "deletePet", "petId"); } @@ -106,7 +106,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'status' is not null or undefined if (status === null || status === undefined) { - throw new RequiredError('Required parameter status was null or undefined when calling findPetsByStatus.'); + throw new RequiredError("PetApi", "findPetsByStatus", "status"); } @@ -143,7 +143,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'tags' is not null or undefined if (tags === null || tags === undefined) { - throw new RequiredError('Required parameter tags was null or undefined when calling findPetsByTags.'); + throw new RequiredError("PetApi", "findPetsByTags", "tags"); } @@ -180,7 +180,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'petId' is not null or undefined if (petId === null || petId === undefined) { - throw new RequiredError('Required parameter petId was null or undefined when calling getPetById.'); + throw new RequiredError("PetApi", "getPetById", "petId"); } @@ -212,7 +212,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'pet' is not null or undefined if (pet === null || pet === undefined) { - throw new RequiredError('Required parameter pet was null or undefined when calling updatePet.'); + throw new RequiredError("PetApi", "updatePet", "pet"); } @@ -258,7 +258,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'petId' is not null or undefined if (petId === null || petId === undefined) { - throw new RequiredError('Required parameter petId was null or undefined when calling updatePetWithForm.'); + throw new RequiredError("PetApi", "updatePetWithForm", "petId"); } @@ -323,7 +323,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'petId' is not null or undefined if (petId === null || petId === undefined) { - throw new RequiredError('Required parameter petId was null or undefined when calling uploadFile.'); + throw new RequiredError("PetApi", "uploadFile", "petId"); } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts index 4bb51211dce..db934bc4d72 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts @@ -24,7 +24,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'orderId' is not null or undefined if (orderId === null || orderId === undefined) { - throw new RequiredError('Required parameter orderId was null or undefined when calling deleteOrder.'); + throw new RequiredError("StoreApi", "deleteOrder", "orderId"); } @@ -76,7 +76,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'orderId' is not null or undefined if (orderId === null || orderId === undefined) { - throw new RequiredError('Required parameter orderId was null or undefined when calling getOrderById.'); + throw new RequiredError("StoreApi", "getOrderById", "orderId"); } @@ -102,7 +102,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'order' is not null or undefined if (order === null || order === undefined) { - throw new RequiredError('Required parameter order was null or undefined when calling placeOrder.'); + throw new RequiredError("StoreApi", "placeOrder", "order"); } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts index 845757f5e83..b6eb68b8c39 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts @@ -24,7 +24,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'user' is not null or undefined if (user === null || user === undefined) { - throw new RequiredError('Required parameter user was null or undefined when calling createUser.'); + throw new RequiredError("UserApi", "createUser", "user"); } @@ -66,7 +66,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'user' is not null or undefined if (user === null || user === undefined) { - throw new RequiredError('Required parameter user was null or undefined when calling createUsersWithArrayInput.'); + throw new RequiredError("UserApi", "createUsersWithArrayInput", "user"); } @@ -108,7 +108,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'user' is not null or undefined if (user === null || user === undefined) { - throw new RequiredError('Required parameter user was null or undefined when calling createUsersWithListInput.'); + throw new RequiredError("UserApi", "createUsersWithListInput", "user"); } @@ -151,7 +151,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { - throw new RequiredError('Required parameter username was null or undefined when calling deleteUser.'); + throw new RequiredError("UserApi", "deleteUser", "username"); } @@ -183,7 +183,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { - throw new RequiredError('Required parameter username was null or undefined when calling getUserByName.'); + throw new RequiredError("UserApi", "getUserByName", "username"); } @@ -210,13 +210,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { - throw new RequiredError('Required parameter username was null or undefined when calling loginUser.'); + throw new RequiredError("UserApi", "loginUser", "username"); } // verify required parameter 'password' is not null or undefined if (password === null || password === undefined) { - throw new RequiredError('Required parameter password was null or undefined when calling loginUser.'); + throw new RequiredError("UserApi", "loginUser", "password"); } @@ -277,13 +277,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { - throw new RequiredError('Required parameter username was null or undefined when calling updateUser.'); + throw new RequiredError("UserApi", "updateUser", "username"); } // verify required parameter 'user' is not null or undefined if (user === null || user === undefined) { - throw new RequiredError('Required parameter user was null or undefined when calling updateUser.'); + throw new RequiredError("UserApi", "updateUser", "user"); } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/baseapi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/baseapi.ts index 4c9d3794034..ce1e2dbc47e 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/baseapi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/baseapi.ts @@ -31,7 +31,7 @@ export class BaseAPIRequestFactory { */ export class RequiredError extends Error { name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); + constructor(public api: string, public method: string, public field: string) { + super("Required parameter " + field + " was null or undefined when calling " + api + "." + method + "."); } } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts index 469e0d17426..dc53ef953c3 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts @@ -26,7 +26,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'pet' is not null or undefined if (pet === null || pet === undefined) { - throw new RequiredError('Required parameter pet was null or undefined when calling addPet.'); + throw new RequiredError("PetApi", "addPet", "pet"); } @@ -71,7 +71,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'petId' is not null or undefined if (petId === null || petId === undefined) { - throw new RequiredError('Required parameter petId was null or undefined when calling deletePet.'); + throw new RequiredError("PetApi", "deletePet", "petId"); } @@ -108,7 +108,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'status' is not null or undefined if (status === null || status === undefined) { - throw new RequiredError('Required parameter status was null or undefined when calling findPetsByStatus.'); + throw new RequiredError("PetApi", "findPetsByStatus", "status"); } @@ -145,7 +145,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'tags' is not null or undefined if (tags === null || tags === undefined) { - throw new RequiredError('Required parameter tags was null or undefined when calling findPetsByTags.'); + throw new RequiredError("PetApi", "findPetsByTags", "tags"); } @@ -182,7 +182,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'petId' is not null or undefined if (petId === null || petId === undefined) { - throw new RequiredError('Required parameter petId was null or undefined when calling getPetById.'); + throw new RequiredError("PetApi", "getPetById", "petId"); } @@ -214,7 +214,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'pet' is not null or undefined if (pet === null || pet === undefined) { - throw new RequiredError('Required parameter pet was null or undefined when calling updatePet.'); + throw new RequiredError("PetApi", "updatePet", "pet"); } @@ -260,7 +260,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'petId' is not null or undefined if (petId === null || petId === undefined) { - throw new RequiredError('Required parameter petId was null or undefined when calling updatePetWithForm.'); + throw new RequiredError("PetApi", "updatePetWithForm", "petId"); } @@ -325,7 +325,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'petId' is not null or undefined if (petId === null || petId === undefined) { - throw new RequiredError('Required parameter petId was null or undefined when calling uploadFile.'); + throw new RequiredError("PetApi", "uploadFile", "petId"); } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts index 1a6d8de0c9b..ec9b8046595 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts @@ -26,7 +26,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'orderId' is not null or undefined if (orderId === null || orderId === undefined) { - throw new RequiredError('Required parameter orderId was null or undefined when calling deleteOrder.'); + throw new RequiredError("StoreApi", "deleteOrder", "orderId"); } @@ -78,7 +78,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'orderId' is not null or undefined if (orderId === null || orderId === undefined) { - throw new RequiredError('Required parameter orderId was null or undefined when calling getOrderById.'); + throw new RequiredError("StoreApi", "getOrderById", "orderId"); } @@ -104,7 +104,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'order' is not null or undefined if (order === null || order === undefined) { - throw new RequiredError('Required parameter order was null or undefined when calling placeOrder.'); + throw new RequiredError("StoreApi", "placeOrder", "order"); } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts index 642cdaac90b..29b98b35ad0 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts @@ -26,7 +26,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'user' is not null or undefined if (user === null || user === undefined) { - throw new RequiredError('Required parameter user was null or undefined when calling createUser.'); + throw new RequiredError("UserApi", "createUser", "user"); } @@ -68,7 +68,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'user' is not null or undefined if (user === null || user === undefined) { - throw new RequiredError('Required parameter user was null or undefined when calling createUsersWithArrayInput.'); + throw new RequiredError("UserApi", "createUsersWithArrayInput", "user"); } @@ -110,7 +110,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'user' is not null or undefined if (user === null || user === undefined) { - throw new RequiredError('Required parameter user was null or undefined when calling createUsersWithListInput.'); + throw new RequiredError("UserApi", "createUsersWithListInput", "user"); } @@ -153,7 +153,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { - throw new RequiredError('Required parameter username was null or undefined when calling deleteUser.'); + throw new RequiredError("UserApi", "deleteUser", "username"); } @@ -185,7 +185,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { - throw new RequiredError('Required parameter username was null or undefined when calling getUserByName.'); + throw new RequiredError("UserApi", "getUserByName", "username"); } @@ -212,13 +212,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { - throw new RequiredError('Required parameter username was null or undefined when calling loginUser.'); + throw new RequiredError("UserApi", "loginUser", "username"); } // verify required parameter 'password' is not null or undefined if (password === null || password === undefined) { - throw new RequiredError('Required parameter password was null or undefined when calling loginUser.'); + throw new RequiredError("UserApi", "loginUser", "password"); } @@ -279,13 +279,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { - throw new RequiredError('Required parameter username was null or undefined when calling updateUser.'); + throw new RequiredError("UserApi", "updateUser", "username"); } // verify required parameter 'user' is not null or undefined if (user === null || user === undefined) { - throw new RequiredError('Required parameter user was null or undefined when calling updateUser.'); + throw new RequiredError("UserApi", "updateUser", "user"); } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/baseapi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/baseapi.ts index 4c9d3794034..ce1e2dbc47e 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/baseapi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/baseapi.ts @@ -31,7 +31,7 @@ export class BaseAPIRequestFactory { */ export class RequiredError extends Error { name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); + constructor(public api: string, public method: string, public field: string) { + super("Required parameter " + field + " was null or undefined when calling " + api + "." + method + "."); } } diff --git a/samples/openapi3/client/petstore/typescript/tests/default/test/api/PetApi.test.ts b/samples/openapi3/client/petstore/typescript/tests/default/test/api/PetApi.test.ts index 5372106656d..cbb1042a622 100644 --- a/samples/openapi3/client/petstore/typescript/tests/default/test/api/PetApi.test.ts +++ b/samples/openapi3/client/petstore/typescript/tests/default/test/api/PetApi.test.ts @@ -62,6 +62,21 @@ describe("PetApi", () => { throw new Error("Deleted non-existant pet with id " + nonExistantId + "!"); }) + it("failRunTimeRequiredParameterCheck", async () => { + try { + await petApi.deletePet(null) + } catch (err) { + expect(err.api).to.equal("PetApi"); + expect(err.message).to.include("PetApi"); + expect(err.method).to.equal("deletePet"); + expect(err.message).to.include("deletePet"); + expect(err.field).to.equal("petId"); + expect(err.message).to.include("petId"); + return; + } + throw new Error("Accepted missing parameter!"); + }) + it("findPetsByStatus", async () => { const pets = await petApi.findPetsByStatus(["available"]); expect(pets.length).to.be.at.least(1); From 72cec10edf913e873c954cb51e7ba3f5c555b924 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 5 Oct 2021 20:37:24 +0800 Subject: [PATCH 49/50] Fix Windows build failure in some environments (#10529) * update surefire to newer version * more fixes * update pet.proto * update model protobuf template * add charset * set line separator * set proper line break in proto test * minor fix * use UTF-8 * use FileUtils.contentEquals * remove line break * remove line breaks * revert utf-8 change --- .../resources/protobuf-schema/partial_header.mustache | 10 ++++++++-- .../codegen/markdown/MarkdownSampleGeneratorTest.java | 7 ++++--- .../codegen/protobuf/ProtobufSchemaCodegenTest.java | 11 ++++++++--- .../src/test/resources/3_0/protobuf-schema/pet.proto | 2 +- pom.xml | 6 +++++- .../protobuf-schema/models/api_response.proto | 2 +- .../petstore/protobuf-schema/models/category.proto | 2 +- .../petstore/protobuf-schema/models/order.proto | 2 +- .../config/petstore/protobuf-schema/models/pet.proto | 2 +- .../config/petstore/protobuf-schema/models/tag.proto | 2 +- .../config/petstore/protobuf-schema/models/user.proto | 2 +- .../protobuf-schema/services/pet_service.proto | 2 +- .../protobuf-schema/services/store_service.proto | 2 +- .../protobuf-schema/services/user_service.proto | 2 +- 14 files changed, 35 insertions(+), 19 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/protobuf-schema/partial_header.mustache b/modules/openapi-generator/src/main/resources/protobuf-schema/partial_header.mustache index 79ae090e31a..038e725751a 100644 --- a/modules/openapi-generator/src/main/resources/protobuf-schema/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/protobuf-schema/partial_header.mustache @@ -7,7 +7,13 @@ {{{.}}} {{/appDescription}} - {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} - {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} + {{#version}} + The version of the OpenAPI document: {{{.}}} + + {{/version}} + {{#infoEmail}} + Contact: {{{.}}} + + {{/infoEmail}} Generated by OpenAPI Generator: https://openapi-generator.tech */ diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/markdown/MarkdownSampleGeneratorTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/markdown/MarkdownSampleGeneratorTest.java index 43b19edb55a..db8a5b29cd0 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/markdown/MarkdownSampleGeneratorTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/markdown/MarkdownSampleGeneratorTest.java @@ -8,7 +8,6 @@ import java.nio.file.Path; import java.util.List; import org.apache.commons.io.FileUtils; - import org.openapitools.codegen.DefaultGenerator; import org.openapitools.codegen.config.CodegenConfigurator; import org.testng.Assert; @@ -21,6 +20,8 @@ public class MarkdownSampleGeneratorTest { @BeforeClass public void beforeClassGenerateTestMarkup() throws Exception { + // set line break to \n across all platforms + System.setProperty("line.separator", "\n"); this.outputTempDirectory = Files.createTempDirectory("test-markdown-sample-generator.").toFile(); @@ -44,8 +45,8 @@ public class MarkdownSampleGeneratorTest { Assert.assertTrue(expected.exists(), "Could not find " + expected.toString()); - Assert.assertEquals(FileUtils.readFileToString(generated), - FileUtils.readFileToString(expected, StandardCharsets.UTF_8)); + Assert.assertEquals(FileUtils.readFileToString(generated, StandardCharsets.UTF_8).replace("\n", "").replace("\r", ""), + FileUtils.readFileToString(expected, StandardCharsets.UTF_8).replace("\n", "").replace("\r", "")); } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/protobuf/ProtobufSchemaCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/protobuf/ProtobufSchemaCodegenTest.java index db3f06e3c80..3b30f96b2e3 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/protobuf/ProtobufSchemaCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/protobuf/ProtobufSchemaCodegenTest.java @@ -49,6 +49,9 @@ public class ProtobufSchemaCodegenTest { @Test public void testCodeGenWithAllOf() throws IOException { + // set line break to \n across all platforms + System.setProperty("line.separator", "\n"); + File output = Files.createTempDirectory("test").toFile(); final CodegenConfigurator configurator = new CodegenConfigurator() @@ -69,9 +72,11 @@ public class ProtobufSchemaCodegenTest { } private void assertFileEquals(Path generatedFilePath, Path expectedFilePath) throws IOException { - String generatedFile = new String(Files.readAllBytes(generatedFilePath), StandardCharsets.UTF_8); - String expectedFile = new String(Files.readAllBytes(expectedFilePath), StandardCharsets.UTF_8); + String generatedFile = new String(Files.readAllBytes(generatedFilePath), StandardCharsets.UTF_8) + .replace("\n", "").replace("\r", ""); + String expectedFile = new String(Files.readAllBytes(expectedFilePath), StandardCharsets.UTF_8) + .replace("\n", "").replace("\r", ""); assertEquals(generatedFile, expectedFile); } -} \ No newline at end of file +} diff --git a/modules/openapi-generator/src/test/resources/3_0/protobuf-schema/pet.proto b/modules/openapi-generator/src/test/resources/3_0/protobuf-schema/pet.proto index 86da6922f5e..7ba4adc282a 100644 --- a/modules/openapi-generator/src/test/resources/3_0/protobuf-schema/pet.proto +++ b/modules/openapi-generator/src/test/resources/3_0/protobuf-schema/pet.proto @@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: 1.0.0 - + Generated by OpenAPI Generator: https://openapi-generator.tech */ diff --git a/pom.xml b/pom.xml index 402fd42cd18..c007f6f2b68 100644 --- a/pom.xml +++ b/pom.xml @@ -226,10 +226,14 @@ ${surefire-version} true + 120 false none:none org.testng:testng @{argLine} -XX:+StartAttachListener + 3 + true + -Xmx1024m -XX:MaxPermSize=256m 1000 5000 @@ -1618,7 +1622,7 @@ 1.14 4.2.1 7.1.0 - 3.0.0-M3 + 3.0.0-M5 0.9.10 3.6.28 0.8.5 diff --git a/samples/config/petstore/protobuf-schema/models/api_response.proto b/samples/config/petstore/protobuf-schema/models/api_response.proto index 9ab4d12e170..96f87652913 100644 --- a/samples/config/petstore/protobuf-schema/models/api_response.proto +++ b/samples/config/petstore/protobuf-schema/models/api_response.proto @@ -4,7 +4,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. The version of the OpenAPI document: 1.0.0 - + Generated by OpenAPI Generator: https://openapi-generator.tech */ diff --git a/samples/config/petstore/protobuf-schema/models/category.proto b/samples/config/petstore/protobuf-schema/models/category.proto index 824ce32ac59..7c05a10a8f6 100644 --- a/samples/config/petstore/protobuf-schema/models/category.proto +++ b/samples/config/petstore/protobuf-schema/models/category.proto @@ -4,7 +4,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. The version of the OpenAPI document: 1.0.0 - + Generated by OpenAPI Generator: https://openapi-generator.tech */ diff --git a/samples/config/petstore/protobuf-schema/models/order.proto b/samples/config/petstore/protobuf-schema/models/order.proto index 5d46dfd9bee..27cded1f00e 100644 --- a/samples/config/petstore/protobuf-schema/models/order.proto +++ b/samples/config/petstore/protobuf-schema/models/order.proto @@ -4,7 +4,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. The version of the OpenAPI document: 1.0.0 - + Generated by OpenAPI Generator: https://openapi-generator.tech */ diff --git a/samples/config/petstore/protobuf-schema/models/pet.proto b/samples/config/petstore/protobuf-schema/models/pet.proto index 725dfa0818a..41ed4b7a9fc 100644 --- a/samples/config/petstore/protobuf-schema/models/pet.proto +++ b/samples/config/petstore/protobuf-schema/models/pet.proto @@ -4,7 +4,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. The version of the OpenAPI document: 1.0.0 - + Generated by OpenAPI Generator: https://openapi-generator.tech */ diff --git a/samples/config/petstore/protobuf-schema/models/tag.proto b/samples/config/petstore/protobuf-schema/models/tag.proto index 9f2a6343955..bd7a9934166 100644 --- a/samples/config/petstore/protobuf-schema/models/tag.proto +++ b/samples/config/petstore/protobuf-schema/models/tag.proto @@ -4,7 +4,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. The version of the OpenAPI document: 1.0.0 - + Generated by OpenAPI Generator: https://openapi-generator.tech */ diff --git a/samples/config/petstore/protobuf-schema/models/user.proto b/samples/config/petstore/protobuf-schema/models/user.proto index 5dcba10582f..eb6f727b876 100644 --- a/samples/config/petstore/protobuf-schema/models/user.proto +++ b/samples/config/petstore/protobuf-schema/models/user.proto @@ -4,7 +4,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. The version of the OpenAPI document: 1.0.0 - + Generated by OpenAPI Generator: https://openapi-generator.tech */ diff --git a/samples/config/petstore/protobuf-schema/services/pet_service.proto b/samples/config/petstore/protobuf-schema/services/pet_service.proto index 9c694f6e838..6ac05f1deeb 100644 --- a/samples/config/petstore/protobuf-schema/services/pet_service.proto +++ b/samples/config/petstore/protobuf-schema/services/pet_service.proto @@ -4,7 +4,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. The version of the OpenAPI document: 1.0.0 - + Generated by OpenAPI Generator: https://openapi-generator.tech */ diff --git a/samples/config/petstore/protobuf-schema/services/store_service.proto b/samples/config/petstore/protobuf-schema/services/store_service.proto index f1b1e90d909..e30382ad502 100644 --- a/samples/config/petstore/protobuf-schema/services/store_service.proto +++ b/samples/config/petstore/protobuf-schema/services/store_service.proto @@ -4,7 +4,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. The version of the OpenAPI document: 1.0.0 - + Generated by OpenAPI Generator: https://openapi-generator.tech */ diff --git a/samples/config/petstore/protobuf-schema/services/user_service.proto b/samples/config/petstore/protobuf-schema/services/user_service.proto index 639867b4fe2..8130b04aadd 100644 --- a/samples/config/petstore/protobuf-schema/services/user_service.proto +++ b/samples/config/petstore/protobuf-schema/services/user_service.proto @@ -4,7 +4,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. The version of the OpenAPI document: 1.0.0 - + Generated by OpenAPI Generator: https://openapi-generator.tech */ From 8d7be74b792466ee4d72cbf3428e5910b792414c Mon Sep 17 00:00:00 2001 From: agilob Date: Tue, 5 Oct 2021 18:38:50 +0100 Subject: [PATCH 50/50] Dart json_serializable: remove experimental generator (#10533) --- docs/generators.md | 2 +- .../codegen/languages/DartJaguarClientCodegen.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/generators.md b/docs/generators.md index b008000a275..ed80e860e49 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -24,7 +24,7 @@ The following generators are available: * [dart](generators/dart.md) * [dart-dio](generators/dart-dio.md) * [dart-dio-next (experimental)](generators/dart-dio-next.md) -* [dart-jaguar](generators/dart-jaguar.md) +* [dart-jaguar (deprecated)](generators/dart-jaguar.md) * [eiffel](generators/eiffel.md) * [elixir](generators/elixir.md) * [elm](generators/elm.md) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java index 9ff3126c980..a767bbd33d8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java @@ -17,6 +17,8 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.GeneratorMetadata; +import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; @@ -88,6 +90,10 @@ public class DartJaguarClientCodegen extends AbstractDartCodegen { ) ); + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) + .stability(Stability.DEPRECATED) + .build(); + outputFolder = "generated-code/dart-jaguar"; embeddedTemplateDir = templateDir = "dart-jaguar";