From 74100e44cb3aa4453ad15f241f2e09cffac38016 Mon Sep 17 00:00:00 2001
From: Bruno Coelho <4brunu@users.noreply.github.com>
Date: Thu, 3 Oct 2024 10:58:06 +0100
Subject: [PATCH] [swift6] replace AnyCodable with JSONValue (#19763)
---
docs/generators/swift6.md | 2 +-
.../languages/Swift6ClientCodegen.java | 9 +-
.../main/resources/swift6/Cartfile.mustache | 3 +-
.../main/resources/swift6/Extensions.mustache | 5 +-
.../main/resources/swift6/JSONValue.mustache | 247 ++++++++++++++++++
.../resources/swift6/Package.swift.mustache | 3 +-
.../main/resources/swift6/Podspec.mustache | 1 -
.../main/resources/swift6/XcodeGen.mustache | 3 +-
.../src/main/resources/swift6/api.mustache | 5 +-
.../src/main/resources/swift6/model.mustache | 5 +-
.../swift6/Swift6ClientCodegenTest.java | 8 +-
.../alamofireLibrary/.openapi-generator/FILES | 1 +
.../petstore/swift6/alamofireLibrary/Cartfile | 1 -
.../swift6/alamofireLibrary/Package.resolved | 11 +-
.../swift6/alamofireLibrary/Package.swift | 3 +-
.../alamofireLibrary/PetstoreClient.podspec | 1 -
.../OpenAPIs/APIs/AnotherFakeAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/FakeAPI.swift | 3 -
.../APIs/FakeClassnameTags123API.swift | 3 -
.../Classes/OpenAPIs/APIs/PetAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/StoreAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/UserAPI.swift | 3 -
.../Classes/OpenAPIs/Extensions.swift | 3 -
.../Classes/OpenAPIs/JSONValue.swift | 247 ++++++++++++++++++
.../Models/AdditionalPropertiesClass.swift | 3 -
.../Classes/OpenAPIs/Models/Animal.swift | 3 -
.../Classes/OpenAPIs/Models/AnimalFarm.swift | 3 -
.../Classes/OpenAPIs/Models/ApiResponse.swift | 3 -
.../Models/ArrayOfArrayOfNumberOnly.swift | 3 -
.../OpenAPIs/Models/ArrayOfNumberOnly.swift | 3 -
.../Classes/OpenAPIs/Models/ArrayTest.swift | 3 -
.../OpenAPIs/Models/Capitalization.swift | 3 -
.../Classes/OpenAPIs/Models/Cat.swift | 3 -
.../Classes/OpenAPIs/Models/Category.swift | 3 -
.../Classes/OpenAPIs/Models/ClassModel.swift | 3 -
.../Classes/OpenAPIs/Models/Client.swift | 3 -
.../Classes/OpenAPIs/Models/Dog.swift | 3 -
.../Classes/OpenAPIs/Models/EnumArrays.swift | 3 -
.../Classes/OpenAPIs/Models/EnumClass.swift | 3 -
.../Classes/OpenAPIs/Models/EnumTest.swift | 3 -
.../Classes/OpenAPIs/Models/File.swift | 3 -
.../OpenAPIs/Models/FileSchemaTestClass.swift | 3 -
.../Classes/OpenAPIs/Models/FormatTest.swift | 3 -
.../OpenAPIs/Models/HasOnlyReadOnly.swift | 3 -
.../Classes/OpenAPIs/Models/List.swift | 3 -
.../Classes/OpenAPIs/Models/MapTest.swift | 3 -
...opertiesAndAdditionalPropertiesClass.swift | 3 -
.../OpenAPIs/Models/Model200Response.swift | 3 -
.../Classes/OpenAPIs/Models/Name.swift | 3 -
.../Classes/OpenAPIs/Models/NumberOnly.swift | 3 -
.../Classes/OpenAPIs/Models/Order.swift | 3 -
.../OpenAPIs/Models/OuterComposite.swift | 3 -
.../Classes/OpenAPIs/Models/OuterEnum.swift | 3 -
.../Classes/OpenAPIs/Models/Pet.swift | 3 -
.../OpenAPIs/Models/ReadOnlyFirst.swift | 3 -
.../Classes/OpenAPIs/Models/Return.swift | 3 -
.../OpenAPIs/Models/SpecialModelName.swift | 3 -
.../OpenAPIs/Models/StringBooleanMap.swift | 3 -
.../Classes/OpenAPIs/Models/Tag.swift | 3 -
.../OpenAPIs/Models/TypeHolderDefault.swift | 3 -
.../OpenAPIs/Models/TypeHolderExample.swift | 3 -
.../Classes/OpenAPIs/Models/User.swift | 3 -
.../xcshareddata/swiftpm/Package.resolved | 11 +-
.../swift6/alamofireLibrary/project.yml | 1 -
.../.openapi-generator/FILES | 1 +
.../swift6/apiNonStaticMethod/Cartfile | 1 -
.../apiNonStaticMethod/Package.resolved | 11 +-
.../swift6/apiNonStaticMethod/Package.swift | 3 +-
.../apiNonStaticMethod/PetstoreClient.podspec | 1 -
.../OpenAPIs/APIs/AnotherFakeAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/FakeAPI.swift | 3 -
.../APIs/FakeClassnameTags123API.swift | 3 -
.../Classes/OpenAPIs/APIs/PetAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/StoreAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/UserAPI.swift | 3 -
.../Classes/OpenAPIs/Extensions.swift | 3 -
.../Classes/OpenAPIs/JSONValue.swift | 247 ++++++++++++++++++
.../Models/AdditionalPropertiesClass.swift | 3 -
.../Classes/OpenAPIs/Models/Animal.swift | 3 -
.../Classes/OpenAPIs/Models/ApiResponse.swift | 3 -
.../Models/ArrayOfArrayOfNumberOnly.swift | 3 -
.../OpenAPIs/Models/ArrayOfNumberOnly.swift | 3 -
.../Classes/OpenAPIs/Models/ArrayTest.swift | 3 -
.../OpenAPIs/Models/Capitalization.swift | 3 -
.../Classes/OpenAPIs/Models/Cat.swift | 3 -
.../Classes/OpenAPIs/Models/Category.swift | 3 -
.../Classes/OpenAPIs/Models/ClassModel.swift | 3 -
.../Classes/OpenAPIs/Models/Client.swift | 3 -
.../Classes/OpenAPIs/Models/Dog.swift | 3 -
.../Classes/OpenAPIs/Models/EnumArrays.swift | 3 -
.../Classes/OpenAPIs/Models/EnumClass.swift | 3 -
.../Classes/OpenAPIs/Models/EnumTest.swift | 3 -
.../Classes/OpenAPIs/Models/File.swift | 3 -
.../OpenAPIs/Models/FileSchemaTestClass.swift | 3 -
.../Classes/OpenAPIs/Models/FormatTest.swift | 3 -
.../OpenAPIs/Models/HasOnlyReadOnly.swift | 3 -
.../Classes/OpenAPIs/Models/List.swift | 3 -
.../Classes/OpenAPIs/Models/MapTest.swift | 3 -
...opertiesAndAdditionalPropertiesClass.swift | 3 -
.../OpenAPIs/Models/Model200Response.swift | 3 -
.../Classes/OpenAPIs/Models/Name.swift | 3 -
.../Classes/OpenAPIs/Models/NumberOnly.swift | 3 -
.../Classes/OpenAPIs/Models/Order.swift | 3 -
.../OpenAPIs/Models/OuterComposite.swift | 3 -
.../Classes/OpenAPIs/Models/OuterEnum.swift | 3 -
.../Classes/OpenAPIs/Models/Pet.swift | 3 -
.../OpenAPIs/Models/ReadOnlyFirst.swift | 3 -
.../Classes/OpenAPIs/Models/Return.swift | 3 -
.../OpenAPIs/Models/SpecialModelName.swift | 3 -
.../Classes/OpenAPIs/Models/Tag.swift | 3 -
.../OpenAPIs/Models/TypeHolderDefault.swift | 3 -
.../OpenAPIs/Models/TypeHolderExample.swift | 3 -
.../Classes/OpenAPIs/Models/User.swift | 3 -
.../xcshareddata/swiftpm/Package.resolved | 11 +-
.../swift6/apiNonStaticMethod/project.yml | 1 -
.../.openapi-generator/FILES | 1 +
.../swift6/asyncAwaitLibrary/Cartfile | 2 +-
.../swift6/asyncAwaitLibrary/Package.resolved | 15 --
.../swift6/asyncAwaitLibrary/Package.swift | 3 +-
.../asyncAwaitLibrary/PetstoreClient.podspec | 1 -
.../OpenAPIs/APIs/AnotherFakeAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/FakeAPI.swift | 3 -
.../APIs/FakeClassnameTags123API.swift | 3 -
.../Classes/OpenAPIs/APIs/PetAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/StoreAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/UserAPI.swift | 3 -
.../Classes/OpenAPIs/Extensions.swift | 3 -
.../Classes/OpenAPIs/JSONValue.swift | 247 ++++++++++++++++++
.../Models/AdditionalPropertiesClass.swift | 3 -
.../Classes/OpenAPIs/Models/Animal.swift | 3 -
.../Classes/OpenAPIs/Models/AnimalFarm.swift | 3 -
.../Classes/OpenAPIs/Models/ApiResponse.swift | 3 -
.../Models/ArrayOfArrayOfNumberOnly.swift | 3 -
.../OpenAPIs/Models/ArrayOfNumberOnly.swift | 3 -
.../Classes/OpenAPIs/Models/ArrayTest.swift | 3 -
.../OpenAPIs/Models/Capitalization.swift | 3 -
.../Classes/OpenAPIs/Models/Cat.swift | 3 -
.../Classes/OpenAPIs/Models/Category.swift | 3 -
.../Classes/OpenAPIs/Models/ClassModel.swift | 3 -
.../Classes/OpenAPIs/Models/Client.swift | 3 -
.../Classes/OpenAPIs/Models/Dog.swift | 3 -
.../Classes/OpenAPIs/Models/EnumArrays.swift | 3 -
.../Classes/OpenAPIs/Models/EnumClass.swift | 3 -
.../Classes/OpenAPIs/Models/EnumTest.swift | 3 -
.../Classes/OpenAPIs/Models/File.swift | 3 -
.../OpenAPIs/Models/FileSchemaTestClass.swift | 3 -
.../Classes/OpenAPIs/Models/FormatTest.swift | 3 -
.../OpenAPIs/Models/HasOnlyReadOnly.swift | 3 -
.../Classes/OpenAPIs/Models/List.swift | 3 -
.../Classes/OpenAPIs/Models/MapTest.swift | 3 -
...opertiesAndAdditionalPropertiesClass.swift | 3 -
.../OpenAPIs/Models/Model200Response.swift | 3 -
.../Classes/OpenAPIs/Models/Name.swift | 3 -
.../Classes/OpenAPIs/Models/NumberOnly.swift | 3 -
.../Classes/OpenAPIs/Models/Order.swift | 3 -
.../OpenAPIs/Models/OuterComposite.swift | 3 -
.../Classes/OpenAPIs/Models/OuterEnum.swift | 3 -
.../Classes/OpenAPIs/Models/Pet.swift | 3 -
.../OpenAPIs/Models/ReadOnlyFirst.swift | 3 -
.../Classes/OpenAPIs/Models/Return.swift | 3 -
.../OpenAPIs/Models/SpecialModelName.swift | 3 -
.../OpenAPIs/Models/StringBooleanMap.swift | 3 -
.../Classes/OpenAPIs/Models/Tag.swift | 3 -
.../OpenAPIs/Models/TypeHolderDefault.swift | 3 -
.../OpenAPIs/Models/TypeHolderExample.swift | 3 -
.../Classes/OpenAPIs/Models/User.swift | 3 -
.../xcshareddata/swiftpm/Package.resolved | 15 --
.../swift6/asyncAwaitLibrary/project.yml | 1 -
.../.openapi-generator/FILES | 1 +
.../swift6/combineDeferredLibrary/Cartfile | 2 +-
.../combineDeferredLibrary/Package.resolved | 15 --
.../combineDeferredLibrary/Package.swift | 3 +-
.../PetstoreClient.podspec | 1 -
.../OpenAPIs/APIs/AnotherFakeAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/FakeAPI.swift | 3 -
.../APIs/FakeClassnameTags123API.swift | 3 -
.../Classes/OpenAPIs/APIs/PetAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/StoreAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/UserAPI.swift | 3 -
.../Classes/OpenAPIs/Extensions.swift | 3 -
.../Classes/OpenAPIs/JSONValue.swift | 247 ++++++++++++++++++
.../Models/AdditionalPropertiesClass.swift | 3 -
.../Classes/OpenAPIs/Models/Animal.swift | 3 -
.../Classes/OpenAPIs/Models/AnimalFarm.swift | 3 -
.../Classes/OpenAPIs/Models/ApiResponse.swift | 3 -
.../Models/ArrayOfArrayOfNumberOnly.swift | 3 -
.../OpenAPIs/Models/ArrayOfNumberOnly.swift | 3 -
.../Classes/OpenAPIs/Models/ArrayTest.swift | 3 -
.../OpenAPIs/Models/Capitalization.swift | 3 -
.../Classes/OpenAPIs/Models/Cat.swift | 3 -
.../Classes/OpenAPIs/Models/Category.swift | 3 -
.../Classes/OpenAPIs/Models/ClassModel.swift | 3 -
.../Classes/OpenAPIs/Models/Client.swift | 3 -
.../Classes/OpenAPIs/Models/Dog.swift | 3 -
.../Classes/OpenAPIs/Models/EnumArrays.swift | 3 -
.../Classes/OpenAPIs/Models/EnumClass.swift | 3 -
.../Classes/OpenAPIs/Models/EnumTest.swift | 3 -
.../Classes/OpenAPIs/Models/File.swift | 3 -
.../OpenAPIs/Models/FileSchemaTestClass.swift | 3 -
.../Classes/OpenAPIs/Models/FormatTest.swift | 3 -
.../OpenAPIs/Models/HasOnlyReadOnly.swift | 3 -
.../Classes/OpenAPIs/Models/List.swift | 3 -
.../Classes/OpenAPIs/Models/MapTest.swift | 3 -
...opertiesAndAdditionalPropertiesClass.swift | 3 -
.../OpenAPIs/Models/Model200Response.swift | 3 -
.../Classes/OpenAPIs/Models/Name.swift | 3 -
.../Classes/OpenAPIs/Models/NumberOnly.swift | 3 -
.../Classes/OpenAPIs/Models/Order.swift | 3 -
.../OpenAPIs/Models/OuterComposite.swift | 3 -
.../Classes/OpenAPIs/Models/OuterEnum.swift | 3 -
.../Classes/OpenAPIs/Models/Pet.swift | 3 -
.../OpenAPIs/Models/ReadOnlyFirst.swift | 3 -
.../Classes/OpenAPIs/Models/Return.swift | 3 -
.../OpenAPIs/Models/SpecialModelName.swift | 3 -
.../OpenAPIs/Models/StringBooleanMap.swift | 3 -
.../Classes/OpenAPIs/Models/Tag.swift | 3 -
.../OpenAPIs/Models/TypeHolderDefault.swift | 3 -
.../OpenAPIs/Models/TypeHolderExample.swift | 3 -
.../Classes/OpenAPIs/Models/User.swift | 3 -
.../xcshareddata/swiftpm/Package.resolved | 15 --
.../swift6/combineDeferredLibrary/project.yml | 1 -
.../combineLibrary/.openapi-generator/FILES | 1 +
.../petstore/swift6/combineLibrary/Cartfile | 2 +-
.../swift6/combineLibrary/Package.resolved | 15 --
.../swift6/combineLibrary/Package.swift | 3 +-
.../combineLibrary/PetstoreClient.podspec | 1 -
.../OpenAPIs/APIs/AnotherFakeAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/FakeAPI.swift | 3 -
.../APIs/FakeClassnameTags123API.swift | 3 -
.../Classes/OpenAPIs/APIs/PetAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/StoreAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/UserAPI.swift | 3 -
.../Classes/OpenAPIs/Extensions.swift | 3 -
.../Classes/OpenAPIs/JSONValue.swift | 247 ++++++++++++++++++
.../Models/AdditionalPropertiesClass.swift | 3 -
.../Classes/OpenAPIs/Models/Animal.swift | 3 -
.../Classes/OpenAPIs/Models/AnimalFarm.swift | 3 -
.../Classes/OpenAPIs/Models/ApiResponse.swift | 3 -
.../Models/ArrayOfArrayOfNumberOnly.swift | 3 -
.../OpenAPIs/Models/ArrayOfNumberOnly.swift | 3 -
.../Classes/OpenAPIs/Models/ArrayTest.swift | 3 -
.../OpenAPIs/Models/Capitalization.swift | 3 -
.../Classes/OpenAPIs/Models/Cat.swift | 3 -
.../Classes/OpenAPIs/Models/Category.swift | 3 -
.../Classes/OpenAPIs/Models/ClassModel.swift | 3 -
.../Classes/OpenAPIs/Models/Client.swift | 3 -
.../Classes/OpenAPIs/Models/Dog.swift | 3 -
.../Classes/OpenAPIs/Models/EnumArrays.swift | 3 -
.../Classes/OpenAPIs/Models/EnumClass.swift | 3 -
.../Classes/OpenAPIs/Models/EnumTest.swift | 3 -
.../Classes/OpenAPIs/Models/File.swift | 3 -
.../OpenAPIs/Models/FileSchemaTestClass.swift | 3 -
.../Classes/OpenAPIs/Models/FormatTest.swift | 3 -
.../OpenAPIs/Models/HasOnlyReadOnly.swift | 3 -
.../Classes/OpenAPIs/Models/List.swift | 3 -
.../Classes/OpenAPIs/Models/MapTest.swift | 3 -
...opertiesAndAdditionalPropertiesClass.swift | 3 -
.../OpenAPIs/Models/Model200Response.swift | 3 -
.../Classes/OpenAPIs/Models/Name.swift | 3 -
.../Classes/OpenAPIs/Models/NumberOnly.swift | 3 -
.../Classes/OpenAPIs/Models/Order.swift | 3 -
.../OpenAPIs/Models/OuterComposite.swift | 3 -
.../Classes/OpenAPIs/Models/OuterEnum.swift | 3 -
.../Classes/OpenAPIs/Models/Pet.swift | 3 -
.../OpenAPIs/Models/ReadOnlyFirst.swift | 3 -
.../Classes/OpenAPIs/Models/Return.swift | 3 -
.../OpenAPIs/Models/SpecialModelName.swift | 3 -
.../OpenAPIs/Models/StringBooleanMap.swift | 3 -
.../Classes/OpenAPIs/Models/Tag.swift | 3 -
.../OpenAPIs/Models/TypeHolderDefault.swift | 3 -
.../OpenAPIs/Models/TypeHolderExample.swift | 3 -
.../Classes/OpenAPIs/Models/User.swift | 3 -
.../xcshareddata/swiftpm/Package.resolved | 15 --
.../swift6/combineLibrary/project.yml | 1 -
.../swift6/default/.openapi-generator/FILES | 1 +
.../client/petstore/swift6/default/Cartfile | 2 +-
.../petstore/swift6/default/Package.resolved | 15 --
.../petstore/swift6/default/Package.swift | 3 +-
.../swift6/default/PetstoreClient.podspec | 1 -
.../OpenAPIs/APIs/AnotherFakeAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/FakeAPI.swift | 3 -
.../APIs/FakeClassnameTags123API.swift | 3 -
.../Classes/OpenAPIs/APIs/PetAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/StoreAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/UserAPI.swift | 3 -
.../Classes/OpenAPIs/Extensions.swift | 3 -
.../Classes/OpenAPIs/JSONValue.swift | 247 ++++++++++++++++++
.../Models/AdditionalPropertiesAnyType.swift | 9 +-
.../Models/AdditionalPropertiesArray.swift | 9 +-
.../Models/AdditionalPropertiesBoolean.swift | 3 -
.../Models/AdditionalPropertiesClass.swift | 15 +-
.../Models/AdditionalPropertiesInteger.swift | 3 -
.../Models/AdditionalPropertiesNumber.swift | 3 -
.../Models/AdditionalPropertiesObject.swift | 9 +-
.../Models/AdditionalPropertiesString.swift | 3 -
.../Classes/OpenAPIs/Models/Animal.swift | 3 -
.../Classes/OpenAPIs/Models/AnimalFarm.swift | 3 -
.../Classes/OpenAPIs/Models/ApiResponse.swift | 3 -
.../Models/ArrayOfArrayOfNumberOnly.swift | 3 -
.../OpenAPIs/Models/ArrayOfNumberOnly.swift | 3 -
.../Classes/OpenAPIs/Models/ArrayTest.swift | 3 -
.../Classes/OpenAPIs/Models/BigCat.swift | 3 -
.../OpenAPIs/Models/Capitalization.swift | 3 -
.../Classes/OpenAPIs/Models/Cat.swift | 3 -
.../Classes/OpenAPIs/Models/Category.swift | 3 -
.../Classes/OpenAPIs/Models/ClassModel.swift | 3 -
.../Classes/OpenAPIs/Models/Client.swift | 3 -
.../Classes/OpenAPIs/Models/Dog.swift | 3 -
.../Classes/OpenAPIs/Models/EnumArrays.swift | 3 -
.../Classes/OpenAPIs/Models/EnumClass.swift | 3 -
.../Classes/OpenAPIs/Models/EnumTest.swift | 3 -
.../Classes/OpenAPIs/Models/File.swift | 3 -
.../OpenAPIs/Models/FileSchemaTestClass.swift | 3 -
.../Classes/OpenAPIs/Models/FormatTest.swift | 3 -
.../OpenAPIs/Models/HasOnlyReadOnly.swift | 3 -
.../Classes/OpenAPIs/Models/List.swift | 3 -
.../Classes/OpenAPIs/Models/MapTest.swift | 3 -
...opertiesAndAdditionalPropertiesClass.swift | 3 -
.../OpenAPIs/Models/Model200Response.swift | 3 -
.../Classes/OpenAPIs/Models/Name.swift | 3 -
.../Classes/OpenAPIs/Models/NumberOnly.swift | 3 -
.../Classes/OpenAPIs/Models/Order.swift | 3 -
.../OpenAPIs/Models/OuterComposite.swift | 3 -
.../Classes/OpenAPIs/Models/OuterEnum.swift | 3 -
.../Classes/OpenAPIs/Models/Pet.swift | 3 -
.../OpenAPIs/Models/ReadOnlyFirst.swift | 3 -
.../Classes/OpenAPIs/Models/Return.swift | 3 -
.../OpenAPIs/Models/SpecialModelName.swift | 3 -
.../OpenAPIs/Models/StringBooleanMap.swift | 3 -
.../Classes/OpenAPIs/Models/Tag.swift | 3 -
.../OpenAPIs/Models/TypeHolderDefault.swift | 3 -
.../OpenAPIs/Models/TypeHolderExample.swift | 3 -
.../Classes/OpenAPIs/Models/User.swift | 3 -
.../Classes/OpenAPIs/Models/XmlItem.swift | 3 -
.../xcshareddata/swiftpm/Package.resolved | 15 --
.../default/docs/AdditionalPropertiesClass.md | 10 +-
.../petstore/swift6/default/project.yml | 1 -
.../objcCompatible/.openapi-generator/FILES | 1 +
.../petstore/swift6/objcCompatible/Cartfile | 2 +-
.../swift6/objcCompatible/Package.resolved | 15 --
.../swift6/objcCompatible/Package.swift | 3 +-
.../objcCompatible/PetstoreClient.podspec | 1 -
.../OpenAPIs/APIs/AnotherFakeAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/FakeAPI.swift | 3 -
.../APIs/FakeClassnameTags123API.swift | 3 -
.../Classes/OpenAPIs/APIs/PetAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/StoreAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/UserAPI.swift | 3 -
.../Classes/OpenAPIs/Extensions.swift | 3 -
.../Classes/OpenAPIs/JSONValue.swift | 247 ++++++++++++++++++
.../Models/AdditionalPropertiesClass.swift | 3 -
.../Classes/OpenAPIs/Models/Animal.swift | 3 -
.../Classes/OpenAPIs/Models/AnimalFarm.swift | 3 -
.../Classes/OpenAPIs/Models/ApiResponse.swift | 3 -
.../Models/ArrayOfArrayOfNumberOnly.swift | 3 -
.../OpenAPIs/Models/ArrayOfNumberOnly.swift | 3 -
.../Classes/OpenAPIs/Models/ArrayTest.swift | 3 -
.../OpenAPIs/Models/Capitalization.swift | 3 -
.../Classes/OpenAPIs/Models/Cat.swift | 3 -
.../Classes/OpenAPIs/Models/Category.swift | 3 -
.../Classes/OpenAPIs/Models/ClassModel.swift | 3 -
.../Classes/OpenAPIs/Models/Client.swift | 3 -
.../Classes/OpenAPIs/Models/Dog.swift | 3 -
.../Classes/OpenAPIs/Models/EnumArrays.swift | 3 -
.../Classes/OpenAPIs/Models/EnumClass.swift | 3 -
.../Classes/OpenAPIs/Models/EnumTest.swift | 3 -
.../Classes/OpenAPIs/Models/File.swift | 3 -
.../OpenAPIs/Models/FileSchemaTestClass.swift | 3 -
.../Classes/OpenAPIs/Models/FormatTest.swift | 3 -
.../OpenAPIs/Models/HasOnlyReadOnly.swift | 3 -
.../Classes/OpenAPIs/Models/List.swift | 3 -
.../Classes/OpenAPIs/Models/MapTest.swift | 3 -
...opertiesAndAdditionalPropertiesClass.swift | 3 -
.../OpenAPIs/Models/Model200Response.swift | 3 -
.../Classes/OpenAPIs/Models/Name.swift | 3 -
.../Classes/OpenAPIs/Models/NumberOnly.swift | 3 -
.../Classes/OpenAPIs/Models/Order.swift | 3 -
.../OpenAPIs/Models/OuterComposite.swift | 3 -
.../Classes/OpenAPIs/Models/OuterEnum.swift | 3 -
.../Classes/OpenAPIs/Models/Pet.swift | 3 -
.../OpenAPIs/Models/ReadOnlyFirst.swift | 3 -
.../Classes/OpenAPIs/Models/Return.swift | 3 -
.../OpenAPIs/Models/SpecialModelName.swift | 3 -
.../OpenAPIs/Models/StringBooleanMap.swift | 3 -
.../Classes/OpenAPIs/Models/Tag.swift | 3 -
.../OpenAPIs/Models/TypeHolderDefault.swift | 3 -
.../OpenAPIs/Models/TypeHolderExample.swift | 3 -
.../Classes/OpenAPIs/Models/User.swift | 3 -
.../swift6/objcCompatible/project.yml | 1 -
.../swift6/oneOf/.openapi-generator/FILES | 1 +
samples/client/petstore/swift6/oneOf/Cartfile | 2 +-
.../petstore/swift6/oneOf/Package.resolved | 15 --
.../petstore/swift6/oneOf/Package.swift | 3 +-
.../swift6/oneOf/PetstoreClient.podspec | 1 -
.../Classes/OpenAPIs/APIs/DefaultAPI.swift | 3 -
.../Classes/OpenAPIs/Extensions.swift | 3 -
.../Classes/OpenAPIs/JSONValue.swift | 247 ++++++++++++++++++
.../Classes/OpenAPIs/Models/Apple.swift | 3 -
.../Classes/OpenAPIs/Models/Banana.swift | 3 -
.../Classes/OpenAPIs/Models/Fruit.swift | 3 -
.../client/petstore/swift6/oneOf/project.yml | 1 -
.../.openapi-generator/FILES | 1 +
.../swift6/promisekitLibrary/Cartfile | 2 +-
.../swift6/promisekitLibrary/Package.resolved | 11 +-
.../swift6/promisekitLibrary/Package.swift | 3 +-
.../promisekitLibrary/PetstoreClient.podspec | 1 -
.../OpenAPIs/APIs/AnotherFakeAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/FakeAPI.swift | 3 -
.../APIs/FakeClassnameTags123API.swift | 3 -
.../Classes/OpenAPIs/APIs/PetAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/StoreAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/UserAPI.swift | 3 -
.../Classes/OpenAPIs/Extensions.swift | 3 -
.../Classes/OpenAPIs/JSONValue.swift | 247 ++++++++++++++++++
.../Models/AdditionalPropertiesClass.swift | 3 -
.../Classes/OpenAPIs/Models/Animal.swift | 3 -
.../Classes/OpenAPIs/Models/AnimalFarm.swift | 3 -
.../Classes/OpenAPIs/Models/ApiResponse.swift | 3 -
.../Models/ArrayOfArrayOfNumberOnly.swift | 3 -
.../OpenAPIs/Models/ArrayOfNumberOnly.swift | 3 -
.../Classes/OpenAPIs/Models/ArrayTest.swift | 3 -
.../OpenAPIs/Models/Capitalization.swift | 3 -
.../Classes/OpenAPIs/Models/Cat.swift | 3 -
.../Classes/OpenAPIs/Models/Category.swift | 3 -
.../Classes/OpenAPIs/Models/ClassModel.swift | 3 -
.../Classes/OpenAPIs/Models/Client.swift | 3 -
.../Classes/OpenAPIs/Models/Dog.swift | 3 -
.../Classes/OpenAPIs/Models/EnumArrays.swift | 3 -
.../Classes/OpenAPIs/Models/EnumClass.swift | 3 -
.../Classes/OpenAPIs/Models/EnumTest.swift | 3 -
.../Classes/OpenAPIs/Models/File.swift | 3 -
.../OpenAPIs/Models/FileSchemaTestClass.swift | 3 -
.../Classes/OpenAPIs/Models/FormatTest.swift | 3 -
.../OpenAPIs/Models/HasOnlyReadOnly.swift | 3 -
.../Classes/OpenAPIs/Models/List.swift | 3 -
.../Classes/OpenAPIs/Models/MapTest.swift | 3 -
...opertiesAndAdditionalPropertiesClass.swift | 3 -
.../OpenAPIs/Models/Model200Response.swift | 3 -
.../Classes/OpenAPIs/Models/Name.swift | 3 -
.../Classes/OpenAPIs/Models/NumberOnly.swift | 3 -
.../Classes/OpenAPIs/Models/Order.swift | 3 -
.../OpenAPIs/Models/OuterComposite.swift | 3 -
.../Classes/OpenAPIs/Models/OuterEnum.swift | 3 -
.../Classes/OpenAPIs/Models/Pet.swift | 3 -
.../OpenAPIs/Models/ReadOnlyFirst.swift | 3 -
.../Classes/OpenAPIs/Models/Return.swift | 3 -
.../OpenAPIs/Models/SpecialModelName.swift | 3 -
.../OpenAPIs/Models/StringBooleanMap.swift | 3 -
.../Classes/OpenAPIs/Models/Tag.swift | 3 -
.../OpenAPIs/Models/TypeHolderDefault.swift | 3 -
.../OpenAPIs/Models/TypeHolderExample.swift | 3 -
.../Classes/OpenAPIs/Models/User.swift | 3 -
.../xcshareddata/swiftpm/Package.resolved | 11 +-
.../swift6/promisekitLibrary/project.yml | 1 -
.../resultLibrary/.openapi-generator/FILES | 1 +
.../petstore/swift6/resultLibrary/Cartfile | 2 +-
.../swift6/resultLibrary/Package.resolved | 15 --
.../swift6/resultLibrary/Package.swift | 3 +-
.../resultLibrary/PetstoreClient.podspec | 1 -
.../OpenAPIs/APIs/AnotherFakeAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/FakeAPI.swift | 3 -
.../APIs/FakeClassnameTags123API.swift | 3 -
.../Classes/OpenAPIs/APIs/PetAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/StoreAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/UserAPI.swift | 3 -
.../Classes/OpenAPIs/Extensions.swift | 3 -
.../Classes/OpenAPIs/JSONValue.swift | 247 ++++++++++++++++++
.../Models/AdditionalPropertiesClass.swift | 3 -
.../Classes/OpenAPIs/Models/Animal.swift | 3 -
.../Classes/OpenAPIs/Models/AnimalFarm.swift | 3 -
.../Classes/OpenAPIs/Models/ApiResponse.swift | 3 -
.../Models/ArrayOfArrayOfNumberOnly.swift | 3 -
.../OpenAPIs/Models/ArrayOfNumberOnly.swift | 3 -
.../Classes/OpenAPIs/Models/ArrayTest.swift | 3 -
.../OpenAPIs/Models/Capitalization.swift | 3 -
.../Classes/OpenAPIs/Models/Cat.swift | 3 -
.../Classes/OpenAPIs/Models/Category.swift | 3 -
.../Classes/OpenAPIs/Models/ClassModel.swift | 3 -
.../Classes/OpenAPIs/Models/Client.swift | 3 -
.../Classes/OpenAPIs/Models/Dog.swift | 3 -
.../Classes/OpenAPIs/Models/EnumArrays.swift | 3 -
.../Classes/OpenAPIs/Models/EnumClass.swift | 3 -
.../Classes/OpenAPIs/Models/EnumTest.swift | 3 -
.../Classes/OpenAPIs/Models/File.swift | 3 -
.../OpenAPIs/Models/FileSchemaTestClass.swift | 3 -
.../Classes/OpenAPIs/Models/FormatTest.swift | 3 -
.../OpenAPIs/Models/HasOnlyReadOnly.swift | 3 -
.../Classes/OpenAPIs/Models/List.swift | 3 -
.../Classes/OpenAPIs/Models/MapTest.swift | 3 -
...opertiesAndAdditionalPropertiesClass.swift | 3 -
.../OpenAPIs/Models/Model200Response.swift | 3 -
.../Classes/OpenAPIs/Models/Name.swift | 3 -
.../Classes/OpenAPIs/Models/NumberOnly.swift | 3 -
.../Classes/OpenAPIs/Models/Order.swift | 3 -
.../OpenAPIs/Models/OuterComposite.swift | 3 -
.../Classes/OpenAPIs/Models/OuterEnum.swift | 3 -
.../Classes/OpenAPIs/Models/Pet.swift | 3 -
.../OpenAPIs/Models/ReadOnlyFirst.swift | 3 -
.../Classes/OpenAPIs/Models/Return.swift | 3 -
.../OpenAPIs/Models/SpecialModelName.swift | 3 -
.../OpenAPIs/Models/StringBooleanMap.swift | 3 -
.../Classes/OpenAPIs/Models/Tag.swift | 3 -
.../OpenAPIs/Models/TypeHolderDefault.swift | 3 -
.../OpenAPIs/Models/TypeHolderExample.swift | 3 -
.../Classes/OpenAPIs/Models/User.swift | 3 -
.../petstore/swift6/resultLibrary/project.yml | 1 -
.../rxswiftLibrary/.openapi-generator/FILES | 1 +
.../petstore/swift6/rxswiftLibrary/Cartfile | 2 +-
.../swift6/rxswiftLibrary/Package.resolved | 11 +-
.../swift6/rxswiftLibrary/Package.swift | 3 +-
.../rxswiftLibrary/PetstoreClient.podspec | 1 -
.../OpenAPIs/APIs/AnotherFakeAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/FakeAPI.swift | 3 -
.../APIs/FakeClassnameTags123API.swift | 3 -
.../Classes/OpenAPIs/APIs/PetAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/StoreAPI.swift | 3 -
.../Classes/OpenAPIs/APIs/UserAPI.swift | 3 -
.../Classes/OpenAPIs/Extensions.swift | 3 -
.../Classes/OpenAPIs/JSONValue.swift | 247 ++++++++++++++++++
.../Models/AdditionalPropertiesClass.swift | 3 -
.../Classes/OpenAPIs/Models/Animal.swift | 3 -
.../Classes/OpenAPIs/Models/AnimalFarm.swift | 3 -
.../Classes/OpenAPIs/Models/ApiResponse.swift | 3 -
.../Models/ArrayOfArrayOfNumberOnly.swift | 3 -
.../OpenAPIs/Models/ArrayOfNumberOnly.swift | 3 -
.../Classes/OpenAPIs/Models/ArrayTest.swift | 3 -
.../OpenAPIs/Models/Capitalization.swift | 3 -
.../Classes/OpenAPIs/Models/Cat.swift | 3 -
.../Classes/OpenAPIs/Models/Category.swift | 3 -
.../Classes/OpenAPIs/Models/ClassModel.swift | 3 -
.../Classes/OpenAPIs/Models/Client.swift | 3 -
.../Classes/OpenAPIs/Models/Dog.swift | 3 -
.../Classes/OpenAPIs/Models/EnumArrays.swift | 3 -
.../Classes/OpenAPIs/Models/EnumClass.swift | 3 -
.../Classes/OpenAPIs/Models/EnumTest.swift | 3 -
.../Classes/OpenAPIs/Models/File.swift | 3 -
.../OpenAPIs/Models/FileSchemaTestClass.swift | 3 -
.../Classes/OpenAPIs/Models/FormatTest.swift | 3 -
.../OpenAPIs/Models/HasOnlyReadOnly.swift | 3 -
.../Classes/OpenAPIs/Models/List.swift | 3 -
.../Classes/OpenAPIs/Models/MapTest.swift | 3 -
...opertiesAndAdditionalPropertiesClass.swift | 3 -
.../OpenAPIs/Models/Model200Response.swift | 3 -
.../Classes/OpenAPIs/Models/Name.swift | 3 -
.../Classes/OpenAPIs/Models/NumberOnly.swift | 3 -
.../Classes/OpenAPIs/Models/Order.swift | 3 -
.../OpenAPIs/Models/OuterComposite.swift | 3 -
.../Classes/OpenAPIs/Models/OuterEnum.swift | 3 -
.../Classes/OpenAPIs/Models/Pet.swift | 3 -
.../OpenAPIs/Models/ReadOnlyFirst.swift | 3 -
.../Classes/OpenAPIs/Models/Return.swift | 3 -
.../OpenAPIs/Models/SpecialModelName.swift | 3 -
.../OpenAPIs/Models/StringBooleanMap.swift | 3 -
.../Classes/OpenAPIs/Models/Tag.swift | 3 -
.../OpenAPIs/Models/TypeHolderDefault.swift | 3 -
.../OpenAPIs/Models/TypeHolderExample.swift | 3 -
.../Classes/OpenAPIs/Models/User.swift | 3 -
.../xcshareddata/swiftpm/Package.resolved | 11 +-
.../swift6/rxswiftLibrary/project.yml | 1 -
.../client/petstore/swift6/swift6_test_all.sh | 1 +
.../.openapi-generator/FILES | 1 +
.../swift6/urlsessionLibrary/Cartfile | 2 +-
.../swift6/urlsessionLibrary/Package.resolved | 15 --
.../swift6/urlsessionLibrary/Package.swift | 3 +-
.../urlsessionLibrary/PetstoreClient.podspec | 1 -
.../PetstoreClient/APIs/AnotherFakeAPI.swift | 3 -
.../Sources/PetstoreClient/APIs/FakeAPI.swift | 3 -
.../APIs/FakeClassnameTags123API.swift | 3 -
.../Sources/PetstoreClient/APIs/PetAPI.swift | 3 -
.../PetstoreClient/APIs/StoreAPI.swift | 3 -
.../Sources/PetstoreClient/APIs/UserAPI.swift | 3 -
.../Sources/PetstoreClient/Extensions.swift | 3 -
.../Sources/PetstoreClient/JSONValue.swift | 247 ++++++++++++++++++
.../Models/AdditionalPropertiesClass.swift | 3 -
.../PetstoreClient/Models/Animal.swift | 3 -
.../PetstoreClient/Models/AnimalFarm.swift | 3 -
.../PetstoreClient/Models/ApiResponse.swift | 3 -
.../Models/ArrayOfArrayOfNumberOnly.swift | 3 -
.../Models/ArrayOfNumberOnly.swift | 3 -
.../PetstoreClient/Models/ArrayTest.swift | 3 -
.../Models/Capitalization.swift | 3 -
.../Sources/PetstoreClient/Models/Cat.swift | 3 -
.../PetstoreClient/Models/Category.swift | 3 -
.../PetstoreClient/Models/ClassModel.swift | 3 -
.../PetstoreClient/Models/Client.swift | 3 -
.../Sources/PetstoreClient/Models/Dog.swift | 3 -
.../PetstoreClient/Models/EnumArrays.swift | 3 -
.../PetstoreClient/Models/EnumClass.swift | 3 -
.../PetstoreClient/Models/EnumTest.swift | 3 -
.../Sources/PetstoreClient/Models/File.swift | 3 -
.../Models/FileSchemaTestClass.swift | 3 -
.../PetstoreClient/Models/FormatTest.swift | 3 -
.../Models/HasOnlyReadOnly.swift | 3 -
.../Sources/PetstoreClient/Models/List.swift | 3 -
.../PetstoreClient/Models/MapTest.swift | 3 -
...opertiesAndAdditionalPropertiesClass.swift | 3 -
.../Models/Model200Response.swift | 3 -
.../Sources/PetstoreClient/Models/Name.swift | 3 -
.../PetstoreClient/Models/NumberOnly.swift | 3 -
.../Sources/PetstoreClient/Models/Order.swift | 3 -
.../Models/OuterComposite.swift | 3 -
.../PetstoreClient/Models/OuterEnum.swift | 3 -
.../Sources/PetstoreClient/Models/Pet.swift | 3 -
.../PetstoreClient/Models/ReadOnlyFirst.swift | 3 -
.../PetstoreClient/Models/Return.swift | 3 -
.../Models/SpecialModelName.swift | 3 -
.../Models/StringBooleanMap.swift | 3 -
.../Sources/PetstoreClient/Models/Tag.swift | 3 -
.../Models/TypeHolderDefault.swift | 3 -
.../Models/TypeHolderExample.swift | 3 -
.../Sources/PetstoreClient/Models/User.swift | 3 -
.../xcshareddata/swiftpm/Package.resolved | 15 --
.../swift6/urlsessionLibrary/project.yml | 1 -
.../validation/.openapi-generator/FILES | 1 +
.../contents.xcworkspacedata | 7 +
.../petstore/swift6/validation/Cartfile | 2 +-
.../swift6/validation/Package.resolved | 16 --
.../petstore/swift6/validation/Package.swift | 3 +-
.../swift6/validation/PetstoreClient.podspec | 1 -
.../Classes/OpenAPIs/APIs/DefaultAPI.swift | 3 -
.../Classes/OpenAPIs/Extensions.swift | 3 -
.../Classes/OpenAPIs/JSONValue.swift | 247 ++++++++++++++++++
.../Classes/OpenAPIs/Models/Banana.swift | 3 -
.../petstore/swift6/validation/project.yml | 1 -
.../swift6/validation/run_spmbuild.sh | 3 +
.../vaporLibrary/.openapi-generator/FILES | 1 +
.../swift6/vaporLibrary/Package.swift | 3 +-
.../PetstoreClient/APIs/AnotherFakeAPI.swift | 3 -
.../Sources/PetstoreClient/APIs/FakeAPI.swift | 3 -
.../APIs/FakeClassnameTags123API.swift | 3 -
.../Sources/PetstoreClient/APIs/PetAPI.swift | 3 -
.../PetstoreClient/APIs/StoreAPI.swift | 3 -
.../Sources/PetstoreClient/APIs/UserAPI.swift | 3 -
.../Sources/PetstoreClient/Extensions.swift | 5 +-
.../Sources/PetstoreClient/JSONValue.swift | 247 ++++++++++++++++++
.../Models/AdditionalPropertiesAnyType.swift | 9 +-
.../Models/AdditionalPropertiesArray.swift | 9 +-
.../Models/AdditionalPropertiesBoolean.swift | 3 -
.../Models/AdditionalPropertiesClass.swift | 15 +-
.../Models/AdditionalPropertiesInteger.swift | 3 -
.../Models/AdditionalPropertiesNumber.swift | 3 -
.../Models/AdditionalPropertiesObject.swift | 9 +-
.../Models/AdditionalPropertiesString.swift | 3 -
.../PetstoreClient/Models/Animal.swift | 3 -
.../PetstoreClient/Models/AnimalFarm.swift | 3 -
.../PetstoreClient/Models/ApiResponse.swift | 3 -
.../Models/ArrayOfArrayOfNumberOnly.swift | 3 -
.../Models/ArrayOfNumberOnly.swift | 3 -
.../PetstoreClient/Models/ArrayTest.swift | 3 -
.../PetstoreClient/Models/BigCat.swift | 3 -
.../Models/Capitalization.swift | 3 -
.../Sources/PetstoreClient/Models/Cat.swift | 3 -
.../PetstoreClient/Models/Category.swift | 3 -
.../PetstoreClient/Models/ClassModel.swift | 3 -
.../PetstoreClient/Models/Client.swift | 3 -
.../Sources/PetstoreClient/Models/Dog.swift | 3 -
.../PetstoreClient/Models/EnumArrays.swift | 3 -
.../PetstoreClient/Models/EnumClass.swift | 3 -
.../PetstoreClient/Models/EnumTest.swift | 3 -
.../Sources/PetstoreClient/Models/File.swift | 3 -
.../Models/FileSchemaTestClass.swift | 3 -
.../PetstoreClient/Models/FormatTest.swift | 3 -
.../Models/HasOnlyReadOnly.swift | 3 -
.../Sources/PetstoreClient/Models/List.swift | 3 -
.../PetstoreClient/Models/MapTest.swift | 3 -
...opertiesAndAdditionalPropertiesClass.swift | 3 -
.../Models/Model200Response.swift | 3 -
.../Sources/PetstoreClient/Models/Name.swift | 3 -
.../PetstoreClient/Models/NumberOnly.swift | 3 -
.../Sources/PetstoreClient/Models/Order.swift | 3 -
.../Models/OuterComposite.swift | 3 -
.../PetstoreClient/Models/OuterEnum.swift | 3 -
.../Sources/PetstoreClient/Models/Pet.swift | 3 -
.../PetstoreClient/Models/ReadOnlyFirst.swift | 3 -
.../PetstoreClient/Models/Return.swift | 3 -
.../Models/SpecialModelName.swift | 3 -
.../Models/StringBooleanMap.swift | 3 -
.../Sources/PetstoreClient/Models/Tag.swift | 3 -
.../Models/TypeHolderDefault.swift | 3 -
.../Models/TypeHolderExample.swift | 3 -
.../Sources/PetstoreClient/Models/User.swift | 3 -
.../PetstoreClient/Models/XmlItem.swift | 3 -
.../docs/AdditionalPropertiesClass.md | 10 +-
683 files changed, 3821 insertions(+), 2118 deletions(-)
create mode 100644 modules/openapi-generator/src/main/resources/swift6/JSONValue.mustache
create mode 100644 samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
create mode 100644 samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
delete mode 100644 samples/client/petstore/swift6/asyncAwaitLibrary/Package.resolved
create mode 100644 samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
delete mode 100644 samples/client/petstore/swift6/asyncAwaitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
delete mode 100644 samples/client/petstore/swift6/combineDeferredLibrary/Package.resolved
create mode 100644 samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
delete mode 100644 samples/client/petstore/swift6/combineDeferredLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
delete mode 100644 samples/client/petstore/swift6/combineLibrary/Package.resolved
create mode 100644 samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
delete mode 100644 samples/client/petstore/swift6/combineLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
delete mode 100644 samples/client/petstore/swift6/default/Package.resolved
create mode 100644 samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
delete mode 100644 samples/client/petstore/swift6/default/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
delete mode 100644 samples/client/petstore/swift6/objcCompatible/Package.resolved
create mode 100644 samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
delete mode 100644 samples/client/petstore/swift6/oneOf/Package.resolved
create mode 100644 samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
create mode 100644 samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
delete mode 100644 samples/client/petstore/swift6/resultLibrary/Package.resolved
create mode 100644 samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
create mode 100644 samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
delete mode 100644 samples/client/petstore/swift6/urlsessionLibrary/Package.resolved
create mode 100644 samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/JSONValue.swift
delete mode 100644 samples/client/petstore/swift6/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
create mode 100644 samples/client/petstore/swift6/validation/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
delete mode 100644 samples/client/petstore/swift6/validation/Package.resolved
create mode 100644 samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
create mode 100755 samples/client/petstore/swift6/validation/run_spmbuild.sh
create mode 100644 samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/JSONValue.swift
diff --git a/docs/generators/swift6.md b/docs/generators/swift6.md
index aec4c81817f..3da134734b8 100644
--- a/docs/generators/swift6.md
+++ b/docs/generators/swift6.md
@@ -76,7 +76,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
- Any
-- AnyCodable
- AnyObject
- Bool
- Character
@@ -88,6 +87,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
- Int
- Int32
- Int64
+- JSONValue
- OpenAPIDateWithoutTime
- String
- URL
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift6ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift6ClientCodegen.java
index e075c95c7f9..276c8d63c27 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift6ClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift6ClientCodegen.java
@@ -173,7 +173,7 @@ public class Swift6ClientCodegen extends DefaultCodegen implements CodegenConfig
"AnyObject",
"Any",
"Decimal",
- "AnyCodable") // from AnyCodable dependency
+ "JSONValue")
);
defaultIncludes = new HashSet<>(
Arrays.asList(
@@ -279,8 +279,8 @@ public class Swift6ClientCodegen extends DefaultCodegen implements CodegenConfig
typeMapping.put("UUID", "UUID");
typeMapping.put("URI", "String");
typeMapping.put("decimal", "Decimal");
- typeMapping.put("object", "AnyCodable");
- typeMapping.put("AnyType", "AnyCodable");
+ typeMapping.put("object", "JSONValue");
+ typeMapping.put("AnyType", "JSONValue");
importMapping = new HashMap<>();
@@ -651,6 +651,9 @@ public class Swift6ClientCodegen extends DefaultCodegen implements CodegenConfig
supportingFiles.add(new SupportingFile("OpenISO8601DateFormatter.mustache",
sourceFolder,
"OpenISO8601DateFormatter.swift"));
+ supportingFiles.add(new SupportingFile("JSONValue.mustache",
+ sourceFolder,
+ "JSONValue.swift"));
if (useCustomDateWithoutTime) {
supportingFiles.add(new SupportingFile("OpenAPIDateWithoutTime.mustache",
sourceFolder,
diff --git a/modules/openapi-generator/src/main/resources/swift6/Cartfile.mustache b/modules/openapi-generator/src/main/resources/swift6/Cartfile.mustache
index db44684151f..7b6736ea760 100644
--- a/modules/openapi-generator/src/main/resources/swift6/Cartfile.mustache
+++ b/modules/openapi-generator/src/main/resources/swift6/Cartfile.mustache
@@ -1,4 +1,3 @@
-github "Flight-School/AnyCodable" ~> 0.6{{#useAlamofire}}
-github "Alamofire/Alamofire" ~> 5.9{{/useAlamofire}}{{#usePromiseKit}}
+{{#useAlamofire}}github "Alamofire/Alamofire" ~> 5.9{{/useAlamofire}}{{#usePromiseKit}}
github "mxcl/PromiseKit" ~> 8.1{{/usePromiseKit}}{{#useRxSwift}}
github "ReactiveX/RxSwift" ~> 6.7{{/useRxSwift}}
diff --git a/modules/openapi-generator/src/main/resources/swift6/Extensions.mustache b/modules/openapi-generator/src/main/resources/swift6/Extensions.mustache
index d95a7d05fe9..5c10ca73b58 100644
--- a/modules/openapi-generator/src/main/resources/swift6/Extensions.mustache
+++ b/modules/openapi-generator/src/main/resources/swift6/Extensions.mustache
@@ -7,9 +7,6 @@
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
-#endif
-#if canImport(AnyCodable)
-import AnyCodable
#endif{{#usePromiseKit}}
@preconcurrency import PromiseKit{{/usePromiseKit}}{{#useVapor}}
import Vapor{{/useVapor}}{{^useVapor}}
@@ -277,4 +274,4 @@ extension Set: RequestDecodable where Element: Content {
extension Set: Content where Element: Content { }
-extension AnyCodable: Content {}{{/useVapor}}
+extension JSONValue: Content {}{{/useVapor}}
diff --git a/modules/openapi-generator/src/main/resources/swift6/JSONValue.mustache b/modules/openapi-generator/src/main/resources/swift6/JSONValue.mustache
new file mode 100644
index 00000000000..d04cb9b1532
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/swift6/JSONValue.mustache
@@ -0,0 +1,247 @@
+//
+// JSONValue.swift
+//
+// Generated by openapi-generator
+// https://openapi-generator.tech
+//
+
+import Foundation
+
+{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum JSONValue: Codable, Hashable {
+ case string(String)
+ case int(Int)
+ case double(Double)
+ case bool(Bool)
+ case array([JSONValue])
+ case dictionary([String: JSONValue])
+ case null
+
+ // MARK: - Decoding Logic
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(from decoder: Decoder) throws {
+ let container = try decoder.singleValueContainer()
+
+ if let stringValue = try? container.decode(String.self) {
+ self = .string(stringValue)
+ } else if let intValue = try? container.decode(Int.self) {
+ self = .int(intValue)
+ } else if let doubleValue = try? container.decode(Double.self) {
+ self = .double(doubleValue)
+ } else if let boolValue = try? container.decode(Bool.self) {
+ self = .bool(boolValue)
+ } else if let arrayValue = try? container.decode([JSONValue].self) {
+ self = .array(arrayValue)
+ } else if let dictionaryValue = try? container.decode([String: JSONValue].self) {
+ self = .dictionary(dictionaryValue)
+ } else if container.decodeNil() {
+ self = .null
+ } else {
+ throw DecodingError.dataCorruptedError(in: container, debugDescription: "Unknown JSON value")
+ }
+ }
+
+ // MARK: - Encoding Logic
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func encode(to encoder: Encoder) throws {
+ var container = encoder.singleValueContainer()
+
+ switch self {
+ case .string(let value):
+ try container.encode(value)
+ case .int(let value):
+ try container.encode(value)
+ case .double(let value):
+ try container.encode(value)
+ case .bool(let value):
+ try container.encode(value)
+ case .array(let value):
+ try container.encode(value)
+ case .dictionary(let value):
+ try container.encode(value)
+ case .null:
+ try container.encodeNil()
+ }
+ }
+}
+
+extension JSONValue {
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(_ value: String) {
+ self = .string(value)
+ }
+
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(_ value: Int) {
+ self = .int(value)
+ }
+
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(_ value: Double) {
+ self = .double(value)
+ }
+
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(_ value: Bool) {
+ self = .bool(value)
+ }
+
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(_ value: [JSONValue]) {
+ self = .array(value)
+ }
+
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(_ value: [String: JSONValue]) {
+ self = .dictionary(value)
+ }
+
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(_ codable: T) throws {
+ let encoder = JSONEncoder()
+ let encodedData = try encoder.encode(codable)
+ let decoder = JSONDecoder()
+
+ let decodedValue = try decoder.decode(JSONValue.self, from: encodedData)
+ self = decodedValue
+ }
+}
+
+extension JSONValue {
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var isString: Bool {
+ if case .string = self { return true }
+ return false
+ }
+
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var isInt: Bool {
+ if case .int = self { return true }
+ return false
+ }
+
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var isDouble: Bool {
+ if case .double = self { return true }
+ return false
+ }
+
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var isBool: Bool {
+ if case .bool = self { return true }
+ return false
+ }
+
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var isArray: Bool {
+ if case .array = self { return true }
+ return false
+ }
+
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var isDictionary: Bool {
+ if case .dictionary = self { return true }
+ return false
+ }
+
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var isNull: Bool {
+ return self == .null
+ }
+
+}
+
+extension JSONValue {
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var stringValue: String? {
+ switch self {
+ case .string(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var intValue: Int? {
+ switch self {
+ case .int(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var doubleValue: Double? {
+ switch self {
+ case .double(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var boolValue: Bool? {
+ switch self {
+ case .bool(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var arrayValue: [JSONValue]? {
+ if case let .array(value) = self {
+ return value
+ }
+ return nil
+ }
+
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var dictionaryValue: [String: JSONValue]? {
+ if case let .dictionary(value) = self {
+ return value
+ }
+ return nil
+ }
+}
+
+extension JSONValue {
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} subscript(key: String) -> JSONValue? {
+ return dictionaryValue?[key]
+ }
+
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} subscript(index: Int) -> JSONValue? {
+ guard case let .array(array) = self, index >= 0 && index < array.count else {
+ return nil
+ }
+ return array[index]
+ }
+}
+
+extension JSONValue: ExpressibleByStringLiteral, ExpressibleByStringInterpolation {
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(stringLiteral value: StringLiteralType) {
+ self = .string(value)
+ }
+}
+
+extension JSONValue: ExpressibleByIntegerLiteral {
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(integerLiteral value: IntegerLiteralType) {
+ self = .int(value)
+ }
+}
+
+extension JSONValue: ExpressibleByFloatLiteral {
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(floatLiteral value: FloatLiteralType) {
+ self = .double(value)
+ }
+}
+
+
+extension JSONValue: ExpressibleByBooleanLiteral {
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(booleanLiteral value: BooleanLiteralType) {
+ self = .bool(value)
+ }
+}
+
+extension JSONValue: ExpressibleByArrayLiteral {
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(arrayLiteral elements: JSONValue...) {
+ self = .array(elements)
+ }
+}
+
+extension JSONValue: ExpressibleByDictionaryLiteral {
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(dictionaryLiteral elements: (String, JSONValue)...) {
+ var dict: [String: JSONValue] = [:]
+ for (key, value) in elements {
+ dict[key] = value
+ }
+ self = .dictionary(dict)
+ }
+}
+
+extension JSONValue: ExpressibleByNilLiteral {
+ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(nilLiteral: ()) {
+ self = .null
+ }
+}
diff --git a/modules/openapi-generator/src/main/resources/swift6/Package.swift.mustache b/modules/openapi-generator/src/main/resources/swift6/Package.swift.mustache
index 4070feca690..4a33ac25b06 100644
--- a/modules/openapi-generator/src/main/resources/swift6/Package.swift.mustache
+++ b/modules/openapi-generator/src/main/resources/swift6/Package.swift.mustache
@@ -24,7 +24,6 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
- .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.7")),
{{#useAlamofire}}
.package(url: "https://github.com/Alamofire/Alamofire", .upToNextMajor(from: "5.9.1")),
{{/useAlamofire}}
@@ -43,7 +42,7 @@ let package = Package(
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "{{projectName}}",
- dependencies: ["AnyCodable", {{#useVapor}}"Vapor", {{/useVapor}}{{#useAlamofire}}"Alamofire", {{/useAlamofire}}{{#usePromiseKit}}"PromiseKit", {{/usePromiseKit}}{{#useRxSwift}}"RxSwift"{{/useRxSwift}}],
+ dependencies: [{{#useVapor}}"Vapor", {{/useVapor}}{{#useAlamofire}}"Alamofire", {{/useAlamofire}}{{#usePromiseKit}}"PromiseKit", {{/usePromiseKit}}{{#useRxSwift}}"RxSwift"{{/useRxSwift}}],
path: "{{swiftPackagePath}}{{^swiftPackagePath}}{{#useSPMFileStructure}}Sources/{{projectName}}{{/useSPMFileStructure}}{{^useSPMFileStructure}}{{projectName}}/Classes{{/useSPMFileStructure}}{{/swiftPackagePath}}"
),
],
diff --git a/modules/openapi-generator/src/main/resources/swift6/Podspec.mustache b/modules/openapi-generator/src/main/resources/swift6/Podspec.mustache
index 2eb0e324b9f..cc92d5c406a 100644
--- a/modules/openapi-generator/src/main/resources/swift6/Podspec.mustache
+++ b/modules/openapi-generator/src/main/resources/swift6/Podspec.mustache
@@ -26,7 +26,6 @@ Pod::Spec.new do |s|
s.documentation_url = '{{.}}'
{{/podDocumentationURL}}
s.source_files = '{{swiftPackagePath}}{{^swiftPackagePath}}{{#useSPMFileStructure}}Sources/{{projectName}}{{/useSPMFileStructure}}{{^useSPMFileStructure}}{{projectName}}/Classes{{/useSPMFileStructure}}{{/swiftPackagePath}}/**/*.swift'
- s.dependency 'AnyCodable-FlightSchool', '~> 0.6'
{{#useAlamofire}}
s.dependency 'Alamofire', '~> 5.9'
{{/useAlamofire}}
diff --git a/modules/openapi-generator/src/main/resources/swift6/XcodeGen.mustache b/modules/openapi-generator/src/main/resources/swift6/XcodeGen.mustache
index d4a36d58ee0..eec5b2b714c 100644
--- a/modules/openapi-generator/src/main/resources/swift6/XcodeGen.mustache
+++ b/modules/openapi-generator/src/main/resources/swift6/XcodeGen.mustache
@@ -11,8 +11,7 @@ targets:
settings:
APPLICATION_EXTENSION_API_ONLY: true
scheme: {}
- dependencies:
- - carthage: AnyCodable{{#useAlamofire}}
+ dependencies:{{#useAlamofire}}
- carthage: Alamofire{{/useAlamofire}}{{#usePromiseKit}}
- carthage: PromiseKit{{/usePromiseKit}}{{#useRxSwift}}
- carthage: RxSwift{{/useRxSwift}}
diff --git a/modules/openapi-generator/src/main/resources/swift6/api.mustache b/modules/openapi-generator/src/main/resources/swift6/api.mustache
index bbef6da2d8d..8bd6dfee31a 100644
--- a/modules/openapi-generator/src/main/resources/swift6/api.mustache
+++ b/modules/openapi-generator/src/main/resources/swift6/api.mustache
@@ -11,10 +11,7 @@ import Foundation{{#usePromiseKit}}
#if canImport(Combine)
import Combine
#endif{{/useCombine}}{{#useVapor}}
-import Vapor{{/useVapor}}
-#if canImport(AnyCodable)
-import AnyCodable
-#endif{{#swiftUseApiNamespace}}
+import Vapor{{/useVapor}}{{#swiftUseApiNamespace}}
extension {{projectName}}API {
{{/swiftUseApiNamespace}}
diff --git a/modules/openapi-generator/src/main/resources/swift6/model.mustache b/modules/openapi-generator/src/main/resources/swift6/model.mustache
index b6a725d0526..7cc0e760218 100644
--- a/modules/openapi-generator/src/main/resources/swift6/model.mustache
+++ b/modules/openapi-generator/src/main/resources/swift6/model.mustache
@@ -5,10 +5,7 @@
// https://openapi-generator.tech
//
-import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif{{#useVapor}}
+import Foundation{{#useVapor}}
import Vapor{{/useVapor}}
{{#swiftUseApiNamespace}}
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift6/Swift6ClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift6/Swift6ClientCodegenTest.java
index 8dfe1efd67c..80bc9d62d7b 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift6/Swift6ClientCodegenTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift6/Swift6ClientCodegenTest.java
@@ -168,8 +168,8 @@ public class Swift6ClientCodegenTest {
final DefaultCodegen codegen = new Swift6ClientCodegen();
codegen.setModelNamePrefix("API");
- final String result = codegen.toModelName("AnyCodable");
- Assert.assertEquals(result, "AnyCodable");
+ final String result = codegen.toModelName("JSONValue");
+ Assert.assertEquals(result, "JSONValue");
}
@Test(description = "type from languageSpecificPrimitives should not be suffixed", enabled = true)
@@ -177,8 +177,8 @@ public class Swift6ClientCodegenTest {
final DefaultCodegen codegen = new Swift6ClientCodegen();
codegen.setModelNameSuffix("API");
- final String result = codegen.toModelName("AnyCodable");
- Assert.assertEquals(result, "AnyCodable");
+ final String result = codegen.toModelName("JSONValue");
+ Assert.assertEquals(result, "JSONValue");
}
@Test(description = "Other types should be prefixed", enabled = true)
diff --git a/samples/client/petstore/swift6/alamofireLibrary/.openapi-generator/FILES b/samples/client/petstore/swift6/alamofireLibrary/.openapi-generator/FILES
index 62ef6051b90..696ad342a33 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/.openapi-generator/FILES
+++ b/samples/client/petstore/swift6/alamofireLibrary/.openapi-generator/FILES
@@ -16,6 +16,7 @@ PetstoreClient/Classes/OpenAPIs/CodableHelper.swift
PetstoreClient/Classes/OpenAPIs/Extensions.swift
PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift
PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift
+PetstoreClient/Classes/OpenAPIs/JSONValue.swift
PetstoreClient/Classes/OpenAPIs/Models.swift
PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
diff --git a/samples/client/petstore/swift6/alamofireLibrary/Cartfile b/samples/client/petstore/swift6/alamofireLibrary/Cartfile
index 2782bf6621e..2aef60d42ae 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/Cartfile
+++ b/samples/client/petstore/swift6/alamofireLibrary/Cartfile
@@ -1,2 +1 @@
-github "Flight-School/AnyCodable" ~> 0.6
github "Alamofire/Alamofire" ~> 5.9
diff --git a/samples/client/petstore/swift6/alamofireLibrary/Package.resolved b/samples/client/petstore/swift6/alamofireLibrary/Package.resolved
index e42b68f3b52..6a8f55be4c4 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/Package.resolved
+++ b/samples/client/petstore/swift6/alamofireLibrary/Package.resolved
@@ -1,5 +1,5 @@
{
- "originHash" : "8b2114c772cba9dfd29281c36d3097ab5d8bcb8eaf2c8fd299949087a48fd168",
+ "originHash" : "6fb5b6bfc406365339fcc9d8236adab4f0b7ee38fc666a0f00b4b3b75beb7900",
"pins" : [
{
"identity" : "alamofire",
@@ -9,15 +9,6 @@
"revision" : "f455c2975872ccd2d9c81594c658af65716e9b9a",
"version" : "5.9.1"
}
- },
- {
- "identity" : "anycodable",
- "kind" : "remoteSourceControl",
- "location" : "https://github.com/Flight-School/AnyCodable",
- "state" : {
- "revision" : "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version" : "0.6.7"
- }
}
],
"version" : 3
diff --git a/samples/client/petstore/swift6/alamofireLibrary/Package.swift b/samples/client/petstore/swift6/alamofireLibrary/Package.swift
index 3d83d131582..5c25f3a2928 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/Package.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/Package.swift
@@ -19,7 +19,6 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
- .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.7")),
.package(url: "https://github.com/Alamofire/Alamofire", .upToNextMajor(from: "5.9.1")),
],
targets: [
@@ -27,7 +26,7 @@ let package = Package(
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "PetstoreClient",
- dependencies: ["AnyCodable", "Alamofire", ],
+ dependencies: ["Alamofire", ],
path: "PetstoreClient/Classes"
),
],
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient.podspec b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient.podspec
index 6d65d90c82e..be7a108a938 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient.podspec
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient.podspec
@@ -11,6 +11,5 @@ Pod::Spec.new do |s|
s.homepage = 'https://github.com/openapitools/openapi-generator'
s.summary = 'PetstoreClient'
s.source_files = 'PetstoreClient/Classes/**/*.swift'
- s.dependency 'AnyCodable-FlightSchool', '~> 0.6'
s.dependency 'Alamofire', '~> 5.9'
end
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
index 3383960de65..3ebeb738ae0 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class AnotherFakeAPI {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
index 989882d96b7..95f1510e907 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class FakeAPI {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
index c6e49aeda8f..ef0c898b1f3 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class FakeClassnameTags123API {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
index 8ad6b197024..c8c4d01ec49 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class PetAPI {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
index 0e29832db78..d35fd14c090 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class StoreAPI {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
index 3e3eecc2745..b14a8eb251d 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class UserAPI {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift
index 00d6e4ac90f..b4341b60870 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift
@@ -8,9 +8,6 @@ import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
extension Bool: JSONEncodable {
func encodeToJSON(codableHelper: CodableHelper) -> Any { self }
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
new file mode 100644
index 00000000000..85d66ad6abf
--- /dev/null
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
@@ -0,0 +1,247 @@
+//
+// JSONValue.swift
+//
+// Generated by openapi-generator
+// https://openapi-generator.tech
+//
+
+import Foundation
+
+public enum JSONValue: Codable, Hashable {
+ case string(String)
+ case int(Int)
+ case double(Double)
+ case bool(Bool)
+ case array([JSONValue])
+ case dictionary([String: JSONValue])
+ case null
+
+ // MARK: - Decoding Logic
+ public init(from decoder: Decoder) throws {
+ let container = try decoder.singleValueContainer()
+
+ if let stringValue = try? container.decode(String.self) {
+ self = .string(stringValue)
+ } else if let intValue = try? container.decode(Int.self) {
+ self = .int(intValue)
+ } else if let doubleValue = try? container.decode(Double.self) {
+ self = .double(doubleValue)
+ } else if let boolValue = try? container.decode(Bool.self) {
+ self = .bool(boolValue)
+ } else if let arrayValue = try? container.decode([JSONValue].self) {
+ self = .array(arrayValue)
+ } else if let dictionaryValue = try? container.decode([String: JSONValue].self) {
+ self = .dictionary(dictionaryValue)
+ } else if container.decodeNil() {
+ self = .null
+ } else {
+ throw DecodingError.dataCorruptedError(in: container, debugDescription: "Unknown JSON value")
+ }
+ }
+
+ // MARK: - Encoding Logic
+ public func encode(to encoder: Encoder) throws {
+ var container = encoder.singleValueContainer()
+
+ switch self {
+ case .string(let value):
+ try container.encode(value)
+ case .int(let value):
+ try container.encode(value)
+ case .double(let value):
+ try container.encode(value)
+ case .bool(let value):
+ try container.encode(value)
+ case .array(let value):
+ try container.encode(value)
+ case .dictionary(let value):
+ try container.encode(value)
+ case .null:
+ try container.encodeNil()
+ }
+ }
+}
+
+extension JSONValue {
+ public init(_ value: String) {
+ self = .string(value)
+ }
+
+ public init(_ value: Int) {
+ self = .int(value)
+ }
+
+ public init(_ value: Double) {
+ self = .double(value)
+ }
+
+ public init(_ value: Bool) {
+ self = .bool(value)
+ }
+
+ public init(_ value: [JSONValue]) {
+ self = .array(value)
+ }
+
+ public init(_ value: [String: JSONValue]) {
+ self = .dictionary(value)
+ }
+
+ public init(_ codable: T) throws {
+ let encoder = JSONEncoder()
+ let encodedData = try encoder.encode(codable)
+ let decoder = JSONDecoder()
+
+ let decodedValue = try decoder.decode(JSONValue.self, from: encodedData)
+ self = decodedValue
+ }
+}
+
+extension JSONValue {
+ public var isString: Bool {
+ if case .string = self { return true }
+ return false
+ }
+
+ public var isInt: Bool {
+ if case .int = self { return true }
+ return false
+ }
+
+ public var isDouble: Bool {
+ if case .double = self { return true }
+ return false
+ }
+
+ public var isBool: Bool {
+ if case .bool = self { return true }
+ return false
+ }
+
+ public var isArray: Bool {
+ if case .array = self { return true }
+ return false
+ }
+
+ public var isDictionary: Bool {
+ if case .dictionary = self { return true }
+ return false
+ }
+
+ public var isNull: Bool {
+ return self == .null
+ }
+
+}
+
+extension JSONValue {
+ public var stringValue: String? {
+ switch self {
+ case .string(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var intValue: Int? {
+ switch self {
+ case .int(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var doubleValue: Double? {
+ switch self {
+ case .double(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var boolValue: Bool? {
+ switch self {
+ case .bool(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var arrayValue: [JSONValue]? {
+ if case let .array(value) = self {
+ return value
+ }
+ return nil
+ }
+
+ public var dictionaryValue: [String: JSONValue]? {
+ if case let .dictionary(value) = self {
+ return value
+ }
+ return nil
+ }
+}
+
+extension JSONValue {
+ public subscript(key: String) -> JSONValue? {
+ return dictionaryValue?[key]
+ }
+
+ public subscript(index: Int) -> JSONValue? {
+ guard case let .array(array) = self, index >= 0 && index < array.count else {
+ return nil
+ }
+ return array[index]
+ }
+}
+
+extension JSONValue: ExpressibleByStringLiteral, ExpressibleByStringInterpolation {
+ public init(stringLiteral value: StringLiteralType) {
+ self = .string(value)
+ }
+}
+
+extension JSONValue: ExpressibleByIntegerLiteral {
+ public init(integerLiteral value: IntegerLiteralType) {
+ self = .int(value)
+ }
+}
+
+extension JSONValue: ExpressibleByFloatLiteral {
+ public init(floatLiteral value: FloatLiteralType) {
+ self = .double(value)
+ }
+}
+
+
+extension JSONValue: ExpressibleByBooleanLiteral {
+ public init(booleanLiteral value: BooleanLiteralType) {
+ self = .bool(value)
+ }
+}
+
+extension JSONValue: ExpressibleByArrayLiteral {
+ public init(arrayLiteral elements: JSONValue...) {
+ self = .array(elements)
+ }
+}
+
+extension JSONValue: ExpressibleByDictionaryLiteral {
+ public init(dictionaryLiteral elements: (String, JSONValue)...) {
+ var dict: [String: JSONValue] = [:]
+ for (key, value) in elements {
+ dict[key] = value
+ }
+ self = .dictionary(dict)
+ }
+}
+
+extension JSONValue: ExpressibleByNilLiteral {
+ public init(nilLiteral: ()) {
+ self = .null
+ }
+}
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
index 623c4c7fd2c..7b8408ce868 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct AdditionalPropertiesClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
index a6882d6517f..bd2a1497826 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Animal: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
index a0b09cb9761..e09b0e9efdc 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
@@ -6,8 +6,5 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public typealias AnimalFarm = [Animal]
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
index 1890fcf9fde..73fe465dd3a 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ApiResponse: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
index eabae42d3bf..3d5d396bed6 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayOfArrayOfNumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
index fa93d7c6c74..852a4aec20f 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayOfNumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
index c99f82be9b9..db34d97ad45 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
index f8a3f64e2ee..06db3d32532 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Capitalization: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
index 253bbd7c04c..6482fd35203 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Cat: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
index 75b68ec01e2..550c78345bb 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Category: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
index a0419d54f15..80d668f552a 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model with \"_class\" property */
public struct ClassModel: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
index 21a539ba010..c0c6b9fa08b 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Client: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
index dc3bb465a5f..7f4b9a07734 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Dog: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
index e06009060c5..b0cb7c1f1a2 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct EnumArrays: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
index 6ea2895aee5..d4029d73f8a 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public enum EnumClass: String, Codable, CaseIterable {
case abc = "_abc"
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
index 3a9edb08ea7..9fd69055c22 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct EnumTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift
index 1378b4f9b20..ea9eeee4ebf 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Must be named `File` for test. */
public struct File: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
index f9a39d2e58e..06e832913eb 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct FileSchemaTestClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
index 1d15c6b3774..0eb9e0a7b88 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct FormatTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
index 9e2fe8cc87f..44c08e6b687 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct HasOnlyReadOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift
index b9a06034e01..ac7196fc74f 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct List: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
index c4792800425..8a4a31082a3 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct MapTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
index c15921ae6c7..9902fafee1c 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
index d5ab7e422f2..0995be822bb 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model name starting with number */
public struct Model200Response: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
index e8a19ee3d99..dfa19a4aad1 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model name same as property name */
public struct Name: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
index 10fd059c856..82d8fb6fb63 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct NumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
index bf7da6a3f86..1afea12cb34 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Order: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
index 99568c8facf..7fe71526624 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct OuterComposite: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
index 76c34b3c2ce..c3b778cbbed 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public enum OuterEnum: String, Codable, CaseIterable {
case placed = "placed"
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
index f93b402b0fd..cef13c2556b 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Pet: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
index 05cf40bedd3..2c99cab3568 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ReadOnlyFirst: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
index 9429b341fa9..2f9230fd652 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing reserved words */
public struct Return: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
index 543f1fa5ad4..21ac694c2c0 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct SpecialModelName: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
index 548b82c049e..ca657eb0db9 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct StringBooleanMap: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
index f2dea74b09d..504343ba7de 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Tag: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
index 9a7d7e6c8e6..ef8000720d8 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct TypeHolderDefault: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
index dd67ca7851d..6c794f3b25a 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct TypeHolderExample: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift
index e55b50dc4f7..5e10d6165ea 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift
+++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct User: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved b/samples/client/petstore/swift6/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
index e42b68f3b52..6a8f55be4c4 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
+++ b/samples/client/petstore/swift6/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -1,5 +1,5 @@
{
- "originHash" : "8b2114c772cba9dfd29281c36d3097ab5d8bcb8eaf2c8fd299949087a48fd168",
+ "originHash" : "6fb5b6bfc406365339fcc9d8236adab4f0b7ee38fc666a0f00b4b3b75beb7900",
"pins" : [
{
"identity" : "alamofire",
@@ -9,15 +9,6 @@
"revision" : "f455c2975872ccd2d9c81594c658af65716e9b9a",
"version" : "5.9.1"
}
- },
- {
- "identity" : "anycodable",
- "kind" : "remoteSourceControl",
- "location" : "https://github.com/Flight-School/AnyCodable",
- "state" : {
- "revision" : "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version" : "0.6.7"
- }
}
],
"version" : 3
diff --git a/samples/client/petstore/swift6/alamofireLibrary/project.yml b/samples/client/petstore/swift6/alamofireLibrary/project.yml
index 74e19988538..98c6aa3a8c7 100644
--- a/samples/client/petstore/swift6/alamofireLibrary/project.yml
+++ b/samples/client/petstore/swift6/alamofireLibrary/project.yml
@@ -12,5 +12,4 @@ targets:
APPLICATION_EXTENSION_API_ONLY: true
scheme: {}
dependencies:
- - carthage: AnyCodable
- carthage: Alamofire
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/.openapi-generator/FILES b/samples/client/petstore/swift6/apiNonStaticMethod/.openapi-generator/FILES
index b6e43b0ba25..cd028591391 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/.openapi-generator/FILES
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/.openapi-generator/FILES
@@ -16,6 +16,7 @@ PetstoreClient/Classes/OpenAPIs/CodableHelper.swift
PetstoreClient/Classes/OpenAPIs/Extensions.swift
PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift
PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift
+PetstoreClient/Classes/OpenAPIs/JSONValue.swift
PetstoreClient/Classes/OpenAPIs/Models.swift
PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/Cartfile b/samples/client/petstore/swift6/apiNonStaticMethod/Cartfile
index 8d359caafa7..b75ded84583 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/Cartfile
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/Cartfile
@@ -1,4 +1,3 @@
-github "Flight-School/AnyCodable" ~> 0.6
github "Alamofire/Alamofire" ~> 5.9
github "mxcl/PromiseKit" ~> 8.1
github "ReactiveX/RxSwift" ~> 6.7
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/Package.resolved b/samples/client/petstore/swift6/apiNonStaticMethod/Package.resolved
index 7af13d17873..eadb875907e 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/Package.resolved
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/Package.resolved
@@ -1,5 +1,5 @@
{
- "originHash" : "99c6cc361c92d76d3f9edcf90668a78a95b742f853a66cbb1804fbcfc63a985c",
+ "originHash" : "b14c4fe6a7263c50050b60f25c3f28d6b22d415d0c780c4d5a3494c6c0218ccd",
"pins" : [
{
"identity" : "alamofire",
@@ -10,15 +10,6 @@
"version" : "5.9.1"
}
},
- {
- "identity" : "anycodable",
- "kind" : "remoteSourceControl",
- "location" : "https://github.com/Flight-School/AnyCodable",
- "state" : {
- "revision" : "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version" : "0.6.7"
- }
- },
{
"identity" : "promisekit",
"kind" : "remoteSourceControl",
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/Package.swift b/samples/client/petstore/swift6/apiNonStaticMethod/Package.swift
index 56e95082c65..7b9fe177781 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/Package.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/Package.swift
@@ -19,7 +19,6 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
- .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.7")),
.package(url: "https://github.com/Alamofire/Alamofire", .upToNextMajor(from: "5.9.1")),
.package(url: "https://github.com/mxcl/PromiseKit", .upToNextMajor(from: "8.1.2")),
.package(url: "https://github.com/ReactiveX/RxSwift", .upToNextMajor(from: "6.7.1")),
@@ -29,7 +28,7 @@ let package = Package(
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "PetstoreClient",
- dependencies: ["AnyCodable", "Alamofire", "PromiseKit", "RxSwift"],
+ dependencies: ["Alamofire", "PromiseKit", "RxSwift"],
path: "PetstoreClient/Classes"
),
],
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient.podspec b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient.podspec
index 6bcd1e171b8..c3933c003f7 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient.podspec
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient.podspec
@@ -11,7 +11,6 @@ Pod::Spec.new do |s|
s.homepage = 'https://github.com/openapitools/openapi-generator'
s.summary = 'PetstoreClient'
s.source_files = 'PetstoreClient/Classes/**/*.swift'
- s.dependency 'AnyCodable-FlightSchool', '~> 0.6'
s.dependency 'Alamofire', '~> 5.9'
s.dependency 'PromiseKit/CorePromise', '~> 8.1'
s.dependency 'RxSwift', '~> 6.7'
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
index bf3aae3f1ce..9eadb0ae108 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
@@ -11,9 +11,6 @@ import Foundation
#if canImport(Combine)
import Combine
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class AnotherFakeAPI {
public let openAPIClient: OpenAPIClient
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
index 8c579c245e8..e61145200d0 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
@@ -11,9 +11,6 @@ import Foundation
#if canImport(Combine)
import Combine
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class FakeAPI {
public let openAPIClient: OpenAPIClient
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
index ef974781d7b..738b1053735 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
@@ -11,9 +11,6 @@ import Foundation
#if canImport(Combine)
import Combine
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class FakeClassnameTags123API {
public let openAPIClient: OpenAPIClient
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
index cc37095a7e0..b773a02cc7e 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
@@ -11,9 +11,6 @@ import Foundation
#if canImport(Combine)
import Combine
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class PetAPI {
public let openAPIClient: OpenAPIClient
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
index 0cd5d40070b..214b976a375 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
@@ -11,9 +11,6 @@ import Foundation
#if canImport(Combine)
import Combine
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class StoreAPI {
public let openAPIClient: OpenAPIClient
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
index 728cb9cb90a..0fce9524228 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
@@ -11,9 +11,6 @@ import Foundation
#if canImport(Combine)
import Combine
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class UserAPI {
public let openAPIClient: OpenAPIClient
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Extensions.swift
index 200d84ae5ba..695a1bc866f 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Extensions.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Extensions.swift
@@ -8,9 +8,6 @@ import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@preconcurrency import PromiseKit
extension Bool: JSONEncodable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/JSONValue.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
new file mode 100644
index 00000000000..85d66ad6abf
--- /dev/null
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
@@ -0,0 +1,247 @@
+//
+// JSONValue.swift
+//
+// Generated by openapi-generator
+// https://openapi-generator.tech
+//
+
+import Foundation
+
+public enum JSONValue: Codable, Hashable {
+ case string(String)
+ case int(Int)
+ case double(Double)
+ case bool(Bool)
+ case array([JSONValue])
+ case dictionary([String: JSONValue])
+ case null
+
+ // MARK: - Decoding Logic
+ public init(from decoder: Decoder) throws {
+ let container = try decoder.singleValueContainer()
+
+ if let stringValue = try? container.decode(String.self) {
+ self = .string(stringValue)
+ } else if let intValue = try? container.decode(Int.self) {
+ self = .int(intValue)
+ } else if let doubleValue = try? container.decode(Double.self) {
+ self = .double(doubleValue)
+ } else if let boolValue = try? container.decode(Bool.self) {
+ self = .bool(boolValue)
+ } else if let arrayValue = try? container.decode([JSONValue].self) {
+ self = .array(arrayValue)
+ } else if let dictionaryValue = try? container.decode([String: JSONValue].self) {
+ self = .dictionary(dictionaryValue)
+ } else if container.decodeNil() {
+ self = .null
+ } else {
+ throw DecodingError.dataCorruptedError(in: container, debugDescription: "Unknown JSON value")
+ }
+ }
+
+ // MARK: - Encoding Logic
+ public func encode(to encoder: Encoder) throws {
+ var container = encoder.singleValueContainer()
+
+ switch self {
+ case .string(let value):
+ try container.encode(value)
+ case .int(let value):
+ try container.encode(value)
+ case .double(let value):
+ try container.encode(value)
+ case .bool(let value):
+ try container.encode(value)
+ case .array(let value):
+ try container.encode(value)
+ case .dictionary(let value):
+ try container.encode(value)
+ case .null:
+ try container.encodeNil()
+ }
+ }
+}
+
+extension JSONValue {
+ public init(_ value: String) {
+ self = .string(value)
+ }
+
+ public init(_ value: Int) {
+ self = .int(value)
+ }
+
+ public init(_ value: Double) {
+ self = .double(value)
+ }
+
+ public init(_ value: Bool) {
+ self = .bool(value)
+ }
+
+ public init(_ value: [JSONValue]) {
+ self = .array(value)
+ }
+
+ public init(_ value: [String: JSONValue]) {
+ self = .dictionary(value)
+ }
+
+ public init(_ codable: T) throws {
+ let encoder = JSONEncoder()
+ let encodedData = try encoder.encode(codable)
+ let decoder = JSONDecoder()
+
+ let decodedValue = try decoder.decode(JSONValue.self, from: encodedData)
+ self = decodedValue
+ }
+}
+
+extension JSONValue {
+ public var isString: Bool {
+ if case .string = self { return true }
+ return false
+ }
+
+ public var isInt: Bool {
+ if case .int = self { return true }
+ return false
+ }
+
+ public var isDouble: Bool {
+ if case .double = self { return true }
+ return false
+ }
+
+ public var isBool: Bool {
+ if case .bool = self { return true }
+ return false
+ }
+
+ public var isArray: Bool {
+ if case .array = self { return true }
+ return false
+ }
+
+ public var isDictionary: Bool {
+ if case .dictionary = self { return true }
+ return false
+ }
+
+ public var isNull: Bool {
+ return self == .null
+ }
+
+}
+
+extension JSONValue {
+ public var stringValue: String? {
+ switch self {
+ case .string(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var intValue: Int? {
+ switch self {
+ case .int(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var doubleValue: Double? {
+ switch self {
+ case .double(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var boolValue: Bool? {
+ switch self {
+ case .bool(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var arrayValue: [JSONValue]? {
+ if case let .array(value) = self {
+ return value
+ }
+ return nil
+ }
+
+ public var dictionaryValue: [String: JSONValue]? {
+ if case let .dictionary(value) = self {
+ return value
+ }
+ return nil
+ }
+}
+
+extension JSONValue {
+ public subscript(key: String) -> JSONValue? {
+ return dictionaryValue?[key]
+ }
+
+ public subscript(index: Int) -> JSONValue? {
+ guard case let .array(array) = self, index >= 0 && index < array.count else {
+ return nil
+ }
+ return array[index]
+ }
+}
+
+extension JSONValue: ExpressibleByStringLiteral, ExpressibleByStringInterpolation {
+ public init(stringLiteral value: StringLiteralType) {
+ self = .string(value)
+ }
+}
+
+extension JSONValue: ExpressibleByIntegerLiteral {
+ public init(integerLiteral value: IntegerLiteralType) {
+ self = .int(value)
+ }
+}
+
+extension JSONValue: ExpressibleByFloatLiteral {
+ public init(floatLiteral value: FloatLiteralType) {
+ self = .double(value)
+ }
+}
+
+
+extension JSONValue: ExpressibleByBooleanLiteral {
+ public init(booleanLiteral value: BooleanLiteralType) {
+ self = .bool(value)
+ }
+}
+
+extension JSONValue: ExpressibleByArrayLiteral {
+ public init(arrayLiteral elements: JSONValue...) {
+ self = .array(elements)
+ }
+}
+
+extension JSONValue: ExpressibleByDictionaryLiteral {
+ public init(dictionaryLiteral elements: (String, JSONValue)...) {
+ var dict: [String: JSONValue] = [:]
+ for (key, value) in elements {
+ dict[key] = value
+ }
+ self = .dictionary(dict)
+ }
+}
+
+extension JSONValue: ExpressibleByNilLiteral {
+ public init(nilLiteral: ()) {
+ self = .null
+ }
+}
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
index 623c4c7fd2c..7b8408ce868 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct AdditionalPropertiesClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
index a6882d6517f..bd2a1497826 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Animal: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
index 1890fcf9fde..73fe465dd3a 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ApiResponse: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
index eabae42d3bf..3d5d396bed6 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayOfArrayOfNumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
index fa93d7c6c74..852a4aec20f 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayOfNumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
index c99f82be9b9..db34d97ad45 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
index f8a3f64e2ee..06db3d32532 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Capitalization: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
index 253bbd7c04c..6482fd35203 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Cat: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
index 75b68ec01e2..550c78345bb 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Category: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
index a0419d54f15..80d668f552a 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model with \"_class\" property */
public struct ClassModel: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
index 21a539ba010..c0c6b9fa08b 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Client: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
index dc3bb465a5f..7f4b9a07734 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Dog: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
index e06009060c5..b0cb7c1f1a2 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct EnumArrays: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
index 6ea2895aee5..d4029d73f8a 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public enum EnumClass: String, Codable, CaseIterable {
case abc = "_abc"
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
index 3a9edb08ea7..9fd69055c22 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct EnumTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/File.swift
index 1378b4f9b20..ea9eeee4ebf 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/File.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/File.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Must be named `File` for test. */
public struct File: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
index f9a39d2e58e..06e832913eb 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct FileSchemaTestClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
index f36abb2bcd6..90b86307a82 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct FormatTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
index 9e2fe8cc87f..44c08e6b687 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct HasOnlyReadOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/List.swift
index b9a06034e01..ac7196fc74f 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/List.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/List.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct List: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
index 46f70f0506d..a3b8aa8c4cb 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct MapTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
index c15921ae6c7..9902fafee1c 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
index d5ab7e422f2..0995be822bb 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model name starting with number */
public struct Model200Response: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
index e8a19ee3d99..dfa19a4aad1 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model name same as property name */
public struct Name: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
index 10fd059c856..82d8fb6fb63 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct NumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
index bf7da6a3f86..1afea12cb34 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Order: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
index 99568c8facf..7fe71526624 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct OuterComposite: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
index 76c34b3c2ce..c3b778cbbed 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public enum OuterEnum: String, Codable, CaseIterable {
case placed = "placed"
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
index f93b402b0fd..cef13c2556b 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Pet: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
index 05cf40bedd3..2c99cab3568 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ReadOnlyFirst: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
index 9429b341fa9..2f9230fd652 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing reserved words */
public struct Return: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
index 543f1fa5ad4..21ac694c2c0 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct SpecialModelName: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
index f2dea74b09d..504343ba7de 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Tag: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
index 9a7d7e6c8e6..ef8000720d8 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct TypeHolderDefault: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
index dd67ca7851d..6c794f3b25a 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct TypeHolderExample: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/User.swift
index e55b50dc4f7..5e10d6165ea 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/User.swift
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/Models/User.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct User: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved b/samples/client/petstore/swift6/apiNonStaticMethod/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
index 7af13d17873..eadb875907e 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -1,5 +1,5 @@
{
- "originHash" : "99c6cc361c92d76d3f9edcf90668a78a95b742f853a66cbb1804fbcfc63a985c",
+ "originHash" : "b14c4fe6a7263c50050b60f25c3f28d6b22d415d0c780c4d5a3494c6c0218ccd",
"pins" : [
{
"identity" : "alamofire",
@@ -10,15 +10,6 @@
"version" : "5.9.1"
}
},
- {
- "identity" : "anycodable",
- "kind" : "remoteSourceControl",
- "location" : "https://github.com/Flight-School/AnyCodable",
- "state" : {
- "revision" : "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version" : "0.6.7"
- }
- },
{
"identity" : "promisekit",
"kind" : "remoteSourceControl",
diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/project.yml b/samples/client/petstore/swift6/apiNonStaticMethod/project.yml
index d6d46b888c9..5af0eaaa04d 100644
--- a/samples/client/petstore/swift6/apiNonStaticMethod/project.yml
+++ b/samples/client/petstore/swift6/apiNonStaticMethod/project.yml
@@ -12,7 +12,6 @@ targets:
APPLICATION_EXTENSION_API_ONLY: true
scheme: {}
dependencies:
- - carthage: AnyCodable
- carthage: Alamofire
- carthage: PromiseKit
- carthage: RxSwift
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/.openapi-generator/FILES b/samples/client/petstore/swift6/asyncAwaitLibrary/.openapi-generator/FILES
index c22bc8bf861..c0b110d1118 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/.openapi-generator/FILES
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/.openapi-generator/FILES
@@ -15,6 +15,7 @@ PetstoreClient/Classes/OpenAPIs/CodableHelper.swift
PetstoreClient/Classes/OpenAPIs/Extensions.swift
PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift
PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift
+PetstoreClient/Classes/OpenAPIs/JSONValue.swift
PetstoreClient/Classes/OpenAPIs/Models.swift
PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/Cartfile b/samples/client/petstore/swift6/asyncAwaitLibrary/Cartfile
index 92bac174543..8b137891791 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/Cartfile
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/Cartfile
@@ -1 +1 @@
-github "Flight-School/AnyCodable" ~> 0.6
+
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/Package.resolved b/samples/client/petstore/swift6/asyncAwaitLibrary/Package.resolved
deleted file mode 100644
index 03613dc681d..00000000000
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/Package.resolved
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "originHash" : "d5919dc82f97fd3c9a6e6c48a59960902c9b17904f5461a66b7bc540833bfea1",
- "pins" : [
- {
- "identity" : "anycodable",
- "kind" : "remoteSourceControl",
- "location" : "https://github.com/Flight-School/AnyCodable",
- "state" : {
- "revision" : "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version" : "0.6.7"
- }
- }
- ],
- "version" : 3
-}
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/Package.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/Package.swift
index 78d5f91e0f2..dc5bc46564c 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/Package.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/Package.swift
@@ -19,14 +19,13 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
- .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.7")),
],
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", ],
+ dependencies: [],
path: "PetstoreClient/Classes"
),
],
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient.podspec b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient.podspec
index 7fdbd7246c5..d5b8cefeffa 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient.podspec
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient.podspec
@@ -11,5 +11,4 @@ Pod::Spec.new do |s|
s.homepage = 'https://github.com/openapitools/openapi-generator'
s.summary = 'PetstoreClient'
s.source_files = 'PetstoreClient/Classes/**/*.swift'
- s.dependency 'AnyCodable-FlightSchool', '~> 0.6'
end
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
index f75934d2cf0..0b126ab8c36 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class AnotherFakeAPI {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
index e2d73d47cff..cee6a25aab6 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class FakeAPI {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
index 4f69142ed86..e311db6721c 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class FakeClassnameTags123API {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
index 16d2f32cf17..85e402b6752 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class PetAPI {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
index 6098fb52701..783666b1a69 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class StoreAPI {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
index 14f1cfe43a1..c4ec09e3d0e 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class UserAPI {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift
index 00d6e4ac90f..b4341b60870 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift
@@ -8,9 +8,6 @@ import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
extension Bool: JSONEncodable {
func encodeToJSON(codableHelper: CodableHelper) -> Any { self }
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
new file mode 100644
index 00000000000..85d66ad6abf
--- /dev/null
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
@@ -0,0 +1,247 @@
+//
+// JSONValue.swift
+//
+// Generated by openapi-generator
+// https://openapi-generator.tech
+//
+
+import Foundation
+
+public enum JSONValue: Codable, Hashable {
+ case string(String)
+ case int(Int)
+ case double(Double)
+ case bool(Bool)
+ case array([JSONValue])
+ case dictionary([String: JSONValue])
+ case null
+
+ // MARK: - Decoding Logic
+ public init(from decoder: Decoder) throws {
+ let container = try decoder.singleValueContainer()
+
+ if let stringValue = try? container.decode(String.self) {
+ self = .string(stringValue)
+ } else if let intValue = try? container.decode(Int.self) {
+ self = .int(intValue)
+ } else if let doubleValue = try? container.decode(Double.self) {
+ self = .double(doubleValue)
+ } else if let boolValue = try? container.decode(Bool.self) {
+ self = .bool(boolValue)
+ } else if let arrayValue = try? container.decode([JSONValue].self) {
+ self = .array(arrayValue)
+ } else if let dictionaryValue = try? container.decode([String: JSONValue].self) {
+ self = .dictionary(dictionaryValue)
+ } else if container.decodeNil() {
+ self = .null
+ } else {
+ throw DecodingError.dataCorruptedError(in: container, debugDescription: "Unknown JSON value")
+ }
+ }
+
+ // MARK: - Encoding Logic
+ public func encode(to encoder: Encoder) throws {
+ var container = encoder.singleValueContainer()
+
+ switch self {
+ case .string(let value):
+ try container.encode(value)
+ case .int(let value):
+ try container.encode(value)
+ case .double(let value):
+ try container.encode(value)
+ case .bool(let value):
+ try container.encode(value)
+ case .array(let value):
+ try container.encode(value)
+ case .dictionary(let value):
+ try container.encode(value)
+ case .null:
+ try container.encodeNil()
+ }
+ }
+}
+
+extension JSONValue {
+ public init(_ value: String) {
+ self = .string(value)
+ }
+
+ public init(_ value: Int) {
+ self = .int(value)
+ }
+
+ public init(_ value: Double) {
+ self = .double(value)
+ }
+
+ public init(_ value: Bool) {
+ self = .bool(value)
+ }
+
+ public init(_ value: [JSONValue]) {
+ self = .array(value)
+ }
+
+ public init(_ value: [String: JSONValue]) {
+ self = .dictionary(value)
+ }
+
+ public init(_ codable: T) throws {
+ let encoder = JSONEncoder()
+ let encodedData = try encoder.encode(codable)
+ let decoder = JSONDecoder()
+
+ let decodedValue = try decoder.decode(JSONValue.self, from: encodedData)
+ self = decodedValue
+ }
+}
+
+extension JSONValue {
+ public var isString: Bool {
+ if case .string = self { return true }
+ return false
+ }
+
+ public var isInt: Bool {
+ if case .int = self { return true }
+ return false
+ }
+
+ public var isDouble: Bool {
+ if case .double = self { return true }
+ return false
+ }
+
+ public var isBool: Bool {
+ if case .bool = self { return true }
+ return false
+ }
+
+ public var isArray: Bool {
+ if case .array = self { return true }
+ return false
+ }
+
+ public var isDictionary: Bool {
+ if case .dictionary = self { return true }
+ return false
+ }
+
+ public var isNull: Bool {
+ return self == .null
+ }
+
+}
+
+extension JSONValue {
+ public var stringValue: String? {
+ switch self {
+ case .string(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var intValue: Int? {
+ switch self {
+ case .int(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var doubleValue: Double? {
+ switch self {
+ case .double(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var boolValue: Bool? {
+ switch self {
+ case .bool(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var arrayValue: [JSONValue]? {
+ if case let .array(value) = self {
+ return value
+ }
+ return nil
+ }
+
+ public var dictionaryValue: [String: JSONValue]? {
+ if case let .dictionary(value) = self {
+ return value
+ }
+ return nil
+ }
+}
+
+extension JSONValue {
+ public subscript(key: String) -> JSONValue? {
+ return dictionaryValue?[key]
+ }
+
+ public subscript(index: Int) -> JSONValue? {
+ guard case let .array(array) = self, index >= 0 && index < array.count else {
+ return nil
+ }
+ return array[index]
+ }
+}
+
+extension JSONValue: ExpressibleByStringLiteral, ExpressibleByStringInterpolation {
+ public init(stringLiteral value: StringLiteralType) {
+ self = .string(value)
+ }
+}
+
+extension JSONValue: ExpressibleByIntegerLiteral {
+ public init(integerLiteral value: IntegerLiteralType) {
+ self = .int(value)
+ }
+}
+
+extension JSONValue: ExpressibleByFloatLiteral {
+ public init(floatLiteral value: FloatLiteralType) {
+ self = .double(value)
+ }
+}
+
+
+extension JSONValue: ExpressibleByBooleanLiteral {
+ public init(booleanLiteral value: BooleanLiteralType) {
+ self = .bool(value)
+ }
+}
+
+extension JSONValue: ExpressibleByArrayLiteral {
+ public init(arrayLiteral elements: JSONValue...) {
+ self = .array(elements)
+ }
+}
+
+extension JSONValue: ExpressibleByDictionaryLiteral {
+ public init(dictionaryLiteral elements: (String, JSONValue)...) {
+ var dict: [String: JSONValue] = [:]
+ for (key, value) in elements {
+ dict[key] = value
+ }
+ self = .dictionary(dict)
+ }
+}
+
+extension JSONValue: ExpressibleByNilLiteral {
+ public init(nilLiteral: ()) {
+ self = .null
+ }
+}
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
index 623c4c7fd2c..7b8408ce868 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct AdditionalPropertiesClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
index a6882d6517f..bd2a1497826 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Animal: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
index a0b09cb9761..e09b0e9efdc 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
@@ -6,8 +6,5 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public typealias AnimalFarm = [Animal]
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
index 1890fcf9fde..73fe465dd3a 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ApiResponse: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
index eabae42d3bf..3d5d396bed6 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayOfArrayOfNumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
index fa93d7c6c74..852a4aec20f 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayOfNumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
index c99f82be9b9..db34d97ad45 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
index f8a3f64e2ee..06db3d32532 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Capitalization: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
index 253bbd7c04c..6482fd35203 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Cat: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
index 75b68ec01e2..550c78345bb 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Category: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
index a0419d54f15..80d668f552a 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model with \"_class\" property */
public struct ClassModel: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
index 21a539ba010..c0c6b9fa08b 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Client: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
index dc3bb465a5f..7f4b9a07734 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Dog: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
index e06009060c5..b0cb7c1f1a2 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct EnumArrays: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
index 6ea2895aee5..d4029d73f8a 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public enum EnumClass: String, Codable, CaseIterable {
case abc = "_abc"
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
index 3a9edb08ea7..9fd69055c22 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct EnumTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift
index 1378b4f9b20..ea9eeee4ebf 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Must be named `File` for test. */
public struct File: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
index f9a39d2e58e..06e832913eb 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct FileSchemaTestClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
index f36abb2bcd6..90b86307a82 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct FormatTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
index 9e2fe8cc87f..44c08e6b687 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct HasOnlyReadOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift
index b9a06034e01..ac7196fc74f 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct List: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
index c4792800425..8a4a31082a3 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct MapTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
index c15921ae6c7..9902fafee1c 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
index d5ab7e422f2..0995be822bb 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model name starting with number */
public struct Model200Response: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
index e8a19ee3d99..dfa19a4aad1 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model name same as property name */
public struct Name: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
index 10fd059c856..82d8fb6fb63 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct NumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
index bf7da6a3f86..1afea12cb34 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Order: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
index 99568c8facf..7fe71526624 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct OuterComposite: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
index 76c34b3c2ce..c3b778cbbed 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public enum OuterEnum: String, Codable, CaseIterable {
case placed = "placed"
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
index f93b402b0fd..cef13c2556b 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Pet: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
index 05cf40bedd3..2c99cab3568 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ReadOnlyFirst: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
index 9429b341fa9..2f9230fd652 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing reserved words */
public struct Return: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
index 543f1fa5ad4..21ac694c2c0 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct SpecialModelName: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
index 548b82c049e..ca657eb0db9 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct StringBooleanMap: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
index f2dea74b09d..504343ba7de 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Tag: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
index 9a7d7e6c8e6..ef8000720d8 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct TypeHolderDefault: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
index dd67ca7851d..6c794f3b25a 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct TypeHolderExample: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift
index e55b50dc4f7..5e10d6165ea 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct User: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved b/samples/client/petstore/swift6/asyncAwaitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
deleted file mode 100644
index 03613dc681d..00000000000
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "originHash" : "d5919dc82f97fd3c9a6e6c48a59960902c9b17904f5461a66b7bc540833bfea1",
- "pins" : [
- {
- "identity" : "anycodable",
- "kind" : "remoteSourceControl",
- "location" : "https://github.com/Flight-School/AnyCodable",
- "state" : {
- "revision" : "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version" : "0.6.7"
- }
- }
- ],
- "version" : 3
-}
diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/project.yml b/samples/client/petstore/swift6/asyncAwaitLibrary/project.yml
index 876aca81692..92ad41fa08d 100644
--- a/samples/client/petstore/swift6/asyncAwaitLibrary/project.yml
+++ b/samples/client/petstore/swift6/asyncAwaitLibrary/project.yml
@@ -12,4 +12,3 @@ targets:
APPLICATION_EXTENSION_API_ONLY: true
scheme: {}
dependencies:
- - carthage: AnyCodable
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/.openapi-generator/FILES b/samples/client/petstore/swift6/combineDeferredLibrary/.openapi-generator/FILES
index c22bc8bf861..c0b110d1118 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/.openapi-generator/FILES
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/.openapi-generator/FILES
@@ -15,6 +15,7 @@ PetstoreClient/Classes/OpenAPIs/CodableHelper.swift
PetstoreClient/Classes/OpenAPIs/Extensions.swift
PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift
PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift
+PetstoreClient/Classes/OpenAPIs/JSONValue.swift
PetstoreClient/Classes/OpenAPIs/Models.swift
PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/Cartfile b/samples/client/petstore/swift6/combineDeferredLibrary/Cartfile
index 92bac174543..8b137891791 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/Cartfile
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/Cartfile
@@ -1 +1 @@
-github "Flight-School/AnyCodable" ~> 0.6
+
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/Package.resolved b/samples/client/petstore/swift6/combineDeferredLibrary/Package.resolved
deleted file mode 100644
index 03613dc681d..00000000000
--- a/samples/client/petstore/swift6/combineDeferredLibrary/Package.resolved
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "originHash" : "d5919dc82f97fd3c9a6e6c48a59960902c9b17904f5461a66b7bc540833bfea1",
- "pins" : [
- {
- "identity" : "anycodable",
- "kind" : "remoteSourceControl",
- "location" : "https://github.com/Flight-School/AnyCodable",
- "state" : {
- "revision" : "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version" : "0.6.7"
- }
- }
- ],
- "version" : 3
-}
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/Package.swift b/samples/client/petstore/swift6/combineDeferredLibrary/Package.swift
index 78d5f91e0f2..dc5bc46564c 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/Package.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/Package.swift
@@ -19,14 +19,13 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
- .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.7")),
],
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", ],
+ dependencies: [],
path: "PetstoreClient/Classes"
),
],
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient.podspec b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient.podspec
index 7fdbd7246c5..d5b8cefeffa 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient.podspec
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient.podspec
@@ -11,5 +11,4 @@ Pod::Spec.new do |s|
s.homepage = 'https://github.com/openapitools/openapi-generator'
s.summary = 'PetstoreClient'
s.source_files = 'PetstoreClient/Classes/**/*.swift'
- s.dependency 'AnyCodable-FlightSchool', '~> 0.6'
end
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
index 39d2aa63610..a37c8c6230e 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
@@ -9,9 +9,6 @@ import Foundation
#if canImport(Combine)
import Combine
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class AnotherFakeAPI {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
index 95d4d2a34b5..9cd690a8e2d 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
@@ -9,9 +9,6 @@ import Foundation
#if canImport(Combine)
import Combine
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class FakeAPI {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
index 60d9c626179..1f6e55082b9 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
@@ -9,9 +9,6 @@ import Foundation
#if canImport(Combine)
import Combine
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class FakeClassnameTags123API {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
index fb1339400d3..ca7b4eda205 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
@@ -9,9 +9,6 @@ import Foundation
#if canImport(Combine)
import Combine
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class PetAPI {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
index e46f967176f..f3bcc4806ba 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
@@ -9,9 +9,6 @@ import Foundation
#if canImport(Combine)
import Combine
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class StoreAPI {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
index 2e56c1580a2..34482e26d82 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
@@ -9,9 +9,6 @@ import Foundation
#if canImport(Combine)
import Combine
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class UserAPI {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift
index 00d6e4ac90f..b4341b60870 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift
@@ -8,9 +8,6 @@ import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
extension Bool: JSONEncodable {
func encodeToJSON(codableHelper: CodableHelper) -> Any { self }
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
new file mode 100644
index 00000000000..85d66ad6abf
--- /dev/null
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
@@ -0,0 +1,247 @@
+//
+// JSONValue.swift
+//
+// Generated by openapi-generator
+// https://openapi-generator.tech
+//
+
+import Foundation
+
+public enum JSONValue: Codable, Hashable {
+ case string(String)
+ case int(Int)
+ case double(Double)
+ case bool(Bool)
+ case array([JSONValue])
+ case dictionary([String: JSONValue])
+ case null
+
+ // MARK: - Decoding Logic
+ public init(from decoder: Decoder) throws {
+ let container = try decoder.singleValueContainer()
+
+ if let stringValue = try? container.decode(String.self) {
+ self = .string(stringValue)
+ } else if let intValue = try? container.decode(Int.self) {
+ self = .int(intValue)
+ } else if let doubleValue = try? container.decode(Double.self) {
+ self = .double(doubleValue)
+ } else if let boolValue = try? container.decode(Bool.self) {
+ self = .bool(boolValue)
+ } else if let arrayValue = try? container.decode([JSONValue].self) {
+ self = .array(arrayValue)
+ } else if let dictionaryValue = try? container.decode([String: JSONValue].self) {
+ self = .dictionary(dictionaryValue)
+ } else if container.decodeNil() {
+ self = .null
+ } else {
+ throw DecodingError.dataCorruptedError(in: container, debugDescription: "Unknown JSON value")
+ }
+ }
+
+ // MARK: - Encoding Logic
+ public func encode(to encoder: Encoder) throws {
+ var container = encoder.singleValueContainer()
+
+ switch self {
+ case .string(let value):
+ try container.encode(value)
+ case .int(let value):
+ try container.encode(value)
+ case .double(let value):
+ try container.encode(value)
+ case .bool(let value):
+ try container.encode(value)
+ case .array(let value):
+ try container.encode(value)
+ case .dictionary(let value):
+ try container.encode(value)
+ case .null:
+ try container.encodeNil()
+ }
+ }
+}
+
+extension JSONValue {
+ public init(_ value: String) {
+ self = .string(value)
+ }
+
+ public init(_ value: Int) {
+ self = .int(value)
+ }
+
+ public init(_ value: Double) {
+ self = .double(value)
+ }
+
+ public init(_ value: Bool) {
+ self = .bool(value)
+ }
+
+ public init(_ value: [JSONValue]) {
+ self = .array(value)
+ }
+
+ public init(_ value: [String: JSONValue]) {
+ self = .dictionary(value)
+ }
+
+ public init(_ codable: T) throws {
+ let encoder = JSONEncoder()
+ let encodedData = try encoder.encode(codable)
+ let decoder = JSONDecoder()
+
+ let decodedValue = try decoder.decode(JSONValue.self, from: encodedData)
+ self = decodedValue
+ }
+}
+
+extension JSONValue {
+ public var isString: Bool {
+ if case .string = self { return true }
+ return false
+ }
+
+ public var isInt: Bool {
+ if case .int = self { return true }
+ return false
+ }
+
+ public var isDouble: Bool {
+ if case .double = self { return true }
+ return false
+ }
+
+ public var isBool: Bool {
+ if case .bool = self { return true }
+ return false
+ }
+
+ public var isArray: Bool {
+ if case .array = self { return true }
+ return false
+ }
+
+ public var isDictionary: Bool {
+ if case .dictionary = self { return true }
+ return false
+ }
+
+ public var isNull: Bool {
+ return self == .null
+ }
+
+}
+
+extension JSONValue {
+ public var stringValue: String? {
+ switch self {
+ case .string(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var intValue: Int? {
+ switch self {
+ case .int(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var doubleValue: Double? {
+ switch self {
+ case .double(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var boolValue: Bool? {
+ switch self {
+ case .bool(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var arrayValue: [JSONValue]? {
+ if case let .array(value) = self {
+ return value
+ }
+ return nil
+ }
+
+ public var dictionaryValue: [String: JSONValue]? {
+ if case let .dictionary(value) = self {
+ return value
+ }
+ return nil
+ }
+}
+
+extension JSONValue {
+ public subscript(key: String) -> JSONValue? {
+ return dictionaryValue?[key]
+ }
+
+ public subscript(index: Int) -> JSONValue? {
+ guard case let .array(array) = self, index >= 0 && index < array.count else {
+ return nil
+ }
+ return array[index]
+ }
+}
+
+extension JSONValue: ExpressibleByStringLiteral, ExpressibleByStringInterpolation {
+ public init(stringLiteral value: StringLiteralType) {
+ self = .string(value)
+ }
+}
+
+extension JSONValue: ExpressibleByIntegerLiteral {
+ public init(integerLiteral value: IntegerLiteralType) {
+ self = .int(value)
+ }
+}
+
+extension JSONValue: ExpressibleByFloatLiteral {
+ public init(floatLiteral value: FloatLiteralType) {
+ self = .double(value)
+ }
+}
+
+
+extension JSONValue: ExpressibleByBooleanLiteral {
+ public init(booleanLiteral value: BooleanLiteralType) {
+ self = .bool(value)
+ }
+}
+
+extension JSONValue: ExpressibleByArrayLiteral {
+ public init(arrayLiteral elements: JSONValue...) {
+ self = .array(elements)
+ }
+}
+
+extension JSONValue: ExpressibleByDictionaryLiteral {
+ public init(dictionaryLiteral elements: (String, JSONValue)...) {
+ var dict: [String: JSONValue] = [:]
+ for (key, value) in elements {
+ dict[key] = value
+ }
+ self = .dictionary(dict)
+ }
+}
+
+extension JSONValue: ExpressibleByNilLiteral {
+ public init(nilLiteral: ()) {
+ self = .null
+ }
+}
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
index 623c4c7fd2c..7b8408ce868 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct AdditionalPropertiesClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
index a6882d6517f..bd2a1497826 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Animal: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
index a0b09cb9761..e09b0e9efdc 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
@@ -6,8 +6,5 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public typealias AnimalFarm = [Animal]
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
index 1890fcf9fde..73fe465dd3a 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ApiResponse: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
index eabae42d3bf..3d5d396bed6 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayOfArrayOfNumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
index fa93d7c6c74..852a4aec20f 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayOfNumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
index c99f82be9b9..db34d97ad45 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
index f8a3f64e2ee..06db3d32532 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Capitalization: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
index 253bbd7c04c..6482fd35203 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Cat: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
index 75b68ec01e2..550c78345bb 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Category: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
index a0419d54f15..80d668f552a 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model with \"_class\" property */
public struct ClassModel: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
index 21a539ba010..c0c6b9fa08b 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Client: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
index dc3bb465a5f..7f4b9a07734 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Dog: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
index e06009060c5..b0cb7c1f1a2 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct EnumArrays: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
index 6ea2895aee5..d4029d73f8a 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public enum EnumClass: String, Codable, CaseIterable {
case abc = "_abc"
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
index 3a9edb08ea7..9fd69055c22 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct EnumTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift
index 1378b4f9b20..ea9eeee4ebf 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Must be named `File` for test. */
public struct File: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
index f9a39d2e58e..06e832913eb 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct FileSchemaTestClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
index f36abb2bcd6..90b86307a82 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct FormatTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
index 9e2fe8cc87f..44c08e6b687 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct HasOnlyReadOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift
index b9a06034e01..ac7196fc74f 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct List: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
index c4792800425..8a4a31082a3 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct MapTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
index c15921ae6c7..9902fafee1c 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
index d5ab7e422f2..0995be822bb 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model name starting with number */
public struct Model200Response: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
index e8a19ee3d99..dfa19a4aad1 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model name same as property name */
public struct Name: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
index 10fd059c856..82d8fb6fb63 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct NumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
index bf7da6a3f86..1afea12cb34 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Order: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
index 99568c8facf..7fe71526624 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct OuterComposite: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
index 76c34b3c2ce..c3b778cbbed 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public enum OuterEnum: String, Codable, CaseIterable {
case placed = "placed"
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
index f93b402b0fd..cef13c2556b 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Pet: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
index 05cf40bedd3..2c99cab3568 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ReadOnlyFirst: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
index 9429b341fa9..2f9230fd652 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing reserved words */
public struct Return: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
index 543f1fa5ad4..21ac694c2c0 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct SpecialModelName: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
index 548b82c049e..ca657eb0db9 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct StringBooleanMap: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
index f2dea74b09d..504343ba7de 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Tag: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
index 9a7d7e6c8e6..ef8000720d8 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct TypeHolderDefault: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
index dd67ca7851d..6c794f3b25a 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct TypeHolderExample: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift
index e55b50dc4f7..5e10d6165ea 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct User: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved b/samples/client/petstore/swift6/combineDeferredLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
deleted file mode 100644
index 03613dc681d..00000000000
--- a/samples/client/petstore/swift6/combineDeferredLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "originHash" : "d5919dc82f97fd3c9a6e6c48a59960902c9b17904f5461a66b7bc540833bfea1",
- "pins" : [
- {
- "identity" : "anycodable",
- "kind" : "remoteSourceControl",
- "location" : "https://github.com/Flight-School/AnyCodable",
- "state" : {
- "revision" : "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version" : "0.6.7"
- }
- }
- ],
- "version" : 3
-}
diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/project.yml b/samples/client/petstore/swift6/combineDeferredLibrary/project.yml
index 876aca81692..92ad41fa08d 100644
--- a/samples/client/petstore/swift6/combineDeferredLibrary/project.yml
+++ b/samples/client/petstore/swift6/combineDeferredLibrary/project.yml
@@ -12,4 +12,3 @@ targets:
APPLICATION_EXTENSION_API_ONLY: true
scheme: {}
dependencies:
- - carthage: AnyCodable
diff --git a/samples/client/petstore/swift6/combineLibrary/.openapi-generator/FILES b/samples/client/petstore/swift6/combineLibrary/.openapi-generator/FILES
index c22bc8bf861..c0b110d1118 100644
--- a/samples/client/petstore/swift6/combineLibrary/.openapi-generator/FILES
+++ b/samples/client/petstore/swift6/combineLibrary/.openapi-generator/FILES
@@ -15,6 +15,7 @@ PetstoreClient/Classes/OpenAPIs/CodableHelper.swift
PetstoreClient/Classes/OpenAPIs/Extensions.swift
PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift
PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift
+PetstoreClient/Classes/OpenAPIs/JSONValue.swift
PetstoreClient/Classes/OpenAPIs/Models.swift
PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
diff --git a/samples/client/petstore/swift6/combineLibrary/Cartfile b/samples/client/petstore/swift6/combineLibrary/Cartfile
index 92bac174543..8b137891791 100644
--- a/samples/client/petstore/swift6/combineLibrary/Cartfile
+++ b/samples/client/petstore/swift6/combineLibrary/Cartfile
@@ -1 +1 @@
-github "Flight-School/AnyCodable" ~> 0.6
+
diff --git a/samples/client/petstore/swift6/combineLibrary/Package.resolved b/samples/client/petstore/swift6/combineLibrary/Package.resolved
deleted file mode 100644
index 03613dc681d..00000000000
--- a/samples/client/petstore/swift6/combineLibrary/Package.resolved
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "originHash" : "d5919dc82f97fd3c9a6e6c48a59960902c9b17904f5461a66b7bc540833bfea1",
- "pins" : [
- {
- "identity" : "anycodable",
- "kind" : "remoteSourceControl",
- "location" : "https://github.com/Flight-School/AnyCodable",
- "state" : {
- "revision" : "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version" : "0.6.7"
- }
- }
- ],
- "version" : 3
-}
diff --git a/samples/client/petstore/swift6/combineLibrary/Package.swift b/samples/client/petstore/swift6/combineLibrary/Package.swift
index 78d5f91e0f2..dc5bc46564c 100644
--- a/samples/client/petstore/swift6/combineLibrary/Package.swift
+++ b/samples/client/petstore/swift6/combineLibrary/Package.swift
@@ -19,14 +19,13 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
- .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.7")),
],
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", ],
+ dependencies: [],
path: "PetstoreClient/Classes"
),
],
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient.podspec b/samples/client/petstore/swift6/combineLibrary/PetstoreClient.podspec
index 7fdbd7246c5..d5b8cefeffa 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient.podspec
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient.podspec
@@ -11,5 +11,4 @@ Pod::Spec.new do |s|
s.homepage = 'https://github.com/openapitools/openapi-generator'
s.summary = 'PetstoreClient'
s.source_files = 'PetstoreClient/Classes/**/*.swift'
- s.dependency 'AnyCodable-FlightSchool', '~> 0.6'
end
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
index b5e0ef44b64..4f4dc815c94 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
@@ -9,9 +9,6 @@ import Foundation
#if canImport(Combine)
import Combine
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class AnotherFakeAPI {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
index 56478f2873b..b7adab145cb 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
@@ -9,9 +9,6 @@ import Foundation
#if canImport(Combine)
import Combine
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class FakeAPI {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
index 5686a291b00..d89814c969e 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
@@ -9,9 +9,6 @@ import Foundation
#if canImport(Combine)
import Combine
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class FakeClassnameTags123API {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
index 030a14db32c..7def35ea438 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
@@ -9,9 +9,6 @@ import Foundation
#if canImport(Combine)
import Combine
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class PetAPI {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
index d16fcf686e6..d6b827685e5 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
@@ -9,9 +9,6 @@ import Foundation
#if canImport(Combine)
import Combine
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class StoreAPI {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
index 2b86effbe17..be2388b874f 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
@@ -9,9 +9,6 @@ import Foundation
#if canImport(Combine)
import Combine
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class UserAPI {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift
index 00d6e4ac90f..b4341b60870 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift
@@ -8,9 +8,6 @@ import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
extension Bool: JSONEncodable {
func encodeToJSON(codableHelper: CodableHelper) -> Any { self }
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
new file mode 100644
index 00000000000..85d66ad6abf
--- /dev/null
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
@@ -0,0 +1,247 @@
+//
+// JSONValue.swift
+//
+// Generated by openapi-generator
+// https://openapi-generator.tech
+//
+
+import Foundation
+
+public enum JSONValue: Codable, Hashable {
+ case string(String)
+ case int(Int)
+ case double(Double)
+ case bool(Bool)
+ case array([JSONValue])
+ case dictionary([String: JSONValue])
+ case null
+
+ // MARK: - Decoding Logic
+ public init(from decoder: Decoder) throws {
+ let container = try decoder.singleValueContainer()
+
+ if let stringValue = try? container.decode(String.self) {
+ self = .string(stringValue)
+ } else if let intValue = try? container.decode(Int.self) {
+ self = .int(intValue)
+ } else if let doubleValue = try? container.decode(Double.self) {
+ self = .double(doubleValue)
+ } else if let boolValue = try? container.decode(Bool.self) {
+ self = .bool(boolValue)
+ } else if let arrayValue = try? container.decode([JSONValue].self) {
+ self = .array(arrayValue)
+ } else if let dictionaryValue = try? container.decode([String: JSONValue].self) {
+ self = .dictionary(dictionaryValue)
+ } else if container.decodeNil() {
+ self = .null
+ } else {
+ throw DecodingError.dataCorruptedError(in: container, debugDescription: "Unknown JSON value")
+ }
+ }
+
+ // MARK: - Encoding Logic
+ public func encode(to encoder: Encoder) throws {
+ var container = encoder.singleValueContainer()
+
+ switch self {
+ case .string(let value):
+ try container.encode(value)
+ case .int(let value):
+ try container.encode(value)
+ case .double(let value):
+ try container.encode(value)
+ case .bool(let value):
+ try container.encode(value)
+ case .array(let value):
+ try container.encode(value)
+ case .dictionary(let value):
+ try container.encode(value)
+ case .null:
+ try container.encodeNil()
+ }
+ }
+}
+
+extension JSONValue {
+ public init(_ value: String) {
+ self = .string(value)
+ }
+
+ public init(_ value: Int) {
+ self = .int(value)
+ }
+
+ public init(_ value: Double) {
+ self = .double(value)
+ }
+
+ public init(_ value: Bool) {
+ self = .bool(value)
+ }
+
+ public init(_ value: [JSONValue]) {
+ self = .array(value)
+ }
+
+ public init(_ value: [String: JSONValue]) {
+ self = .dictionary(value)
+ }
+
+ public init(_ codable: T) throws {
+ let encoder = JSONEncoder()
+ let encodedData = try encoder.encode(codable)
+ let decoder = JSONDecoder()
+
+ let decodedValue = try decoder.decode(JSONValue.self, from: encodedData)
+ self = decodedValue
+ }
+}
+
+extension JSONValue {
+ public var isString: Bool {
+ if case .string = self { return true }
+ return false
+ }
+
+ public var isInt: Bool {
+ if case .int = self { return true }
+ return false
+ }
+
+ public var isDouble: Bool {
+ if case .double = self { return true }
+ return false
+ }
+
+ public var isBool: Bool {
+ if case .bool = self { return true }
+ return false
+ }
+
+ public var isArray: Bool {
+ if case .array = self { return true }
+ return false
+ }
+
+ public var isDictionary: Bool {
+ if case .dictionary = self { return true }
+ return false
+ }
+
+ public var isNull: Bool {
+ return self == .null
+ }
+
+}
+
+extension JSONValue {
+ public var stringValue: String? {
+ switch self {
+ case .string(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var intValue: Int? {
+ switch self {
+ case .int(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var doubleValue: Double? {
+ switch self {
+ case .double(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var boolValue: Bool? {
+ switch self {
+ case .bool(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var arrayValue: [JSONValue]? {
+ if case let .array(value) = self {
+ return value
+ }
+ return nil
+ }
+
+ public var dictionaryValue: [String: JSONValue]? {
+ if case let .dictionary(value) = self {
+ return value
+ }
+ return nil
+ }
+}
+
+extension JSONValue {
+ public subscript(key: String) -> JSONValue? {
+ return dictionaryValue?[key]
+ }
+
+ public subscript(index: Int) -> JSONValue? {
+ guard case let .array(array) = self, index >= 0 && index < array.count else {
+ return nil
+ }
+ return array[index]
+ }
+}
+
+extension JSONValue: ExpressibleByStringLiteral, ExpressibleByStringInterpolation {
+ public init(stringLiteral value: StringLiteralType) {
+ self = .string(value)
+ }
+}
+
+extension JSONValue: ExpressibleByIntegerLiteral {
+ public init(integerLiteral value: IntegerLiteralType) {
+ self = .int(value)
+ }
+}
+
+extension JSONValue: ExpressibleByFloatLiteral {
+ public init(floatLiteral value: FloatLiteralType) {
+ self = .double(value)
+ }
+}
+
+
+extension JSONValue: ExpressibleByBooleanLiteral {
+ public init(booleanLiteral value: BooleanLiteralType) {
+ self = .bool(value)
+ }
+}
+
+extension JSONValue: ExpressibleByArrayLiteral {
+ public init(arrayLiteral elements: JSONValue...) {
+ self = .array(elements)
+ }
+}
+
+extension JSONValue: ExpressibleByDictionaryLiteral {
+ public init(dictionaryLiteral elements: (String, JSONValue)...) {
+ var dict: [String: JSONValue] = [:]
+ for (key, value) in elements {
+ dict[key] = value
+ }
+ self = .dictionary(dict)
+ }
+}
+
+extension JSONValue: ExpressibleByNilLiteral {
+ public init(nilLiteral: ()) {
+ self = .null
+ }
+}
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
index 623c4c7fd2c..7b8408ce868 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct AdditionalPropertiesClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
index a6882d6517f..bd2a1497826 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Animal: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
index a0b09cb9761..e09b0e9efdc 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
@@ -6,8 +6,5 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public typealias AnimalFarm = [Animal]
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
index 1890fcf9fde..73fe465dd3a 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ApiResponse: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
index eabae42d3bf..3d5d396bed6 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayOfArrayOfNumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
index fa93d7c6c74..852a4aec20f 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayOfNumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
index c99f82be9b9..db34d97ad45 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
index f8a3f64e2ee..06db3d32532 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Capitalization: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
index 253bbd7c04c..6482fd35203 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Cat: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
index 75b68ec01e2..550c78345bb 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Category: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
index a0419d54f15..80d668f552a 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model with \"_class\" property */
public struct ClassModel: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
index 21a539ba010..c0c6b9fa08b 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Client: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
index dc3bb465a5f..7f4b9a07734 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Dog: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
index e06009060c5..b0cb7c1f1a2 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct EnumArrays: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
index 6ea2895aee5..d4029d73f8a 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public enum EnumClass: String, Codable, CaseIterable {
case abc = "_abc"
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
index 3a9edb08ea7..9fd69055c22 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct EnumTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift
index 1378b4f9b20..ea9eeee4ebf 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Must be named `File` for test. */
public struct File: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
index f9a39d2e58e..06e832913eb 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct FileSchemaTestClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
index f36abb2bcd6..90b86307a82 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct FormatTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
index 9e2fe8cc87f..44c08e6b687 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct HasOnlyReadOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift
index b9a06034e01..ac7196fc74f 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct List: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
index c4792800425..8a4a31082a3 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct MapTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
index c15921ae6c7..9902fafee1c 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
index d5ab7e422f2..0995be822bb 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model name starting with number */
public struct Model200Response: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
index e8a19ee3d99..dfa19a4aad1 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model name same as property name */
public struct Name: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
index 10fd059c856..82d8fb6fb63 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct NumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
index bf7da6a3f86..1afea12cb34 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Order: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
index 99568c8facf..7fe71526624 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct OuterComposite: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
index 76c34b3c2ce..c3b778cbbed 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public enum OuterEnum: String, Codable, CaseIterable {
case placed = "placed"
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
index f93b402b0fd..cef13c2556b 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Pet: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
index 05cf40bedd3..2c99cab3568 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ReadOnlyFirst: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
index 9429b341fa9..2f9230fd652 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing reserved words */
public struct Return: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
index 543f1fa5ad4..21ac694c2c0 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct SpecialModelName: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
index 548b82c049e..ca657eb0db9 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct StringBooleanMap: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
index f2dea74b09d..504343ba7de 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Tag: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
index 9a7d7e6c8e6..ef8000720d8 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct TypeHolderDefault: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
index dd67ca7851d..6c794f3b25a 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct TypeHolderExample: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift
index e55b50dc4f7..5e10d6165ea 100644
--- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift
+++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct User: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/combineLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved b/samples/client/petstore/swift6/combineLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
deleted file mode 100644
index 03613dc681d..00000000000
--- a/samples/client/petstore/swift6/combineLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "originHash" : "d5919dc82f97fd3c9a6e6c48a59960902c9b17904f5461a66b7bc540833bfea1",
- "pins" : [
- {
- "identity" : "anycodable",
- "kind" : "remoteSourceControl",
- "location" : "https://github.com/Flight-School/AnyCodable",
- "state" : {
- "revision" : "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version" : "0.6.7"
- }
- }
- ],
- "version" : 3
-}
diff --git a/samples/client/petstore/swift6/combineLibrary/project.yml b/samples/client/petstore/swift6/combineLibrary/project.yml
index 876aca81692..92ad41fa08d 100644
--- a/samples/client/petstore/swift6/combineLibrary/project.yml
+++ b/samples/client/petstore/swift6/combineLibrary/project.yml
@@ -12,4 +12,3 @@ targets:
APPLICATION_EXTENSION_API_ONLY: true
scheme: {}
dependencies:
- - carthage: AnyCodable
diff --git a/samples/client/petstore/swift6/default/.openapi-generator/FILES b/samples/client/petstore/swift6/default/.openapi-generator/FILES
index 3f134a8f587..6d7185f70aa 100644
--- a/samples/client/petstore/swift6/default/.openapi-generator/FILES
+++ b/samples/client/petstore/swift6/default/.openapi-generator/FILES
@@ -15,6 +15,7 @@ PetstoreClient/Classes/OpenAPIs/CodableHelper.swift
PetstoreClient/Classes/OpenAPIs/Extensions.swift
PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift
PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift
+PetstoreClient/Classes/OpenAPIs/JSONValue.swift
PetstoreClient/Classes/OpenAPIs/Models.swift
PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesAnyType.swift
PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesArray.swift
diff --git a/samples/client/petstore/swift6/default/Cartfile b/samples/client/petstore/swift6/default/Cartfile
index 92bac174543..8b137891791 100644
--- a/samples/client/petstore/swift6/default/Cartfile
+++ b/samples/client/petstore/swift6/default/Cartfile
@@ -1 +1 @@
-github "Flight-School/AnyCodable" ~> 0.6
+
diff --git a/samples/client/petstore/swift6/default/Package.resolved b/samples/client/petstore/swift6/default/Package.resolved
deleted file mode 100644
index 03613dc681d..00000000000
--- a/samples/client/petstore/swift6/default/Package.resolved
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "originHash" : "d5919dc82f97fd3c9a6e6c48a59960902c9b17904f5461a66b7bc540833bfea1",
- "pins" : [
- {
- "identity" : "anycodable",
- "kind" : "remoteSourceControl",
- "location" : "https://github.com/Flight-School/AnyCodable",
- "state" : {
- "revision" : "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version" : "0.6.7"
- }
- }
- ],
- "version" : 3
-}
diff --git a/samples/client/petstore/swift6/default/Package.swift b/samples/client/petstore/swift6/default/Package.swift
index 78d5f91e0f2..dc5bc46564c 100644
--- a/samples/client/petstore/swift6/default/Package.swift
+++ b/samples/client/petstore/swift6/default/Package.swift
@@ -19,14 +19,13 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
- .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.7")),
],
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", ],
+ dependencies: [],
path: "PetstoreClient/Classes"
),
],
diff --git a/samples/client/petstore/swift6/default/PetstoreClient.podspec b/samples/client/petstore/swift6/default/PetstoreClient.podspec
index 7fdbd7246c5..d5b8cefeffa 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient.podspec
+++ b/samples/client/petstore/swift6/default/PetstoreClient.podspec
@@ -11,5 +11,4 @@ Pod::Spec.new do |s|
s.homepage = 'https://github.com/openapitools/openapi-generator'
s.summary = 'PetstoreClient'
s.source_files = 'PetstoreClient/Classes/**/*.swift'
- s.dependency 'AnyCodable-FlightSchool', '~> 0.6'
end
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
index 8695f2c9c28..bc0e003a851 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class AnotherFakeAPI {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
index 4379225cd79..7e47697a82d 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class FakeAPI {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
index c6e49aeda8f..ef0c898b1f3 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class FakeClassnameTags123API {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
index 9f6fe242419..7616baa85c3 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class PetAPI {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
index 0e29832db78..d35fd14c090 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class StoreAPI {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
index 3e3eecc2745..b14a8eb251d 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class UserAPI {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift
index 00d6e4ac90f..b4341b60870 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift
@@ -8,9 +8,6 @@ import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
extension Bool: JSONEncodable {
func encodeToJSON(codableHelper: CodableHelper) -> Any { self }
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/JSONValue.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
new file mode 100644
index 00000000000..85d66ad6abf
--- /dev/null
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
@@ -0,0 +1,247 @@
+//
+// JSONValue.swift
+//
+// Generated by openapi-generator
+// https://openapi-generator.tech
+//
+
+import Foundation
+
+public enum JSONValue: Codable, Hashable {
+ case string(String)
+ case int(Int)
+ case double(Double)
+ case bool(Bool)
+ case array([JSONValue])
+ case dictionary([String: JSONValue])
+ case null
+
+ // MARK: - Decoding Logic
+ public init(from decoder: Decoder) throws {
+ let container = try decoder.singleValueContainer()
+
+ if let stringValue = try? container.decode(String.self) {
+ self = .string(stringValue)
+ } else if let intValue = try? container.decode(Int.self) {
+ self = .int(intValue)
+ } else if let doubleValue = try? container.decode(Double.self) {
+ self = .double(doubleValue)
+ } else if let boolValue = try? container.decode(Bool.self) {
+ self = .bool(boolValue)
+ } else if let arrayValue = try? container.decode([JSONValue].self) {
+ self = .array(arrayValue)
+ } else if let dictionaryValue = try? container.decode([String: JSONValue].self) {
+ self = .dictionary(dictionaryValue)
+ } else if container.decodeNil() {
+ self = .null
+ } else {
+ throw DecodingError.dataCorruptedError(in: container, debugDescription: "Unknown JSON value")
+ }
+ }
+
+ // MARK: - Encoding Logic
+ public func encode(to encoder: Encoder) throws {
+ var container = encoder.singleValueContainer()
+
+ switch self {
+ case .string(let value):
+ try container.encode(value)
+ case .int(let value):
+ try container.encode(value)
+ case .double(let value):
+ try container.encode(value)
+ case .bool(let value):
+ try container.encode(value)
+ case .array(let value):
+ try container.encode(value)
+ case .dictionary(let value):
+ try container.encode(value)
+ case .null:
+ try container.encodeNil()
+ }
+ }
+}
+
+extension JSONValue {
+ public init(_ value: String) {
+ self = .string(value)
+ }
+
+ public init(_ value: Int) {
+ self = .int(value)
+ }
+
+ public init(_ value: Double) {
+ self = .double(value)
+ }
+
+ public init(_ value: Bool) {
+ self = .bool(value)
+ }
+
+ public init(_ value: [JSONValue]) {
+ self = .array(value)
+ }
+
+ public init(_ value: [String: JSONValue]) {
+ self = .dictionary(value)
+ }
+
+ public init(_ codable: T) throws {
+ let encoder = JSONEncoder()
+ let encodedData = try encoder.encode(codable)
+ let decoder = JSONDecoder()
+
+ let decodedValue = try decoder.decode(JSONValue.self, from: encodedData)
+ self = decodedValue
+ }
+}
+
+extension JSONValue {
+ public var isString: Bool {
+ if case .string = self { return true }
+ return false
+ }
+
+ public var isInt: Bool {
+ if case .int = self { return true }
+ return false
+ }
+
+ public var isDouble: Bool {
+ if case .double = self { return true }
+ return false
+ }
+
+ public var isBool: Bool {
+ if case .bool = self { return true }
+ return false
+ }
+
+ public var isArray: Bool {
+ if case .array = self { return true }
+ return false
+ }
+
+ public var isDictionary: Bool {
+ if case .dictionary = self { return true }
+ return false
+ }
+
+ public var isNull: Bool {
+ return self == .null
+ }
+
+}
+
+extension JSONValue {
+ public var stringValue: String? {
+ switch self {
+ case .string(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var intValue: Int? {
+ switch self {
+ case .int(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var doubleValue: Double? {
+ switch self {
+ case .double(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var boolValue: Bool? {
+ switch self {
+ case .bool(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var arrayValue: [JSONValue]? {
+ if case let .array(value) = self {
+ return value
+ }
+ return nil
+ }
+
+ public var dictionaryValue: [String: JSONValue]? {
+ if case let .dictionary(value) = self {
+ return value
+ }
+ return nil
+ }
+}
+
+extension JSONValue {
+ public subscript(key: String) -> JSONValue? {
+ return dictionaryValue?[key]
+ }
+
+ public subscript(index: Int) -> JSONValue? {
+ guard case let .array(array) = self, index >= 0 && index < array.count else {
+ return nil
+ }
+ return array[index]
+ }
+}
+
+extension JSONValue: ExpressibleByStringLiteral, ExpressibleByStringInterpolation {
+ public init(stringLiteral value: StringLiteralType) {
+ self = .string(value)
+ }
+}
+
+extension JSONValue: ExpressibleByIntegerLiteral {
+ public init(integerLiteral value: IntegerLiteralType) {
+ self = .int(value)
+ }
+}
+
+extension JSONValue: ExpressibleByFloatLiteral {
+ public init(floatLiteral value: FloatLiteralType) {
+ self = .double(value)
+ }
+}
+
+
+extension JSONValue: ExpressibleByBooleanLiteral {
+ public init(booleanLiteral value: BooleanLiteralType) {
+ self = .bool(value)
+ }
+}
+
+extension JSONValue: ExpressibleByArrayLiteral {
+ public init(arrayLiteral elements: JSONValue...) {
+ self = .array(elements)
+ }
+}
+
+extension JSONValue: ExpressibleByDictionaryLiteral {
+ public init(dictionaryLiteral elements: (String, JSONValue)...) {
+ var dict: [String: JSONValue] = [:]
+ for (key, value) in elements {
+ dict[key] = value
+ }
+ self = .dictionary(dict)
+ }
+}
+
+extension JSONValue: ExpressibleByNilLiteral {
+ public init(nilLiteral: ()) {
+ self = .null
+ }
+}
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesAnyType.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesAnyType.swift
index 71141047347..d881561a121 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesAnyType.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesAnyType.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct AdditionalPropertiesAnyType: Codable, JSONEncodable, Hashable {
@@ -22,9 +19,9 @@ public struct AdditionalPropertiesAnyType: Codable, JSONEncodable, Hashable {
case name
}
- public var additionalProperties: [String: AnyCodable] = [:]
+ public var additionalProperties: [String: JSONValue] = [:]
- public subscript(key: String) -> AnyCodable? {
+ public subscript(key: String) -> JSONValue? {
get {
if let value = additionalProperties[key] {
return value
@@ -55,7 +52,7 @@ public struct AdditionalPropertiesAnyType: Codable, JSONEncodable, Hashable {
var nonAdditionalPropertyKeys = Set()
nonAdditionalPropertyKeys.insert("name")
let additionalPropertiesContainer = try decoder.container(keyedBy: String.self)
- additionalProperties = try additionalPropertiesContainer.decodeMap(AnyCodable.self, excludedKeys: nonAdditionalPropertyKeys)
+ additionalProperties = try additionalPropertiesContainer.decodeMap(JSONValue.self, excludedKeys: nonAdditionalPropertyKeys)
}
}
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesArray.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesArray.swift
index e6b88a3f1d2..df1563ac175 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesArray.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesArray.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct AdditionalPropertiesArray: Codable, JSONEncodable, Hashable {
@@ -22,9 +19,9 @@ public struct AdditionalPropertiesArray: Codable, JSONEncodable, Hashable {
case name
}
- public var additionalProperties: [String: [AnyCodable]] = [:]
+ public var additionalProperties: [String: [JSONValue]] = [:]
- public subscript(key: String) -> [AnyCodable]? {
+ public subscript(key: String) -> [JSONValue]? {
get {
if let value = additionalProperties[key] {
return value
@@ -55,7 +52,7 @@ public struct AdditionalPropertiesArray: Codable, JSONEncodable, Hashable {
var nonAdditionalPropertyKeys = Set()
nonAdditionalPropertyKeys.insert("name")
let additionalPropertiesContainer = try decoder.container(keyedBy: String.self)
- additionalProperties = try additionalPropertiesContainer.decodeMap([AnyCodable].self, excludedKeys: nonAdditionalPropertyKeys)
+ additionalProperties = try additionalPropertiesContainer.decodeMap([JSONValue].self, excludedKeys: nonAdditionalPropertyKeys)
}
}
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesBoolean.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesBoolean.swift
index a8b5930bdf2..169fb23f0c5 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesBoolean.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesBoolean.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct AdditionalPropertiesBoolean: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
index 674eec97cc4..a1b72c5666c 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct AdditionalPropertiesClass: Codable, JSONEncodable, Hashable {
@@ -17,14 +14,14 @@ public struct AdditionalPropertiesClass: Codable, JSONEncodable, Hashable {
public var mapInteger: [String: Int]?
public var mapBoolean: [String: Bool]?
public var mapArrayInteger: [String: [Int]]?
- public var mapArrayAnytype: [String: [AnyCodable]]?
+ public var mapArrayAnytype: [String: [JSONValue]]?
public var mapMapString: [String: [String: String]]?
- public var mapMapAnytype: [String: [String: AnyCodable]]?
- public var anytype1: AnyCodable?
- public var anytype2: AnyCodable?
- public var anytype3: AnyCodable?
+ public var mapMapAnytype: [String: [String: JSONValue]]?
+ public var anytype1: JSONValue?
+ public var anytype2: JSONValue?
+ public var anytype3: JSONValue?
- public init(mapString: [String: String]? = nil, mapNumber: [String: Double]? = nil, mapInteger: [String: Int]? = nil, mapBoolean: [String: Bool]? = nil, mapArrayInteger: [String: [Int]]? = nil, mapArrayAnytype: [String: [AnyCodable]]? = nil, mapMapString: [String: [String: String]]? = nil, mapMapAnytype: [String: [String: AnyCodable]]? = nil, anytype1: AnyCodable? = nil, anytype2: AnyCodable? = nil, anytype3: AnyCodable? = nil) {
+ public init(mapString: [String: String]? = nil, mapNumber: [String: Double]? = nil, mapInteger: [String: Int]? = nil, mapBoolean: [String: Bool]? = nil, mapArrayInteger: [String: [Int]]? = nil, mapArrayAnytype: [String: [JSONValue]]? = nil, mapMapString: [String: [String: String]]? = nil, mapMapAnytype: [String: [String: JSONValue]]? = nil, anytype1: JSONValue? = nil, anytype2: JSONValue? = nil, anytype3: JSONValue? = nil) {
self.mapString = mapString
self.mapNumber = mapNumber
self.mapInteger = mapInteger
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesInteger.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesInteger.swift
index a6661e776dd..30e4bcaf8d9 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesInteger.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesInteger.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct AdditionalPropertiesInteger: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesNumber.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesNumber.swift
index 676c6e7838d..22674493ca2 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesNumber.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesNumber.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct AdditionalPropertiesNumber: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesObject.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesObject.swift
index 7480c9a65b5..9516ae2c50f 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesObject.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesObject.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct AdditionalPropertiesObject: Codable, JSONEncodable, Hashable {
@@ -22,9 +19,9 @@ public struct AdditionalPropertiesObject: Codable, JSONEncodable, Hashable {
case name
}
- public var additionalProperties: [String: [String: AnyCodable]] = [:]
+ public var additionalProperties: [String: [String: JSONValue]] = [:]
- public subscript(key: String) -> [String: AnyCodable]? {
+ public subscript(key: String) -> [String: JSONValue]? {
get {
if let value = additionalProperties[key] {
return value
@@ -55,7 +52,7 @@ public struct AdditionalPropertiesObject: Codable, JSONEncodable, Hashable {
var nonAdditionalPropertyKeys = Set()
nonAdditionalPropertyKeys.insert("name")
let additionalPropertiesContainer = try decoder.container(keyedBy: String.self)
- additionalProperties = try additionalPropertiesContainer.decodeMap([String: AnyCodable].self, excludedKeys: nonAdditionalPropertyKeys)
+ additionalProperties = try additionalPropertiesContainer.decodeMap([String: JSONValue].self, excludedKeys: nonAdditionalPropertyKeys)
}
}
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesString.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesString.swift
index 3f35bbf770c..b5b1de65dc1 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesString.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesString.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct AdditionalPropertiesString: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
index a6882d6517f..bd2a1497826 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Animal: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
index a0b09cb9761..e09b0e9efdc 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
@@ -6,8 +6,5 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public typealias AnimalFarm = [Animal]
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
index 1890fcf9fde..73fe465dd3a 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ApiResponse: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
index eabae42d3bf..3d5d396bed6 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayOfArrayOfNumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
index fa93d7c6c74..852a4aec20f 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayOfNumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
index c99f82be9b9..db34d97ad45 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/BigCat.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/BigCat.swift
index 6a01769ede3..761d956f7c7 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/BigCat.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/BigCat.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct BigCat: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
index f8a3f64e2ee..06db3d32532 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Capitalization: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
index 253bbd7c04c..6482fd35203 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Cat: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
index 80ac2aeaf8b..ec1d7c4b830 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Category: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
index a0419d54f15..80d668f552a 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model with \"_class\" property */
public struct ClassModel: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
index 21a539ba010..c0c6b9fa08b 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Client: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
index dc3bb465a5f..7f4b9a07734 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Dog: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
index e06009060c5..b0cb7c1f1a2 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct EnumArrays: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
index 6ea2895aee5..d4029d73f8a 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public enum EnumClass: String, Codable, CaseIterable {
case abc = "_abc"
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
index 3a9edb08ea7..9fd69055c22 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct EnumTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift
index 1378b4f9b20..ea9eeee4ebf 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Must be named `File` for test. */
public struct File: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
index f9a39d2e58e..06e832913eb 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct FileSchemaTestClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
index 48248f47cf3..7e3ab124744 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct FormatTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
index 9e2fe8cc87f..44c08e6b687 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct HasOnlyReadOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift
index b9a06034e01..ac7196fc74f 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct List: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
index c4792800425..8a4a31082a3 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct MapTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
index c15921ae6c7..9902fafee1c 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
index d5ab7e422f2..0995be822bb 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model name starting with number */
public struct Model200Response: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
index a4ba4255e0c..9882c9a086c 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model name same as property name */
public struct Name: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
index 10fd059c856..82d8fb6fb63 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct NumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
index 818233c5fce..76d28449c05 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Order: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
index 99568c8facf..7fe71526624 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct OuterComposite: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
index a1981c09f18..f51a1790130 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public enum OuterEnum: String, Codable, CaseIterable {
case placed = "placed"
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
index 394619c072c..c6c1749be33 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Pet: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
index 05cf40bedd3..2c99cab3568 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ReadOnlyFirst: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
index 9429b341fa9..2f9230fd652 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing reserved words */
public struct Return: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
index 543f1fa5ad4..21ac694c2c0 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct SpecialModelName: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
index 548b82c049e..ca657eb0db9 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct StringBooleanMap: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
index f2dea74b09d..504343ba7de 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Tag: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
index 9a7d7e6c8e6..ef8000720d8 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct TypeHolderDefault: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
index 1a37683324d..d99b7222dfa 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct TypeHolderExample: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift
index e55b50dc4f7..5e10d6165ea 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct User: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/XmlItem.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/XmlItem.swift
index 84b13d99b5f..cc1240e1597 100644
--- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/XmlItem.swift
+++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/Models/XmlItem.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct XmlItem: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/default/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved b/samples/client/petstore/swift6/default/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
deleted file mode 100644
index 03613dc681d..00000000000
--- a/samples/client/petstore/swift6/default/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "originHash" : "d5919dc82f97fd3c9a6e6c48a59960902c9b17904f5461a66b7bc540833bfea1",
- "pins" : [
- {
- "identity" : "anycodable",
- "kind" : "remoteSourceControl",
- "location" : "https://github.com/Flight-School/AnyCodable",
- "state" : {
- "revision" : "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version" : "0.6.7"
- }
- }
- ],
- "version" : 3
-}
diff --git a/samples/client/petstore/swift6/default/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift6/default/docs/AdditionalPropertiesClass.md
index 4d5f0963145..62baaf997b7 100644
--- a/samples/client/petstore/swift6/default/docs/AdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift6/default/docs/AdditionalPropertiesClass.md
@@ -8,12 +8,12 @@ Name | Type | Description | Notes
**mapInteger** | **[String: Int]** | | [optional]
**mapBoolean** | **[String: Bool]** | | [optional]
**mapArrayInteger** | [String: [Int]] | | [optional]
-**mapArrayAnytype** | [String: [AnyCodable]] | | [optional]
+**mapArrayAnytype** | [String: [JSONValue]] | | [optional]
**mapMapString** | [String: [String: String]] | | [optional]
-**mapMapAnytype** | [String: [String: AnyCodable]] | | [optional]
-**anytype1** | **AnyCodable** | | [optional]
-**anytype2** | **AnyCodable** | | [optional]
-**anytype3** | **AnyCodable** | | [optional]
+**mapMapAnytype** | [String: [String: JSONValue]] | | [optional]
+**anytype1** | **JSONValue** | | [optional]
+**anytype2** | **JSONValue** | | [optional]
+**anytype3** | **JSONValue** | | [optional]
[[Back to Model list]](../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/swift6/default/project.yml b/samples/client/petstore/swift6/default/project.yml
index 876aca81692..92ad41fa08d 100644
--- a/samples/client/petstore/swift6/default/project.yml
+++ b/samples/client/petstore/swift6/default/project.yml
@@ -12,4 +12,3 @@ targets:
APPLICATION_EXTENSION_API_ONLY: true
scheme: {}
dependencies:
- - carthage: AnyCodable
diff --git a/samples/client/petstore/swift6/objcCompatible/.openapi-generator/FILES b/samples/client/petstore/swift6/objcCompatible/.openapi-generator/FILES
index c22bc8bf861..c0b110d1118 100644
--- a/samples/client/petstore/swift6/objcCompatible/.openapi-generator/FILES
+++ b/samples/client/petstore/swift6/objcCompatible/.openapi-generator/FILES
@@ -15,6 +15,7 @@ PetstoreClient/Classes/OpenAPIs/CodableHelper.swift
PetstoreClient/Classes/OpenAPIs/Extensions.swift
PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift
PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift
+PetstoreClient/Classes/OpenAPIs/JSONValue.swift
PetstoreClient/Classes/OpenAPIs/Models.swift
PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
diff --git a/samples/client/petstore/swift6/objcCompatible/Cartfile b/samples/client/petstore/swift6/objcCompatible/Cartfile
index 92bac174543..8b137891791 100644
--- a/samples/client/petstore/swift6/objcCompatible/Cartfile
+++ b/samples/client/petstore/swift6/objcCompatible/Cartfile
@@ -1 +1 @@
-github "Flight-School/AnyCodable" ~> 0.6
+
diff --git a/samples/client/petstore/swift6/objcCompatible/Package.resolved b/samples/client/petstore/swift6/objcCompatible/Package.resolved
deleted file mode 100644
index 03613dc681d..00000000000
--- a/samples/client/petstore/swift6/objcCompatible/Package.resolved
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "originHash" : "d5919dc82f97fd3c9a6e6c48a59960902c9b17904f5461a66b7bc540833bfea1",
- "pins" : [
- {
- "identity" : "anycodable",
- "kind" : "remoteSourceControl",
- "location" : "https://github.com/Flight-School/AnyCodable",
- "state" : {
- "revision" : "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version" : "0.6.7"
- }
- }
- ],
- "version" : 3
-}
diff --git a/samples/client/petstore/swift6/objcCompatible/Package.swift b/samples/client/petstore/swift6/objcCompatible/Package.swift
index 78d5f91e0f2..dc5bc46564c 100644
--- a/samples/client/petstore/swift6/objcCompatible/Package.swift
+++ b/samples/client/petstore/swift6/objcCompatible/Package.swift
@@ -19,14 +19,13 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
- .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.7")),
],
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", ],
+ dependencies: [],
path: "PetstoreClient/Classes"
),
],
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient.podspec b/samples/client/petstore/swift6/objcCompatible/PetstoreClient.podspec
index 7fdbd7246c5..d5b8cefeffa 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient.podspec
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient.podspec
@@ -11,5 +11,4 @@ Pod::Spec.new do |s|
s.homepage = 'https://github.com/openapitools/openapi-generator'
s.summary = 'PetstoreClient'
s.source_files = 'PetstoreClient/Classes/**/*.swift'
- s.dependency 'AnyCodable-FlightSchool', '~> 0.6'
end
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
index 45268eb734d..89621e7ff0e 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers open class AnotherFakeAPI : NSObject {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
index da7e8c5d447..5fd0ac8bd7c 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers open class FakeAPI : NSObject {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
index 7ac1aef1816..72ac07963f8 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers open class FakeClassnameTags123API : NSObject {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
index 9ffa65a9d7d..a8be265073b 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers open class PetAPI : NSObject {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
index 5ac762544ce..d09b05e6e73 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers open class StoreAPI : NSObject {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
index f524b73a35b..57fcc2212a0 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers open class UserAPI : NSObject {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift
index 00d6e4ac90f..b4341b60870 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift
@@ -8,9 +8,6 @@ import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
extension Bool: JSONEncodable {
func encodeToJSON(codableHelper: CodableHelper) -> Any { self }
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONValue.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
new file mode 100644
index 00000000000..85d66ad6abf
--- /dev/null
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
@@ -0,0 +1,247 @@
+//
+// JSONValue.swift
+//
+// Generated by openapi-generator
+// https://openapi-generator.tech
+//
+
+import Foundation
+
+public enum JSONValue: Codable, Hashable {
+ case string(String)
+ case int(Int)
+ case double(Double)
+ case bool(Bool)
+ case array([JSONValue])
+ case dictionary([String: JSONValue])
+ case null
+
+ // MARK: - Decoding Logic
+ public init(from decoder: Decoder) throws {
+ let container = try decoder.singleValueContainer()
+
+ if let stringValue = try? container.decode(String.self) {
+ self = .string(stringValue)
+ } else if let intValue = try? container.decode(Int.self) {
+ self = .int(intValue)
+ } else if let doubleValue = try? container.decode(Double.self) {
+ self = .double(doubleValue)
+ } else if let boolValue = try? container.decode(Bool.self) {
+ self = .bool(boolValue)
+ } else if let arrayValue = try? container.decode([JSONValue].self) {
+ self = .array(arrayValue)
+ } else if let dictionaryValue = try? container.decode([String: JSONValue].self) {
+ self = .dictionary(dictionaryValue)
+ } else if container.decodeNil() {
+ self = .null
+ } else {
+ throw DecodingError.dataCorruptedError(in: container, debugDescription: "Unknown JSON value")
+ }
+ }
+
+ // MARK: - Encoding Logic
+ public func encode(to encoder: Encoder) throws {
+ var container = encoder.singleValueContainer()
+
+ switch self {
+ case .string(let value):
+ try container.encode(value)
+ case .int(let value):
+ try container.encode(value)
+ case .double(let value):
+ try container.encode(value)
+ case .bool(let value):
+ try container.encode(value)
+ case .array(let value):
+ try container.encode(value)
+ case .dictionary(let value):
+ try container.encode(value)
+ case .null:
+ try container.encodeNil()
+ }
+ }
+}
+
+extension JSONValue {
+ public init(_ value: String) {
+ self = .string(value)
+ }
+
+ public init(_ value: Int) {
+ self = .int(value)
+ }
+
+ public init(_ value: Double) {
+ self = .double(value)
+ }
+
+ public init(_ value: Bool) {
+ self = .bool(value)
+ }
+
+ public init(_ value: [JSONValue]) {
+ self = .array(value)
+ }
+
+ public init(_ value: [String: JSONValue]) {
+ self = .dictionary(value)
+ }
+
+ public init(_ codable: T) throws {
+ let encoder = JSONEncoder()
+ let encodedData = try encoder.encode(codable)
+ let decoder = JSONDecoder()
+
+ let decodedValue = try decoder.decode(JSONValue.self, from: encodedData)
+ self = decodedValue
+ }
+}
+
+extension JSONValue {
+ public var isString: Bool {
+ if case .string = self { return true }
+ return false
+ }
+
+ public var isInt: Bool {
+ if case .int = self { return true }
+ return false
+ }
+
+ public var isDouble: Bool {
+ if case .double = self { return true }
+ return false
+ }
+
+ public var isBool: Bool {
+ if case .bool = self { return true }
+ return false
+ }
+
+ public var isArray: Bool {
+ if case .array = self { return true }
+ return false
+ }
+
+ public var isDictionary: Bool {
+ if case .dictionary = self { return true }
+ return false
+ }
+
+ public var isNull: Bool {
+ return self == .null
+ }
+
+}
+
+extension JSONValue {
+ public var stringValue: String? {
+ switch self {
+ case .string(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var intValue: Int? {
+ switch self {
+ case .int(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var doubleValue: Double? {
+ switch self {
+ case .double(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var boolValue: Bool? {
+ switch self {
+ case .bool(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var arrayValue: [JSONValue]? {
+ if case let .array(value) = self {
+ return value
+ }
+ return nil
+ }
+
+ public var dictionaryValue: [String: JSONValue]? {
+ if case let .dictionary(value) = self {
+ return value
+ }
+ return nil
+ }
+}
+
+extension JSONValue {
+ public subscript(key: String) -> JSONValue? {
+ return dictionaryValue?[key]
+ }
+
+ public subscript(index: Int) -> JSONValue? {
+ guard case let .array(array) = self, index >= 0 && index < array.count else {
+ return nil
+ }
+ return array[index]
+ }
+}
+
+extension JSONValue: ExpressibleByStringLiteral, ExpressibleByStringInterpolation {
+ public init(stringLiteral value: StringLiteralType) {
+ self = .string(value)
+ }
+}
+
+extension JSONValue: ExpressibleByIntegerLiteral {
+ public init(integerLiteral value: IntegerLiteralType) {
+ self = .int(value)
+ }
+}
+
+extension JSONValue: ExpressibleByFloatLiteral {
+ public init(floatLiteral value: FloatLiteralType) {
+ self = .double(value)
+ }
+}
+
+
+extension JSONValue: ExpressibleByBooleanLiteral {
+ public init(booleanLiteral value: BooleanLiteralType) {
+ self = .bool(value)
+ }
+}
+
+extension JSONValue: ExpressibleByArrayLiteral {
+ public init(arrayLiteral elements: JSONValue...) {
+ self = .array(elements)
+ }
+}
+
+extension JSONValue: ExpressibleByDictionaryLiteral {
+ public init(dictionaryLiteral elements: (String, JSONValue)...) {
+ var dict: [String: JSONValue] = [:]
+ for (key, value) in elements {
+ dict[key] = value
+ }
+ self = .dictionary(dict)
+ }
+}
+
+extension JSONValue: ExpressibleByNilLiteral {
+ public init(nilLiteral: ()) {
+ self = .null
+ }
+}
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
index 1024ef9b5ef..d50a1098405 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class AdditionalPropertiesClass: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
index 9cd0bf45021..5bff0271e9b 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class Animal: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
index a0b09cb9761..e09b0e9efdc 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
@@ -6,8 +6,5 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public typealias AnimalFarm = [Animal]
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
index 9f50e68baf3..cd172879d9b 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class ApiResponse: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
index 8ca663e28c2..ea461061000 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class ArrayOfArrayOfNumberOnly: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
index fdc9ad97f89..c2699042a25 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class ArrayOfNumberOnly: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
index 7b7fa5d460f..9ec08c49104 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class ArrayTest: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
index 777182be04d..8790368ff14 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class Capitalization: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
index b7fb98e69cd..762473a58f3 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class Cat: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
index 520c9fd39ea..5c70f7f2231 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class Category: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
index 87195217149..ad360b79279 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model with \"_class\" property */
@objcMembers public class ClassModel: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
index 22020ebe3b9..46bb6353395 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class Client: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
index b7af9cb9fb6..049b33f251b 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class Dog: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
index 743ec00c8b7..bcd4fee4034 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class EnumArrays: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
index 6ea2895aee5..d4029d73f8a 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public enum EnumClass: String, Codable, CaseIterable {
case abc = "_abc"
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
index f6c43aeb5a8..60815e083f0 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class EnumTest: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift
index 72b8114bc4d..c04390551de 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Must be named `File` for test. */
@objcMembers public class File: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
index 09878a41b5f..7c959dec0af 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class FileSchemaTestClass: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
index 0e1f9058cb3..b8e49bf4478 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class FormatTest: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
index aa4b375566e..6f77912ffd7 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class HasOnlyReadOnly: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift
index 1ba9601bea2..24d35593da8 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class List: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
index 3539ece4a59..9fd814c8783 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class MapTest: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
index 243df96b017..a72e234c4f5 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class MixedPropertiesAndAdditionalPropertiesClass: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
index 93a2a994293..4eb5580876d 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model name starting with number */
@objcMembers public class Model200Response: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
index fc167f18228..1e6508489c1 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model name same as property name */
@objcMembers public class Name: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
index 23c4df1a074..30fd8c4bf7a 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class NumberOnly: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
index 509572ecc4e..9e573c1ad06 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class Order: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
index 6a713ae467d..ae0e069c09b 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class OuterComposite: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
index 76c34b3c2ce..c3b778cbbed 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public enum OuterEnum: String, Codable, CaseIterable {
case placed = "placed"
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
index d1f400f2cb3..8b147562e2f 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class Pet: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
index 44784c908e9..baca695f586 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class ReadOnlyFirst: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
index fafbde1becd..46ca1bb6cf4 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing reserved words */
@objcMembers public class Return: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
index e605357d227..e2edd5a86a4 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class SpecialModelName: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
index a0aef250585..d840e30d767 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class StringBooleanMap: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
index 772d9a110ae..20db10fe34d 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class Tag: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
index cf2ecb33847..cf70b1888bc 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class TypeHolderDefault: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
index 954ae45779b..544bf61e10e 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class TypeHolderExample: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift
index b8e17773a39..30c92e4b9b8 100644
--- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift
+++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@objcMembers public class User: NSObject, Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/objcCompatible/project.yml b/samples/client/petstore/swift6/objcCompatible/project.yml
index 876aca81692..92ad41fa08d 100644
--- a/samples/client/petstore/swift6/objcCompatible/project.yml
+++ b/samples/client/petstore/swift6/objcCompatible/project.yml
@@ -12,4 +12,3 @@ targets:
APPLICATION_EXTENSION_API_ONLY: true
scheme: {}
dependencies:
- - carthage: AnyCodable
diff --git a/samples/client/petstore/swift6/oneOf/.openapi-generator/FILES b/samples/client/petstore/swift6/oneOf/.openapi-generator/FILES
index 4b50a447abd..fb95f33e854 100644
--- a/samples/client/petstore/swift6/oneOf/.openapi-generator/FILES
+++ b/samples/client/petstore/swift6/oneOf/.openapi-generator/FILES
@@ -10,6 +10,7 @@ PetstoreClient/Classes/OpenAPIs/CodableHelper.swift
PetstoreClient/Classes/OpenAPIs/Extensions.swift
PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift
PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift
+PetstoreClient/Classes/OpenAPIs/JSONValue.swift
PetstoreClient/Classes/OpenAPIs/Models.swift
PetstoreClient/Classes/OpenAPIs/Models/Apple.swift
PetstoreClient/Classes/OpenAPIs/Models/Banana.swift
diff --git a/samples/client/petstore/swift6/oneOf/Cartfile b/samples/client/petstore/swift6/oneOf/Cartfile
index 92bac174543..8b137891791 100644
--- a/samples/client/petstore/swift6/oneOf/Cartfile
+++ b/samples/client/petstore/swift6/oneOf/Cartfile
@@ -1 +1 @@
-github "Flight-School/AnyCodable" ~> 0.6
+
diff --git a/samples/client/petstore/swift6/oneOf/Package.resolved b/samples/client/petstore/swift6/oneOf/Package.resolved
deleted file mode 100644
index 03613dc681d..00000000000
--- a/samples/client/petstore/swift6/oneOf/Package.resolved
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "originHash" : "d5919dc82f97fd3c9a6e6c48a59960902c9b17904f5461a66b7bc540833bfea1",
- "pins" : [
- {
- "identity" : "anycodable",
- "kind" : "remoteSourceControl",
- "location" : "https://github.com/Flight-School/AnyCodable",
- "state" : {
- "revision" : "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version" : "0.6.7"
- }
- }
- ],
- "version" : 3
-}
diff --git a/samples/client/petstore/swift6/oneOf/Package.swift b/samples/client/petstore/swift6/oneOf/Package.swift
index 78d5f91e0f2..dc5bc46564c 100644
--- a/samples/client/petstore/swift6/oneOf/Package.swift
+++ b/samples/client/petstore/swift6/oneOf/Package.swift
@@ -19,14 +19,13 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
- .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.7")),
],
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", ],
+ dependencies: [],
path: "PetstoreClient/Classes"
),
],
diff --git a/samples/client/petstore/swift6/oneOf/PetstoreClient.podspec b/samples/client/petstore/swift6/oneOf/PetstoreClient.podspec
index 8bbe76b43d5..2dec3a8ecf9 100644
--- a/samples/client/petstore/swift6/oneOf/PetstoreClient.podspec
+++ b/samples/client/petstore/swift6/oneOf/PetstoreClient.podspec
@@ -11,5 +11,4 @@ Pod::Spec.new do |s|
s.homepage = 'https://github.com/openapitools/openapi-generator'
s.summary = 'PetstoreClient'
s.source_files = 'PetstoreClient/Classes/**/*.swift'
- s.dependency 'AnyCodable-FlightSchool', '~> 0.6'
end
diff --git a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/APIs/DefaultAPI.swift b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/APIs/DefaultAPI.swift
index 5aeb5ba6a12..0e58f588924 100644
--- a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/APIs/DefaultAPI.swift
+++ b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/APIs/DefaultAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class DefaultAPI {
diff --git a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift
index 00d6e4ac90f..b4341b60870 100644
--- a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift
+++ b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift
@@ -8,9 +8,6 @@ import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
extension Bool: JSONEncodable {
func encodeToJSON(codableHelper: CodableHelper) -> Any { self }
diff --git a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/JSONValue.swift b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
new file mode 100644
index 00000000000..85d66ad6abf
--- /dev/null
+++ b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
@@ -0,0 +1,247 @@
+//
+// JSONValue.swift
+//
+// Generated by openapi-generator
+// https://openapi-generator.tech
+//
+
+import Foundation
+
+public enum JSONValue: Codable, Hashable {
+ case string(String)
+ case int(Int)
+ case double(Double)
+ case bool(Bool)
+ case array([JSONValue])
+ case dictionary([String: JSONValue])
+ case null
+
+ // MARK: - Decoding Logic
+ public init(from decoder: Decoder) throws {
+ let container = try decoder.singleValueContainer()
+
+ if let stringValue = try? container.decode(String.self) {
+ self = .string(stringValue)
+ } else if let intValue = try? container.decode(Int.self) {
+ self = .int(intValue)
+ } else if let doubleValue = try? container.decode(Double.self) {
+ self = .double(doubleValue)
+ } else if let boolValue = try? container.decode(Bool.self) {
+ self = .bool(boolValue)
+ } else if let arrayValue = try? container.decode([JSONValue].self) {
+ self = .array(arrayValue)
+ } else if let dictionaryValue = try? container.decode([String: JSONValue].self) {
+ self = .dictionary(dictionaryValue)
+ } else if container.decodeNil() {
+ self = .null
+ } else {
+ throw DecodingError.dataCorruptedError(in: container, debugDescription: "Unknown JSON value")
+ }
+ }
+
+ // MARK: - Encoding Logic
+ public func encode(to encoder: Encoder) throws {
+ var container = encoder.singleValueContainer()
+
+ switch self {
+ case .string(let value):
+ try container.encode(value)
+ case .int(let value):
+ try container.encode(value)
+ case .double(let value):
+ try container.encode(value)
+ case .bool(let value):
+ try container.encode(value)
+ case .array(let value):
+ try container.encode(value)
+ case .dictionary(let value):
+ try container.encode(value)
+ case .null:
+ try container.encodeNil()
+ }
+ }
+}
+
+extension JSONValue {
+ public init(_ value: String) {
+ self = .string(value)
+ }
+
+ public init(_ value: Int) {
+ self = .int(value)
+ }
+
+ public init(_ value: Double) {
+ self = .double(value)
+ }
+
+ public init(_ value: Bool) {
+ self = .bool(value)
+ }
+
+ public init(_ value: [JSONValue]) {
+ self = .array(value)
+ }
+
+ public init(_ value: [String: JSONValue]) {
+ self = .dictionary(value)
+ }
+
+ public init(_ codable: T) throws {
+ let encoder = JSONEncoder()
+ let encodedData = try encoder.encode(codable)
+ let decoder = JSONDecoder()
+
+ let decodedValue = try decoder.decode(JSONValue.self, from: encodedData)
+ self = decodedValue
+ }
+}
+
+extension JSONValue {
+ public var isString: Bool {
+ if case .string = self { return true }
+ return false
+ }
+
+ public var isInt: Bool {
+ if case .int = self { return true }
+ return false
+ }
+
+ public var isDouble: Bool {
+ if case .double = self { return true }
+ return false
+ }
+
+ public var isBool: Bool {
+ if case .bool = self { return true }
+ return false
+ }
+
+ public var isArray: Bool {
+ if case .array = self { return true }
+ return false
+ }
+
+ public var isDictionary: Bool {
+ if case .dictionary = self { return true }
+ return false
+ }
+
+ public var isNull: Bool {
+ return self == .null
+ }
+
+}
+
+extension JSONValue {
+ public var stringValue: String? {
+ switch self {
+ case .string(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var intValue: Int? {
+ switch self {
+ case .int(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var doubleValue: Double? {
+ switch self {
+ case .double(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var boolValue: Bool? {
+ switch self {
+ case .bool(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var arrayValue: [JSONValue]? {
+ if case let .array(value) = self {
+ return value
+ }
+ return nil
+ }
+
+ public var dictionaryValue: [String: JSONValue]? {
+ if case let .dictionary(value) = self {
+ return value
+ }
+ return nil
+ }
+}
+
+extension JSONValue {
+ public subscript(key: String) -> JSONValue? {
+ return dictionaryValue?[key]
+ }
+
+ public subscript(index: Int) -> JSONValue? {
+ guard case let .array(array) = self, index >= 0 && index < array.count else {
+ return nil
+ }
+ return array[index]
+ }
+}
+
+extension JSONValue: ExpressibleByStringLiteral, ExpressibleByStringInterpolation {
+ public init(stringLiteral value: StringLiteralType) {
+ self = .string(value)
+ }
+}
+
+extension JSONValue: ExpressibleByIntegerLiteral {
+ public init(integerLiteral value: IntegerLiteralType) {
+ self = .int(value)
+ }
+}
+
+extension JSONValue: ExpressibleByFloatLiteral {
+ public init(floatLiteral value: FloatLiteralType) {
+ self = .double(value)
+ }
+}
+
+
+extension JSONValue: ExpressibleByBooleanLiteral {
+ public init(booleanLiteral value: BooleanLiteralType) {
+ self = .bool(value)
+ }
+}
+
+extension JSONValue: ExpressibleByArrayLiteral {
+ public init(arrayLiteral elements: JSONValue...) {
+ self = .array(elements)
+ }
+}
+
+extension JSONValue: ExpressibleByDictionaryLiteral {
+ public init(dictionaryLiteral elements: (String, JSONValue)...) {
+ var dict: [String: JSONValue] = [:]
+ for (key, value) in elements {
+ dict[key] = value
+ }
+ self = .dictionary(dict)
+ }
+}
+
+extension JSONValue: ExpressibleByNilLiteral {
+ public init(nilLiteral: ()) {
+ self = .null
+ }
+}
diff --git a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Apple.swift b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Apple.swift
index 897f9223084..d9105732a58 100644
--- a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Apple.swift
+++ b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Apple.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Apple: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Banana.swift b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Banana.swift
index 9173607e0b5..6a5741a96c2 100644
--- a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Banana.swift
+++ b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Banana.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Banana: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Fruit.swift b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Fruit.swift
index 76f10ba92e7..f74cb59062d 100644
--- a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Fruit.swift
+++ b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Models/Fruit.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public enum Fruit: Codable, JSONEncodable, Hashable {
case typeApple(Apple)
diff --git a/samples/client/petstore/swift6/oneOf/project.yml b/samples/client/petstore/swift6/oneOf/project.yml
index 2d5e58ca2ef..f5637330c96 100644
--- a/samples/client/petstore/swift6/oneOf/project.yml
+++ b/samples/client/petstore/swift6/oneOf/project.yml
@@ -12,4 +12,3 @@ targets:
APPLICATION_EXTENSION_API_ONLY: true
scheme: {}
dependencies:
- - carthage: AnyCodable
diff --git a/samples/client/petstore/swift6/promisekitLibrary/.openapi-generator/FILES b/samples/client/petstore/swift6/promisekitLibrary/.openapi-generator/FILES
index c22bc8bf861..c0b110d1118 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/.openapi-generator/FILES
+++ b/samples/client/petstore/swift6/promisekitLibrary/.openapi-generator/FILES
@@ -15,6 +15,7 @@ PetstoreClient/Classes/OpenAPIs/CodableHelper.swift
PetstoreClient/Classes/OpenAPIs/Extensions.swift
PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift
PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift
+PetstoreClient/Classes/OpenAPIs/JSONValue.swift
PetstoreClient/Classes/OpenAPIs/Models.swift
PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
diff --git a/samples/client/petstore/swift6/promisekitLibrary/Cartfile b/samples/client/petstore/swift6/promisekitLibrary/Cartfile
index cd478240257..21364a1934e 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/Cartfile
+++ b/samples/client/petstore/swift6/promisekitLibrary/Cartfile
@@ -1,2 +1,2 @@
-github "Flight-School/AnyCodable" ~> 0.6
+
github "mxcl/PromiseKit" ~> 8.1
diff --git a/samples/client/petstore/swift6/promisekitLibrary/Package.resolved b/samples/client/petstore/swift6/promisekitLibrary/Package.resolved
index f4224105a4a..aa4c8a082a9 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/Package.resolved
+++ b/samples/client/petstore/swift6/promisekitLibrary/Package.resolved
@@ -1,15 +1,6 @@
{
- "originHash" : "48faf8e7b544007b7b8b639e29704d9531ea5fdc227db7a2ddaee149d8c41e39",
+ "originHash" : "6fd6d6a686ec78068b932a1816e15c281f6491eaa381ec9f343d63363e2f0bd1",
"pins" : [
- {
- "identity" : "anycodable",
- "kind" : "remoteSourceControl",
- "location" : "https://github.com/Flight-School/AnyCodable",
- "state" : {
- "revision" : "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version" : "0.6.7"
- }
- },
{
"identity" : "promisekit",
"kind" : "remoteSourceControl",
diff --git a/samples/client/petstore/swift6/promisekitLibrary/Package.swift b/samples/client/petstore/swift6/promisekitLibrary/Package.swift
index 19025917d59..efc43e9be1d 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/Package.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/Package.swift
@@ -19,7 +19,6 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
- .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.7")),
.package(url: "https://github.com/mxcl/PromiseKit", .upToNextMajor(from: "8.1.2")),
],
targets: [
@@ -27,7 +26,7 @@ let package = Package(
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "PetstoreClient",
- dependencies: ["AnyCodable", "PromiseKit", ],
+ dependencies: ["PromiseKit", ],
path: "PetstoreClient/Classes"
),
],
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient.podspec b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient.podspec
index 23a5d0acfc7..fa038ff7ce5 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient.podspec
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient.podspec
@@ -11,6 +11,5 @@ Pod::Spec.new do |s|
s.homepage = 'https://github.com/openapitools/openapi-generator'
s.summary = 'PetstoreClient'
s.source_files = 'PetstoreClient/Classes/**/*.swift'
- s.dependency 'AnyCodable-FlightSchool', '~> 0.6'
s.dependency 'PromiseKit/CorePromise', '~> 8.1'
end
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
index 73f70decde3..867cf549aeb 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
@@ -7,9 +7,6 @@
import Foundation
@preconcurrency import PromiseKit
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class AnotherFakeAPI {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
index 5b93b45d530..6efc49692f5 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
@@ -7,9 +7,6 @@
import Foundation
@preconcurrency import PromiseKit
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class FakeAPI {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
index 036a48df1b2..800a6a93648 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
@@ -7,9 +7,6 @@
import Foundation
@preconcurrency import PromiseKit
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class FakeClassnameTags123API {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
index ecd79b343cf..f4996b843ba 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
@@ -7,9 +7,6 @@
import Foundation
@preconcurrency import PromiseKit
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class PetAPI {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
index f87f893e04d..6958614e4e5 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
@@ -7,9 +7,6 @@
import Foundation
@preconcurrency import PromiseKit
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class StoreAPI {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
index 63fc8dfcae9..ec6b1e72ec1 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
@@ -7,9 +7,6 @@
import Foundation
@preconcurrency import PromiseKit
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class UserAPI {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift
index 200d84ae5ba..695a1bc866f 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift
@@ -8,9 +8,6 @@ import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@preconcurrency import PromiseKit
extension Bool: JSONEncodable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
new file mode 100644
index 00000000000..85d66ad6abf
--- /dev/null
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
@@ -0,0 +1,247 @@
+//
+// JSONValue.swift
+//
+// Generated by openapi-generator
+// https://openapi-generator.tech
+//
+
+import Foundation
+
+public enum JSONValue: Codable, Hashable {
+ case string(String)
+ case int(Int)
+ case double(Double)
+ case bool(Bool)
+ case array([JSONValue])
+ case dictionary([String: JSONValue])
+ case null
+
+ // MARK: - Decoding Logic
+ public init(from decoder: Decoder) throws {
+ let container = try decoder.singleValueContainer()
+
+ if let stringValue = try? container.decode(String.self) {
+ self = .string(stringValue)
+ } else if let intValue = try? container.decode(Int.self) {
+ self = .int(intValue)
+ } else if let doubleValue = try? container.decode(Double.self) {
+ self = .double(doubleValue)
+ } else if let boolValue = try? container.decode(Bool.self) {
+ self = .bool(boolValue)
+ } else if let arrayValue = try? container.decode([JSONValue].self) {
+ self = .array(arrayValue)
+ } else if let dictionaryValue = try? container.decode([String: JSONValue].self) {
+ self = .dictionary(dictionaryValue)
+ } else if container.decodeNil() {
+ self = .null
+ } else {
+ throw DecodingError.dataCorruptedError(in: container, debugDescription: "Unknown JSON value")
+ }
+ }
+
+ // MARK: - Encoding Logic
+ public func encode(to encoder: Encoder) throws {
+ var container = encoder.singleValueContainer()
+
+ switch self {
+ case .string(let value):
+ try container.encode(value)
+ case .int(let value):
+ try container.encode(value)
+ case .double(let value):
+ try container.encode(value)
+ case .bool(let value):
+ try container.encode(value)
+ case .array(let value):
+ try container.encode(value)
+ case .dictionary(let value):
+ try container.encode(value)
+ case .null:
+ try container.encodeNil()
+ }
+ }
+}
+
+extension JSONValue {
+ public init(_ value: String) {
+ self = .string(value)
+ }
+
+ public init(_ value: Int) {
+ self = .int(value)
+ }
+
+ public init(_ value: Double) {
+ self = .double(value)
+ }
+
+ public init(_ value: Bool) {
+ self = .bool(value)
+ }
+
+ public init(_ value: [JSONValue]) {
+ self = .array(value)
+ }
+
+ public init(_ value: [String: JSONValue]) {
+ self = .dictionary(value)
+ }
+
+ public init(_ codable: T) throws {
+ let encoder = JSONEncoder()
+ let encodedData = try encoder.encode(codable)
+ let decoder = JSONDecoder()
+
+ let decodedValue = try decoder.decode(JSONValue.self, from: encodedData)
+ self = decodedValue
+ }
+}
+
+extension JSONValue {
+ public var isString: Bool {
+ if case .string = self { return true }
+ return false
+ }
+
+ public var isInt: Bool {
+ if case .int = self { return true }
+ return false
+ }
+
+ public var isDouble: Bool {
+ if case .double = self { return true }
+ return false
+ }
+
+ public var isBool: Bool {
+ if case .bool = self { return true }
+ return false
+ }
+
+ public var isArray: Bool {
+ if case .array = self { return true }
+ return false
+ }
+
+ public var isDictionary: Bool {
+ if case .dictionary = self { return true }
+ return false
+ }
+
+ public var isNull: Bool {
+ return self == .null
+ }
+
+}
+
+extension JSONValue {
+ public var stringValue: String? {
+ switch self {
+ case .string(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var intValue: Int? {
+ switch self {
+ case .int(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var doubleValue: Double? {
+ switch self {
+ case .double(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var boolValue: Bool? {
+ switch self {
+ case .bool(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var arrayValue: [JSONValue]? {
+ if case let .array(value) = self {
+ return value
+ }
+ return nil
+ }
+
+ public var dictionaryValue: [String: JSONValue]? {
+ if case let .dictionary(value) = self {
+ return value
+ }
+ return nil
+ }
+}
+
+extension JSONValue {
+ public subscript(key: String) -> JSONValue? {
+ return dictionaryValue?[key]
+ }
+
+ public subscript(index: Int) -> JSONValue? {
+ guard case let .array(array) = self, index >= 0 && index < array.count else {
+ return nil
+ }
+ return array[index]
+ }
+}
+
+extension JSONValue: ExpressibleByStringLiteral, ExpressibleByStringInterpolation {
+ public init(stringLiteral value: StringLiteralType) {
+ self = .string(value)
+ }
+}
+
+extension JSONValue: ExpressibleByIntegerLiteral {
+ public init(integerLiteral value: IntegerLiteralType) {
+ self = .int(value)
+ }
+}
+
+extension JSONValue: ExpressibleByFloatLiteral {
+ public init(floatLiteral value: FloatLiteralType) {
+ self = .double(value)
+ }
+}
+
+
+extension JSONValue: ExpressibleByBooleanLiteral {
+ public init(booleanLiteral value: BooleanLiteralType) {
+ self = .bool(value)
+ }
+}
+
+extension JSONValue: ExpressibleByArrayLiteral {
+ public init(arrayLiteral elements: JSONValue...) {
+ self = .array(elements)
+ }
+}
+
+extension JSONValue: ExpressibleByDictionaryLiteral {
+ public init(dictionaryLiteral elements: (String, JSONValue)...) {
+ var dict: [String: JSONValue] = [:]
+ for (key, value) in elements {
+ dict[key] = value
+ }
+ self = .dictionary(dict)
+ }
+}
+
+extension JSONValue: ExpressibleByNilLiteral {
+ public init(nilLiteral: ()) {
+ self = .null
+ }
+}
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
index 623c4c7fd2c..7b8408ce868 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct AdditionalPropertiesClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
index a6882d6517f..bd2a1497826 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Animal: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
index a0b09cb9761..e09b0e9efdc 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
@@ -6,8 +6,5 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public typealias AnimalFarm = [Animal]
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
index 1890fcf9fde..73fe465dd3a 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ApiResponse: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
index eabae42d3bf..3d5d396bed6 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayOfArrayOfNumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
index fa93d7c6c74..852a4aec20f 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayOfNumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
index c99f82be9b9..db34d97ad45 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
index f8a3f64e2ee..06db3d32532 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Capitalization: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
index 253bbd7c04c..6482fd35203 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Cat: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
index 75b68ec01e2..550c78345bb 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Category: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
index a0419d54f15..80d668f552a 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model with \"_class\" property */
public struct ClassModel: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
index 21a539ba010..c0c6b9fa08b 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Client: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
index dc3bb465a5f..7f4b9a07734 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Dog: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
index e06009060c5..b0cb7c1f1a2 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct EnumArrays: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
index 6ea2895aee5..d4029d73f8a 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public enum EnumClass: String, Codable, CaseIterable {
case abc = "_abc"
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
index 3a9edb08ea7..9fd69055c22 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct EnumTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift
index 1378b4f9b20..ea9eeee4ebf 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Must be named `File` for test. */
public struct File: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
index f9a39d2e58e..06e832913eb 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct FileSchemaTestClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
index f36abb2bcd6..90b86307a82 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct FormatTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
index 9e2fe8cc87f..44c08e6b687 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct HasOnlyReadOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift
index b9a06034e01..ac7196fc74f 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct List: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
index c4792800425..8a4a31082a3 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct MapTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
index c15921ae6c7..9902fafee1c 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
index d5ab7e422f2..0995be822bb 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model name starting with number */
public struct Model200Response: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
index e8a19ee3d99..dfa19a4aad1 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model name same as property name */
public struct Name: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
index 10fd059c856..82d8fb6fb63 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct NumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
index bf7da6a3f86..1afea12cb34 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Order: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
index 99568c8facf..7fe71526624 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct OuterComposite: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
index 76c34b3c2ce..c3b778cbbed 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public enum OuterEnum: String, Codable, CaseIterable {
case placed = "placed"
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
index f93b402b0fd..cef13c2556b 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Pet: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
index 05cf40bedd3..2c99cab3568 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ReadOnlyFirst: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
index 9429b341fa9..2f9230fd652 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing reserved words */
public struct Return: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
index 543f1fa5ad4..21ac694c2c0 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct SpecialModelName: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
index 548b82c049e..ca657eb0db9 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct StringBooleanMap: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
index f2dea74b09d..504343ba7de 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Tag: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
index 9a7d7e6c8e6..ef8000720d8 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct TypeHolderDefault: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
index dd67ca7851d..6c794f3b25a 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct TypeHolderExample: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift
index e55b50dc4f7..5e10d6165ea 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift
+++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct User: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved b/samples/client/petstore/swift6/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
index 24f75e52690..aa4c8a082a9 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
+++ b/samples/client/petstore/swift6/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -1,15 +1,6 @@
{
- "originHash" : "0585a7bd330d7a8ea8cdcbb397bc271da1221e99902352de81fe9b70121dd098",
+ "originHash" : "6fd6d6a686ec78068b932a1816e15c281f6491eaa381ec9f343d63363e2f0bd1",
"pins" : [
- {
- "identity" : "anycodable",
- "kind" : "remoteSourceControl",
- "location" : "https://github.com/Flight-School/AnyCodable",
- "state" : {
- "revision" : "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version" : "0.6.7"
- }
- },
{
"identity" : "promisekit",
"kind" : "remoteSourceControl",
diff --git a/samples/client/petstore/swift6/promisekitLibrary/project.yml b/samples/client/petstore/swift6/promisekitLibrary/project.yml
index 720b91a3220..9a81e25f3a4 100644
--- a/samples/client/petstore/swift6/promisekitLibrary/project.yml
+++ b/samples/client/petstore/swift6/promisekitLibrary/project.yml
@@ -12,5 +12,4 @@ targets:
APPLICATION_EXTENSION_API_ONLY: true
scheme: {}
dependencies:
- - carthage: AnyCodable
- carthage: PromiseKit
diff --git a/samples/client/petstore/swift6/resultLibrary/.openapi-generator/FILES b/samples/client/petstore/swift6/resultLibrary/.openapi-generator/FILES
index c22bc8bf861..c0b110d1118 100644
--- a/samples/client/petstore/swift6/resultLibrary/.openapi-generator/FILES
+++ b/samples/client/petstore/swift6/resultLibrary/.openapi-generator/FILES
@@ -15,6 +15,7 @@ PetstoreClient/Classes/OpenAPIs/CodableHelper.swift
PetstoreClient/Classes/OpenAPIs/Extensions.swift
PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift
PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift
+PetstoreClient/Classes/OpenAPIs/JSONValue.swift
PetstoreClient/Classes/OpenAPIs/Models.swift
PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
diff --git a/samples/client/petstore/swift6/resultLibrary/Cartfile b/samples/client/petstore/swift6/resultLibrary/Cartfile
index 92bac174543..8b137891791 100644
--- a/samples/client/petstore/swift6/resultLibrary/Cartfile
+++ b/samples/client/petstore/swift6/resultLibrary/Cartfile
@@ -1 +1 @@
-github "Flight-School/AnyCodable" ~> 0.6
+
diff --git a/samples/client/petstore/swift6/resultLibrary/Package.resolved b/samples/client/petstore/swift6/resultLibrary/Package.resolved
deleted file mode 100644
index 03613dc681d..00000000000
--- a/samples/client/petstore/swift6/resultLibrary/Package.resolved
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "originHash" : "d5919dc82f97fd3c9a6e6c48a59960902c9b17904f5461a66b7bc540833bfea1",
- "pins" : [
- {
- "identity" : "anycodable",
- "kind" : "remoteSourceControl",
- "location" : "https://github.com/Flight-School/AnyCodable",
- "state" : {
- "revision" : "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version" : "0.6.7"
- }
- }
- ],
- "version" : 3
-}
diff --git a/samples/client/petstore/swift6/resultLibrary/Package.swift b/samples/client/petstore/swift6/resultLibrary/Package.swift
index 78d5f91e0f2..dc5bc46564c 100644
--- a/samples/client/petstore/swift6/resultLibrary/Package.swift
+++ b/samples/client/petstore/swift6/resultLibrary/Package.swift
@@ -19,14 +19,13 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
- .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.7")),
],
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", ],
+ dependencies: [],
path: "PetstoreClient/Classes"
),
],
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient.podspec b/samples/client/petstore/swift6/resultLibrary/PetstoreClient.podspec
index 7fdbd7246c5..d5b8cefeffa 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient.podspec
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient.podspec
@@ -11,5 +11,4 @@ Pod::Spec.new do |s|
s.homepage = 'https://github.com/openapitools/openapi-generator'
s.summary = 'PetstoreClient'
s.source_files = 'PetstoreClient/Classes/**/*.swift'
- s.dependency 'AnyCodable-FlightSchool', '~> 0.6'
end
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
index a115c97f36a..ab33b704bef 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal class AnotherFakeAPI {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
index 4b008f8ecd7..a28c02beb41 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal class FakeAPI {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
index bcca984513a..88d58e913da 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal class FakeClassnameTags123API {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
index e365abf5a91..68a1cdf9a6e 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal class PetAPI {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
index 19586157e8a..7a32c200bd5 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal class StoreAPI {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
index 9ccea7a3c70..a2a9d33df94 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal class UserAPI {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift
index 3128ce2e167..e59acd126f0 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift
@@ -8,9 +8,6 @@ import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
extension Bool: JSONEncodable {
func encodeToJSON(codableHelper: CodableHelper) -> Any { self }
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
new file mode 100644
index 00000000000..108e9abe5bb
--- /dev/null
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
@@ -0,0 +1,247 @@
+//
+// JSONValue.swift
+//
+// Generated by openapi-generator
+// https://openapi-generator.tech
+//
+
+import Foundation
+
+internal enum JSONValue: Codable, Hashable {
+ case string(String)
+ case int(Int)
+ case double(Double)
+ case bool(Bool)
+ case array([JSONValue])
+ case dictionary([String: JSONValue])
+ case null
+
+ // MARK: - Decoding Logic
+ internal init(from decoder: Decoder) throws {
+ let container = try decoder.singleValueContainer()
+
+ if let stringValue = try? container.decode(String.self) {
+ self = .string(stringValue)
+ } else if let intValue = try? container.decode(Int.self) {
+ self = .int(intValue)
+ } else if let doubleValue = try? container.decode(Double.self) {
+ self = .double(doubleValue)
+ } else if let boolValue = try? container.decode(Bool.self) {
+ self = .bool(boolValue)
+ } else if let arrayValue = try? container.decode([JSONValue].self) {
+ self = .array(arrayValue)
+ } else if let dictionaryValue = try? container.decode([String: JSONValue].self) {
+ self = .dictionary(dictionaryValue)
+ } else if container.decodeNil() {
+ self = .null
+ } else {
+ throw DecodingError.dataCorruptedError(in: container, debugDescription: "Unknown JSON value")
+ }
+ }
+
+ // MARK: - Encoding Logic
+ internal func encode(to encoder: Encoder) throws {
+ var container = encoder.singleValueContainer()
+
+ switch self {
+ case .string(let value):
+ try container.encode(value)
+ case .int(let value):
+ try container.encode(value)
+ case .double(let value):
+ try container.encode(value)
+ case .bool(let value):
+ try container.encode(value)
+ case .array(let value):
+ try container.encode(value)
+ case .dictionary(let value):
+ try container.encode(value)
+ case .null:
+ try container.encodeNil()
+ }
+ }
+}
+
+extension JSONValue {
+ internal init(_ value: String) {
+ self = .string(value)
+ }
+
+ internal init(_ value: Int) {
+ self = .int(value)
+ }
+
+ internal init(_ value: Double) {
+ self = .double(value)
+ }
+
+ internal init(_ value: Bool) {
+ self = .bool(value)
+ }
+
+ internal init(_ value: [JSONValue]) {
+ self = .array(value)
+ }
+
+ internal init(_ value: [String: JSONValue]) {
+ self = .dictionary(value)
+ }
+
+ internal init(_ codable: T) throws {
+ let encoder = JSONEncoder()
+ let encodedData = try encoder.encode(codable)
+ let decoder = JSONDecoder()
+
+ let decodedValue = try decoder.decode(JSONValue.self, from: encodedData)
+ self = decodedValue
+ }
+}
+
+extension JSONValue {
+ internal var isString: Bool {
+ if case .string = self { return true }
+ return false
+ }
+
+ internal var isInt: Bool {
+ if case .int = self { return true }
+ return false
+ }
+
+ internal var isDouble: Bool {
+ if case .double = self { return true }
+ return false
+ }
+
+ internal var isBool: Bool {
+ if case .bool = self { return true }
+ return false
+ }
+
+ internal var isArray: Bool {
+ if case .array = self { return true }
+ return false
+ }
+
+ internal var isDictionary: Bool {
+ if case .dictionary = self { return true }
+ return false
+ }
+
+ internal var isNull: Bool {
+ return self == .null
+ }
+
+}
+
+extension JSONValue {
+ internal var stringValue: String? {
+ switch self {
+ case .string(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ internal var intValue: Int? {
+ switch self {
+ case .int(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ internal var doubleValue: Double? {
+ switch self {
+ case .double(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ internal var boolValue: Bool? {
+ switch self {
+ case .bool(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ internal var arrayValue: [JSONValue]? {
+ if case let .array(value) = self {
+ return value
+ }
+ return nil
+ }
+
+ internal var dictionaryValue: [String: JSONValue]? {
+ if case let .dictionary(value) = self {
+ return value
+ }
+ return nil
+ }
+}
+
+extension JSONValue {
+ internal subscript(key: String) -> JSONValue? {
+ return dictionaryValue?[key]
+ }
+
+ internal subscript(index: Int) -> JSONValue? {
+ guard case let .array(array) = self, index >= 0 && index < array.count else {
+ return nil
+ }
+ return array[index]
+ }
+}
+
+extension JSONValue: ExpressibleByStringLiteral, ExpressibleByStringInterpolation {
+ internal init(stringLiteral value: StringLiteralType) {
+ self = .string(value)
+ }
+}
+
+extension JSONValue: ExpressibleByIntegerLiteral {
+ internal init(integerLiteral value: IntegerLiteralType) {
+ self = .int(value)
+ }
+}
+
+extension JSONValue: ExpressibleByFloatLiteral {
+ internal init(floatLiteral value: FloatLiteralType) {
+ self = .double(value)
+ }
+}
+
+
+extension JSONValue: ExpressibleByBooleanLiteral {
+ internal init(booleanLiteral value: BooleanLiteralType) {
+ self = .bool(value)
+ }
+}
+
+extension JSONValue: ExpressibleByArrayLiteral {
+ internal init(arrayLiteral elements: JSONValue...) {
+ self = .array(elements)
+ }
+}
+
+extension JSONValue: ExpressibleByDictionaryLiteral {
+ internal init(dictionaryLiteral elements: (String, JSONValue)...) {
+ var dict: [String: JSONValue] = [:]
+ for (key, value) in elements {
+ dict[key] = value
+ }
+ self = .dictionary(dict)
+ }
+}
+
+extension JSONValue: ExpressibleByNilLiteral {
+ internal init(nilLiteral: ()) {
+ self = .null
+ }
+}
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
index f5d53cc2fd8..a510cc99b6e 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct AdditionalPropertiesClass: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
index 5e2143e4e4c..f8b574a176a 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct Animal: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
index 58d2309771e..3ebe9e9a5de 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
@@ -6,8 +6,5 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal typealias AnimalFarm = [Animal]
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
index 86eaee260cc..273dbe29a6b 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct ApiResponse: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
index a690aebd2c3..2d88d5ff22e 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct ArrayOfArrayOfNumberOnly: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
index a11f2a0a610..4bf32480630 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct ArrayOfNumberOnly: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
index f0594043a37..114da1e1d6e 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct ArrayTest: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
index 24d2b85de15..554bd62eaca 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct Capitalization: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
index f89f7d5dbb3..89328b28bb2 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct Cat: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
index 012090297b2..db36b91c393 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct Category: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
index 0e0b630ddb1..22913f1b12d 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model with \"_class\" property */
internal struct ClassModel: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
index 40e08424b0e..32f7f568684 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct Client: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
index 5bc2f0789f1..7cd79582fa0 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct Dog: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
index 6773182d75d..aeda06ffb72 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct EnumArrays: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
index e1d7b221836..098ac3cdbc5 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal enum EnumClass: String, Codable, CaseIterable, CaseIterableDefaultsLast {
case abc = "_abc"
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
index f3415b314e1..ed923bfb530 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct EnumTest: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift
index a3f8bf61e81..a2083de499e 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Must be named `File` for test. */
internal struct File: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
index febddf74787..115508472ec 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct FileSchemaTestClass: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
index 7b62c973d42..6ed4a21ed4f 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct FormatTest: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
index ee83e0ce84a..aa3e4b34a22 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct HasOnlyReadOnly: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift
index 8ab02e809ca..98d55230a87 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct List: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
index 08a3bbb46c7..07b65b6910e 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct MapTest: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
index 4bebb9b11ef..3c769e4893b 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
index 1184fc8450a..b05f8547cd1 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model name starting with number */
internal struct Model200Response: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
index d5d4ea5cfc4..ef120186a97 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model name same as property name */
internal struct Name: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
index b9b4523e996..6c5ef3f3283 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct NumberOnly: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
index 78eb1c3d8ce..8116e8d86f3 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct Order: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
index f3dadc35418..8ada5e38553 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct OuterComposite: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
index 65ba7de3dd3..e2e4c13969b 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal enum OuterEnum: String, Codable, CaseIterable, CaseIterableDefaultsLast {
case placed = "placed"
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
index 26cc4e5eee2..daded4aa92f 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct Pet: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
index 281a13a981d..bb7971010e3 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct ReadOnlyFirst: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
index f0ae698a0fb..6492b25df49 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing reserved words */
internal struct Return: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
index 1d4a2945084..f6066f6b810 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct SpecialModelName: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
index 36e64bd2d5a..995bca91b92 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct StringBooleanMap: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
index fc36965c2eb..d43acc6f844 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct Tag: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
index c98648dab20..e8f4fae5fbd 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct TypeHolderDefault: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
index 502073a3273..ee1296ac811 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct TypeHolderExample: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift
index fa481cd187d..0c9523d60a3 100644
--- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift
+++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
internal struct User: Codable, JSONEncodable {
diff --git a/samples/client/petstore/swift6/resultLibrary/project.yml b/samples/client/petstore/swift6/resultLibrary/project.yml
index 876aca81692..92ad41fa08d 100644
--- a/samples/client/petstore/swift6/resultLibrary/project.yml
+++ b/samples/client/petstore/swift6/resultLibrary/project.yml
@@ -12,4 +12,3 @@ targets:
APPLICATION_EXTENSION_API_ONLY: true
scheme: {}
dependencies:
- - carthage: AnyCodable
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/.openapi-generator/FILES b/samples/client/petstore/swift6/rxswiftLibrary/.openapi-generator/FILES
index c22bc8bf861..c0b110d1118 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/.openapi-generator/FILES
+++ b/samples/client/petstore/swift6/rxswiftLibrary/.openapi-generator/FILES
@@ -15,6 +15,7 @@ PetstoreClient/Classes/OpenAPIs/CodableHelper.swift
PetstoreClient/Classes/OpenAPIs/Extensions.swift
PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift
PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift
+PetstoreClient/Classes/OpenAPIs/JSONValue.swift
PetstoreClient/Classes/OpenAPIs/Models.swift
PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/Cartfile b/samples/client/petstore/swift6/rxswiftLibrary/Cartfile
index 6d239e222de..90e87c59faf 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/Cartfile
+++ b/samples/client/petstore/swift6/rxswiftLibrary/Cartfile
@@ -1,2 +1,2 @@
-github "Flight-School/AnyCodable" ~> 0.6
+
github "ReactiveX/RxSwift" ~> 6.7
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/Package.resolved b/samples/client/petstore/swift6/rxswiftLibrary/Package.resolved
index 4c6f4162b78..8b2edf6ef04 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/Package.resolved
+++ b/samples/client/petstore/swift6/rxswiftLibrary/Package.resolved
@@ -1,15 +1,6 @@
{
- "originHash" : "981675c61de3df2b5da8b0fe67d783bb280d42de0a43b6d317624a0b3ae2f4f3",
+ "originHash" : "8715c17031940f4af806198304bcbe69dada24a78bffcac182d214ef9568103b",
"pins" : [
- {
- "identity" : "anycodable",
- "kind" : "remoteSourceControl",
- "location" : "https://github.com/Flight-School/AnyCodable",
- "state" : {
- "revision" : "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version" : "0.6.7"
- }
- },
{
"identity" : "rxswift",
"kind" : "remoteSourceControl",
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/Package.swift b/samples/client/petstore/swift6/rxswiftLibrary/Package.swift
index ed4f96f6235..cfa0a32107d 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/Package.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/Package.swift
@@ -19,7 +19,6 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
- .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.7")),
.package(url: "https://github.com/ReactiveX/RxSwift", .upToNextMajor(from: "6.7.1")),
],
targets: [
@@ -27,7 +26,7 @@ let package = Package(
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "PetstoreClient",
- dependencies: ["AnyCodable", "RxSwift"],
+ dependencies: ["RxSwift"],
path: "PetstoreClient/Classes"
),
],
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient.podspec b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient.podspec
index d59dcffee5e..43734a05f83 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient.podspec
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient.podspec
@@ -11,6 +11,5 @@ Pod::Spec.new do |s|
s.homepage = 'https://github.com/openapitools/openapi-generator'
s.summary = 'PetstoreClient'
s.source_files = 'PetstoreClient/Classes/**/*.swift'
- s.dependency 'AnyCodable-FlightSchool', '~> 0.6'
s.dependency 'RxSwift', '~> 6.7'
end
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
index 783c9271079..57e2b73b36d 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift
@@ -7,9 +7,6 @@
import Foundation
@preconcurrency import RxSwift
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class AnotherFakeAPI {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
index 8df021eb271..b30b6f05a13 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift
@@ -7,9 +7,6 @@
import Foundation
@preconcurrency import RxSwift
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class FakeAPI {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
index a770c9995de..7dfc83cfe91 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift
@@ -7,9 +7,6 @@
import Foundation
@preconcurrency import RxSwift
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class FakeClassnameTags123API {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
index 80c71e0f5f4..5bc02d9f514 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift
@@ -7,9 +7,6 @@
import Foundation
@preconcurrency import RxSwift
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class PetAPI {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
index 607723b7397..7931468eef2 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift
@@ -7,9 +7,6 @@
import Foundation
@preconcurrency import RxSwift
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class StoreAPI {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
index 87c897d330a..a20fed6a62c 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift
@@ -7,9 +7,6 @@
import Foundation
@preconcurrency import RxSwift
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class UserAPI {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift
index d13a9285112..3bf1690460b 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift
@@ -8,9 +8,6 @@ import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
extension Bool: JSONEncodable {
func encodeToJSON(codableHelper: CodableHelper) -> Any { self }
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
new file mode 100644
index 00000000000..85d66ad6abf
--- /dev/null
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
@@ -0,0 +1,247 @@
+//
+// JSONValue.swift
+//
+// Generated by openapi-generator
+// https://openapi-generator.tech
+//
+
+import Foundation
+
+public enum JSONValue: Codable, Hashable {
+ case string(String)
+ case int(Int)
+ case double(Double)
+ case bool(Bool)
+ case array([JSONValue])
+ case dictionary([String: JSONValue])
+ case null
+
+ // MARK: - Decoding Logic
+ public init(from decoder: Decoder) throws {
+ let container = try decoder.singleValueContainer()
+
+ if let stringValue = try? container.decode(String.self) {
+ self = .string(stringValue)
+ } else if let intValue = try? container.decode(Int.self) {
+ self = .int(intValue)
+ } else if let doubleValue = try? container.decode(Double.self) {
+ self = .double(doubleValue)
+ } else if let boolValue = try? container.decode(Bool.self) {
+ self = .bool(boolValue)
+ } else if let arrayValue = try? container.decode([JSONValue].self) {
+ self = .array(arrayValue)
+ } else if let dictionaryValue = try? container.decode([String: JSONValue].self) {
+ self = .dictionary(dictionaryValue)
+ } else if container.decodeNil() {
+ self = .null
+ } else {
+ throw DecodingError.dataCorruptedError(in: container, debugDescription: "Unknown JSON value")
+ }
+ }
+
+ // MARK: - Encoding Logic
+ public func encode(to encoder: Encoder) throws {
+ var container = encoder.singleValueContainer()
+
+ switch self {
+ case .string(let value):
+ try container.encode(value)
+ case .int(let value):
+ try container.encode(value)
+ case .double(let value):
+ try container.encode(value)
+ case .bool(let value):
+ try container.encode(value)
+ case .array(let value):
+ try container.encode(value)
+ case .dictionary(let value):
+ try container.encode(value)
+ case .null:
+ try container.encodeNil()
+ }
+ }
+}
+
+extension JSONValue {
+ public init(_ value: String) {
+ self = .string(value)
+ }
+
+ public init(_ value: Int) {
+ self = .int(value)
+ }
+
+ public init(_ value: Double) {
+ self = .double(value)
+ }
+
+ public init(_ value: Bool) {
+ self = .bool(value)
+ }
+
+ public init(_ value: [JSONValue]) {
+ self = .array(value)
+ }
+
+ public init(_ value: [String: JSONValue]) {
+ self = .dictionary(value)
+ }
+
+ public init(_ codable: T) throws {
+ let encoder = JSONEncoder()
+ let encodedData = try encoder.encode(codable)
+ let decoder = JSONDecoder()
+
+ let decodedValue = try decoder.decode(JSONValue.self, from: encodedData)
+ self = decodedValue
+ }
+}
+
+extension JSONValue {
+ public var isString: Bool {
+ if case .string = self { return true }
+ return false
+ }
+
+ public var isInt: Bool {
+ if case .int = self { return true }
+ return false
+ }
+
+ public var isDouble: Bool {
+ if case .double = self { return true }
+ return false
+ }
+
+ public var isBool: Bool {
+ if case .bool = self { return true }
+ return false
+ }
+
+ public var isArray: Bool {
+ if case .array = self { return true }
+ return false
+ }
+
+ public var isDictionary: Bool {
+ if case .dictionary = self { return true }
+ return false
+ }
+
+ public var isNull: Bool {
+ return self == .null
+ }
+
+}
+
+extension JSONValue {
+ public var stringValue: String? {
+ switch self {
+ case .string(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var intValue: Int? {
+ switch self {
+ case .int(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var doubleValue: Double? {
+ switch self {
+ case .double(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var boolValue: Bool? {
+ switch self {
+ case .bool(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var arrayValue: [JSONValue]? {
+ if case let .array(value) = self {
+ return value
+ }
+ return nil
+ }
+
+ public var dictionaryValue: [String: JSONValue]? {
+ if case let .dictionary(value) = self {
+ return value
+ }
+ return nil
+ }
+}
+
+extension JSONValue {
+ public subscript(key: String) -> JSONValue? {
+ return dictionaryValue?[key]
+ }
+
+ public subscript(index: Int) -> JSONValue? {
+ guard case let .array(array) = self, index >= 0 && index < array.count else {
+ return nil
+ }
+ return array[index]
+ }
+}
+
+extension JSONValue: ExpressibleByStringLiteral, ExpressibleByStringInterpolation {
+ public init(stringLiteral value: StringLiteralType) {
+ self = .string(value)
+ }
+}
+
+extension JSONValue: ExpressibleByIntegerLiteral {
+ public init(integerLiteral value: IntegerLiteralType) {
+ self = .int(value)
+ }
+}
+
+extension JSONValue: ExpressibleByFloatLiteral {
+ public init(floatLiteral value: FloatLiteralType) {
+ self = .double(value)
+ }
+}
+
+
+extension JSONValue: ExpressibleByBooleanLiteral {
+ public init(booleanLiteral value: BooleanLiteralType) {
+ self = .bool(value)
+ }
+}
+
+extension JSONValue: ExpressibleByArrayLiteral {
+ public init(arrayLiteral elements: JSONValue...) {
+ self = .array(elements)
+ }
+}
+
+extension JSONValue: ExpressibleByDictionaryLiteral {
+ public init(dictionaryLiteral elements: (String, JSONValue)...) {
+ var dict: [String: JSONValue] = [:]
+ for (key, value) in elements {
+ dict[key] = value
+ }
+ self = .dictionary(dict)
+ }
+}
+
+extension JSONValue: ExpressibleByNilLiteral {
+ public init(nilLiteral: ()) {
+ self = .null
+ }
+}
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
index 623c4c7fd2c..7b8408ce868 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct AdditionalPropertiesClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
index a6882d6517f..bd2a1497826 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Animal: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
index a0b09cb9761..e09b0e9efdc 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift
@@ -6,8 +6,5 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public typealias AnimalFarm = [Animal]
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
index 1890fcf9fde..73fe465dd3a 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ApiResponse: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
index eabae42d3bf..3d5d396bed6 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayOfArrayOfNumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
index fa93d7c6c74..852a4aec20f 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayOfNumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
index c99f82be9b9..db34d97ad45 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ArrayTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
index f8a3f64e2ee..06db3d32532 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Capitalization: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
index 253bbd7c04c..6482fd35203 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Cat: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
index 75b68ec01e2..550c78345bb 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Category: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
index f75fe8ac331..c76cb5acf71 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model with \"_class\" property */
public struct ClassModel: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
index 21a539ba010..c0c6b9fa08b 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Client: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
index dc3bb465a5f..7f4b9a07734 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Dog: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
index e06009060c5..b0cb7c1f1a2 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct EnumArrays: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
index 6ea2895aee5..d4029d73f8a 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public enum EnumClass: String, Codable, CaseIterable {
case abc = "_abc"
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
index 3a9edb08ea7..9fd69055c22 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct EnumTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift
index 1378b4f9b20..ea9eeee4ebf 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Must be named `File` for test. */
public struct File: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
index f9a39d2e58e..06e832913eb 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct FileSchemaTestClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
index f36abb2bcd6..90b86307a82 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct FormatTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
index 9e2fe8cc87f..44c08e6b687 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct HasOnlyReadOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift
index b9a06034e01..ac7196fc74f 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct List: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
index c4792800425..8a4a31082a3 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct MapTest: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
index c15921ae6c7..9902fafee1c 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct MixedPropertiesAndAdditionalPropertiesClass: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
index b1b3712eac3..bfc3d116788 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model name starting with number */
public struct Model200Response: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
index e8a19ee3d99..dfa19a4aad1 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing model name same as property name */
public struct Name: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
index 10fd059c856..82d8fb6fb63 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct NumberOnly: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
index bf7da6a3f86..1afea12cb34 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Order: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
index 99568c8facf..7fe71526624 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct OuterComposite: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
index 76c34b3c2ce..c3b778cbbed 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public enum OuterEnum: String, Codable, CaseIterable {
case placed = "placed"
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
index f93b402b0fd..cef13c2556b 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Pet: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
index 05cf40bedd3..2c99cab3568 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct ReadOnlyFirst: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
index 4886c9a8ac2..5c8506c80e9 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
/** Model for testing reserved words */
public struct Return: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
index 543f1fa5ad4..21ac694c2c0 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct SpecialModelName: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
index 9c40477ece7..42b4a8da815 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct StringBooleanMap: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
index f2dea74b09d..504343ba7de 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Tag: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
index 9a7d7e6c8e6..ef8000720d8 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct TypeHolderDefault: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
index dd67ca7851d..6c794f3b25a 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct TypeHolderExample: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift
index e55b50dc4f7..5e10d6165ea 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift
+++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct User: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved b/samples/client/petstore/swift6/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
index 4c6f4162b78..8b2edf6ef04 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
+++ b/samples/client/petstore/swift6/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -1,15 +1,6 @@
{
- "originHash" : "981675c61de3df2b5da8b0fe67d783bb280d42de0a43b6d317624a0b3ae2f4f3",
+ "originHash" : "8715c17031940f4af806198304bcbe69dada24a78bffcac182d214ef9568103b",
"pins" : [
- {
- "identity" : "anycodable",
- "kind" : "remoteSourceControl",
- "location" : "https://github.com/Flight-School/AnyCodable",
- "state" : {
- "revision" : "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version" : "0.6.7"
- }
- },
{
"identity" : "rxswift",
"kind" : "remoteSourceControl",
diff --git a/samples/client/petstore/swift6/rxswiftLibrary/project.yml b/samples/client/petstore/swift6/rxswiftLibrary/project.yml
index 2d80f2e8a28..6ae09ba0da3 100644
--- a/samples/client/petstore/swift6/rxswiftLibrary/project.yml
+++ b/samples/client/petstore/swift6/rxswiftLibrary/project.yml
@@ -12,5 +12,4 @@ targets:
APPLICATION_EXTENSION_API_ONLY: true
scheme: {}
dependencies:
- - carthage: AnyCodable
- carthage: RxSwift
diff --git a/samples/client/petstore/swift6/swift6_test_all.sh b/samples/client/petstore/swift6/swift6_test_all.sh
index 71fb4462253..a67ed671455 100755
--- a/samples/client/petstore/swift6/swift6_test_all.sh
+++ b/samples/client/petstore/swift6/swift6_test_all.sh
@@ -27,5 +27,6 @@ DIRECTORY=`dirname $0`
(cd $DIRECTORY/resultLibrary/ && ./run_spmbuild.sh)
(cd $DIRECTORY/rxswiftLibrary/ && ./run_spmbuild.sh)
(cd $DIRECTORY/urlsessionLibrary/ && ./run_spmbuild.sh)
+(cd $DIRECTORY/validation/ && ./run_spmbuild.sh)
# #(cd $DIRECTORY/vaporLibrary/ && ./run_spmbuild.sh)
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/.openapi-generator/FILES b/samples/client/petstore/swift6/urlsessionLibrary/.openapi-generator/FILES
index 88d8dbe2ccb..3baa52304d9 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/.openapi-generator/FILES
+++ b/samples/client/petstore/swift6/urlsessionLibrary/.openapi-generator/FILES
@@ -16,6 +16,7 @@ Sources/PetstoreClient/CodableHelper.swift
Sources/PetstoreClient/Extensions.swift
Sources/PetstoreClient/JSONDataEncoding.swift
Sources/PetstoreClient/JSONEncodingHelper.swift
+Sources/PetstoreClient/JSONValue.swift
Sources/PetstoreClient/Models.swift
Sources/PetstoreClient/Models/AdditionalPropertiesClass.swift
Sources/PetstoreClient/Models/Animal.swift
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Cartfile b/samples/client/petstore/swift6/urlsessionLibrary/Cartfile
index 92bac174543..8b137891791 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Cartfile
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Cartfile
@@ -1 +1 @@
-github "Flight-School/AnyCodable" ~> 0.6
+
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Package.resolved b/samples/client/petstore/swift6/urlsessionLibrary/Package.resolved
deleted file mode 100644
index fa693974514..00000000000
--- a/samples/client/petstore/swift6/urlsessionLibrary/Package.resolved
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "originHash" : "7178d22f8ab4deb93f0e868ffd75776c39f257093d0b8f4f99917554033837b4",
- "pins" : [
- {
- "identity" : "anycodable",
- "kind" : "remoteSourceControl",
- "location" : "https://github.com/Flight-School/AnyCodable",
- "state" : {
- "revision" : "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version" : "0.6.7"
- }
- }
- ],
- "version" : 3
-}
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Package.swift b/samples/client/petstore/swift6/urlsessionLibrary/Package.swift
index 02bfee6e585..0c83fdb8747 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Package.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Package.swift
@@ -19,14 +19,13 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
- .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.7")),
],
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", ],
+ dependencies: [],
path: "Sources/PetstoreClient"
),
],
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/PetstoreClient.podspec b/samples/client/petstore/swift6/urlsessionLibrary/PetstoreClient.podspec
index 43421a2c215..a438db34097 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/PetstoreClient.podspec
+++ b/samples/client/petstore/swift6/urlsessionLibrary/PetstoreClient.podspec
@@ -11,5 +11,4 @@ Pod::Spec.new do |s|
s.homepage = 'https://github.com/openapitools/openapi-generator'
s.summary = 'PetstoreClient'
s.source_files = 'Sources/PetstoreClient/**/*.swift'
- s.dependency 'AnyCodable-FlightSchool', '~> 0.6'
end
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift
index cf6b31f47c9..01f923edfa0 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
extension PetstoreClientAPI {
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift
index 65b100a7ce0..ed4e2674496 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
extension PetstoreClientAPI {
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeClassnameTags123API.swift
index 09182e3342a..0c22d54f398 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeClassnameTags123API.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
extension PetstoreClientAPI {
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/PetAPI.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/PetAPI.swift
index 938ecc0c8d3..31165243838 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/PetAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
extension PetstoreClientAPI {
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift
index fc4de9515ac..8546019a53a 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
extension PetstoreClientAPI {
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/UserAPI.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/UserAPI.swift
index 67a07957c6a..5f466e3c122 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/UserAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
extension PetstoreClientAPI {
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift
index 00d6e4ac90f..b4341b60870 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift
@@ -8,9 +8,6 @@ import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
extension Bool: JSONEncodable {
func encodeToJSON(codableHelper: CodableHelper) -> Any { self }
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/JSONValue.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/JSONValue.swift
new file mode 100644
index 00000000000..85d66ad6abf
--- /dev/null
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/JSONValue.swift
@@ -0,0 +1,247 @@
+//
+// JSONValue.swift
+//
+// Generated by openapi-generator
+// https://openapi-generator.tech
+//
+
+import Foundation
+
+public enum JSONValue: Codable, Hashable {
+ case string(String)
+ case int(Int)
+ case double(Double)
+ case bool(Bool)
+ case array([JSONValue])
+ case dictionary([String: JSONValue])
+ case null
+
+ // MARK: - Decoding Logic
+ public init(from decoder: Decoder) throws {
+ let container = try decoder.singleValueContainer()
+
+ if let stringValue = try? container.decode(String.self) {
+ self = .string(stringValue)
+ } else if let intValue = try? container.decode(Int.self) {
+ self = .int(intValue)
+ } else if let doubleValue = try? container.decode(Double.self) {
+ self = .double(doubleValue)
+ } else if let boolValue = try? container.decode(Bool.self) {
+ self = .bool(boolValue)
+ } else if let arrayValue = try? container.decode([JSONValue].self) {
+ self = .array(arrayValue)
+ } else if let dictionaryValue = try? container.decode([String: JSONValue].self) {
+ self = .dictionary(dictionaryValue)
+ } else if container.decodeNil() {
+ self = .null
+ } else {
+ throw DecodingError.dataCorruptedError(in: container, debugDescription: "Unknown JSON value")
+ }
+ }
+
+ // MARK: - Encoding Logic
+ public func encode(to encoder: Encoder) throws {
+ var container = encoder.singleValueContainer()
+
+ switch self {
+ case .string(let value):
+ try container.encode(value)
+ case .int(let value):
+ try container.encode(value)
+ case .double(let value):
+ try container.encode(value)
+ case .bool(let value):
+ try container.encode(value)
+ case .array(let value):
+ try container.encode(value)
+ case .dictionary(let value):
+ try container.encode(value)
+ case .null:
+ try container.encodeNil()
+ }
+ }
+}
+
+extension JSONValue {
+ public init(_ value: String) {
+ self = .string(value)
+ }
+
+ public init(_ value: Int) {
+ self = .int(value)
+ }
+
+ public init(_ value: Double) {
+ self = .double(value)
+ }
+
+ public init(_ value: Bool) {
+ self = .bool(value)
+ }
+
+ public init(_ value: [JSONValue]) {
+ self = .array(value)
+ }
+
+ public init(_ value: [String: JSONValue]) {
+ self = .dictionary(value)
+ }
+
+ public init(_ codable: T) throws {
+ let encoder = JSONEncoder()
+ let encodedData = try encoder.encode(codable)
+ let decoder = JSONDecoder()
+
+ let decodedValue = try decoder.decode(JSONValue.self, from: encodedData)
+ self = decodedValue
+ }
+}
+
+extension JSONValue {
+ public var isString: Bool {
+ if case .string = self { return true }
+ return false
+ }
+
+ public var isInt: Bool {
+ if case .int = self { return true }
+ return false
+ }
+
+ public var isDouble: Bool {
+ if case .double = self { return true }
+ return false
+ }
+
+ public var isBool: Bool {
+ if case .bool = self { return true }
+ return false
+ }
+
+ public var isArray: Bool {
+ if case .array = self { return true }
+ return false
+ }
+
+ public var isDictionary: Bool {
+ if case .dictionary = self { return true }
+ return false
+ }
+
+ public var isNull: Bool {
+ return self == .null
+ }
+
+}
+
+extension JSONValue {
+ public var stringValue: String? {
+ switch self {
+ case .string(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var intValue: Int? {
+ switch self {
+ case .int(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var doubleValue: Double? {
+ switch self {
+ case .double(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var boolValue: Bool? {
+ switch self {
+ case .bool(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var arrayValue: [JSONValue]? {
+ if case let .array(value) = self {
+ return value
+ }
+ return nil
+ }
+
+ public var dictionaryValue: [String: JSONValue]? {
+ if case let .dictionary(value) = self {
+ return value
+ }
+ return nil
+ }
+}
+
+extension JSONValue {
+ public subscript(key: String) -> JSONValue? {
+ return dictionaryValue?[key]
+ }
+
+ public subscript(index: Int) -> JSONValue? {
+ guard case let .array(array) = self, index >= 0 && index < array.count else {
+ return nil
+ }
+ return array[index]
+ }
+}
+
+extension JSONValue: ExpressibleByStringLiteral, ExpressibleByStringInterpolation {
+ public init(stringLiteral value: StringLiteralType) {
+ self = .string(value)
+ }
+}
+
+extension JSONValue: ExpressibleByIntegerLiteral {
+ public init(integerLiteral value: IntegerLiteralType) {
+ self = .int(value)
+ }
+}
+
+extension JSONValue: ExpressibleByFloatLiteral {
+ public init(floatLiteral value: FloatLiteralType) {
+ self = .double(value)
+ }
+}
+
+
+extension JSONValue: ExpressibleByBooleanLiteral {
+ public init(booleanLiteral value: BooleanLiteralType) {
+ self = .bool(value)
+ }
+}
+
+extension JSONValue: ExpressibleByArrayLiteral {
+ public init(arrayLiteral elements: JSONValue...) {
+ self = .array(elements)
+ }
+}
+
+extension JSONValue: ExpressibleByDictionaryLiteral {
+ public init(dictionaryLiteral elements: (String, JSONValue)...) {
+ var dict: [String: JSONValue] = [:]
+ for (key, value) in elements {
+ dict[key] = value
+ }
+ self = .dictionary(dict)
+ }
+}
+
+extension JSONValue: ExpressibleByNilLiteral {
+ public init(nilLiteral: ()) {
+ self = .null
+ }
+}
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesClass.swift
index bbe32fd2015..96a1bf3a03c 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.AdditionalPropertiesClass")
public typealias AdditionalPropertiesClass = PetstoreClientAPI.AdditionalPropertiesClass
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Animal.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Animal.swift
index d61432435c6..17e5cadb74e 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Animal.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Animal.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.Animal")
public typealias Animal = PetstoreClientAPI.Animal
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/AnimalFarm.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/AnimalFarm.swift
index 7dd9dedf4de..257bedfd7e3 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/AnimalFarm.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/AnimalFarm.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.AnimalFarm")
public typealias AnimalFarm = PetstoreClientAPI.AnimalFarm
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ApiResponse.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ApiResponse.swift
index a42b0caadde..2f46dd42353 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ApiResponse.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ApiResponse.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.ApiResponse")
public typealias ApiResponse = PetstoreClientAPI.ApiResponse
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayOfArrayOfNumberOnly.swift
index a7860c6b8aa..b79a49832d2 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayOfArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayOfArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.ArrayOfArrayOfNumberOnly")
public typealias ArrayOfArrayOfNumberOnly = PetstoreClientAPI.ArrayOfArrayOfNumberOnly
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayOfNumberOnly.swift
index 2c5a2dc4890..cfe47a1c397 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.ArrayOfNumberOnly")
public typealias ArrayOfNumberOnly = PetstoreClientAPI.ArrayOfNumberOnly
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayTest.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayTest.swift
index 94b6a87508a..00a40007f01 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayTest.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ArrayTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.ArrayTest")
public typealias ArrayTest = PetstoreClientAPI.ArrayTest
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Capitalization.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Capitalization.swift
index a0a2e2b7ed2..4cc52a1cbcb 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Capitalization.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Capitalization.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.Capitalization")
public typealias Capitalization = PetstoreClientAPI.Capitalization
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Cat.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Cat.swift
index 006b34e4510..9373ec7d30f 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Cat.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Cat.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.Cat")
public typealias Cat = PetstoreClientAPI.Cat
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Category.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Category.swift
index 90eec24e2a6..d43bfc64bcf 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Category.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Category.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.Category")
public typealias Category = PetstoreClientAPI.Category
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ClassModel.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ClassModel.swift
index 411d00c8849..aa0b97a2270 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ClassModel.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ClassModel.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.ClassModel")
public typealias ClassModel = PetstoreClientAPI.ClassModel
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Client.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Client.swift
index c41a2876504..d22309a531b 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Client.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Client.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.Client")
public typealias Client = PetstoreClientAPI.Client
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Dog.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Dog.swift
index a8f98eecb28..76d09406932 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Dog.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Dog.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.Dog")
public typealias Dog = PetstoreClientAPI.Dog
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/EnumArrays.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/EnumArrays.swift
index c9c9ab8756c..b6e4b39b44b 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/EnumArrays.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/EnumArrays.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.EnumArrays")
public typealias EnumArrays = PetstoreClientAPI.EnumArrays
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/EnumClass.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/EnumClass.swift
index 3e775af1233..c839d756d1b 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/EnumClass.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/EnumClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.EnumClass")
public typealias EnumClass = PetstoreClientAPI.EnumClass
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/EnumTest.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/EnumTest.swift
index b0a4756d3e8..31595242ff5 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/EnumTest.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/EnumTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.EnumTest")
public typealias EnumTest = PetstoreClientAPI.EnumTest
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/File.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/File.swift
index d10c0e0a4b5..299ced815b6 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/File.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/File.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.File")
public typealias File = PetstoreClientAPI.File
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/FileSchemaTestClass.swift
index 550858bd70e..fdf674345cc 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/FileSchemaTestClass.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/FileSchemaTestClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.FileSchemaTestClass")
public typealias FileSchemaTestClass = PetstoreClientAPI.FileSchemaTestClass
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/FormatTest.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/FormatTest.swift
index a4d90bfe6f7..78bcc0302b3 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/FormatTest.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/FormatTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.FormatTest")
public typealias FormatTest = PetstoreClientAPI.FormatTest
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/HasOnlyReadOnly.swift
index 7c991e9e7c4..21bc234f545 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/HasOnlyReadOnly.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/HasOnlyReadOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.HasOnlyReadOnly")
public typealias HasOnlyReadOnly = PetstoreClientAPI.HasOnlyReadOnly
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/List.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/List.swift
index 7f77dd2d5f0..7d159160c4c 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/List.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/List.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.List")
public typealias List = PetstoreClientAPI.List
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/MapTest.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/MapTest.swift
index 90feda030db..dabf90aabb1 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/MapTest.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/MapTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.MapTest")
public typealias MapTest = PetstoreClientAPI.MapTest
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
index f6e53c35028..9fdbd05ab30 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.MixedPropertiesAndAdditionalPropertiesClass")
public typealias MixedPropertiesAndAdditionalPropertiesClass = PetstoreClientAPI.MixedPropertiesAndAdditionalPropertiesClass
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Model200Response.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Model200Response.swift
index 917b539da00..268aa17983f 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Model200Response.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Model200Response.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.Model200Response")
public typealias Model200Response = PetstoreClientAPI.Model200Response
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Name.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Name.swift
index fa3e1bc692f..48325a9c65f 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Name.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Name.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.Name")
public typealias Name = PetstoreClientAPI.Name
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/NumberOnly.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/NumberOnly.swift
index 9412892a223..d33b8d52538 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/NumberOnly.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/NumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.NumberOnly")
public typealias NumberOnly = PetstoreClientAPI.NumberOnly
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Order.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Order.swift
index 6a9c4ec8937..9d270220201 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Order.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Order.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.Order")
public typealias Order = PetstoreClientAPI.Order
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/OuterComposite.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/OuterComposite.swift
index cc9598c3fa1..9761969c9b9 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/OuterComposite.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/OuterComposite.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.OuterComposite")
public typealias OuterComposite = PetstoreClientAPI.OuterComposite
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/OuterEnum.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/OuterEnum.swift
index 2a16e08330a..8d3a29aee95 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/OuterEnum.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/OuterEnum.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.OuterEnum")
public typealias OuterEnum = PetstoreClientAPI.OuterEnum
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Pet.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Pet.swift
index ee791a3947a..53196d1ef64 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Pet.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Pet.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.Pet")
public typealias Pet = PetstoreClientAPI.Pet
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ReadOnlyFirst.swift
index 80fb29f9d9d..4b350f58189 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ReadOnlyFirst.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/ReadOnlyFirst.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.ReadOnlyFirst")
public typealias ReadOnlyFirst = PetstoreClientAPI.ReadOnlyFirst
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Return.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Return.swift
index 233b3d401e0..b1cd9152d35 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Return.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Return.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.Return")
public typealias Return = PetstoreClientAPI.Return
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/SpecialModelName.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/SpecialModelName.swift
index ac7c5f87a76..3968d844a0f 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/SpecialModelName.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/SpecialModelName.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.SpecialModelName")
public typealias SpecialModelName = PetstoreClientAPI.SpecialModelName
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/StringBooleanMap.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/StringBooleanMap.swift
index 495a09ba807..2424e0f51ec 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/StringBooleanMap.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/StringBooleanMap.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.StringBooleanMap")
public typealias StringBooleanMap = PetstoreClientAPI.StringBooleanMap
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Tag.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Tag.swift
index fbb689857fc..d3124e5c7f2 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Tag.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/Tag.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.Tag")
public typealias Tag = PetstoreClientAPI.Tag
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/TypeHolderDefault.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/TypeHolderDefault.swift
index 39bc3abd9a9..0eb7ee6f8d3 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/TypeHolderDefault.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/TypeHolderDefault.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.TypeHolderDefault")
public typealias TypeHolderDefault = PetstoreClientAPI.TypeHolderDefault
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/TypeHolderExample.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/TypeHolderExample.swift
index 6f955d93f3c..c9447eaecb1 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/TypeHolderExample.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/TypeHolderExample.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.TypeHolderExample")
public typealias TypeHolderExample = PetstoreClientAPI.TypeHolderExample
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/User.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/User.swift
index e0616cdca59..07208971af6 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/User.swift
+++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/User.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
@available(*, deprecated, renamed: "PetstoreClientAPI.User")
public typealias User = PetstoreClientAPI.User
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved b/samples/client/petstore/swift6/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
deleted file mode 100644
index fa693974514..00000000000
--- a/samples/client/petstore/swift6/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/swiftpm/Package.resolved
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "originHash" : "7178d22f8ab4deb93f0e868ffd75776c39f257093d0b8f4f99917554033837b4",
- "pins" : [
- {
- "identity" : "anycodable",
- "kind" : "remoteSourceControl",
- "location" : "https://github.com/Flight-School/AnyCodable",
- "state" : {
- "revision" : "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version" : "0.6.7"
- }
- }
- ],
- "version" : 3
-}
diff --git a/samples/client/petstore/swift6/urlsessionLibrary/project.yml b/samples/client/petstore/swift6/urlsessionLibrary/project.yml
index 7f5630aa661..f1dcabd67c6 100644
--- a/samples/client/petstore/swift6/urlsessionLibrary/project.yml
+++ b/samples/client/petstore/swift6/urlsessionLibrary/project.yml
@@ -12,4 +12,3 @@ targets:
APPLICATION_EXTENSION_API_ONLY: true
scheme: {}
dependencies:
- - carthage: AnyCodable
diff --git a/samples/client/petstore/swift6/validation/.openapi-generator/FILES b/samples/client/petstore/swift6/validation/.openapi-generator/FILES
index 52c879f39c2..cc1e4eb349d 100644
--- a/samples/client/petstore/swift6/validation/.openapi-generator/FILES
+++ b/samples/client/petstore/swift6/validation/.openapi-generator/FILES
@@ -10,6 +10,7 @@ PetstoreClient/Classes/OpenAPIs/CodableHelper.swift
PetstoreClient/Classes/OpenAPIs/Extensions.swift
PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift
PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift
+PetstoreClient/Classes/OpenAPIs/JSONValue.swift
PetstoreClient/Classes/OpenAPIs/Models.swift
PetstoreClient/Classes/OpenAPIs/Models/Banana.swift
PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift
diff --git a/samples/client/petstore/swift6/validation/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift6/validation/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 00000000000..919434a6254
--- /dev/null
+++ b/samples/client/petstore/swift6/validation/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/samples/client/petstore/swift6/validation/Cartfile b/samples/client/petstore/swift6/validation/Cartfile
index 92bac174543..8b137891791 100644
--- a/samples/client/petstore/swift6/validation/Cartfile
+++ b/samples/client/petstore/swift6/validation/Cartfile
@@ -1 +1 @@
-github "Flight-School/AnyCodable" ~> 0.6
+
diff --git a/samples/client/petstore/swift6/validation/Package.resolved b/samples/client/petstore/swift6/validation/Package.resolved
deleted file mode 100644
index ad0d042394e..00000000000
--- a/samples/client/petstore/swift6/validation/Package.resolved
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "object": {
- "pins": [
- {
- "package": "AnyCodable",
- "repositoryURL": "https://github.com/Flight-School/AnyCodable",
- "state": {
- "branch": null,
- "revision": "862808b2070cd908cb04f9aafe7de83d35f81b05",
- "version": "0.6.7"
- }
- }
- ]
- },
- "version": 1
-}
diff --git a/samples/client/petstore/swift6/validation/Package.swift b/samples/client/petstore/swift6/validation/Package.swift
index 78d5f91e0f2..dc5bc46564c 100644
--- a/samples/client/petstore/swift6/validation/Package.swift
+++ b/samples/client/petstore/swift6/validation/Package.swift
@@ -19,14 +19,13 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
- .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.7")),
],
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", ],
+ dependencies: [],
path: "PetstoreClient/Classes"
),
],
diff --git a/samples/client/petstore/swift6/validation/PetstoreClient.podspec b/samples/client/petstore/swift6/validation/PetstoreClient.podspec
index 8bbe76b43d5..2dec3a8ecf9 100644
--- a/samples/client/petstore/swift6/validation/PetstoreClient.podspec
+++ b/samples/client/petstore/swift6/validation/PetstoreClient.podspec
@@ -11,5 +11,4 @@ Pod::Spec.new do |s|
s.homepage = 'https://github.com/openapitools/openapi-generator'
s.summary = 'PetstoreClient'
s.source_files = 'PetstoreClient/Classes/**/*.swift'
- s.dependency 'AnyCodable-FlightSchool', '~> 0.6'
end
diff --git a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/APIs/DefaultAPI.swift b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/APIs/DefaultAPI.swift
index 35d9e52912f..deba405b9fc 100644
--- a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/APIs/DefaultAPI.swift
+++ b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/APIs/DefaultAPI.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class DefaultAPI {
diff --git a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Extensions.swift
index 00d6e4ac90f..b4341b60870 100644
--- a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Extensions.swift
+++ b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Extensions.swift
@@ -8,9 +8,6 @@ import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
extension Bool: JSONEncodable {
func encodeToJSON(codableHelper: CodableHelper) -> Any { self }
diff --git a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/JSONValue.swift b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
new file mode 100644
index 00000000000..85d66ad6abf
--- /dev/null
+++ b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/JSONValue.swift
@@ -0,0 +1,247 @@
+//
+// JSONValue.swift
+//
+// Generated by openapi-generator
+// https://openapi-generator.tech
+//
+
+import Foundation
+
+public enum JSONValue: Codable, Hashable {
+ case string(String)
+ case int(Int)
+ case double(Double)
+ case bool(Bool)
+ case array([JSONValue])
+ case dictionary([String: JSONValue])
+ case null
+
+ // MARK: - Decoding Logic
+ public init(from decoder: Decoder) throws {
+ let container = try decoder.singleValueContainer()
+
+ if let stringValue = try? container.decode(String.self) {
+ self = .string(stringValue)
+ } else if let intValue = try? container.decode(Int.self) {
+ self = .int(intValue)
+ } else if let doubleValue = try? container.decode(Double.self) {
+ self = .double(doubleValue)
+ } else if let boolValue = try? container.decode(Bool.self) {
+ self = .bool(boolValue)
+ } else if let arrayValue = try? container.decode([JSONValue].self) {
+ self = .array(arrayValue)
+ } else if let dictionaryValue = try? container.decode([String: JSONValue].self) {
+ self = .dictionary(dictionaryValue)
+ } else if container.decodeNil() {
+ self = .null
+ } else {
+ throw DecodingError.dataCorruptedError(in: container, debugDescription: "Unknown JSON value")
+ }
+ }
+
+ // MARK: - Encoding Logic
+ public func encode(to encoder: Encoder) throws {
+ var container = encoder.singleValueContainer()
+
+ switch self {
+ case .string(let value):
+ try container.encode(value)
+ case .int(let value):
+ try container.encode(value)
+ case .double(let value):
+ try container.encode(value)
+ case .bool(let value):
+ try container.encode(value)
+ case .array(let value):
+ try container.encode(value)
+ case .dictionary(let value):
+ try container.encode(value)
+ case .null:
+ try container.encodeNil()
+ }
+ }
+}
+
+extension JSONValue {
+ public init(_ value: String) {
+ self = .string(value)
+ }
+
+ public init(_ value: Int) {
+ self = .int(value)
+ }
+
+ public init(_ value: Double) {
+ self = .double(value)
+ }
+
+ public init(_ value: Bool) {
+ self = .bool(value)
+ }
+
+ public init(_ value: [JSONValue]) {
+ self = .array(value)
+ }
+
+ public init(_ value: [String: JSONValue]) {
+ self = .dictionary(value)
+ }
+
+ public init(_ codable: T) throws {
+ let encoder = JSONEncoder()
+ let encodedData = try encoder.encode(codable)
+ let decoder = JSONDecoder()
+
+ let decodedValue = try decoder.decode(JSONValue.self, from: encodedData)
+ self = decodedValue
+ }
+}
+
+extension JSONValue {
+ public var isString: Bool {
+ if case .string = self { return true }
+ return false
+ }
+
+ public var isInt: Bool {
+ if case .int = self { return true }
+ return false
+ }
+
+ public var isDouble: Bool {
+ if case .double = self { return true }
+ return false
+ }
+
+ public var isBool: Bool {
+ if case .bool = self { return true }
+ return false
+ }
+
+ public var isArray: Bool {
+ if case .array = self { return true }
+ return false
+ }
+
+ public var isDictionary: Bool {
+ if case .dictionary = self { return true }
+ return false
+ }
+
+ public var isNull: Bool {
+ return self == .null
+ }
+
+}
+
+extension JSONValue {
+ public var stringValue: String? {
+ switch self {
+ case .string(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var intValue: Int? {
+ switch self {
+ case .int(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var doubleValue: Double? {
+ switch self {
+ case .double(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var boolValue: Bool? {
+ switch self {
+ case .bool(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var arrayValue: [JSONValue]? {
+ if case let .array(value) = self {
+ return value
+ }
+ return nil
+ }
+
+ public var dictionaryValue: [String: JSONValue]? {
+ if case let .dictionary(value) = self {
+ return value
+ }
+ return nil
+ }
+}
+
+extension JSONValue {
+ public subscript(key: String) -> JSONValue? {
+ return dictionaryValue?[key]
+ }
+
+ public subscript(index: Int) -> JSONValue? {
+ guard case let .array(array) = self, index >= 0 && index < array.count else {
+ return nil
+ }
+ return array[index]
+ }
+}
+
+extension JSONValue: ExpressibleByStringLiteral, ExpressibleByStringInterpolation {
+ public init(stringLiteral value: StringLiteralType) {
+ self = .string(value)
+ }
+}
+
+extension JSONValue: ExpressibleByIntegerLiteral {
+ public init(integerLiteral value: IntegerLiteralType) {
+ self = .int(value)
+ }
+}
+
+extension JSONValue: ExpressibleByFloatLiteral {
+ public init(floatLiteral value: FloatLiteralType) {
+ self = .double(value)
+ }
+}
+
+
+extension JSONValue: ExpressibleByBooleanLiteral {
+ public init(booleanLiteral value: BooleanLiteralType) {
+ self = .bool(value)
+ }
+}
+
+extension JSONValue: ExpressibleByArrayLiteral {
+ public init(arrayLiteral elements: JSONValue...) {
+ self = .array(elements)
+ }
+}
+
+extension JSONValue: ExpressibleByDictionaryLiteral {
+ public init(dictionaryLiteral elements: (String, JSONValue)...) {
+ var dict: [String: JSONValue] = [:]
+ for (key, value) in elements {
+ dict[key] = value
+ }
+ self = .dictionary(dict)
+ }
+}
+
+extension JSONValue: ExpressibleByNilLiteral {
+ public init(nilLiteral: ()) {
+ self = .null
+ }
+}
diff --git a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Models/Banana.swift b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Models/Banana.swift
index 5eb857cb6a9..e73ff9b8a24 100644
--- a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Models/Banana.swift
+++ b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Models/Banana.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
public struct Banana: Codable, JSONEncodable, Hashable {
diff --git a/samples/client/petstore/swift6/validation/project.yml b/samples/client/petstore/swift6/validation/project.yml
index 2d5e58ca2ef..f5637330c96 100644
--- a/samples/client/petstore/swift6/validation/project.yml
+++ b/samples/client/petstore/swift6/validation/project.yml
@@ -12,4 +12,3 @@ targets:
APPLICATION_EXTENSION_API_ONLY: true
scheme: {}
dependencies:
- - carthage: AnyCodable
diff --git a/samples/client/petstore/swift6/validation/run_spmbuild.sh b/samples/client/petstore/swift6/validation/run_spmbuild.sh
new file mode 100755
index 00000000000..1a9f585ad05
--- /dev/null
+++ b/samples/client/petstore/swift6/validation/run_spmbuild.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+swift build && exit ${PIPESTATUS[0]}
diff --git a/samples/client/petstore/swift6/vaporLibrary/.openapi-generator/FILES b/samples/client/petstore/swift6/vaporLibrary/.openapi-generator/FILES
index ecff918a8c0..71921c67aa3 100644
--- a/samples/client/petstore/swift6/vaporLibrary/.openapi-generator/FILES
+++ b/samples/client/petstore/swift6/vaporLibrary/.openapi-generator/FILES
@@ -10,6 +10,7 @@ Sources/PetstoreClient/APIs/PetAPI.swift
Sources/PetstoreClient/APIs/StoreAPI.swift
Sources/PetstoreClient/APIs/UserAPI.swift
Sources/PetstoreClient/Extensions.swift
+Sources/PetstoreClient/JSONValue.swift
Sources/PetstoreClient/Models/AdditionalPropertiesAnyType.swift
Sources/PetstoreClient/Models/AdditionalPropertiesArray.swift
Sources/PetstoreClient/Models/AdditionalPropertiesBoolean.swift
diff --git a/samples/client/petstore/swift6/vaporLibrary/Package.swift b/samples/client/petstore/swift6/vaporLibrary/Package.swift
index 90a2d25ccd5..5f2d61faba9 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Package.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Package.swift
@@ -16,7 +16,6 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
- .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.7")),
.package(url: "https://github.com/vapor/vapor", from: "4.0.0")
],
targets: [
@@ -24,7 +23,7 @@ let package = Package(
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "PetstoreClient",
- dependencies: ["AnyCodable", "Vapor", ],
+ dependencies: ["Vapor", ],
path: "Sources/PetstoreClient"
),
],
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift
index d4005b54758..a1cc0367556 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift
@@ -7,9 +7,6 @@
import Foundation
import Vapor
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class AnotherFakeAPI {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift
index d10f10fdbf5..66af99ea721 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift
@@ -7,9 +7,6 @@
import Foundation
import Vapor
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class FakeAPI {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/FakeClassnameTags123API.swift
index 6c31e6ce12d..c79ebe4d348 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/FakeClassnameTags123API.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/FakeClassnameTags123API.swift
@@ -7,9 +7,6 @@
import Foundation
import Vapor
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class FakeClassnameTags123API {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/PetAPI.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/PetAPI.swift
index b8ed2e7ed49..80026c35fe9 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/PetAPI.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/PetAPI.swift
@@ -7,9 +7,6 @@
import Foundation
import Vapor
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class PetAPI {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift
index 7813efb8661..cc6f5925e59 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift
@@ -7,9 +7,6 @@
import Foundation
import Vapor
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class StoreAPI {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/UserAPI.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/UserAPI.swift
index 9c62db02b13..29b6e495a57 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/UserAPI.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/APIs/UserAPI.swift
@@ -7,9 +7,6 @@
import Foundation
import Vapor
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
open class UserAPI {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Extensions.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Extensions.swift
index e3e5d4a3647..f8b1d7f1a21 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Extensions.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Extensions.swift
@@ -8,9 +8,6 @@ import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
extension String: @retroactive CodingKey {
@@ -166,4 +163,4 @@ extension Set: RequestDecodable where Element: Content {
extension Set: Content where Element: Content { }
-extension AnyCodable: Content {}
+extension JSONValue: Content {}
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/JSONValue.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/JSONValue.swift
new file mode 100644
index 00000000000..85d66ad6abf
--- /dev/null
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/JSONValue.swift
@@ -0,0 +1,247 @@
+//
+// JSONValue.swift
+//
+// Generated by openapi-generator
+// https://openapi-generator.tech
+//
+
+import Foundation
+
+public enum JSONValue: Codable, Hashable {
+ case string(String)
+ case int(Int)
+ case double(Double)
+ case bool(Bool)
+ case array([JSONValue])
+ case dictionary([String: JSONValue])
+ case null
+
+ // MARK: - Decoding Logic
+ public init(from decoder: Decoder) throws {
+ let container = try decoder.singleValueContainer()
+
+ if let stringValue = try? container.decode(String.self) {
+ self = .string(stringValue)
+ } else if let intValue = try? container.decode(Int.self) {
+ self = .int(intValue)
+ } else if let doubleValue = try? container.decode(Double.self) {
+ self = .double(doubleValue)
+ } else if let boolValue = try? container.decode(Bool.self) {
+ self = .bool(boolValue)
+ } else if let arrayValue = try? container.decode([JSONValue].self) {
+ self = .array(arrayValue)
+ } else if let dictionaryValue = try? container.decode([String: JSONValue].self) {
+ self = .dictionary(dictionaryValue)
+ } else if container.decodeNil() {
+ self = .null
+ } else {
+ throw DecodingError.dataCorruptedError(in: container, debugDescription: "Unknown JSON value")
+ }
+ }
+
+ // MARK: - Encoding Logic
+ public func encode(to encoder: Encoder) throws {
+ var container = encoder.singleValueContainer()
+
+ switch self {
+ case .string(let value):
+ try container.encode(value)
+ case .int(let value):
+ try container.encode(value)
+ case .double(let value):
+ try container.encode(value)
+ case .bool(let value):
+ try container.encode(value)
+ case .array(let value):
+ try container.encode(value)
+ case .dictionary(let value):
+ try container.encode(value)
+ case .null:
+ try container.encodeNil()
+ }
+ }
+}
+
+extension JSONValue {
+ public init(_ value: String) {
+ self = .string(value)
+ }
+
+ public init(_ value: Int) {
+ self = .int(value)
+ }
+
+ public init(_ value: Double) {
+ self = .double(value)
+ }
+
+ public init(_ value: Bool) {
+ self = .bool(value)
+ }
+
+ public init(_ value: [JSONValue]) {
+ self = .array(value)
+ }
+
+ public init(_ value: [String: JSONValue]) {
+ self = .dictionary(value)
+ }
+
+ public init(_ codable: T) throws {
+ let encoder = JSONEncoder()
+ let encodedData = try encoder.encode(codable)
+ let decoder = JSONDecoder()
+
+ let decodedValue = try decoder.decode(JSONValue.self, from: encodedData)
+ self = decodedValue
+ }
+}
+
+extension JSONValue {
+ public var isString: Bool {
+ if case .string = self { return true }
+ return false
+ }
+
+ public var isInt: Bool {
+ if case .int = self { return true }
+ return false
+ }
+
+ public var isDouble: Bool {
+ if case .double = self { return true }
+ return false
+ }
+
+ public var isBool: Bool {
+ if case .bool = self { return true }
+ return false
+ }
+
+ public var isArray: Bool {
+ if case .array = self { return true }
+ return false
+ }
+
+ public var isDictionary: Bool {
+ if case .dictionary = self { return true }
+ return false
+ }
+
+ public var isNull: Bool {
+ return self == .null
+ }
+
+}
+
+extension JSONValue {
+ public var stringValue: String? {
+ switch self {
+ case .string(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var intValue: Int? {
+ switch self {
+ case .int(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var doubleValue: Double? {
+ switch self {
+ case .double(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var boolValue: Bool? {
+ switch self {
+ case .bool(let value):
+ return value
+ default:
+ return nil
+ }
+ }
+
+ public var arrayValue: [JSONValue]? {
+ if case let .array(value) = self {
+ return value
+ }
+ return nil
+ }
+
+ public var dictionaryValue: [String: JSONValue]? {
+ if case let .dictionary(value) = self {
+ return value
+ }
+ return nil
+ }
+}
+
+extension JSONValue {
+ public subscript(key: String) -> JSONValue? {
+ return dictionaryValue?[key]
+ }
+
+ public subscript(index: Int) -> JSONValue? {
+ guard case let .array(array) = self, index >= 0 && index < array.count else {
+ return nil
+ }
+ return array[index]
+ }
+}
+
+extension JSONValue: ExpressibleByStringLiteral, ExpressibleByStringInterpolation {
+ public init(stringLiteral value: StringLiteralType) {
+ self = .string(value)
+ }
+}
+
+extension JSONValue: ExpressibleByIntegerLiteral {
+ public init(integerLiteral value: IntegerLiteralType) {
+ self = .int(value)
+ }
+}
+
+extension JSONValue: ExpressibleByFloatLiteral {
+ public init(floatLiteral value: FloatLiteralType) {
+ self = .double(value)
+ }
+}
+
+
+extension JSONValue: ExpressibleByBooleanLiteral {
+ public init(booleanLiteral value: BooleanLiteralType) {
+ self = .bool(value)
+ }
+}
+
+extension JSONValue: ExpressibleByArrayLiteral {
+ public init(arrayLiteral elements: JSONValue...) {
+ self = .array(elements)
+ }
+}
+
+extension JSONValue: ExpressibleByDictionaryLiteral {
+ public init(dictionaryLiteral elements: (String, JSONValue)...) {
+ var dict: [String: JSONValue] = [:]
+ for (key, value) in elements {
+ dict[key] = value
+ }
+ self = .dictionary(dict)
+ }
+}
+
+extension JSONValue: ExpressibleByNilLiteral {
+ public init(nilLiteral: ()) {
+ self = .null
+ }
+}
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesAnyType.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesAnyType.swift
index 2f18010d237..8f33cba8744 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesAnyType.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesAnyType.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class AdditionalPropertiesAnyType: Content, Hashable {
@@ -23,9 +20,9 @@ public final class AdditionalPropertiesAnyType: Content, Hashable {
case name
}
- public var additionalProperties: [String: AnyCodable] = [:]
+ public var additionalProperties: [String: JSONValue] = [:]
- public subscript(key: String) -> AnyCodable? {
+ public subscript(key: String) -> JSONValue? {
get {
if let value = additionalProperties[key] {
return value
@@ -56,7 +53,7 @@ public final class AdditionalPropertiesAnyType: Content, Hashable {
var nonAdditionalPropertyKeys = Set()
nonAdditionalPropertyKeys.insert("name")
let additionalPropertiesContainer = try decoder.container(keyedBy: String.self)
- additionalProperties = try additionalPropertiesContainer.decodeMap(AnyCodable.self, excludedKeys: nonAdditionalPropertyKeys)
+ additionalProperties = try additionalPropertiesContainer.decodeMap(JSONValue.self, excludedKeys: nonAdditionalPropertyKeys)
}
public static func == (lhs: AdditionalPropertiesAnyType, rhs: AdditionalPropertiesAnyType) -> Bool {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesArray.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesArray.swift
index d590cb3a390..cf3d2db319f 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesArray.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesArray.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class AdditionalPropertiesArray: Content, Hashable {
@@ -23,9 +20,9 @@ public final class AdditionalPropertiesArray: Content, Hashable {
case name
}
- public var additionalProperties: [String: [AnyCodable]] = [:]
+ public var additionalProperties: [String: [JSONValue]] = [:]
- public subscript(key: String) -> [AnyCodable]? {
+ public subscript(key: String) -> [JSONValue]? {
get {
if let value = additionalProperties[key] {
return value
@@ -56,7 +53,7 @@ public final class AdditionalPropertiesArray: Content, Hashable {
var nonAdditionalPropertyKeys = Set()
nonAdditionalPropertyKeys.insert("name")
let additionalPropertiesContainer = try decoder.container(keyedBy: String.self)
- additionalProperties = try additionalPropertiesContainer.decodeMap([AnyCodable].self, excludedKeys: nonAdditionalPropertyKeys)
+ additionalProperties = try additionalPropertiesContainer.decodeMap([JSONValue].self, excludedKeys: nonAdditionalPropertyKeys)
}
public static func == (lhs: AdditionalPropertiesArray, rhs: AdditionalPropertiesArray) -> Bool {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesBoolean.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesBoolean.swift
index 8dc293a604e..e2908594503 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesBoolean.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesBoolean.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class AdditionalPropertiesBoolean: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesClass.swift
index de9ef459a05..dcbede7bc8f 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class AdditionalPropertiesClass: Content, Hashable {
@@ -18,14 +15,14 @@ public final class AdditionalPropertiesClass: Content, Hashable {
public var mapInteger: [String: Int]?
public var mapBoolean: [String: Bool]?
public var mapArrayInteger: [String: [Int]]?
- public var mapArrayAnytype: [String: [AnyCodable]]?
+ public var mapArrayAnytype: [String: [JSONValue]]?
public var mapMapString: [String: [String: String]]?
- public var mapMapAnytype: [String: [String: AnyCodable]]?
- public var anytype1: AnyCodable?
- public var anytype2: AnyCodable?
- public var anytype3: AnyCodable?
+ public var mapMapAnytype: [String: [String: JSONValue]]?
+ public var anytype1: JSONValue?
+ public var anytype2: JSONValue?
+ public var anytype3: JSONValue?
- public init(mapString: [String: String]? = nil, mapNumber: [String: Double]? = nil, mapInteger: [String: Int]? = nil, mapBoolean: [String: Bool]? = nil, mapArrayInteger: [String: [Int]]? = nil, mapArrayAnytype: [String: [AnyCodable]]? = nil, mapMapString: [String: [String: String]]? = nil, mapMapAnytype: [String: [String: AnyCodable]]? = nil, anytype1: AnyCodable? = nil, anytype2: AnyCodable? = nil, anytype3: AnyCodable? = nil) {
+ public init(mapString: [String: String]? = nil, mapNumber: [String: Double]? = nil, mapInteger: [String: Int]? = nil, mapBoolean: [String: Bool]? = nil, mapArrayInteger: [String: [Int]]? = nil, mapArrayAnytype: [String: [JSONValue]]? = nil, mapMapString: [String: [String: String]]? = nil, mapMapAnytype: [String: [String: JSONValue]]? = nil, anytype1: JSONValue? = nil, anytype2: JSONValue? = nil, anytype3: JSONValue? = nil) {
self.mapString = mapString
self.mapNumber = mapNumber
self.mapInteger = mapInteger
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesInteger.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesInteger.swift
index 5a7c412958a..f90c9ffa7a6 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesInteger.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesInteger.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class AdditionalPropertiesInteger: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesNumber.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesNumber.swift
index 259b29dae57..5c6ae2f4740 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesNumber.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesNumber.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class AdditionalPropertiesNumber: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesObject.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesObject.swift
index c8c0052c00c..16dbb6aa01d 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesObject.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesObject.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class AdditionalPropertiesObject: Content, Hashable {
@@ -23,9 +20,9 @@ public final class AdditionalPropertiesObject: Content, Hashable {
case name
}
- public var additionalProperties: [String: [String: AnyCodable]] = [:]
+ public var additionalProperties: [String: [String: JSONValue]] = [:]
- public subscript(key: String) -> [String: AnyCodable]? {
+ public subscript(key: String) -> [String: JSONValue]? {
get {
if let value = additionalProperties[key] {
return value
@@ -56,7 +53,7 @@ public final class AdditionalPropertiesObject: Content, Hashable {
var nonAdditionalPropertyKeys = Set()
nonAdditionalPropertyKeys.insert("name")
let additionalPropertiesContainer = try decoder.container(keyedBy: String.self)
- additionalProperties = try additionalPropertiesContainer.decodeMap([String: AnyCodable].self, excludedKeys: nonAdditionalPropertyKeys)
+ additionalProperties = try additionalPropertiesContainer.decodeMap([String: JSONValue].self, excludedKeys: nonAdditionalPropertyKeys)
}
public static func == (lhs: AdditionalPropertiesObject, rhs: AdditionalPropertiesObject) -> Bool {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesString.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesString.swift
index 13456e89d1b..27b7f315f1f 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesString.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AdditionalPropertiesString.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class AdditionalPropertiesString: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Animal.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Animal.swift
index 344d5b13b1f..e61742f7690 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Animal.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Animal.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class Animal: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AnimalFarm.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AnimalFarm.swift
index 1b3a286f089..dd9770231d6 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AnimalFarm.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/AnimalFarm.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public typealias AnimalFarm = [Animal]
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ApiResponse.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ApiResponse.swift
index 4323130668e..f9c5939be9b 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ApiResponse.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ApiResponse.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class ApiResponse: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ArrayOfArrayOfNumberOnly.swift
index cd3669774bf..60ae66f64e3 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ArrayOfArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ArrayOfArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class ArrayOfArrayOfNumberOnly: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ArrayOfNumberOnly.swift
index e222fdd2adb..f93ca8bdeaf 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ArrayOfNumberOnly.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ArrayOfNumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class ArrayOfNumberOnly: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ArrayTest.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ArrayTest.swift
index 87d4e0b8239..e0a779991ca 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ArrayTest.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ArrayTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class ArrayTest: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/BigCat.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/BigCat.swift
index f68dcec1d65..4470586eff3 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/BigCat.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/BigCat.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class BigCat: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Capitalization.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Capitalization.swift
index 3cc1d9d4cf3..f0cc18c0f8c 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Capitalization.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Capitalization.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class Capitalization: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Cat.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Cat.swift
index 6c0d6f303c5..37e70c0036f 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Cat.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Cat.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class Cat: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Category.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Category.swift
index ca2a487b438..58991bb8b7b 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Category.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Category.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class Category: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ClassModel.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ClassModel.swift
index a50bdf9ffd1..000d3658d22 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ClassModel.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ClassModel.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
/** Model for testing model with \"_class\" property */
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Client.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Client.swift
index 1ac630b90e9..4ba5219ddf2 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Client.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Client.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class Client: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Dog.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Dog.swift
index 71a8002b754..a20eb84fffb 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Dog.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Dog.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class Dog: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/EnumArrays.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/EnumArrays.swift
index 0b2b8c32844..f4ac110f88b 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/EnumArrays.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/EnumArrays.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class EnumArrays: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/EnumClass.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/EnumClass.swift
index 26c121d1543..4db864dd1c7 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/EnumClass.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/EnumClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public enum EnumClass: String, Content, Hashable, CaseIterable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/EnumTest.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/EnumTest.swift
index 044d121b9f3..66a3d967937 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/EnumTest.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/EnumTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class EnumTest: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/File.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/File.swift
index d7505802943..3b70313f505 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/File.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/File.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
/** Must be named `File` for test. */
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/FileSchemaTestClass.swift
index c2426485fe6..bc57101c274 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/FileSchemaTestClass.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/FileSchemaTestClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class FileSchemaTestClass: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/FormatTest.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/FormatTest.swift
index ea3dde72f1e..c1389aed718 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/FormatTest.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/FormatTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class FormatTest: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/HasOnlyReadOnly.swift
index fd0e1532b04..dfdb09175e4 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/HasOnlyReadOnly.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/HasOnlyReadOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class HasOnlyReadOnly: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/List.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/List.swift
index fd15761ab8a..a96ff0eef78 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/List.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/List.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class List: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/MapTest.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/MapTest.swift
index 2726af8cb65..f89a13e6a96 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/MapTest.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/MapTest.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class MapTest: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
index a98efe737a2..61d7e38e040 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/MixedPropertiesAndAdditionalPropertiesClass.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class MixedPropertiesAndAdditionalPropertiesClass: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Model200Response.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Model200Response.swift
index 1c9c6154700..40e36b4ca39 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Model200Response.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Model200Response.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
/** Model for testing model name starting with number */
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Name.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Name.swift
index 86a8d6bbe83..ef9692a6603 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Name.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Name.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
/** Model for testing model name same as property name */
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/NumberOnly.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/NumberOnly.swift
index b88d51e3b12..9c451e9f018 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/NumberOnly.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/NumberOnly.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class NumberOnly: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Order.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Order.swift
index 7a7b357cd46..e62357d2e31 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Order.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Order.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class Order: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/OuterComposite.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/OuterComposite.swift
index 7fd8d9254a6..d7696fe5c9f 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/OuterComposite.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/OuterComposite.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class OuterComposite: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/OuterEnum.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/OuterEnum.swift
index 3ea0e73af37..f73a43b6a89 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/OuterEnum.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/OuterEnum.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public enum OuterEnum: String, Content, Hashable, CaseIterable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Pet.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Pet.swift
index 73c5b9d0b65..ded293e7428 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Pet.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Pet.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class Pet: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ReadOnlyFirst.swift
index 05402ceb4d7..c48fc99cdc8 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ReadOnlyFirst.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/ReadOnlyFirst.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class ReadOnlyFirst: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Return.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Return.swift
index 05e4d06219a..45415afbd2b 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Return.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Return.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
/** Model for testing reserved words */
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/SpecialModelName.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/SpecialModelName.swift
index 8ad4aa608ea..9319338bde6 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/SpecialModelName.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/SpecialModelName.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class SpecialModelName: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/StringBooleanMap.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/StringBooleanMap.swift
index 59d76476f8b..e558e254f53 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/StringBooleanMap.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/StringBooleanMap.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class StringBooleanMap: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Tag.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Tag.swift
index b6ec1244243..88753a144ff 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Tag.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Tag.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class Tag: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/TypeHolderDefault.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/TypeHolderDefault.swift
index f0d5c3ad313..766b73224e9 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/TypeHolderDefault.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/TypeHolderDefault.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class TypeHolderDefault: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/TypeHolderExample.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/TypeHolderExample.swift
index cdefaad66d2..8115aacedba 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/TypeHolderExample.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/TypeHolderExample.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class TypeHolderExample: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/User.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/User.swift
index 47e3f6fbcb3..6bff6863965 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/User.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/User.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class User: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/XmlItem.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/XmlItem.swift
index 85003560b37..6a66d8e7e82 100644
--- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/XmlItem.swift
+++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/XmlItem.swift
@@ -6,9 +6,6 @@
//
import Foundation
-#if canImport(AnyCodable)
-import AnyCodable
-#endif
import Vapor
public final class XmlItem: Content, Hashable {
diff --git a/samples/client/petstore/swift6/vaporLibrary/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift6/vaporLibrary/docs/AdditionalPropertiesClass.md
index 4d5f0963145..62baaf997b7 100644
--- a/samples/client/petstore/swift6/vaporLibrary/docs/AdditionalPropertiesClass.md
+++ b/samples/client/petstore/swift6/vaporLibrary/docs/AdditionalPropertiesClass.md
@@ -8,12 +8,12 @@ Name | Type | Description | Notes
**mapInteger** | **[String: Int]** | | [optional]
**mapBoolean** | **[String: Bool]** | | [optional]
**mapArrayInteger** | [String: [Int]] | | [optional]
-**mapArrayAnytype** | [String: [AnyCodable]] | | [optional]
+**mapArrayAnytype** | [String: [JSONValue]] | | [optional]
**mapMapString** | [String: [String: String]] | | [optional]
-**mapMapAnytype** | [String: [String: AnyCodable]] | | [optional]
-**anytype1** | **AnyCodable** | | [optional]
-**anytype2** | **AnyCodable** | | [optional]
-**anytype3** | **AnyCodable** | | [optional]
+**mapMapAnytype** | [String: [String: JSONValue]] | | [optional]
+**anytype1** | **JSONValue** | | [optional]
+**anytype2** | **JSONValue** | | [optional]
+**anytype3** | **JSONValue** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)