diff --git a/samples/client/petstore/swift5/default/.gitignore b/samples/client/petstore/swift5/default/.gitignore new file mode 100644 index 00000000000..5e5d5cebcf4 --- /dev/null +++ b/samples/client/petstore/swift5/default/.gitignore @@ -0,0 +1,63 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots diff --git a/samples/client/petstore/swift5/default/.openapi-generator-ignore b/samples/client/petstore/swift5/default/.openapi-generator-ignore new file mode 100644 index 00000000000..7484ee590a3 --- /dev/null +++ b/samples/client/petstore/swift5/default/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/swift5/default/.openapi-generator/VERSION b/samples/client/petstore/swift5/default/.openapi-generator/VERSION new file mode 100644 index 00000000000..83a328a9227 --- /dev/null +++ b/samples/client/petstore/swift5/default/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/default/Info.plist b/samples/client/petstore/swift5/default/Info.plist new file mode 100644 index 00000000000..323e5ecfc42 --- /dev/null +++ b/samples/client/petstore/swift5/default/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/samples/client/petstore/swift5/default/PetstoreClient.podspec b/samples/client/petstore/swift5/default/PetstoreClient.podspec new file mode 100644 index 00000000000..c9e486d0dc4 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient.podspec @@ -0,0 +1,14 @@ +Pod::Spec.new do |s| + s.name = 'PetstoreClient' + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.11' + s.tvos.deployment_target = '9.0' + s.version = '1.0.0' + s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' } + s.authors = '' + s.license = 'Proprietary' + s.homepage = 'https://github.com/openapitools/openapi-generator' + s.summary = 'PetstoreClient' + s.source_files = 'PetstoreClient/Classes/**/*.swift' + +end diff --git a/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.pbxproj new file mode 100644 index 00000000000..5d6aed595c9 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.pbxproj @@ -0,0 +1,491 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXGroup section */ + 4FBDCF1330A9AB9122780DB3 /* Models */ = { + isa = PBXGroup; + children = ( + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, + ); + path = Models; + sourceTree = ""; + }; + 5FBA6AE5F64CD737F88B4565 = { + isa = PBXGroup; + children = ( + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 857F0DEA1890CE66D6DAD556 /* Products */, + ); + sourceTree = ""; + }; + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { + isa = PBXGroup; + children = ( + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, + ); + path = OpenAPIs; + sourceTree = ""; + }; + 857F0DEA1890CE66D6DAD556 /* Products */ = { + isa = PBXGroup; + children = ( + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, + ); + name = Products; + sourceTree = ""; + }; + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { + isa = PBXGroup; + children = ( + EF4C81BDD734856ED5023B77 /* Classes */, + ); + path = PetstoreClient; + sourceTree = ""; + }; + EF4C81BDD734856ED5023B77 /* Classes */ = { + isa = PBXGroup; + children = ( + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, + ); + path = Classes; + sourceTree = ""; + }; + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { + isa = PBXGroup; + children = ( + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, + ); + path = APIs; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C1282C2230015E0D204BEAED /* PetstoreClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildPhases = ( + E539708354CE60FE486F81ED /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PetstoreClient; + productName = PetstoreClient; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E7D276EE2369D8C455513C2E /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + }; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 5FBA6AE5F64CD737F88B4565; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C1282C2230015E0D204BEAED /* PetstoreClient */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + E539708354CE60FE486F81ED /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 3B2C02AFB91CB5C82766ED5C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + A9EB0A02B94C427CBACFEC7C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "DEBUG=1", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + DD3EEB93949E9EBA4437E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ""; + }; + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000000..919434a6254 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000000..18d981003d6 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme new file mode 100644 index 00000000000..e8ac84fa992 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs.swift new file mode 100644 index 00000000000..295f1934af7 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -0,0 +1,54 @@ +// APIs.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct RequestBuilder { + public let endpoint: String + public let method: String + public let parameters: [Parameters] + public let headers: [String: String] + + public init(endpoint: String, method: String, parameters: [Parameters] = [], headers: [String: String] = [:]) { + self.endpoint = endpoint + self.method = method + self.parameters = parameters + self.headers = headers + } +} + +public enum Parameters { + case query([String: Any?]) + case form([String: String?]) + case json(AnyEncodable) + + public init(_ raw: [String: Any?]) { + self = .query(raw) + } + + public init(_ raw: [String: String?]) { + self = .form(raw) + } + + public init(_ raw: T) { + self = .json(AnyEncodable(raw)) + } +} + +public struct AnyEncodable: Encodable { + var encode: (Encoder) throws -> Void + + init(_ encodable: Encodable) { + func encode(to encoder: Encoder) throws { + try encodable.encode(to: encoder) + } + self.encode = encode + } + + public func encode(to encoder: Encoder) throws { + try encode(encoder) + } +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift new file mode 100644 index 00000000000..827ab21b6b5 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -0,0 +1,28 @@ +// +// AnotherFakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct AnotherFakeAPI { + /** + To test special tags + - PATCH /another-fake/dummy + - To test special tags and operation ID starting with number + - parameter body: (body) client model + - returns: RequestBuilder + */ + public func call123testSpecialTags(body: Client) -> RequestBuilder { + let path = "/another-fake/dummy" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PATCH", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift new file mode 100644 index 00000000000..af04243b096 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -0,0 +1,340 @@ +// +// FakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FakeAPI { + /** + - POST /fake/outer/boolean + - Test serialization of outer boolean types + - parameter body: (body) Input boolean as post body (optional) + - returns: RequestBuilder + */ + public func fakeOuterBooleanSerialize(body: Bool? = nil) -> RequestBuilder { + let path = "/fake/outer/boolean" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + - POST /fake/outer/composite + - Test serialization of object with outer number type + - parameter body: (body) Input composite as post body (optional) + - returns: RequestBuilder + */ + public func fakeOuterCompositeSerialize(body: OuterComposite? = nil) -> RequestBuilder { + let path = "/fake/outer/composite" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + - POST /fake/outer/number + - Test serialization of outer number types + - parameter body: (body) Input number as post body (optional) + - returns: RequestBuilder + */ + public func fakeOuterNumberSerialize(body: Double? = nil) -> RequestBuilder { + let path = "/fake/outer/number" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + - POST /fake/outer/string + - Test serialization of outer string types + - parameter body: (body) Input string as post body (optional) + - returns: RequestBuilder + */ + public func fakeOuterStringSerialize(body: String? = nil) -> RequestBuilder { + let path = "/fake/outer/string" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + - PUT /fake/body-with-file-schema + - For this test, the body for this request much reference a schema named `File`. + - parameter body: (body) + - returns: RequestBuilder + */ + public func testBodyWithFileSchema(body: FileSchemaTestClass) -> RequestBuilder { + let path = "/fake/body-with-file-schema" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PUT", parameters: parameters) + } + + /** + - PUT /fake/body-with-query-params + - parameter query: (query) + - parameter body: (body) + - returns: RequestBuilder + */ + public func testBodyWithQueryParams(query: String, body: User) -> RequestBuilder { + let path = "/fake/body-with-query-params" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + let queryParams: [String: Any?] = [ + "query": query + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder(endpoint: path, method: "PUT", parameters: parameters) + } + + /** + To test \"client\" model + - PATCH /fake + - To test \"client\" model + - parameter body: (body) client model + - returns: RequestBuilder + */ + public func testClientModel(body: Client) -> RequestBuilder { + let path = "/fake" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PATCH", parameters: parameters) + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - POST /fake + - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - BASIC: + - type: http + - name: http_basic_test + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - returns: RequestBuilder + */ + public func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + let path = "/fake" + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "integer": integer?.description, + "int32": int32?.description, + "int64": int64?.description, + "number": number.description, + "float": float?.description, + "double": double.description, + "string": string, + "pattern_without_delimiter": patternWithoutDelimiter, + "byte": byte.description, + "binary": binary?.description, + "date": date?.description, + "dateTime": dateTime?.description, + "password": password, + "callback": callback + ] + parameters.append(Parameters(formParams)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + * enum for parameter enumHeaderStringArray + */ + public enum EnumHeaderStringArray_testEnumParameters: String { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumHeaderString + */ + public enum EnumHeaderString_testEnumParameters: String { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryStringArray + */ + public enum EnumQueryStringArray_testEnumParameters: String { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumQueryString + */ + public enum EnumQueryString_testEnumParameters: String { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryInteger + */ + public enum EnumQueryInteger_testEnumParameters: Int { + case _1 = 1 + case number2 = -2 + } + + /** + * enum for parameter enumQueryDouble + */ + public enum EnumQueryDouble_testEnumParameters: Double { + case _11 = 1.1 + case number12 = -1.2 + } + + /** + * enum for parameter enumFormStringArray + */ + public enum EnumFormStringArray_testEnumParameters: String { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumFormString + */ + public enum EnumFormString_testEnumParameters: String { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + To test enum parameters + - GET /fake + - To test enum parameters + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .-efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .-efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .$) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .-efg) + - returns: RequestBuilder + */ + public func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { + let path = "/fake" + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "enum_form_string_array": enumFormStringArray?.description, + "enum_form_string": enumFormString?.rawValue + ] + parameters.append(Parameters(formParams)) + + let queryParams: [String: Any?] = [ + "enum_query_string_array": enumQueryStringArray, + "enum_query_string": enumQueryString, + "enum_query_integer": enumQueryInteger, + "enum_query_double": enumQueryDouble + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder(endpoint: path, method: "GET", parameters: parameters) + } + + /** + Fake endpoint to test group parameters (optional) + - DELETE /fake + - Fake endpoint to test group parameters (optional) + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - returns: RequestBuilder + */ + public func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { + let path = "/fake" + + var parameters: [Parameters] = [] + + let queryParams: [String: Any?] = [ + "required_string_group": requiredStringGroup, + "required_int64_group": requiredInt64Group, + "string_group": stringGroup, + "int64_group": int64Group + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder(endpoint: path, method: "DELETE", parameters: parameters) + } + + /** + test inline additionalProperties + - POST /fake/inline-additionalProperties + - parameter param: (body) request body + - returns: RequestBuilder + */ + public func testInlineAdditionalProperties(param: [String: String]) -> RequestBuilder { + let path = "/fake/inline-additionalProperties" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(param)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + test json serialization of form data + - GET /fake/jsonFormData + - parameter param: (form) field1 + - parameter param2: (form) field2 + - returns: RequestBuilder + */ + public func testJsonFormData(param: String, param2: String) -> RequestBuilder { + let path = "/fake/jsonFormData" + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "param": param, + "param2": param2 + ] + parameters.append(Parameters(formParams)) + + return RequestBuilder(endpoint: path, method: "GET", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift new file mode 100644 index 00000000000..96131d9c1fb --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -0,0 +1,31 @@ +// +// FakeClassnameTags123API.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FakeClassnameTags123API { + /** + To test class name in snake case + - PATCH /fake_classname_test + - To test class name in snake case + - API Key: + - type: apiKey api_key_query (QUERY) + - name: api_key_query + - parameter body: (body) client model + - returns: RequestBuilder + */ + public func testClassname(body: Client) -> RequestBuilder { + let path = "/fake_classname_test" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PATCH", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift new file mode 100644 index 00000000000..8240720cdb3 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -0,0 +1,216 @@ +// +// PetAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PetAPI { + /** + Add a new pet to the store + - POST /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + public func addPet(body: Pet) -> RequestBuilder { + let path = "/pet" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + Deletes a pet + - DELETE /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - returns: RequestBuilder + */ + public func deletePet(petId: Int64, apiKey: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdEscaped = "\(petId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "DELETE") + } + + /** + * enum for parameter status + */ + public enum Status_findPetsByStatus: String { + case available = "available" + case pending = "pending" + case sold = "sold" + } + + /** + Finds Pets by status + - GET /pet/findByStatus + - Multiple status values can be provided with comma separated strings + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter status: (query) Status values that need to be considered for filter + - returns: RequestBuilder<[Pet]> + */ + public func findPetsByStatus(status: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByStatus" + + var parameters: [Parameters] = [] + + let queryParams: [String: Any?] = [ + "status": status + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder<[Pet]>(endpoint: path, method: "GET", parameters: parameters) + } + + /** + Finds Pets by tags + - GET /pet/findByTags + - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter tags: (query) Tags to filter by + - returns: RequestBuilder<[Pet]> + */ + public func findPetsByTags(tags: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByTags" + + var parameters: [Parameters] = [] + + let queryParams: [String: Any?] = [ + "tags": tags + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder<[Pet]>(endpoint: path, method: "GET", parameters: parameters) + } + + /** + Find pet by ID + - GET /pet/{petId} + - Returns a single pet + - API Key: + - type: apiKey api_key + - name: api_key + - parameter petId: (path) ID of pet to return + - returns: RequestBuilder + */ + public func getPetById(petId: Int64) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdEscaped = "\(petId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "GET") + } + + /** + Update an existing pet + - PUT /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + public func updatePet(body: Pet) -> RequestBuilder { + let path = "/pet" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PUT", parameters: parameters) + } + + /** + Updates a pet in the store with form data + - POST /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - returns: RequestBuilder + */ + public func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdEscaped = "\(petId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdEscaped, options: .literal, range: nil) + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "name": name, + "status": status + ] + parameters.append(Parameters(formParams)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + uploads an image + - POST /pet/{petId}/uploadImage + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - returns: RequestBuilder + */ + public func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImage" + let petIdEscaped = "\(petId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdEscaped, options: .literal, range: nil) + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "additionalMetadata": additionalMetadata, + "file": file?.description + ] + parameters.append(Parameters(formParams)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + uploads an image (required) + - POST /fake/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + public func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/fake/{petId}/uploadImageWithRequiredFile" + let petIdEscaped = "\(petId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdEscaped, options: .literal, range: nil) + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "additionalMetadata": additionalMetadata, + "requiredFile": requiredFile.description + ] + parameters.append(Parameters(formParams)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift new file mode 100644 index 00000000000..6b5488e5246 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -0,0 +1,72 @@ +// +// StoreAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct StoreAPI { + /** + Delete purchase order by ID + - DELETE /store/order/{order_id} + - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + - parameter orderId: (path) ID of the order that needs to be deleted + - returns: RequestBuilder + */ + public func deleteOrder(orderId: String) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdEscaped = "\(orderId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "DELETE") + } + + /** + Returns pet inventories by status + - GET /store/inventory + - Returns a map of status codes to quantities + - API Key: + - type: apiKey api_key + - name: api_key + - returns: RequestBuilder<[String:Int]> + */ + public func getInventory() -> RequestBuilder<[String: Int]> { + let path = "/store/inventory" + + return RequestBuilder<[String: Int]>(endpoint: path, method: "GET") + } + + /** + Find purchase order by ID + - GET /store/order/{order_id} + - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - parameter orderId: (path) ID of pet that needs to be fetched + - returns: RequestBuilder + */ + public func getOrderById(orderId: Int64) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdEscaped = "\(orderId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "GET") + } + + /** + Place an order for a pet + - POST /store/order + - parameter body: (body) order placed for purchasing the pet + - returns: RequestBuilder + */ + public func placeOrder(body: Order) -> RequestBuilder { + let path = "/store/order" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift new file mode 100644 index 00000000000..d7d61295e8f --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -0,0 +1,141 @@ +// +// UserAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct UserAPI { + /** + Create user + - POST /user + - This can only be done by the logged in user. + - parameter body: (body) Created user object + - returns: RequestBuilder + */ + public func createUser(body: User) -> RequestBuilder { + let path = "/user" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + Creates list of users with given input array + - POST /user/createWithArray + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + public func createUsersWithArrayInput(body: [User]) -> RequestBuilder { + let path = "/user/createWithArray" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + Creates list of users with given input array + - POST /user/createWithList + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + public func createUsersWithListInput(body: [User]) -> RequestBuilder { + let path = "/user/createWithList" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + Delete user + - DELETE /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) The name that needs to be deleted + - returns: RequestBuilder + */ + public func deleteUser(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernameEscaped = "\(username)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernameEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "DELETE") + } + + /** + Get user by user name + - GET /user/{username} + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - returns: RequestBuilder + */ + public func getUserByName(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernameEscaped = "\(username)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernameEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "GET") + } + + /** + Logs user into the system + - GET /user/login + - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - returns: RequestBuilder + */ + public func loginUser(username: String, password: String) -> RequestBuilder { + let path = "/user/login" + + var parameters: [Parameters] = [] + + let queryParams: [String: Any?] = [ + "username": username, + "password": password + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder(endpoint: path, method: "GET", parameters: parameters) + } + + /** + Logs out current logged in user session + - GET /user/logout + - returns: RequestBuilder + */ + public func logoutUser() -> RequestBuilder { + let path = "/user/logout" + + return RequestBuilder(endpoint: path, method: "GET") + } + + /** + Updated user + - PUT /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - returns: RequestBuilder + */ + public func updateUser(username: String, body: User) -> RequestBuilder { + var path = "/user/{username}" + let usernameEscaped = "\(username)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernameEscaped, options: .literal, range: nil) + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PUT", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift new file mode 100644 index 00000000000..a64e64065c9 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -0,0 +1,24 @@ +// +// AdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct AdditionalPropertiesClass: Codable { + + public var mapString: [String: String]? + public var mapMapString: [String: [String: String]]? + public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + self.mapString = mapString + self.mapMapString = mapMapString + } + + public enum CodingKeys: String, CodingKey { + case mapString = "map_string" + case mapMapString = "map_map_string" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift new file mode 100644 index 00000000000..cf5de2351a9 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -0,0 +1,19 @@ +// +// Animal.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Animal: Codable { + + public var className: String + public var color: String? = "red" + public init(className: String, color: String?) { + self.className = className + self.color = color + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift new file mode 100644 index 00000000000..e09b0e9efdc --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -0,0 +1,10 @@ +// +// AnimalFarm.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift new file mode 100644 index 00000000000..28eacf580dd --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -0,0 +1,21 @@ +// +// ApiResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ApiResponse: Codable { + + public var code: Int? + public var type: String? + public var message: String? + public init(code: Int?, type: String?, message: String?) { + self.code = code + self.type = type + self.message = message + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift new file mode 100644 index 00000000000..c2ef4cc41f1 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -0,0 +1,21 @@ +// +// ArrayOfArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfArrayOfNumberOnly: Codable { + + public var arrayArrayNumber: [[Double]]? + public init(arrayArrayNumber: [[Double]]?) { + self.arrayArrayNumber = arrayArrayNumber + } + + public enum CodingKeys: String, CodingKey { + case arrayArrayNumber = "ArrayArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift new file mode 100644 index 00000000000..36a6b5adbe7 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -0,0 +1,21 @@ +// +// ArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfNumberOnly: Codable { + + public var arrayNumber: [Double]? + public init(arrayNumber: [Double]?) { + self.arrayNumber = arrayNumber + } + + public enum CodingKeys: String, CodingKey { + case arrayNumber = "ArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift new file mode 100644 index 00000000000..a9617771b40 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -0,0 +1,27 @@ +// +// ArrayTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayTest: Codable { + + public var arrayOfString: [String]? + public var arrayArrayOfInteger: [[Int64]]? + public var arrayArrayOfModel: [[ReadOnlyFirst]]? + public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { + self.arrayOfString = arrayOfString + self.arrayArrayOfInteger = arrayArrayOfInteger + self.arrayArrayOfModel = arrayArrayOfModel + } + + public enum CodingKeys: String, CodingKey { + case arrayOfString = "array_of_string" + case arrayArrayOfInteger = "array_array_of_integer" + case arrayArrayOfModel = "array_array_of_model" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift new file mode 100644 index 00000000000..660ebd30aaa --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -0,0 +1,37 @@ +// +// Capitalization.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Capitalization: Codable { + + public var smallCamel: String? + public var capitalCamel: String? + public var smallSnake: String? + public var capitalSnake: String? + public var sCAETHFlowPoints: String? + /** Name of the pet */ + public var ATT_NAME: String? + public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { + self.smallCamel = smallCamel + self.capitalCamel = capitalCamel + self.smallSnake = smallSnake + self.capitalSnake = capitalSnake + self.sCAETHFlowPoints = sCAETHFlowPoints + self.ATT_NAME = ATT_NAME + } + + public enum CodingKeys: String, CodingKey { + case smallCamel + case capitalCamel = "CapitalCamel" + case smallSnake = "small_Snake" + case capitalSnake = "Capital_Snake" + case sCAETHFlowPoints = "SCA_ETH_Flow_Points" + case ATT_NAME + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift new file mode 100644 index 00000000000..cb9f812b935 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -0,0 +1,21 @@ +// +// Cat.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Cat: Codable { + + public var className: String + public var color: String? = "red" + public var declawed: Bool? + public init(className: String, color: String?, declawed: Bool?) { + self.className = className + self.color = color + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift new file mode 100644 index 00000000000..4f9a5b5a648 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -0,0 +1,17 @@ +// +// CatAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct CatAllOf: Codable { + + public var declawed: Bool? + public init(declawed: Bool?) { + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift new file mode 100644 index 00000000000..cdb57d6e39d --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -0,0 +1,19 @@ +// +// Category.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Category: Codable { + + public var id: Int64? + public var name: String = "default-name" + public init(id: Int64?, name: String) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift new file mode 100644 index 00000000000..8968e876037 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -0,0 +1,19 @@ +// +// ClassModel.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model with \"_class\" property */ + +public struct ClassModel: Codable { + + public var _class: String? + public init(_class: String?) { + self._class = _class + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift new file mode 100644 index 00000000000..85d2bf59f88 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -0,0 +1,17 @@ +// +// Client.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Client: Codable { + + public var client: String? + public init(client: String?) { + self.client = client + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift new file mode 100644 index 00000000000..99e7abc2038 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -0,0 +1,21 @@ +// +// Dog.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Dog: Codable { + + public var className: String + public var color: String? = "red" + public var breed: String? + public init(className: String, color: String?, breed: String?) { + self.className = className + self.color = color + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift new file mode 100644 index 00000000000..cff2c19160c --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -0,0 +1,17 @@ +// +// DogAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct DogAllOf: Codable { + + public var breed: String? + public init(breed: String?) { + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift new file mode 100644 index 00000000000..3796fefc5b5 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -0,0 +1,32 @@ +// +// EnumArrays.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumArrays: Codable { + + public enum JustSymbol: String, Codable { + case greaterThanOrEqualTo = ">=" + case dollar = "$" + } + public enum ArrayEnum: String, Codable { + case fish = "fish" + case crab = "crab" + } + public var justSymbol: JustSymbol? + public var arrayEnum: [ArrayEnum]? + public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { + self.justSymbol = justSymbol + self.arrayEnum = arrayEnum + } + + public enum CodingKeys: String, CodingKey { + case justSymbol = "just_symbol" + case arrayEnum = "array_enum" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift new file mode 100644 index 00000000000..3c1dfcac577 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -0,0 +1,14 @@ +// +// EnumClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum EnumClass: String, Codable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift new file mode 100644 index 00000000000..8a5a061c350 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -0,0 +1,51 @@ +// +// EnumTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumTest: Codable { + + public enum EnumString: String, Codable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumStringRequired: String, Codable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumInteger: Int, Codable { + case _1 = 1 + case number1 = -1 + } + public enum EnumNumber: Double, Codable { + case _11 = 1.1 + case number12 = -1.2 + } + public var enumString: EnumString? + public var enumStringRequired: EnumStringRequired + public var enumInteger: EnumInteger? + public var enumNumber: EnumNumber? + public var outerEnum: OuterEnum? + public init(enumString: EnumString?, enumStringRequired: EnumStringRequired, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { + self.enumString = enumString + self.enumStringRequired = enumStringRequired + self.enumInteger = enumInteger + self.enumNumber = enumNumber + self.outerEnum = outerEnum + } + + public enum CodingKeys: String, CodingKey { + case enumString = "enum_string" + case enumStringRequired = "enum_string_required" + case enumInteger = "enum_integer" + case enumNumber = "enum_number" + case outerEnum + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift new file mode 100644 index 00000000000..4a7ad73b13b --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -0,0 +1,20 @@ +// +// File.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Must be named `File` for test. */ + +public struct File: Codable { + + /** Test capitalization */ + public var sourceURI: String? + public init(sourceURI: String?) { + self.sourceURI = sourceURI + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift new file mode 100644 index 00000000000..2e10cf79ee7 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -0,0 +1,19 @@ +// +// FileSchemaTestClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FileSchemaTestClass: Codable { + + public var file: File? + public var files: [File]? + public init(file: File?, files: [File]?) { + self.file = file + self.files = files + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift new file mode 100644 index 00000000000..360dc2f2daa --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -0,0 +1,41 @@ +// +// FormatTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FormatTest: Codable { + + public var integer: Int? + public var int32: Int? + public var int64: Int64? + public var number: Double + public var float: Float? + public var double: Double? + public var string: String? + public var byte: Data + public var binary: URL? + public var date: Date + public var dateTime: Date? + public var uuid: UUID? + public var password: String + public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: URL?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { + self.integer = integer + self.int32 = int32 + self.int64 = int64 + self.number = number + self.float = float + self.double = double + self.string = string + self.byte = byte + self.binary = binary + self.date = date + self.dateTime = dateTime + self.uuid = uuid + self.password = password + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift new file mode 100644 index 00000000000..92d25b4035b --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -0,0 +1,19 @@ +// +// HasOnlyReadOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct HasOnlyReadOnly: Codable { + + public var bar: String? + public var foo: String? + public init(bar: String?, foo: String?) { + self.bar = bar + self.foo = foo + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift new file mode 100644 index 00000000000..0a12547ee44 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -0,0 +1,21 @@ +// +// List.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct List: Codable { + + public var _123list: String? + public init(_123list: String?) { + self._123list = _123list + } + + public enum CodingKeys: String, CodingKey { + case _123list = "123-list" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift new file mode 100644 index 00000000000..f146a8651c7 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -0,0 +1,34 @@ +// +// MapTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MapTest: Codable { + + public enum MapOfEnumString: String, Codable { + case upper = "UPPER" + case lower = "lower" + } + public var mapMapOfString: [String: [String: String]]? + public var mapOfEnumString: [String: String]? + public var directMap: [String: Bool]? + public var indirectMap: StringBooleanMap? + public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { + self.mapMapOfString = mapMapOfString + self.mapOfEnumString = mapOfEnumString + self.directMap = directMap + self.indirectMap = indirectMap + } + + public enum CodingKeys: String, CodingKey { + case mapMapOfString = "map_map_of_string" + case mapOfEnumString = "map_of_enum_string" + case directMap = "direct_map" + case indirectMap = "indirect_map" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift new file mode 100644 index 00000000000..16fb430a8b2 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -0,0 +1,21 @@ +// +// MixedPropertiesAndAdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + + public var uuid: UUID? + public var dateTime: Date? + public var map: [String: Animal]? + public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { + self.uuid = uuid + self.dateTime = dateTime + self.map = map + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift new file mode 100644 index 00000000000..96af48ec264 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -0,0 +1,26 @@ +// +// Model200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name starting with number */ + +public struct Model200Response: Codable { + + public var name: Int? + public var _class: String? + public init(name: Int?, _class: String?) { + self.name = name + self._class = _class + } + + public enum CodingKeys: String, CodingKey { + case name + case _class = "class" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift new file mode 100644 index 00000000000..1970d8c67cd --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -0,0 +1,32 @@ +// +// Name.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name same as property name */ + +public struct Name: Codable { + + public var name: Int + public var snakeCase: Int? + public var property: String? + public var _123number: Int? + public init(name: Int, snakeCase: Int?, property: String?, _123number: Int?) { + self.name = name + self.snakeCase = snakeCase + self.property = property + self._123number = _123number + } + + public enum CodingKeys: String, CodingKey { + case name + case snakeCase = "snake_case" + case property + case _123number = "123Number" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift new file mode 100644 index 00000000000..20146b8c408 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -0,0 +1,21 @@ +// +// NumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct NumberOnly: Codable { + + public var justNumber: Double? + public init(justNumber: Double?) { + self.justNumber = justNumber + } + + public enum CodingKeys: String, CodingKey { + case justNumber = "JustNumber" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift new file mode 100644 index 00000000000..318d1c4127c --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -0,0 +1,33 @@ +// +// Order.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Order: Codable { + + public enum Status: String, Codable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" + } + public var id: Int64? + public var petId: Int64? + public var quantity: Int? + public var shipDate: Date? + /** Order Status */ + public var status: Status? + public var complete: Bool? = false + public init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { + self.id = id + self.petId = petId + self.quantity = quantity + self.shipDate = shipDate + self.status = status + self.complete = complete + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift new file mode 100644 index 00000000000..9da80f3b277 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -0,0 +1,27 @@ +// +// OuterComposite.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct OuterComposite: Codable { + + public var myNumber: Double? + public var myString: String? + public var myBoolean: Bool? + public init(myNumber: Double?, myString: String?, myBoolean: Bool?) { + self.myNumber = myNumber + self.myString = myString + self.myBoolean = myBoolean + } + + public enum CodingKeys: String, CodingKey { + case myNumber = "my_number" + case myString = "my_string" + case myBoolean = "my_boolean" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift new file mode 100644 index 00000000000..9f80fc95ecf --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -0,0 +1,14 @@ +// +// OuterEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum OuterEnum: String, Codable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift new file mode 100644 index 00000000000..35911df349b --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -0,0 +1,33 @@ +// +// Pet.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Pet: Codable { + + public enum Status: String, Codable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + public var id: Int64? + public var category: Category? + public var name: String + public var photoUrls: [String] + public var tags: [Tag]? + /** pet status in the store */ + public var status: Status? + public init(id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { + self.id = id + self.category = category + self.name = name + self.photoUrls = photoUrls + self.tags = tags + self.status = status + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift new file mode 100644 index 00000000000..06a842a672d --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -0,0 +1,19 @@ +// +// ReadOnlyFirst.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ReadOnlyFirst: Codable { + + public var bar: String? + public var baz: String? + public init(bar: String?, baz: String?) { + self.bar = bar + self.baz = baz + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift new file mode 100644 index 00000000000..a763353d12c --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -0,0 +1,23 @@ +// +// Return.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing reserved words */ + +public struct Return: Codable { + + public var _return: Int? + public init(_return: Int?) { + self._return = _return + } + + public enum CodingKeys: String, CodingKey { + case _return = "return" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift new file mode 100644 index 00000000000..ea11261e7b6 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -0,0 +1,21 @@ +// +// SpecialModelName.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct SpecialModelName: Codable { + + public var specialPropertyName: Int64? + public init(specialPropertyName: Int64?) { + self.specialPropertyName = specialPropertyName + } + + public enum CodingKeys: String, CodingKey { + case specialPropertyName = "$special[property.name]" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift new file mode 100644 index 00000000000..682ef3359d3 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -0,0 +1,14 @@ +// +// StringBooleanMap.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct StringBooleanMap: Codable { + + public var additionalProperties: [String: Bool] = [:] + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift new file mode 100644 index 00000000000..50cfb7610bd --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -0,0 +1,19 @@ +// +// Tag.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Tag: Codable { + + public var id: Int64? + public var name: String? + public init(id: Int64?, name: String?) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift new file mode 100644 index 00000000000..640de5b4345 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -0,0 +1,33 @@ +// +// TypeHolderDefault.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderDefault: Codable { + + public var stringItem: String = "what" + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool = true + public var arrayItem: [Int] + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift new file mode 100644 index 00000000000..3c0d33456b2 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -0,0 +1,33 @@ +// +// TypeHolderExample.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderExample: Codable { + + public var stringItem: String + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool + public var arrayItem: [Int] + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift new file mode 100644 index 00000000000..e27318ef80c --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -0,0 +1,32 @@ +// +// User.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct User: Codable { + + public var id: Int64? + public var username: String? + public var firstName: String? + public var lastName: String? + public var email: String? + public var password: String? + public var phone: String? + /** User Status */ + public var userStatus: Int? + public init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { + self.id = id + self.username = username + self.firstName = firstName + self.lastName = lastName + self.email = email + self.password = password + self.phone = phone + self.userStatus = userStatus + } + +} diff --git a/samples/client/petstore/swift5/default/README.md b/samples/client/petstore/swift5/default/README.md new file mode 100644 index 00000000000..595aca25752 --- /dev/null +++ b/samples/client/petstore/swift5/default/README.md @@ -0,0 +1,141 @@ +# Swift4 API client for PetstoreClient + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build package: org.openapitools.codegen.languages.Swift5Codegen + +## Installation + +### Carthage + +Run `carthage update` + +### CocoaPods + +Run `pod install` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AnotherFakeAPI* | [**call123testSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags +*FakeAPI* | [**fakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +*FakeAPI* | [**fakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +*FakeAPI* | [**fakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +*FakeAPI* | [**fakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*FakeAPI* | [**testBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +*FakeAPI* | [**testBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +*FakeAPI* | [**testClientModel**](docs/FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +*FakeAPI* | [**testEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeAPI* | [**testEnumParameters**](docs/FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +*FakeAPI* | [**testGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +*FakeAPI* | [**testInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeAPI* | [**testJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeClassnameTags123API* | [**testClassname**](docs/FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case +*PetAPI* | [**addPet**](docs/PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +*PetAPI* | [**deletePet**](docs/PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetAPI* | [**findPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetAPI* | [**findPetsByTags**](docs/PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetAPI* | [**getPetById**](docs/PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetAPI* | [**updatePet**](docs/PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +*PetAPI* | [**updatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetAPI* | [**uploadFile**](docs/PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetAPI* | [**uploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreAPI* | [**deleteOrder**](docs/StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +*StoreAPI* | [**getInventory**](docs/StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreAPI* | [**getOrderById**](docs/StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +*StoreAPI* | [**placeOrder**](docs/StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserAPI* | [**createUser**](docs/UserAPI.md#createuser) | **POST** /user | Create user +*UserAPI* | [**createUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserAPI* | [**createUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserAPI* | [**deleteUser**](docs/UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserAPI* | [**getUserByName**](docs/UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserAPI* | [**loginUser**](docs/UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +*UserAPI* | [**logoutUser**](docs/UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserAPI* | [**updateUser**](docs/UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +## Documentation For Models + + - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [Animal](docs/Animal.md) + - [AnimalFarm](docs/AnimalFarm.md) + - [ApiResponse](docs/ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [ArrayTest](docs/ArrayTest.md) + - [Capitalization](docs/Capitalization.md) + - [Cat](docs/Cat.md) + - [CatAllOf](docs/CatAllOf.md) + - [Category](docs/Category.md) + - [ClassModel](docs/ClassModel.md) + - [Client](docs/Client.md) + - [Dog](docs/Dog.md) + - [DogAllOf](docs/DogAllOf.md) + - [EnumArrays](docs/EnumArrays.md) + - [EnumClass](docs/EnumClass.md) + - [EnumTest](docs/EnumTest.md) + - [File](docs/File.md) + - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [FormatTest](docs/FormatTest.md) + - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [List](docs/List.md) + - [MapTest](docs/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](docs/Model200Response.md) + - [Name](docs/Name.md) + - [NumberOnly](docs/NumberOnly.md) + - [Order](docs/Order.md) + - [OuterComposite](docs/OuterComposite.md) + - [OuterEnum](docs/OuterEnum.md) + - [Pet](docs/Pet.md) + - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [Return](docs/Return.md) + - [SpecialModelName](docs/SpecialModelName.md) + - [StringBooleanMap](docs/StringBooleanMap.md) + - [Tag](docs/Tag.md) + - [TypeHolderDefault](docs/TypeHolderDefault.md) + - [TypeHolderExample](docs/TypeHolderExample.md) + - [User](docs/User.md) + + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +## api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +## http_basic_test + +- **Type**: HTTP basic authentication + +## petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + + +## Author + + + diff --git a/samples/client/petstore/swift5/default/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/default/docs/AdditionalPropertiesClass.md new file mode 100644 index 00000000000..e22d28be1de --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/AdditionalPropertiesClass.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapString** | **[String:String]** | | [optional] +**mapMapString** | [String:[String:String]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Animal.md b/samples/client/petstore/swift5/default/docs/Animal.md new file mode 100644 index 00000000000..69c601455cd --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Animal.md @@ -0,0 +1,11 @@ +# Animal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] [default to "red"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/AnimalFarm.md b/samples/client/petstore/swift5/default/docs/AnimalFarm.md new file mode 100644 index 00000000000..df6bab21dae --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/AnimalFarm.md @@ -0,0 +1,9 @@ +# AnimalFarm + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/default/docs/AnotherFakeAPI.md new file mode 100644 index 00000000000..aead5f1f980 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/AnotherFakeAPI.md @@ -0,0 +1,59 @@ +# AnotherFakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**call123testSpecialTags**](AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags + + +# **call123testSpecialTags** +```swift + open class func call123testSpecialTags(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test special tags + +To test special tags and operation ID starting with number + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test special tags +AnotherFakeAPI.call123testSpecialTags(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/default/docs/ApiResponse.md b/samples/client/petstore/swift5/default/docs/ApiResponse.md new file mode 100644 index 00000000000..c6d9768fe9b --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/ApiResponse.md @@ -0,0 +1,12 @@ +# ApiResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Int** | | [optional] +**type** | **String** | | [optional] +**message** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/swift5/default/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 00000000000..c6fceff5e08 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayArrayNumber** | [[Double]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/ArrayOfNumberOnly.md b/samples/client/petstore/swift5/default/docs/ArrayOfNumberOnly.md new file mode 100644 index 00000000000..f09f8fa6f70 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/ArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayNumber** | **[Double]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/ArrayTest.md b/samples/client/petstore/swift5/default/docs/ArrayTest.md new file mode 100644 index 00000000000..bf416b8330c --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/ArrayTest.md @@ -0,0 +1,12 @@ +# ArrayTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayOfString** | **[String]** | | [optional] +**arrayArrayOfInteger** | [[Int64]] | | [optional] +**arrayArrayOfModel** | [[ReadOnlyFirst]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Capitalization.md b/samples/client/petstore/swift5/default/docs/Capitalization.md new file mode 100644 index 00000000000..95374216c77 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Capitalization.md @@ -0,0 +1,15 @@ +# Capitalization + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] +**smallSnake** | **String** | | [optional] +**capitalSnake** | **String** | | [optional] +**sCAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Cat.md b/samples/client/petstore/swift5/default/docs/Cat.md new file mode 100644 index 00000000000..fb5949b1576 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Cat.md @@ -0,0 +1,10 @@ +# Cat + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/CatAllOf.md b/samples/client/petstore/swift5/default/docs/CatAllOf.md new file mode 100644 index 00000000000..79789be61c0 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/CatAllOf.md @@ -0,0 +1,10 @@ +# CatAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Category.md b/samples/client/petstore/swift5/default/docs/Category.md new file mode 100644 index 00000000000..5ca5408c0f9 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Category.md @@ -0,0 +1,11 @@ +# Category + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [default to "default-name"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/ClassModel.md b/samples/client/petstore/swift5/default/docs/ClassModel.md new file mode 100644 index 00000000000..e3912fdf0fd --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/ClassModel.md @@ -0,0 +1,10 @@ +# ClassModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Client.md b/samples/client/petstore/swift5/default/docs/Client.md new file mode 100644 index 00000000000..0de1b238c36 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Client.md @@ -0,0 +1,10 @@ +# Client + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Dog.md b/samples/client/petstore/swift5/default/docs/Dog.md new file mode 100644 index 00000000000..4824786da04 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Dog.md @@ -0,0 +1,10 @@ +# Dog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/DogAllOf.md b/samples/client/petstore/swift5/default/docs/DogAllOf.md new file mode 100644 index 00000000000..9302ef52e93 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/DogAllOf.md @@ -0,0 +1,10 @@ +# DogAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/EnumArrays.md b/samples/client/petstore/swift5/default/docs/EnumArrays.md new file mode 100644 index 00000000000..b9a9807d3c8 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/EnumArrays.md @@ -0,0 +1,11 @@ +# EnumArrays + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justSymbol** | **String** | | [optional] +**arrayEnum** | **[String]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/EnumClass.md b/samples/client/petstore/swift5/default/docs/EnumClass.md new file mode 100644 index 00000000000..67f017becd0 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/EnumClass.md @@ -0,0 +1,9 @@ +# EnumClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/EnumTest.md b/samples/client/petstore/swift5/default/docs/EnumTest.md new file mode 100644 index 00000000000..bc9b036dd76 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/EnumTest.md @@ -0,0 +1,14 @@ +# EnumTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumString** | **String** | | [optional] +**enumStringRequired** | **String** | | +**enumInteger** | **Int** | | [optional] +**enumNumber** | **Double** | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/FakeAPI.md b/samples/client/petstore/swift5/default/docs/FakeAPI.md new file mode 100644 index 00000000000..18fbf8147d8 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/FakeAPI.md @@ -0,0 +1,662 @@ +# FakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fakeOuterBooleanSerialize**](FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +[**fakeOuterCompositeSerialize**](FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +[**fakeOuterNumberSerialize**](FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +[**fakeOuterStringSerialize**](FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +[**testBodyWithFileSchema**](FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +[**testBodyWithQueryParams**](FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +[**testClientModel**](FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +[**testEndpointParameters**](FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEnumParameters**](FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +[**testGroupParameters**](FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**testInlineAdditionalProperties**](FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**testJsonFormData**](FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data + + +# **fakeOuterBooleanSerialize** +```swift + open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping (_ data: Bool?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer boolean types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = false // Bool | Input boolean as post body (optional) + +FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Bool** | Input boolean as post body | [optional] + +### Return type + +**Bool** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterCompositeSerialize** +```swift + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping (_ data: OuterComposite?, _ error: Error?) -> Void) +``` + + + +Test serialization of object with outer number type + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = OuterComposite(myNumber: 123, myString: "myString_example", myBoolean: false) // OuterComposite | Input composite as post body (optional) + +FakeAPI.fakeOuterCompositeSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterNumberSerialize** +```swift + open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping (_ data: Double?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer number types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = 987 // Double | Input number as post body (optional) + +FakeAPI.fakeOuterNumberSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Double** | Input number as post body | [optional] + +### Return type + +**Double** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterStringSerialize** +```swift + open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping (_ data: String?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer string types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = "body_example" // String | Input string as post body (optional) + +FakeAPI.fakeOuterStringSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **String** | Input string as post body | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithFileSchema** +```swift + open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + + + +For this test, the body for this request much reference a schema named `File`. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | + +FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithQueryParams** +```swift + open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + + + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let query = "query_example" // String | +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | + +FakeAPI.testBodyWithQueryParams(query: query, body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **String** | | + **body** | [**User**](User.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testClientModel** +```swift + open class func testClientModel(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test \"client\" model + +To test \"client\" model + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test \"client\" model +FakeAPI.testClientModel(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEndpointParameters** +```swift + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let number = 987 // Double | None +let double = 987 // Double | None +let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None +let byte = 987 // Data | None +let integer = 987 // Int | None (optional) +let int32 = 987 // Int | None (optional) +let int64 = 987 // Int64 | None (optional) +let float = 987 // Float | None (optional) +let string = "string_example" // String | None (optional) +let binary = URL(string: "https://example.com")! // URL | None (optional) +let date = Date() // Date | None (optional) +let dateTime = Date() // Date | None (optional) +let password = "password_example" // String | None (optional) +let callback = "callback_example" // String | None (optional) + +// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +FakeAPI.testEndpointParameters(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **Double** | None | + **double** | **Double** | None | + **patternWithoutDelimiter** | **String** | None | + **byte** | **Data** | None | + **integer** | **Int** | None | [optional] + **int32** | **Int** | None | [optional] + **int64** | **Int64** | None | [optional] + **float** | **Float** | None | [optional] + **string** | **String** | None | [optional] + **binary** | **URL** | None | [optional] + **date** | **Date** | None | [optional] + **dateTime** | **Date** | None | [optional] + **password** | **String** | None | [optional] + **callback** | **String** | None | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEnumParameters** +```swift + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +To test enum parameters + +To test enum parameters + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let enumHeaderStringArray = ["enumHeaderStringArray_example"] // [String] | Header parameter enum test (string array) (optional) +let enumHeaderString = "enumHeaderString_example" // String | Header parameter enum test (string) (optional) (default to .-efg) +let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query parameter enum test (string array) (optional) +let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .-efg) +let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) +let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) +let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .$) +let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .-efg) + +// To test enum parameters +FakeAPI.testEnumParameters(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumHeaderStringArray** | [**[String]**](String.md) | Header parameter enum test (string array) | [optional] + **enumHeaderString** | **String** | Header parameter enum test (string) | [optional] [default to .-efg] + **enumQueryStringArray** | [**[String]**](String.md) | Query parameter enum test (string array) | [optional] + **enumQueryString** | **String** | Query parameter enum test (string) | [optional] [default to .-efg] + **enumQueryInteger** | **Int** | Query parameter enum test (double) | [optional] + **enumQueryDouble** | **Double** | Query parameter enum test (double) | [optional] + **enumFormStringArray** | [**[String]**](String.md) | Form parameter enum test (string array) | [optional] [default to .$] + **enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to .-efg] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testGroupParameters** +```swift + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let requiredStringGroup = 987 // Int | Required String in group parameters +let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredInt64Group = 987 // Int64 | Required Integer in group parameters +let stringGroup = 987 // Int | String in group parameters (optional) +let booleanGroup = false // Bool | Boolean in group parameters (optional) +let int64Group = 987 // Int64 | Integer in group parameters (optional) + +// Fake endpoint to test group parameters (optional) +FakeAPI.testGroupParameters(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requiredStringGroup** | **Int** | Required String in group parameters | + **requiredBooleanGroup** | **Bool** | Required Boolean in group parameters | + **requiredInt64Group** | **Int64** | Required Integer in group parameters | + **stringGroup** | **Int** | String in group parameters | [optional] + **booleanGroup** | **Bool** | Boolean in group parameters | [optional] + **int64Group** | **Int64** | Integer in group parameters | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testInlineAdditionalProperties** +```swift + open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +test inline additionalProperties + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "TODO" // [String:String] | request body + +// test inline additionalProperties +FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | [**[String:String]**](String.md) | request body | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testJsonFormData** +```swift + open class func testJsonFormData(param: String, param2: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +test json serialization of form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "param_example" // String | field1 +let param2 = "param2_example" // String | field2 + +// test json serialization of form data +FakeAPI.testJsonFormData(param: param, param2: param2) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **String** | field1 | + **param2** | **String** | field2 | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/default/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/default/docs/FakeClassnameTags123API.md new file mode 100644 index 00000000000..9f24b46edbc --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/FakeClassnameTags123API.md @@ -0,0 +1,59 @@ +# FakeClassnameTags123API + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testClassname**](FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case + + +# **testClassname** +```swift + open class func testClassname(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test class name in snake case + +To test class name in snake case + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test class name in snake case +FakeClassnameTags123API.testClassname(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/default/docs/File.md b/samples/client/petstore/swift5/default/docs/File.md new file mode 100644 index 00000000000..3edfef17b79 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/File.md @@ -0,0 +1,10 @@ +# File + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourceURI** | **String** | Test capitalization | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/FileSchemaTestClass.md b/samples/client/petstore/swift5/default/docs/FileSchemaTestClass.md new file mode 100644 index 00000000000..afdacc60b2c --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/FileSchemaTestClass.md @@ -0,0 +1,11 @@ +# FileSchemaTestClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | [**File**](File.md) | | [optional] +**files** | [File] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/FormatTest.md b/samples/client/petstore/swift5/default/docs/FormatTest.md new file mode 100644 index 00000000000..f74d94f6c46 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/FormatTest.md @@ -0,0 +1,22 @@ +# FormatTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Int** | | [optional] +**int32** | **Int** | | [optional] +**int64** | **Int64** | | [optional] +**number** | **Double** | | +**float** | **Float** | | [optional] +**double** | **Double** | | [optional] +**string** | **String** | | [optional] +**byte** | **Data** | | +**binary** | **URL** | | [optional] +**date** | **Date** | | +**dateTime** | **Date** | | [optional] +**uuid** | **UUID** | | [optional] +**password** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift5/default/docs/HasOnlyReadOnly.md new file mode 100644 index 00000000000..45781360154 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/HasOnlyReadOnly.md @@ -0,0 +1,11 @@ +# HasOnlyReadOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] +**foo** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/List.md b/samples/client/petstore/swift5/default/docs/List.md new file mode 100644 index 00000000000..b77718302ed --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/List.md @@ -0,0 +1,10 @@ +# List + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_123list** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/MapTest.md b/samples/client/petstore/swift5/default/docs/MapTest.md new file mode 100644 index 00000000000..56213c4113f --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/MapTest.md @@ -0,0 +1,13 @@ +# MapTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapMapOfString** | [String:[String:String]] | | [optional] +**mapOfEnumString** | **[String:String]** | | [optional] +**directMap** | **[String:Bool]** | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/default/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 00000000000..fcffb8ecdbf --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,12 @@ +# MixedPropertiesAndAdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **UUID** | | [optional] +**dateTime** | **Date** | | [optional] +**map** | [String:Animal] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Model200Response.md b/samples/client/petstore/swift5/default/docs/Model200Response.md new file mode 100644 index 00000000000..5865ea690cc --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Model200Response.md @@ -0,0 +1,11 @@ +# Model200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | [optional] +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Name.md b/samples/client/petstore/swift5/default/docs/Name.md new file mode 100644 index 00000000000..2be75d062e4 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Name.md @@ -0,0 +1,13 @@ +# Name + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | +**snakeCase** | **Int** | | [optional] +**property** | **String** | | [optional] +**_123number** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/NumberOnly.md b/samples/client/petstore/swift5/default/docs/NumberOnly.md new file mode 100644 index 00000000000..72bd361168b --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/NumberOnly.md @@ -0,0 +1,10 @@ +# NumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justNumber** | **Double** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Order.md b/samples/client/petstore/swift5/default/docs/Order.md new file mode 100644 index 00000000000..15487f01175 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Order.md @@ -0,0 +1,15 @@ +# Order + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**petId** | **Int64** | | [optional] +**quantity** | **Int** | | [optional] +**shipDate** | **Date** | | [optional] +**status** | **String** | Order Status | [optional] +**complete** | **Bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/OuterComposite.md b/samples/client/petstore/swift5/default/docs/OuterComposite.md new file mode 100644 index 00000000000..d6b3583bc3f --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/OuterComposite.md @@ -0,0 +1,12 @@ +# OuterComposite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myNumber** | **Double** | | [optional] +**myString** | **String** | | [optional] +**myBoolean** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/OuterEnum.md b/samples/client/petstore/swift5/default/docs/OuterEnum.md new file mode 100644 index 00000000000..06d413b0168 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/OuterEnum.md @@ -0,0 +1,9 @@ +# OuterEnum + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Pet.md b/samples/client/petstore/swift5/default/docs/Pet.md new file mode 100644 index 00000000000..5c05f98fad4 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Pet.md @@ -0,0 +1,15 @@ +# Pet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **String** | | +**photoUrls** | **[String]** | | +**tags** | [Tag] | | [optional] +**status** | **String** | pet status in the store | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/PetAPI.md b/samples/client/petstore/swift5/default/docs/PetAPI.md new file mode 100644 index 00000000000..27efe083347 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/PetAPI.md @@ -0,0 +1,469 @@ +# PetAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) + + +# **addPet** +```swift + open class func addPet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Add a new pet to the store + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Add a new pet to the store +PetAPI.addPet(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deletePet** +```swift + open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Deletes a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | Pet id to delete +let apiKey = "apiKey_example" // String | (optional) + +// Deletes a pet +PetAPI.deletePet(petId: petId, apiKey: apiKey) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | Pet id to delete | + **apiKey** | **String** | | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByStatus** +```swift + open class func findPetsByStatus(status: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) +``` + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let status = ["status_example"] // [String] | Status values that need to be considered for filter + +// Finds Pets by status +PetAPI.findPetsByStatus(status: status) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**[String]**](String.md) | Status values that need to be considered for filter | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByTags** +```swift + open class func findPetsByTags(tags: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) +``` + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let tags = ["inner_example"] // [String] | Tags to filter by + +// Finds Pets by tags +PetAPI.findPetsByTags(tags: tags) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**[String]**](String.md) | Tags to filter by | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getPetById** +```swift + open class func getPetById(petId: Int64, completion: @escaping (_ data: Pet?, _ error: Error?) -> Void) +``` + +Find pet by ID + +Returns a single pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to return + +// Find pet by ID +PetAPI.getPetById(petId: petId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePet** +```swift + open class func updatePet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Update an existing pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Update an existing pet +PetAPI.updatePet(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePetWithForm** +```swift + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Updates a pet in the store with form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet that needs to be updated +let name = "name_example" // String | Updated name of the pet (optional) +let status = "status_example" // String | Updated status of the pet (optional) + +// Updates a pet in the store with form data +PetAPI.updatePetWithForm(petId: petId, name: name, status: status) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet that needs to be updated | + **name** | **String** | Updated name of the pet | [optional] + **status** | **String** | Updated status of the pet | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFile** +```swift + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) +``` + +uploads an image + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) +let file = URL(string: "https://example.com")! // URL | file to upload (optional) + +// uploads an image +PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + **file** | **URL** | file to upload | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFileWithRequiredFile** +```swift + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) +``` + +uploads an image (required) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) + +// uploads an image (required) +PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **requiredFile** | **URL** | file to upload | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/default/docs/ReadOnlyFirst.md b/samples/client/petstore/swift5/default/docs/ReadOnlyFirst.md new file mode 100644 index 00000000000..e3f16038b97 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/ReadOnlyFirst.md @@ -0,0 +1,11 @@ +# ReadOnlyFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] +**baz** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Return.md b/samples/client/petstore/swift5/default/docs/Return.md new file mode 100644 index 00000000000..66d17c27c88 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Return.md @@ -0,0 +1,10 @@ +# Return + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/SpecialModelName.md b/samples/client/petstore/swift5/default/docs/SpecialModelName.md new file mode 100644 index 00000000000..3ec27a38c2a --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/SpecialModelName.md @@ -0,0 +1,10 @@ +# SpecialModelName + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**specialPropertyName** | **Int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/StoreAPI.md b/samples/client/petstore/swift5/default/docs/StoreAPI.md new file mode 100644 index 00000000000..36365ca5199 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/StoreAPI.md @@ -0,0 +1,206 @@ +# StoreAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[**getInventory**](StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +[**placeOrder**](StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet + + +# **deleteOrder** +```swift + open class func deleteOrder(orderId: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = "orderId_example" // String | ID of the order that needs to be deleted + +// Delete purchase order by ID +StoreAPI.deleteOrder(orderId: orderId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String** | ID of the order that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getInventory** +```swift + open class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void) +``` + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Returns pet inventories by status +StoreAPI.getInventory() { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**[String:Int]** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrderById** +```swift + open class func getOrderById(orderId: Int64, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) +``` + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = 987 // Int64 | ID of pet that needs to be fetched + +// Find purchase order by ID +StoreAPI.getOrderById(orderId: orderId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **Int64** | ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **placeOrder** +```swift + open class func placeOrder(body: Order, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) +``` + +Place an order for a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Order(id: 123, petId: 123, quantity: 123, shipDate: Date(), status: "status_example", complete: false) // Order | order placed for purchasing the pet + +// Place an order for a pet +StoreAPI.placeOrder(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md) | order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/default/docs/StringBooleanMap.md b/samples/client/petstore/swift5/default/docs/StringBooleanMap.md new file mode 100644 index 00000000000..7abf11ec68b --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/StringBooleanMap.md @@ -0,0 +1,9 @@ +# StringBooleanMap + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Tag.md b/samples/client/petstore/swift5/default/docs/Tag.md new file mode 100644 index 00000000000..ff4ac8aa451 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Tag.md @@ -0,0 +1,11 @@ +# Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/TypeHolderDefault.md b/samples/client/petstore/swift5/default/docs/TypeHolderDefault.md new file mode 100644 index 00000000000..5161394bdc3 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/TypeHolderDefault.md @@ -0,0 +1,14 @@ +# TypeHolderDefault + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | [default to "what"] +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | [default to true] +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/TypeHolderExample.md b/samples/client/petstore/swift5/default/docs/TypeHolderExample.md new file mode 100644 index 00000000000..46d0471cd71 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/TypeHolderExample.md @@ -0,0 +1,14 @@ +# TypeHolderExample + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/User.md b/samples/client/petstore/swift5/default/docs/User.md new file mode 100644 index 00000000000..5a439de0ff9 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/User.md @@ -0,0 +1,17 @@ +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**username** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] +**email** | **String** | | [optional] +**password** | **String** | | [optional] +**phone** | **String** | | [optional] +**userStatus** | **Int** | User Status | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/UserAPI.md b/samples/client/petstore/swift5/default/docs/UserAPI.md new file mode 100644 index 00000000000..380813bc68c --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/UserAPI.md @@ -0,0 +1,406 @@ +# UserAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserAPI.md#createuser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +# **createUser** +```swift + open class func createUser(body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Create user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Created user object + +// Create user +UserAPI.createUser(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md) | Created user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithArrayInput** +```swift + open class func createUsersWithArrayInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithArrayInput(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithListInput** +```swift + open class func createUsersWithListInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithListInput(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteUser** +```swift + open class func deleteUser(username: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Delete user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be deleted + +// Delete user +UserAPI.deleteUser(username: username) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getUserByName** +```swift + open class func getUserByName(username: String, completion: @escaping (_ data: User?, _ error: Error?) -> Void) +``` + +Get user by user name + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be fetched. Use user1 for testing. + +// Get user by user name +UserAPI.getUserByName(username: username) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loginUser** +```swift + open class func loginUser(username: String, password: String, completion: @escaping (_ data: String?, _ error: Error?) -> Void) +``` + +Logs user into the system + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The user name for login +let password = "password_example" // String | The password for login in clear text + +// Logs user into the system +UserAPI.loginUser(username: username, password: password) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The user name for login | + **password** | **String** | The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **logoutUser** +```swift + open class func logoutUser(completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Logs out current logged in user session + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Logs out current logged in user session +UserAPI.logoutUser() { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +```swift + open class func updateUser(username: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Updated user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | name that need to be deleted +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Updated user object + +// Updated user +UserAPI.updateUser(username: username, body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | name that need to be deleted | + **body** | [**User**](User.md) | Updated user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/default/git_push.sh b/samples/client/petstore/swift5/default/git_push.sh new file mode 100644 index 00000000000..8442b80bb44 --- /dev/null +++ b/samples/client/petstore/swift5/default/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/samples/client/petstore/swift5/default/project.yml b/samples/client/petstore/swift5/default/project.yml new file mode 100644 index 00000000000..92f5767755b --- /dev/null +++ b/samples/client/petstore/swift5/default/project.yml @@ -0,0 +1,15 @@ +name: PetstoreClient +targets: + PetstoreClient: + type: framework + platform: iOS + deploymentTarget: "10.0" + sources: [PetstoreClient] + info: + path: ./Info.plist + version: 1.0.0 + settings: + APPLICATION_EXTENSION_API_ONLY: true + SWIFT_VERSION: "5.0" + scheme: {} + diff --git a/samples/client/petstore/swift5/promisekit/.gitignore b/samples/client/petstore/swift5/promisekit/.gitignore new file mode 100644 index 00000000000..5e5d5cebcf4 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/.gitignore @@ -0,0 +1,63 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots diff --git a/samples/client/petstore/swift5/promisekit/.openapi-generator-ignore b/samples/client/petstore/swift5/promisekit/.openapi-generator-ignore new file mode 100644 index 00000000000..7484ee590a3 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/swift5/promisekit/.openapi-generator/VERSION b/samples/client/petstore/swift5/promisekit/.openapi-generator/VERSION new file mode 100644 index 00000000000..83a328a9227 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/promisekit/Cartfile b/samples/client/petstore/swift5/promisekit/Cartfile new file mode 100644 index 00000000000..07b43e237b5 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/Cartfile @@ -0,0 +1,2 @@ +github "Alamofire/Alamofire" +github "mxcl/PromiseKit" diff --git a/samples/client/petstore/swift5/promisekit/Info.plist b/samples/client/petstore/swift5/promisekit/Info.plist new file mode 100644 index 00000000000..323e5ecfc42 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient.podspec b/samples/client/petstore/swift5/promisekit/PetstoreClient.podspec new file mode 100644 index 00000000000..8e6819efa9e --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient.podspec @@ -0,0 +1,16 @@ +Pod::Spec.new do |s| + s.name = 'PetstoreClient' + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.11' + s.tvos.deployment_target = '9.0' + s.version = '1.0.0' + s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' } + s.authors = '' + s.license = 'Proprietary' + s.homepage = 'https://github.com/openapitools/openapi-generator' + s.summary = 'PetstoreClient' + s.source_files = 'PetstoreClient/Classes/**/*.swift' + + s.dependency 'PromiseKit/CorePromise', '~> 4.4.0' + s.dependency 'Alamofire', '~> 4.7.0' +end diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/promisekit/PetstoreClient.xcodeproj/project.pbxproj new file mode 100644 index 00000000000..2ee29e27ef9 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient.xcodeproj/project.pbxproj @@ -0,0 +1,575 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; + 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */; }; + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83D /* Alamofire.framework */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; + 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 731043E4ECC8708558821B31 /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A586582C92491DF9C12D27E2 /* PromiseKit.framework */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; + 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A586582C92491DF9C12D27E2 /* PromiseKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = PromiseKit.framework; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D1990C2A394CCF025EF98A2F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */, + 731043E4ECC8708558821B31 /* PromiseKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1E464C0937FE0D3A7A0FE29A /* Frameworks */ = { + isa = PBXGroup; + children = ( + 7861EE241895128F64DD7873 /* Carthage */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4FBDCF1330A9AB9122780DB3 /* Models */ = { + isa = PBXGroup; + children = ( + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, + ); + path = Models; + sourceTree = ""; + }; + 5FBA6AE5F64CD737F88B4565 = { + isa = PBXGroup; + children = ( + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 1E464C0937FE0D3A7A0FE29A /* Frameworks */, + 857F0DEA1890CE66D6DAD556 /* Products */, + ); + sourceTree = ""; + }; + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { + isa = PBXGroup; + children = ( + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */, + 897716962D472FE162B723CB /* APIHelper.swift */, + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, + 28A444949BBC254798C3B3DD /* Configuration.swift */, + B8C298FC8929DCB369053F11 /* Extensions.swift */, + 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */, + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, + 8699F7966F748ED026A6FB4C /* Models.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, + ); + path = OpenAPIs; + sourceTree = ""; + }; + 7861EE241895128F64DD7873 /* Carthage */ = { + isa = PBXGroup; + children = ( + A012205B41CB71A62B86EECD /* iOS */, + ); + name = Carthage; + path = Carthage/Build; + sourceTree = ""; + }; + 857F0DEA1890CE66D6DAD556 /* Products */ = { + isa = PBXGroup; + children = ( + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, + ); + name = Products; + sourceTree = ""; + }; + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { + isa = PBXGroup; + children = ( + EF4C81BDD734856ED5023B77 /* Classes */, + ); + path = PetstoreClient; + sourceTree = ""; + }; + A012205B41CB71A62B86EECD /* iOS */ = { + isa = PBXGroup; + children = ( + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */, + A586582C92491DF9C12D27E2 /* PromiseKit.framework */, + ); + path = iOS; + sourceTree = ""; + }; + EF4C81BDD734856ED5023B77 /* Classes */ = { + isa = PBXGroup; + children = ( + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, + ); + path = Classes; + sourceTree = ""; + }; + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { + isa = PBXGroup; + children = ( + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, + ); + path = APIs; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C1282C2230015E0D204BEAED /* PetstoreClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildPhases = ( + E539708354CE60FE486F81ED /* Sources */, + D1990C2A394CCF025EF98A2F /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PetstoreClient; + productName = PetstoreClient; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E7D276EE2369D8C455513C2E /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + }; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 5FBA6AE5F64CD737F88B4565; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C1282C2230015E0D204BEAED /* PetstoreClient */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + E539708354CE60FE486F81ED /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, + 72547ECFB451A509409311EE /* Configuration.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */, + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 3B2C02AFB91CB5C82766ED5C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + A9EB0A02B94C427CBACFEC7C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "DEBUG=1", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + DD3EEB93949E9EBA4437E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ""; + }; + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/promisekit/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000000..919434a6254 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift5/promisekit/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme new file mode 100644 index 00000000000..e8ac84fa992 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIHelper.swift new file mode 100644 index 00000000000..75dea243957 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -0,0 +1,70 @@ +// APIHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct APIHelper { + public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + let destination = source.reduce(into: [String: Any]()) { (result, item) in + if let value = item.value { + result[item.key] = value + } + } + + if destination.isEmpty { + return nil + } + return destination + } + + public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + return source.reduce(into: [String: String]()) { (result, item) in + if let collection = item.value as? Array { + result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") + } else if let value: Any = item.value { + result[item.key] = "\(value)" + } + } + } + + public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { + guard let source = source else { + return nil + } + + return source.reduce(into: [String: Any](), { (result, item) in + switch item.value { + case let x as Bool: + result[item.key] = x.description + default: + result[item.key] = item.value + } + }) + } + + public static func mapValueToPathItem(_ source: Any) -> Any { + if let collection = source as? Array { + return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + } + return source + } + + public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in + if let collection = item.value as? Array { + let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + result.append(URLQueryItem(name: item.key, value: value)) + } else if let value = item.value { + result.append(URLQueryItem(name: item.key, value: "\(value)")) + } + } + + if destination.isEmpty { + return nil + } + return destination + } +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIs.swift new file mode 100644 index 00000000000..295f1934af7 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -0,0 +1,54 @@ +// APIs.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct RequestBuilder { + public let endpoint: String + public let method: String + public let parameters: [Parameters] + public let headers: [String: String] + + public init(endpoint: String, method: String, parameters: [Parameters] = [], headers: [String: String] = [:]) { + self.endpoint = endpoint + self.method = method + self.parameters = parameters + self.headers = headers + } +} + +public enum Parameters { + case query([String: Any?]) + case form([String: String?]) + case json(AnyEncodable) + + public init(_ raw: [String: Any?]) { + self = .query(raw) + } + + public init(_ raw: [String: String?]) { + self = .form(raw) + } + + public init(_ raw: T) { + self = .json(AnyEncodable(raw)) + } +} + +public struct AnyEncodable: Encodable { + var encode: (Encoder) throws -> Void + + init(_ encodable: Encodable) { + func encode(to encoder: Encoder) throws { + try encodable.encode(to: encoder) + } + self.encode = encode + } + + public func encode(to encoder: Encoder) throws { + try encode(encoder) + } +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift new file mode 100644 index 00000000000..827ab21b6b5 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -0,0 +1,28 @@ +// +// AnotherFakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct AnotherFakeAPI { + /** + To test special tags + - PATCH /another-fake/dummy + - To test special tags and operation ID starting with number + - parameter body: (body) client model + - returns: RequestBuilder + */ + public func call123testSpecialTags(body: Client) -> RequestBuilder { + let path = "/another-fake/dummy" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PATCH", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift new file mode 100644 index 00000000000..af04243b096 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -0,0 +1,340 @@ +// +// FakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FakeAPI { + /** + - POST /fake/outer/boolean + - Test serialization of outer boolean types + - parameter body: (body) Input boolean as post body (optional) + - returns: RequestBuilder + */ + public func fakeOuterBooleanSerialize(body: Bool? = nil) -> RequestBuilder { + let path = "/fake/outer/boolean" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + - POST /fake/outer/composite + - Test serialization of object with outer number type + - parameter body: (body) Input composite as post body (optional) + - returns: RequestBuilder + */ + public func fakeOuterCompositeSerialize(body: OuterComposite? = nil) -> RequestBuilder { + let path = "/fake/outer/composite" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + - POST /fake/outer/number + - Test serialization of outer number types + - parameter body: (body) Input number as post body (optional) + - returns: RequestBuilder + */ + public func fakeOuterNumberSerialize(body: Double? = nil) -> RequestBuilder { + let path = "/fake/outer/number" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + - POST /fake/outer/string + - Test serialization of outer string types + - parameter body: (body) Input string as post body (optional) + - returns: RequestBuilder + */ + public func fakeOuterStringSerialize(body: String? = nil) -> RequestBuilder { + let path = "/fake/outer/string" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + - PUT /fake/body-with-file-schema + - For this test, the body for this request much reference a schema named `File`. + - parameter body: (body) + - returns: RequestBuilder + */ + public func testBodyWithFileSchema(body: FileSchemaTestClass) -> RequestBuilder { + let path = "/fake/body-with-file-schema" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PUT", parameters: parameters) + } + + /** + - PUT /fake/body-with-query-params + - parameter query: (query) + - parameter body: (body) + - returns: RequestBuilder + */ + public func testBodyWithQueryParams(query: String, body: User) -> RequestBuilder { + let path = "/fake/body-with-query-params" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + let queryParams: [String: Any?] = [ + "query": query + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder(endpoint: path, method: "PUT", parameters: parameters) + } + + /** + To test \"client\" model + - PATCH /fake + - To test \"client\" model + - parameter body: (body) client model + - returns: RequestBuilder + */ + public func testClientModel(body: Client) -> RequestBuilder { + let path = "/fake" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PATCH", parameters: parameters) + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - POST /fake + - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - BASIC: + - type: http + - name: http_basic_test + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - returns: RequestBuilder + */ + public func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + let path = "/fake" + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "integer": integer?.description, + "int32": int32?.description, + "int64": int64?.description, + "number": number.description, + "float": float?.description, + "double": double.description, + "string": string, + "pattern_without_delimiter": patternWithoutDelimiter, + "byte": byte.description, + "binary": binary?.description, + "date": date?.description, + "dateTime": dateTime?.description, + "password": password, + "callback": callback + ] + parameters.append(Parameters(formParams)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + * enum for parameter enumHeaderStringArray + */ + public enum EnumHeaderStringArray_testEnumParameters: String { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumHeaderString + */ + public enum EnumHeaderString_testEnumParameters: String { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryStringArray + */ + public enum EnumQueryStringArray_testEnumParameters: String { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumQueryString + */ + public enum EnumQueryString_testEnumParameters: String { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryInteger + */ + public enum EnumQueryInteger_testEnumParameters: Int { + case _1 = 1 + case number2 = -2 + } + + /** + * enum for parameter enumQueryDouble + */ + public enum EnumQueryDouble_testEnumParameters: Double { + case _11 = 1.1 + case number12 = -1.2 + } + + /** + * enum for parameter enumFormStringArray + */ + public enum EnumFormStringArray_testEnumParameters: String { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumFormString + */ + public enum EnumFormString_testEnumParameters: String { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + To test enum parameters + - GET /fake + - To test enum parameters + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .-efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .-efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .$) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .-efg) + - returns: RequestBuilder + */ + public func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { + let path = "/fake" + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "enum_form_string_array": enumFormStringArray?.description, + "enum_form_string": enumFormString?.rawValue + ] + parameters.append(Parameters(formParams)) + + let queryParams: [String: Any?] = [ + "enum_query_string_array": enumQueryStringArray, + "enum_query_string": enumQueryString, + "enum_query_integer": enumQueryInteger, + "enum_query_double": enumQueryDouble + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder(endpoint: path, method: "GET", parameters: parameters) + } + + /** + Fake endpoint to test group parameters (optional) + - DELETE /fake + - Fake endpoint to test group parameters (optional) + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - returns: RequestBuilder + */ + public func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { + let path = "/fake" + + var parameters: [Parameters] = [] + + let queryParams: [String: Any?] = [ + "required_string_group": requiredStringGroup, + "required_int64_group": requiredInt64Group, + "string_group": stringGroup, + "int64_group": int64Group + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder(endpoint: path, method: "DELETE", parameters: parameters) + } + + /** + test inline additionalProperties + - POST /fake/inline-additionalProperties + - parameter param: (body) request body + - returns: RequestBuilder + */ + public func testInlineAdditionalProperties(param: [String: String]) -> RequestBuilder { + let path = "/fake/inline-additionalProperties" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(param)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + test json serialization of form data + - GET /fake/jsonFormData + - parameter param: (form) field1 + - parameter param2: (form) field2 + - returns: RequestBuilder + */ + public func testJsonFormData(param: String, param2: String) -> RequestBuilder { + let path = "/fake/jsonFormData" + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "param": param, + "param2": param2 + ] + parameters.append(Parameters(formParams)) + + return RequestBuilder(endpoint: path, method: "GET", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift new file mode 100644 index 00000000000..96131d9c1fb --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -0,0 +1,31 @@ +// +// FakeClassnameTags123API.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FakeClassnameTags123API { + /** + To test class name in snake case + - PATCH /fake_classname_test + - To test class name in snake case + - API Key: + - type: apiKey api_key_query (QUERY) + - name: api_key_query + - parameter body: (body) client model + - returns: RequestBuilder + */ + public func testClassname(body: Client) -> RequestBuilder { + let path = "/fake_classname_test" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PATCH", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift new file mode 100644 index 00000000000..8240720cdb3 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -0,0 +1,216 @@ +// +// PetAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PetAPI { + /** + Add a new pet to the store + - POST /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + public func addPet(body: Pet) -> RequestBuilder { + let path = "/pet" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + Deletes a pet + - DELETE /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - returns: RequestBuilder + */ + public func deletePet(petId: Int64, apiKey: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdEscaped = "\(petId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "DELETE") + } + + /** + * enum for parameter status + */ + public enum Status_findPetsByStatus: String { + case available = "available" + case pending = "pending" + case sold = "sold" + } + + /** + Finds Pets by status + - GET /pet/findByStatus + - Multiple status values can be provided with comma separated strings + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter status: (query) Status values that need to be considered for filter + - returns: RequestBuilder<[Pet]> + */ + public func findPetsByStatus(status: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByStatus" + + var parameters: [Parameters] = [] + + let queryParams: [String: Any?] = [ + "status": status + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder<[Pet]>(endpoint: path, method: "GET", parameters: parameters) + } + + /** + Finds Pets by tags + - GET /pet/findByTags + - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter tags: (query) Tags to filter by + - returns: RequestBuilder<[Pet]> + */ + public func findPetsByTags(tags: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByTags" + + var parameters: [Parameters] = [] + + let queryParams: [String: Any?] = [ + "tags": tags + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder<[Pet]>(endpoint: path, method: "GET", parameters: parameters) + } + + /** + Find pet by ID + - GET /pet/{petId} + - Returns a single pet + - API Key: + - type: apiKey api_key + - name: api_key + - parameter petId: (path) ID of pet to return + - returns: RequestBuilder + */ + public func getPetById(petId: Int64) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdEscaped = "\(petId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "GET") + } + + /** + Update an existing pet + - PUT /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + public func updatePet(body: Pet) -> RequestBuilder { + let path = "/pet" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PUT", parameters: parameters) + } + + /** + Updates a pet in the store with form data + - POST /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - returns: RequestBuilder + */ + public func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdEscaped = "\(petId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdEscaped, options: .literal, range: nil) + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "name": name, + "status": status + ] + parameters.append(Parameters(formParams)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + uploads an image + - POST /pet/{petId}/uploadImage + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - returns: RequestBuilder + */ + public func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImage" + let petIdEscaped = "\(petId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdEscaped, options: .literal, range: nil) + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "additionalMetadata": additionalMetadata, + "file": file?.description + ] + parameters.append(Parameters(formParams)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + uploads an image (required) + - POST /fake/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + public func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/fake/{petId}/uploadImageWithRequiredFile" + let petIdEscaped = "\(petId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdEscaped, options: .literal, range: nil) + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "additionalMetadata": additionalMetadata, + "requiredFile": requiredFile.description + ] + parameters.append(Parameters(formParams)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift new file mode 100644 index 00000000000..6b5488e5246 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -0,0 +1,72 @@ +// +// StoreAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct StoreAPI { + /** + Delete purchase order by ID + - DELETE /store/order/{order_id} + - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + - parameter orderId: (path) ID of the order that needs to be deleted + - returns: RequestBuilder + */ + public func deleteOrder(orderId: String) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdEscaped = "\(orderId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "DELETE") + } + + /** + Returns pet inventories by status + - GET /store/inventory + - Returns a map of status codes to quantities + - API Key: + - type: apiKey api_key + - name: api_key + - returns: RequestBuilder<[String:Int]> + */ + public func getInventory() -> RequestBuilder<[String: Int]> { + let path = "/store/inventory" + + return RequestBuilder<[String: Int]>(endpoint: path, method: "GET") + } + + /** + Find purchase order by ID + - GET /store/order/{order_id} + - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - parameter orderId: (path) ID of pet that needs to be fetched + - returns: RequestBuilder + */ + public func getOrderById(orderId: Int64) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdEscaped = "\(orderId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "GET") + } + + /** + Place an order for a pet + - POST /store/order + - parameter body: (body) order placed for purchasing the pet + - returns: RequestBuilder + */ + public func placeOrder(body: Order) -> RequestBuilder { + let path = "/store/order" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift new file mode 100644 index 00000000000..d7d61295e8f --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -0,0 +1,141 @@ +// +// UserAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct UserAPI { + /** + Create user + - POST /user + - This can only be done by the logged in user. + - parameter body: (body) Created user object + - returns: RequestBuilder + */ + public func createUser(body: User) -> RequestBuilder { + let path = "/user" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + Creates list of users with given input array + - POST /user/createWithArray + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + public func createUsersWithArrayInput(body: [User]) -> RequestBuilder { + let path = "/user/createWithArray" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + Creates list of users with given input array + - POST /user/createWithList + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + public func createUsersWithListInput(body: [User]) -> RequestBuilder { + let path = "/user/createWithList" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + Delete user + - DELETE /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) The name that needs to be deleted + - returns: RequestBuilder + */ + public func deleteUser(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernameEscaped = "\(username)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernameEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "DELETE") + } + + /** + Get user by user name + - GET /user/{username} + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - returns: RequestBuilder + */ + public func getUserByName(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernameEscaped = "\(username)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernameEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "GET") + } + + /** + Logs user into the system + - GET /user/login + - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - returns: RequestBuilder + */ + public func loginUser(username: String, password: String) -> RequestBuilder { + let path = "/user/login" + + var parameters: [Parameters] = [] + + let queryParams: [String: Any?] = [ + "username": username, + "password": password + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder(endpoint: path, method: "GET", parameters: parameters) + } + + /** + Logs out current logged in user session + - GET /user/logout + - returns: RequestBuilder + */ + public func logoutUser() -> RequestBuilder { + let path = "/user/logout" + + return RequestBuilder(endpoint: path, method: "GET") + } + + /** + Updated user + - PUT /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - returns: RequestBuilder + */ + public func updateUser(username: String, body: User) -> RequestBuilder { + var path = "/user/{username}" + let usernameEscaped = "\(username)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernameEscaped, options: .literal, range: nil) + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PUT", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift new file mode 100644 index 00000000000..60ce28c66a2 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift @@ -0,0 +1,450 @@ +// AlamofireImplementations.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Alamofire + +class AlamofireRequestBuilderFactory: RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type { + return AlamofireRequestBuilder.self + } + + func getBuilder() -> RequestBuilder.Type { + return AlamofireDecodableRequestBuilder.self + } +} + +private struct SynchronizedDictionary { + + private var dictionary = [K: V]() + private let queue = DispatchQueue( + label: "SynchronizedDictionary", + qos: DispatchQoS.userInitiated, + attributes: [DispatchQueue.Attributes.concurrent], + autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, + target: nil + ) + + public subscript(key: K) -> V? { + get { + var value: V? + + queue.sync { + value = self.dictionary[key] + } + + return value + } + set { + queue.sync(flags: DispatchWorkItemFlags.barrier) { + self.dictionary[key] = newValue + } + } + } + } + +// Store manager to retain its reference +private var managerStore = SynchronizedDictionary() + +open class AlamofireRequestBuilder: RequestBuilder { + required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) + } + + /** + May be overridden by a subclass if you want to control the session + configuration. + */ + open func createSessionManager() -> Alamofire.SessionManager { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = buildHeaders() + return Alamofire.SessionManager(configuration: configuration) + } + + /** + May be overridden by a subclass if you want to custom request constructor. + */ + open func createURLRequest() -> URLRequest? { + let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() + guard let originalRequest = try? URLRequest(url: URLString, method: HTTPMethod(rawValue: method)!, headers: buildHeaders()) else { return nil } + return try? encoding.encode(originalRequest, with: parameters) + } + + /** + May be overridden by a subclass if you want to control the Content-Type + that is given to an uploaded form part. + + Return nil to use the default behavior (inferring the Content-Type from + the file extension). Return the desired Content-Type otherwise. + */ + open func contentTypeForFormPart(fileURL: URL) -> String? { + return nil + } + + /** + May be overridden by a subclass if you want to control the request + configuration (e.g. to override the cache policy). + */ + open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) -> DataRequest { + return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) + } + + override open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { + let managerId: String = UUID().uuidString + // Create a new manager for each request to customize its request header + let manager = createSessionManager() + managerStore[managerId] = manager + + let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() + + let xMethod = Alamofire.HTTPMethod(rawValue: method) + let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } + .map { $0.0 } + + if fileKeys.count > 0 { + manager.upload(multipartFormData: { mpForm in + for (k, v) in self.parameters! { + switch v { + case let fileURL as URL: + if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { + mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) + } else { + mpForm.append(fileURL, withName: k) + } + case let string as String: + mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k) + case let number as NSNumber: + mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k) + default: + fatalError("Unprocessable value \(v) with key \(k)") + } + } + }, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in + switch encodingResult { + case .success(let upload, _, _): + if let onProgressReady = self.onProgressReady { + onProgressReady(upload.uploadProgress) + } + self.processRequest(request: upload, managerId, completion) + case .failure(let encodingError): + completion(nil, ErrorResponse.error(415, nil, encodingError)) + } + }) + } else { + let request = makeRequest(manager: manager, method: xMethod!, encoding: encoding, headers: headers) + if let onProgressReady = self.onProgressReady { + onProgressReady(request.progress) + } + processRequest(request: request, managerId, completion) + } + + } + + fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { + if let credential = self.credential { + request.authenticate(usingCredential: credential) + } + + let cleanupRequest = { + managerStore[managerId] = nil + } + + let validatedRequest = request.validate() + + switch T.self { + case is String.Type: + validatedRequest.responseString(completionHandler: { (stringResponse) in + cleanupRequest() + + if stringResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) + ) + return + } + + completion( + Response( + response: stringResponse.response!, + body: ((stringResponse.result.value ?? "") as! T) + ), + nil + ) + }) + case is URL.Type: + validatedRequest.responseData(completionHandler: { (dataResponse) in + cleanupRequest() + + do { + + guard !dataResponse.result.isFailure else { + throw DownloadException.responseFailed + } + + guard let data = dataResponse.data else { + throw DownloadException.responseDataMissing + } + + guard let request = request.request else { + throw DownloadException.requestMissing + } + + let fileManager = FileManager.default + let urlRequest = try request.asURLRequest() + let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] + let requestURL = try self.getURL(from: urlRequest) + + var requestPath = try self.getPath(from: requestURL) + + if let headerFileName = self.getFileName(fromContentDisposition: dataResponse.response?.allHeaderFields["Content-Disposition"] as? String) { + requestPath = requestPath.appending("/\(headerFileName)") + } + + let filePath = documentsDirectory.appendingPathComponent(requestPath) + let directoryPath = filePath.deletingLastPathComponent().path + + try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) + try data.write(to: filePath, options: .atomic) + + completion( + Response( + response: dataResponse.response!, + body: (filePath as! T) + ), + nil + ) + + } catch let requestParserError as DownloadException { + completion(nil, ErrorResponse.error(400, dataResponse.data, requestParserError)) + } catch let error { + completion(nil, ErrorResponse.error(400, dataResponse.data, error)) + } + return + }) + case is Void.Type: + validatedRequest.responseData(completionHandler: { (voidResponse) in + cleanupRequest() + + if voidResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) + ) + return + } + + completion( + Response( + response: voidResponse.response!, + body: nil), + nil + ) + }) + default: + validatedRequest.responseData(completionHandler: { (dataResponse) in + cleanupRequest() + + if dataResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) + ) + return + } + + completion( + Response( + response: dataResponse.response!, + body: (dataResponse.data as! T) + ), + nil + ) + }) + } + } + + open func buildHeaders() -> [String: String] { + var httpHeaders = SessionManager.defaultHTTPHeaders + for (key, value) in self.headers { + httpHeaders[key] = value + } + return httpHeaders + } + + fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + + guard let contentDisposition = contentDisposition else { + return nil + } + + let items = contentDisposition.components(separatedBy: ";") + + var filename: String? + + for contentItem in items { + + let filenameKey = "filename=" + guard let range = contentItem.range(of: filenameKey) else { + break + } + + filename = contentItem + return filename? + .replacingCharacters(in: range, with: "") + .replacingOccurrences(of: "\"", with: "") + .trimmingCharacters(in: .whitespacesAndNewlines) + } + + return filename + + } + + fileprivate func getPath(from url: URL) throws -> String { + + guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { + throw DownloadException.requestMissingPath + } + + if path.hasPrefix("/") { + path.remove(at: path.startIndex) + } + + return path + + } + + fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + return url + } + +} + +private enum DownloadException: Error { + case responseDataMissing + case responseFailed + case requestMissing + case requestMissingPath + case requestMissingURL +} + +public enum AlamofireDecodableRequestBuilderError: Error { + case emptyDataResponse + case nilHTTPResponse + case jsonDecoding(DecodingError) + case generalError(Error) +} + +open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { + + override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { + if let credential = self.credential { + request.authenticate(usingCredential: credential) + } + + let cleanupRequest = { + managerStore[managerId] = nil + } + + let validatedRequest = request.validate() + + switch T.self { + case is String.Type: + validatedRequest.responseString(completionHandler: { (stringResponse) in + cleanupRequest() + + if stringResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) + ) + return + } + + completion( + Response( + response: stringResponse.response!, + body: ((stringResponse.result.value ?? "") as! T) + ), + nil + ) + }) + case is Void.Type: + validatedRequest.responseData(completionHandler: { (voidResponse) in + cleanupRequest() + + if voidResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) + ) + return + } + + completion( + Response( + response: voidResponse.response!, + body: nil), + nil + ) + }) + case is Data.Type: + validatedRequest.responseData(completionHandler: { (dataResponse) in + cleanupRequest() + + if dataResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) + ) + return + } + + completion( + Response( + response: dataResponse.response!, + body: (dataResponse.data as! T) + ), + nil + ) + }) + default: + validatedRequest.responseData(completionHandler: { (dataResponse: DataResponse) in + cleanupRequest() + + guard dataResponse.result.isSuccess else { + completion(nil, ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)) + return + } + + guard let data = dataResponse.data, !data.isEmpty else { + completion(nil, ErrorResponse.error(-1, nil, AlamofireDecodableRequestBuilderError.emptyDataResponse)) + return + } + + guard let httpResponse = dataResponse.response else { + completion(nil, ErrorResponse.error(-2, nil, AlamofireDecodableRequestBuilderError.nilHTTPResponse)) + return + } + + var responseObj: Response? + + let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) + if decodeResult.error == nil { + responseObj = Response(response: httpResponse, body: decodeResult.decodableObj) + } + + completion(responseObj, decodeResult.error) + }) + } + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift new file mode 100644 index 00000000000..0a333db0d10 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -0,0 +1,71 @@ +// +// CodableHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public typealias EncodeResult = (data: Data?, error: Error?) + +open class CodableHelper { + + public static var dateformatter: DateFormatter? + + open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T: Decodable { + var returnedDecodable: T? + var returnedError: Error? + + let decoder = JSONDecoder() + if let df = self.dateformatter { + decoder.dateDecodingStrategy = .formatted(df) + } else { + decoder.dataDecodingStrategy = .base64 + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = Configuration.dateFormat + decoder.dateDecodingStrategy = .formatted(formatter) + } + + do { + returnedDecodable = try decoder.decode(type, from: data) + } catch { + returnedError = error + } + + return (returnedDecodable, returnedError) + } + + open class func encode(_ value: T, prettyPrint: Bool = false) -> EncodeResult where T: Encodable { + var returnedData: Data? + var returnedError: Error? + + let encoder = JSONEncoder() + if prettyPrint { + encoder.outputFormatting = .prettyPrinted + } + if let df = self.dateformatter { + encoder.dateEncodingStrategy = .formatted(df) + } else { + encoder.dataEncodingStrategy = .base64 + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = Configuration.dateFormat + encoder.dateEncodingStrategy = .formatted(formatter) + } + + do { + returnedData = try encoder.encode(value) + } catch { + returnedError = error + } + + return (returnedData, returnedError) + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Configuration.swift new file mode 100644 index 00000000000..e1ecb39726e --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -0,0 +1,15 @@ +// Configuration.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class Configuration { + + // This value is used to configure the date formatter that is used to serialize dates into JSON format. + // You must set it prior to encoding any dates, and it will only be read once. + public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Extensions.swift new file mode 100644 index 00000000000..b07e60d99e3 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -0,0 +1,192 @@ +// Extensions.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Alamofire +import PromiseKit + +extension Bool: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Float: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int32: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } +} + +extension Int64: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } +} + +extension Double: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension String: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +private func encodeIfPossible(_ object: T) -> Any { + if let encodableObject = object as? JSONEncodable { + return encodableObject.encodeToJSON() + } else { + return object as Any + } +} + +extension Array: JSONEncodable { + func encodeToJSON() -> Any { + return self.map(encodeIfPossible) + } +} + +extension Dictionary: JSONEncodable { + func encodeToJSON() -> Any { + var dictionary = [AnyHashable: Any]() + for (key, value) in self { + dictionary[key] = encodeIfPossible(value) + } + return dictionary as Any + } +} + +extension Data: JSONEncodable { + func encodeToJSON() -> Any { + return self.base64EncodedString(options: Data.Base64EncodingOptions()) + } +} + +private let dateFormatter: DateFormatter = { + if let formatter = CodableHelper.dateformatter { + return formatter + } else { + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = Configuration.dateFormat + return formatter + } +}() + +extension Date: JSONEncodable { + func encodeToJSON() -> Any { + return dateFormatter.string(from: self) as Any + } +} + +extension UUID: JSONEncodable { + func encodeToJSON() -> Any { + return self.uuidString + } +} + +extension String: CodingKey { + + public var stringValue: String { + return self + } + + public init?(stringValue: String) { + self.init(stringLiteral: stringValue) + } + + public var intValue: Int? { + return nil + } + + public init?(intValue: Int) { + return nil + } + +} + +extension KeyedEncodingContainerProtocol { + + public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + var arrayContainer = nestedUnkeyedContainer(forKey: key) + try arrayContainer.encode(contentsOf: values) + } + + public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { + if let values = values { + try encodeArray(values, forKey: key) + } + } + + public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { + for (key, value) in pairs { + try encode(value, forKey: key) + } + } + + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { + if let pairs = pairs { + try encodeMap(pairs) + } + } + +} + +extension KeyedDecodingContainerProtocol { + + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + var tmpArray = [T]() + + var nestedContainer = try nestedUnkeyedContainer(forKey: key) + while !nestedContainer.isAtEnd { + let arrayValue = try nestedContainer.decode(T.self) + tmpArray.append(arrayValue) + } + + return tmpArray + } + + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { + var tmpArray: [T]? + + if contains(key) { + tmpArray = try decodeArray(T.self, forKey: key) + } + + return tmpArray + } + + public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { + var map: [Self.Key: T] = [:] + + for key in allKeys { + if !excludedKeys.contains(key) { + let value = try decode(T.self, forKey: key) + map[key] = value + } + } + + return map + } + +} + +extension RequestBuilder { + public func execute() -> Promise> { + let deferred = Promise>.pending() + self.execute { (response: Response?, error: Error?) in + if let response = response { + deferred.fulfill(response) + } else { + deferred.reject(error!) + } + } + return deferred.promise + } +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift new file mode 100644 index 00000000000..fb76bbed26f --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift @@ -0,0 +1,54 @@ +// +// JSONDataEncoding.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Alamofire + +public struct JSONDataEncoding: ParameterEncoding { + + // MARK: Properties + + private static let jsonDataKey = "jsonData" + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. This should have a single key/value + /// pair with "jsonData" as the key and a Data object as the value. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { + var urlRequest = try urlRequest.asURLRequest() + + guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { + return urlRequest + } + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = jsonData + + return urlRequest + } + + public static func encodingParameters(jsonData: Data?) -> Parameters? { + var returnedParams: Parameters? + if let jsonData = jsonData, !jsonData.isEmpty { + var params = Parameters() + params[jsonDataKey] = jsonData + returnedParams = params + } + return returnedParams + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift new file mode 100644 index 00000000000..7bd1267e95f --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -0,0 +1,43 @@ +// +// JSONEncodingHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Alamofire + +open class JSONEncodingHelper { + + open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { + var params: Parameters? + + // Encode the Encodable object + if let encodableObj = encodableObj { + let encodeResult = CodableHelper.encode(encodableObj, prettyPrint: true) + if encodeResult.error == nil { + params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) + } + } + + return params + } + + open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { + var params: Parameters? + + if let encodableObj = encodableObj { + do { + let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error) + return nil + } + } + + return params + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models.swift new file mode 100644 index 00000000000..25161165865 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -0,0 +1,36 @@ +// Models.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +protocol JSONEncodable { + func encodeToJSON() -> Any +} + +public enum ErrorResponse: Error { + case error(Int, Data?, Error) +} + +open class Response { + public let statusCode: Int + public let header: [String: String] + public let body: T? + + public init(statusCode: Int, header: [String: String], body: T?) { + self.statusCode = statusCode + self.header = header + self.body = body + } + + public convenience init(response: HTTPURLResponse, body: T?) { + let rawHeader = response.allHeaderFields + var header = [String: String]() + for case let (key, value) as (String, String) in rawHeader { + header[key] = value + } + self.init(statusCode: response.statusCode, header: header, body: body) + } +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift new file mode 100644 index 00000000000..a64e64065c9 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -0,0 +1,24 @@ +// +// AdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct AdditionalPropertiesClass: Codable { + + public var mapString: [String: String]? + public var mapMapString: [String: [String: String]]? + public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + self.mapString = mapString + self.mapMapString = mapMapString + } + + public enum CodingKeys: String, CodingKey { + case mapString = "map_string" + case mapMapString = "map_map_string" + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift new file mode 100644 index 00000000000..cf5de2351a9 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -0,0 +1,19 @@ +// +// Animal.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Animal: Codable { + + public var className: String + public var color: String? = "red" + public init(className: String, color: String?) { + self.className = className + self.color = color + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift new file mode 100644 index 00000000000..e09b0e9efdc --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -0,0 +1,10 @@ +// +// AnimalFarm.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift new file mode 100644 index 00000000000..28eacf580dd --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -0,0 +1,21 @@ +// +// ApiResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ApiResponse: Codable { + + public var code: Int? + public var type: String? + public var message: String? + public init(code: Int?, type: String?, message: String?) { + self.code = code + self.type = type + self.message = message + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift new file mode 100644 index 00000000000..c2ef4cc41f1 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -0,0 +1,21 @@ +// +// ArrayOfArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfArrayOfNumberOnly: Codable { + + public var arrayArrayNumber: [[Double]]? + public init(arrayArrayNumber: [[Double]]?) { + self.arrayArrayNumber = arrayArrayNumber + } + + public enum CodingKeys: String, CodingKey { + case arrayArrayNumber = "ArrayArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift new file mode 100644 index 00000000000..36a6b5adbe7 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -0,0 +1,21 @@ +// +// ArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfNumberOnly: Codable { + + public var arrayNumber: [Double]? + public init(arrayNumber: [Double]?) { + self.arrayNumber = arrayNumber + } + + public enum CodingKeys: String, CodingKey { + case arrayNumber = "ArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift new file mode 100644 index 00000000000..a9617771b40 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -0,0 +1,27 @@ +// +// ArrayTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayTest: Codable { + + public var arrayOfString: [String]? + public var arrayArrayOfInteger: [[Int64]]? + public var arrayArrayOfModel: [[ReadOnlyFirst]]? + public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { + self.arrayOfString = arrayOfString + self.arrayArrayOfInteger = arrayArrayOfInteger + self.arrayArrayOfModel = arrayArrayOfModel + } + + public enum CodingKeys: String, CodingKey { + case arrayOfString = "array_of_string" + case arrayArrayOfInteger = "array_array_of_integer" + case arrayArrayOfModel = "array_array_of_model" + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift new file mode 100644 index 00000000000..660ebd30aaa --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -0,0 +1,37 @@ +// +// Capitalization.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Capitalization: Codable { + + public var smallCamel: String? + public var capitalCamel: String? + public var smallSnake: String? + public var capitalSnake: String? + public var sCAETHFlowPoints: String? + /** Name of the pet */ + public var ATT_NAME: String? + public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { + self.smallCamel = smallCamel + self.capitalCamel = capitalCamel + self.smallSnake = smallSnake + self.capitalSnake = capitalSnake + self.sCAETHFlowPoints = sCAETHFlowPoints + self.ATT_NAME = ATT_NAME + } + + public enum CodingKeys: String, CodingKey { + case smallCamel + case capitalCamel = "CapitalCamel" + case smallSnake = "small_Snake" + case capitalSnake = "Capital_Snake" + case sCAETHFlowPoints = "SCA_ETH_Flow_Points" + case ATT_NAME + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift new file mode 100644 index 00000000000..cb9f812b935 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -0,0 +1,21 @@ +// +// Cat.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Cat: Codable { + + public var className: String + public var color: String? = "red" + public var declawed: Bool? + public init(className: String, color: String?, declawed: Bool?) { + self.className = className + self.color = color + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift new file mode 100644 index 00000000000..4f9a5b5a648 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -0,0 +1,17 @@ +// +// CatAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct CatAllOf: Codable { + + public var declawed: Bool? + public init(declawed: Bool?) { + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Category.swift new file mode 100644 index 00000000000..cdb57d6e39d --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -0,0 +1,19 @@ +// +// Category.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Category: Codable { + + public var id: Int64? + public var name: String = "default-name" + public init(id: Int64?, name: String) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift new file mode 100644 index 00000000000..8968e876037 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -0,0 +1,19 @@ +// +// ClassModel.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model with \"_class\" property */ + +public struct ClassModel: Codable { + + public var _class: String? + public init(_class: String?) { + self._class = _class + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Client.swift new file mode 100644 index 00000000000..85d2bf59f88 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -0,0 +1,17 @@ +// +// Client.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Client: Codable { + + public var client: String? + public init(client: String?) { + self.client = client + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift new file mode 100644 index 00000000000..99e7abc2038 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -0,0 +1,21 @@ +// +// Dog.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Dog: Codable { + + public var className: String + public var color: String? = "red" + public var breed: String? + public init(className: String, color: String?, breed: String?) { + self.className = className + self.color = color + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift new file mode 100644 index 00000000000..cff2c19160c --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -0,0 +1,17 @@ +// +// DogAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct DogAllOf: Codable { + + public var breed: String? + public init(breed: String?) { + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift new file mode 100644 index 00000000000..3796fefc5b5 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -0,0 +1,32 @@ +// +// EnumArrays.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumArrays: Codable { + + public enum JustSymbol: String, Codable { + case greaterThanOrEqualTo = ">=" + case dollar = "$" + } + public enum ArrayEnum: String, Codable { + case fish = "fish" + case crab = "crab" + } + public var justSymbol: JustSymbol? + public var arrayEnum: [ArrayEnum]? + public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { + self.justSymbol = justSymbol + self.arrayEnum = arrayEnum + } + + public enum CodingKeys: String, CodingKey { + case justSymbol = "just_symbol" + case arrayEnum = "array_enum" + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift new file mode 100644 index 00000000000..3c1dfcac577 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -0,0 +1,14 @@ +// +// EnumClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum EnumClass: String, Codable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift new file mode 100644 index 00000000000..8a5a061c350 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -0,0 +1,51 @@ +// +// EnumTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumTest: Codable { + + public enum EnumString: String, Codable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumStringRequired: String, Codable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumInteger: Int, Codable { + case _1 = 1 + case number1 = -1 + } + public enum EnumNumber: Double, Codable { + case _11 = 1.1 + case number12 = -1.2 + } + public var enumString: EnumString? + public var enumStringRequired: EnumStringRequired + public var enumInteger: EnumInteger? + public var enumNumber: EnumNumber? + public var outerEnum: OuterEnum? + public init(enumString: EnumString?, enumStringRequired: EnumStringRequired, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { + self.enumString = enumString + self.enumStringRequired = enumStringRequired + self.enumInteger = enumInteger + self.enumNumber = enumNumber + self.outerEnum = outerEnum + } + + public enum CodingKeys: String, CodingKey { + case enumString = "enum_string" + case enumStringRequired = "enum_string_required" + case enumInteger = "enum_integer" + case enumNumber = "enum_number" + case outerEnum + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/File.swift new file mode 100644 index 00000000000..4a7ad73b13b --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -0,0 +1,20 @@ +// +// File.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Must be named `File` for test. */ + +public struct File: Codable { + + /** Test capitalization */ + public var sourceURI: String? + public init(sourceURI: String?) { + self.sourceURI = sourceURI + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift new file mode 100644 index 00000000000..2e10cf79ee7 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -0,0 +1,19 @@ +// +// FileSchemaTestClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FileSchemaTestClass: Codable { + + public var file: File? + public var files: [File]? + public init(file: File?, files: [File]?) { + self.file = file + self.files = files + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift new file mode 100644 index 00000000000..360dc2f2daa --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -0,0 +1,41 @@ +// +// FormatTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FormatTest: Codable { + + public var integer: Int? + public var int32: Int? + public var int64: Int64? + public var number: Double + public var float: Float? + public var double: Double? + public var string: String? + public var byte: Data + public var binary: URL? + public var date: Date + public var dateTime: Date? + public var uuid: UUID? + public var password: String + public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: URL?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { + self.integer = integer + self.int32 = int32 + self.int64 = int64 + self.number = number + self.float = float + self.double = double + self.string = string + self.byte = byte + self.binary = binary + self.date = date + self.dateTime = dateTime + self.uuid = uuid + self.password = password + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift new file mode 100644 index 00000000000..92d25b4035b --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -0,0 +1,19 @@ +// +// HasOnlyReadOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct HasOnlyReadOnly: Codable { + + public var bar: String? + public var foo: String? + public init(bar: String?, foo: String?) { + self.bar = bar + self.foo = foo + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/List.swift new file mode 100644 index 00000000000..0a12547ee44 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -0,0 +1,21 @@ +// +// List.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct List: Codable { + + public var _123list: String? + public init(_123list: String?) { + self._123list = _123list + } + + public enum CodingKeys: String, CodingKey { + case _123list = "123-list" + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift new file mode 100644 index 00000000000..f146a8651c7 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -0,0 +1,34 @@ +// +// MapTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MapTest: Codable { + + public enum MapOfEnumString: String, Codable { + case upper = "UPPER" + case lower = "lower" + } + public var mapMapOfString: [String: [String: String]]? + public var mapOfEnumString: [String: String]? + public var directMap: [String: Bool]? + public var indirectMap: StringBooleanMap? + public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { + self.mapMapOfString = mapMapOfString + self.mapOfEnumString = mapOfEnumString + self.directMap = directMap + self.indirectMap = indirectMap + } + + public enum CodingKeys: String, CodingKey { + case mapMapOfString = "map_map_of_string" + case mapOfEnumString = "map_of_enum_string" + case directMap = "direct_map" + case indirectMap = "indirect_map" + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift new file mode 100644 index 00000000000..16fb430a8b2 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -0,0 +1,21 @@ +// +// MixedPropertiesAndAdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + + public var uuid: UUID? + public var dateTime: Date? + public var map: [String: Animal]? + public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { + self.uuid = uuid + self.dateTime = dateTime + self.map = map + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift new file mode 100644 index 00000000000..96af48ec264 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -0,0 +1,26 @@ +// +// Model200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name starting with number */ + +public struct Model200Response: Codable { + + public var name: Int? + public var _class: String? + public init(name: Int?, _class: String?) { + self.name = name + self._class = _class + } + + public enum CodingKeys: String, CodingKey { + case name + case _class = "class" + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Name.swift new file mode 100644 index 00000000000..1970d8c67cd --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -0,0 +1,32 @@ +// +// Name.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name same as property name */ + +public struct Name: Codable { + + public var name: Int + public var snakeCase: Int? + public var property: String? + public var _123number: Int? + public init(name: Int, snakeCase: Int?, property: String?, _123number: Int?) { + self.name = name + self.snakeCase = snakeCase + self.property = property + self._123number = _123number + } + + public enum CodingKeys: String, CodingKey { + case name + case snakeCase = "snake_case" + case property + case _123number = "123Number" + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift new file mode 100644 index 00000000000..20146b8c408 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -0,0 +1,21 @@ +// +// NumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct NumberOnly: Codable { + + public var justNumber: Double? + public init(justNumber: Double?) { + self.justNumber = justNumber + } + + public enum CodingKeys: String, CodingKey { + case justNumber = "JustNumber" + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Order.swift new file mode 100644 index 00000000000..318d1c4127c --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -0,0 +1,33 @@ +// +// Order.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Order: Codable { + + public enum Status: String, Codable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" + } + public var id: Int64? + public var petId: Int64? + public var quantity: Int? + public var shipDate: Date? + /** Order Status */ + public var status: Status? + public var complete: Bool? = false + public init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { + self.id = id + self.petId = petId + self.quantity = quantity + self.shipDate = shipDate + self.status = status + self.complete = complete + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift new file mode 100644 index 00000000000..9da80f3b277 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -0,0 +1,27 @@ +// +// OuterComposite.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct OuterComposite: Codable { + + public var myNumber: Double? + public var myString: String? + public var myBoolean: Bool? + public init(myNumber: Double?, myString: String?, myBoolean: Bool?) { + self.myNumber = myNumber + self.myString = myString + self.myBoolean = myBoolean + } + + public enum CodingKeys: String, CodingKey { + case myNumber = "my_number" + case myString = "my_string" + case myBoolean = "my_boolean" + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift new file mode 100644 index 00000000000..9f80fc95ecf --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -0,0 +1,14 @@ +// +// OuterEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum OuterEnum: String, Codable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift new file mode 100644 index 00000000000..35911df349b --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -0,0 +1,33 @@ +// +// Pet.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Pet: Codable { + + public enum Status: String, Codable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + public var id: Int64? + public var category: Category? + public var name: String + public var photoUrls: [String] + public var tags: [Tag]? + /** pet status in the store */ + public var status: Status? + public init(id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { + self.id = id + self.category = category + self.name = name + self.photoUrls = photoUrls + self.tags = tags + self.status = status + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift new file mode 100644 index 00000000000..06a842a672d --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -0,0 +1,19 @@ +// +// ReadOnlyFirst.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ReadOnlyFirst: Codable { + + public var bar: String? + public var baz: String? + public init(bar: String?, baz: String?) { + self.bar = bar + self.baz = baz + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Return.swift new file mode 100644 index 00000000000..a763353d12c --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -0,0 +1,23 @@ +// +// Return.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing reserved words */ + +public struct Return: Codable { + + public var _return: Int? + public init(_return: Int?) { + self._return = _return + } + + public enum CodingKeys: String, CodingKey { + case _return = "return" + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift new file mode 100644 index 00000000000..ea11261e7b6 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -0,0 +1,21 @@ +// +// SpecialModelName.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct SpecialModelName: Codable { + + public var specialPropertyName: Int64? + public init(specialPropertyName: Int64?) { + self.specialPropertyName = specialPropertyName + } + + public enum CodingKeys: String, CodingKey { + case specialPropertyName = "$special[property.name]" + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift new file mode 100644 index 00000000000..682ef3359d3 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -0,0 +1,14 @@ +// +// StringBooleanMap.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct StringBooleanMap: Codable { + + public var additionalProperties: [String: Bool] = [:] + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift new file mode 100644 index 00000000000..50cfb7610bd --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -0,0 +1,19 @@ +// +// Tag.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Tag: Codable { + + public var id: Int64? + public var name: String? + public init(id: Int64?, name: String?) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift new file mode 100644 index 00000000000..640de5b4345 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -0,0 +1,33 @@ +// +// TypeHolderDefault.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderDefault: Codable { + + public var stringItem: String = "what" + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool = true + public var arrayItem: [Int] + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift new file mode 100644 index 00000000000..3c0d33456b2 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -0,0 +1,33 @@ +// +// TypeHolderExample.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderExample: Codable { + + public var stringItem: String + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool + public var arrayItem: [Int] + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/User.swift new file mode 100644 index 00000000000..e27318ef80c --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -0,0 +1,32 @@ +// +// User.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct User: Codable { + + public var id: Int64? + public var username: String? + public var firstName: String? + public var lastName: String? + public var email: String? + public var password: String? + public var phone: String? + /** User Status */ + public var userStatus: Int? + public init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { + self.id = id + self.username = username + self.firstName = firstName + self.lastName = lastName + self.email = email + self.password = password + self.phone = phone + self.userStatus = userStatus + } + +} diff --git a/samples/client/petstore/swift5/promisekit/README.md b/samples/client/petstore/swift5/promisekit/README.md new file mode 100644 index 00000000000..595aca25752 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/README.md @@ -0,0 +1,141 @@ +# Swift4 API client for PetstoreClient + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build package: org.openapitools.codegen.languages.Swift5Codegen + +## Installation + +### Carthage + +Run `carthage update` + +### CocoaPods + +Run `pod install` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AnotherFakeAPI* | [**call123testSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags +*FakeAPI* | [**fakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +*FakeAPI* | [**fakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +*FakeAPI* | [**fakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +*FakeAPI* | [**fakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*FakeAPI* | [**testBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +*FakeAPI* | [**testBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +*FakeAPI* | [**testClientModel**](docs/FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +*FakeAPI* | [**testEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeAPI* | [**testEnumParameters**](docs/FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +*FakeAPI* | [**testGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +*FakeAPI* | [**testInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeAPI* | [**testJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeClassnameTags123API* | [**testClassname**](docs/FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case +*PetAPI* | [**addPet**](docs/PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +*PetAPI* | [**deletePet**](docs/PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetAPI* | [**findPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetAPI* | [**findPetsByTags**](docs/PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetAPI* | [**getPetById**](docs/PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetAPI* | [**updatePet**](docs/PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +*PetAPI* | [**updatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetAPI* | [**uploadFile**](docs/PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetAPI* | [**uploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreAPI* | [**deleteOrder**](docs/StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +*StoreAPI* | [**getInventory**](docs/StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreAPI* | [**getOrderById**](docs/StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +*StoreAPI* | [**placeOrder**](docs/StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserAPI* | [**createUser**](docs/UserAPI.md#createuser) | **POST** /user | Create user +*UserAPI* | [**createUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserAPI* | [**createUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserAPI* | [**deleteUser**](docs/UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserAPI* | [**getUserByName**](docs/UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserAPI* | [**loginUser**](docs/UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +*UserAPI* | [**logoutUser**](docs/UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserAPI* | [**updateUser**](docs/UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +## Documentation For Models + + - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [Animal](docs/Animal.md) + - [AnimalFarm](docs/AnimalFarm.md) + - [ApiResponse](docs/ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [ArrayTest](docs/ArrayTest.md) + - [Capitalization](docs/Capitalization.md) + - [Cat](docs/Cat.md) + - [CatAllOf](docs/CatAllOf.md) + - [Category](docs/Category.md) + - [ClassModel](docs/ClassModel.md) + - [Client](docs/Client.md) + - [Dog](docs/Dog.md) + - [DogAllOf](docs/DogAllOf.md) + - [EnumArrays](docs/EnumArrays.md) + - [EnumClass](docs/EnumClass.md) + - [EnumTest](docs/EnumTest.md) + - [File](docs/File.md) + - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [FormatTest](docs/FormatTest.md) + - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [List](docs/List.md) + - [MapTest](docs/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](docs/Model200Response.md) + - [Name](docs/Name.md) + - [NumberOnly](docs/NumberOnly.md) + - [Order](docs/Order.md) + - [OuterComposite](docs/OuterComposite.md) + - [OuterEnum](docs/OuterEnum.md) + - [Pet](docs/Pet.md) + - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [Return](docs/Return.md) + - [SpecialModelName](docs/SpecialModelName.md) + - [StringBooleanMap](docs/StringBooleanMap.md) + - [Tag](docs/Tag.md) + - [TypeHolderDefault](docs/TypeHolderDefault.md) + - [TypeHolderExample](docs/TypeHolderExample.md) + - [User](docs/User.md) + + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +## api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +## http_basic_test + +- **Type**: HTTP basic authentication + +## petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + + +## Author + + + diff --git a/samples/client/petstore/swift5/promisekit/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/promisekit/docs/AdditionalPropertiesClass.md new file mode 100644 index 00000000000..e22d28be1de --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/AdditionalPropertiesClass.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapString** | **[String:String]** | | [optional] +**mapMapString** | [String:[String:String]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/Animal.md b/samples/client/petstore/swift5/promisekit/docs/Animal.md new file mode 100644 index 00000000000..69c601455cd --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/Animal.md @@ -0,0 +1,11 @@ +# Animal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] [default to "red"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/AnimalFarm.md b/samples/client/petstore/swift5/promisekit/docs/AnimalFarm.md new file mode 100644 index 00000000000..df6bab21dae --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/AnimalFarm.md @@ -0,0 +1,9 @@ +# AnimalFarm + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/promisekit/docs/AnotherFakeAPI.md new file mode 100644 index 00000000000..7ac52a2b127 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/AnotherFakeAPI.md @@ -0,0 +1,56 @@ +# AnotherFakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**call123testSpecialTags**](AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags + + +# **call123testSpecialTags** +```swift + open class func call123testSpecialTags( body: Client) -> Promise +``` + +To test special tags + +To test special tags and operation ID starting with number + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test special tags +AnotherFakeAPI.call123testSpecialTags(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/promisekit/docs/ApiResponse.md b/samples/client/petstore/swift5/promisekit/docs/ApiResponse.md new file mode 100644 index 00000000000..c6d9768fe9b --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/ApiResponse.md @@ -0,0 +1,12 @@ +# ApiResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Int** | | [optional] +**type** | **String** | | [optional] +**message** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/swift5/promisekit/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 00000000000..c6fceff5e08 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayArrayNumber** | [[Double]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/ArrayOfNumberOnly.md b/samples/client/petstore/swift5/promisekit/docs/ArrayOfNumberOnly.md new file mode 100644 index 00000000000..f09f8fa6f70 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/ArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayNumber** | **[Double]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/ArrayTest.md b/samples/client/petstore/swift5/promisekit/docs/ArrayTest.md new file mode 100644 index 00000000000..bf416b8330c --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/ArrayTest.md @@ -0,0 +1,12 @@ +# ArrayTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayOfString** | **[String]** | | [optional] +**arrayArrayOfInteger** | [[Int64]] | | [optional] +**arrayArrayOfModel** | [[ReadOnlyFirst]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/Capitalization.md b/samples/client/petstore/swift5/promisekit/docs/Capitalization.md new file mode 100644 index 00000000000..95374216c77 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/Capitalization.md @@ -0,0 +1,15 @@ +# Capitalization + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] +**smallSnake** | **String** | | [optional] +**capitalSnake** | **String** | | [optional] +**sCAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/Cat.md b/samples/client/petstore/swift5/promisekit/docs/Cat.md new file mode 100644 index 00000000000..fb5949b1576 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/Cat.md @@ -0,0 +1,10 @@ +# Cat + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/CatAllOf.md b/samples/client/petstore/swift5/promisekit/docs/CatAllOf.md new file mode 100644 index 00000000000..79789be61c0 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/CatAllOf.md @@ -0,0 +1,10 @@ +# CatAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/Category.md b/samples/client/petstore/swift5/promisekit/docs/Category.md new file mode 100644 index 00000000000..5ca5408c0f9 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/Category.md @@ -0,0 +1,11 @@ +# Category + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [default to "default-name"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/ClassModel.md b/samples/client/petstore/swift5/promisekit/docs/ClassModel.md new file mode 100644 index 00000000000..e3912fdf0fd --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/ClassModel.md @@ -0,0 +1,10 @@ +# ClassModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/Client.md b/samples/client/petstore/swift5/promisekit/docs/Client.md new file mode 100644 index 00000000000..0de1b238c36 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/Client.md @@ -0,0 +1,10 @@ +# Client + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/Dog.md b/samples/client/petstore/swift5/promisekit/docs/Dog.md new file mode 100644 index 00000000000..4824786da04 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/Dog.md @@ -0,0 +1,10 @@ +# Dog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/DogAllOf.md b/samples/client/petstore/swift5/promisekit/docs/DogAllOf.md new file mode 100644 index 00000000000..9302ef52e93 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/DogAllOf.md @@ -0,0 +1,10 @@ +# DogAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/EnumArrays.md b/samples/client/petstore/swift5/promisekit/docs/EnumArrays.md new file mode 100644 index 00000000000..b9a9807d3c8 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/EnumArrays.md @@ -0,0 +1,11 @@ +# EnumArrays + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justSymbol** | **String** | | [optional] +**arrayEnum** | **[String]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/EnumClass.md b/samples/client/petstore/swift5/promisekit/docs/EnumClass.md new file mode 100644 index 00000000000..67f017becd0 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/EnumClass.md @@ -0,0 +1,9 @@ +# EnumClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/EnumTest.md b/samples/client/petstore/swift5/promisekit/docs/EnumTest.md new file mode 100644 index 00000000000..bc9b036dd76 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/EnumTest.md @@ -0,0 +1,14 @@ +# EnumTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumString** | **String** | | [optional] +**enumStringRequired** | **String** | | +**enumInteger** | **Int** | | [optional] +**enumNumber** | **Double** | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/FakeAPI.md b/samples/client/petstore/swift5/promisekit/docs/FakeAPI.md new file mode 100644 index 00000000000..15f8e5f9f69 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/FakeAPI.md @@ -0,0 +1,626 @@ +# FakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fakeOuterBooleanSerialize**](FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +[**fakeOuterCompositeSerialize**](FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +[**fakeOuterNumberSerialize**](FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +[**fakeOuterStringSerialize**](FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +[**testBodyWithFileSchema**](FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +[**testBodyWithQueryParams**](FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +[**testClientModel**](FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +[**testEndpointParameters**](FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEnumParameters**](FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +[**testGroupParameters**](FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**testInlineAdditionalProperties**](FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**testJsonFormData**](FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data + + +# **fakeOuterBooleanSerialize** +```swift + open class func fakeOuterBooleanSerialize( body: Bool? = nil) -> Promise +``` + + + +Test serialization of outer boolean types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = false // Bool | Input boolean as post body (optional) + +FakeAPI.fakeOuterBooleanSerialize(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Bool** | Input boolean as post body | [optional] + +### Return type + +**Bool** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterCompositeSerialize** +```swift + open class func fakeOuterCompositeSerialize( body: OuterComposite? = nil) -> Promise +``` + + + +Test serialization of object with outer number type + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = OuterComposite(myNumber: 123, myString: "myString_example", myBoolean: false) // OuterComposite | Input composite as post body (optional) + +FakeAPI.fakeOuterCompositeSerialize(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterNumberSerialize** +```swift + open class func fakeOuterNumberSerialize( body: Double? = nil) -> Promise +``` + + + +Test serialization of outer number types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = 987 // Double | Input number as post body (optional) + +FakeAPI.fakeOuterNumberSerialize(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Double** | Input number as post body | [optional] + +### Return type + +**Double** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterStringSerialize** +```swift + open class func fakeOuterStringSerialize( body: String? = nil) -> Promise +``` + + + +Test serialization of outer string types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = "body_example" // String | Input string as post body (optional) + +FakeAPI.fakeOuterStringSerialize(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **String** | Input string as post body | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithFileSchema** +```swift + open class func testBodyWithFileSchema( body: FileSchemaTestClass) -> Promise +``` + + + +For this test, the body for this request much reference a schema named `File`. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | + +FakeAPI.testBodyWithFileSchema(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithQueryParams** +```swift + open class func testBodyWithQueryParams( query: String, body: User) -> Promise +``` + + + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let query = "query_example" // String | +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | + +FakeAPI.testBodyWithQueryParams(query: query, body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **String** | | + **body** | [**User**](User.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testClientModel** +```swift + open class func testClientModel( body: Client) -> Promise +``` + +To test \"client\" model + +To test \"client\" model + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test \"client\" model +FakeAPI.testClientModel(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEndpointParameters** +```swift + open class func testEndpointParameters( number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> Promise +``` + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let number = 987 // Double | None +let double = 987 // Double | None +let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None +let byte = 987 // Data | None +let integer = 987 // Int | None (optional) +let int32 = 987 // Int | None (optional) +let int64 = 987 // Int64 | None (optional) +let float = 987 // Float | None (optional) +let string = "string_example" // String | None (optional) +let binary = URL(string: "https://example.com")! // URL | None (optional) +let date = Date() // Date | None (optional) +let dateTime = Date() // Date | None (optional) +let password = "password_example" // String | None (optional) +let callback = "callback_example" // String | None (optional) + +// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +FakeAPI.testEndpointParameters(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **Double** | None | + **double** | **Double** | None | + **patternWithoutDelimiter** | **String** | None | + **byte** | **Data** | None | + **integer** | **Int** | None | [optional] + **int32** | **Int** | None | [optional] + **int64** | **Int64** | None | [optional] + **float** | **Float** | None | [optional] + **string** | **String** | None | [optional] + **binary** | **URL** | None | [optional] + **date** | **Date** | None | [optional] + **dateTime** | **Date** | None | [optional] + **password** | **String** | None | [optional] + **callback** | **String** | None | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEnumParameters** +```swift + open class func testEnumParameters( enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> Promise +``` + +To test enum parameters + +To test enum parameters + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let enumHeaderStringArray = ["enumHeaderStringArray_example"] // [String] | Header parameter enum test (string array) (optional) +let enumHeaderString = "enumHeaderString_example" // String | Header parameter enum test (string) (optional) (default to .-efg) +let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query parameter enum test (string array) (optional) +let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .-efg) +let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) +let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) +let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .$) +let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .-efg) + +// To test enum parameters +FakeAPI.testEnumParameters(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumHeaderStringArray** | [**[String]**](String.md) | Header parameter enum test (string array) | [optional] + **enumHeaderString** | **String** | Header parameter enum test (string) | [optional] [default to .-efg] + **enumQueryStringArray** | [**[String]**](String.md) | Query parameter enum test (string array) | [optional] + **enumQueryString** | **String** | Query parameter enum test (string) | [optional] [default to .-efg] + **enumQueryInteger** | **Int** | Query parameter enum test (double) | [optional] + **enumQueryDouble** | **Double** | Query parameter enum test (double) | [optional] + **enumFormStringArray** | [**[String]**](String.md) | Form parameter enum test (string array) | [optional] [default to .$] + **enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to .-efg] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testGroupParameters** +```swift + open class func testGroupParameters( requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> Promise +``` + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let requiredStringGroup = 987 // Int | Required String in group parameters +let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredInt64Group = 987 // Int64 | Required Integer in group parameters +let stringGroup = 987 // Int | String in group parameters (optional) +let booleanGroup = false // Bool | Boolean in group parameters (optional) +let int64Group = 987 // Int64 | Integer in group parameters (optional) + +// Fake endpoint to test group parameters (optional) +FakeAPI.testGroupParameters(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requiredStringGroup** | **Int** | Required String in group parameters | + **requiredBooleanGroup** | **Bool** | Required Boolean in group parameters | + **requiredInt64Group** | **Int64** | Required Integer in group parameters | + **stringGroup** | **Int** | String in group parameters | [optional] + **booleanGroup** | **Bool** | Boolean in group parameters | [optional] + **int64Group** | **Int64** | Integer in group parameters | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testInlineAdditionalProperties** +```swift + open class func testInlineAdditionalProperties( param: [String:String]) -> Promise +``` + +test inline additionalProperties + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "TODO" // [String:String] | request body + +// test inline additionalProperties +FakeAPI.testInlineAdditionalProperties(param: param).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | [**[String:String]**](String.md) | request body | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testJsonFormData** +```swift + open class func testJsonFormData( param: String, param2: String) -> Promise +``` + +test json serialization of form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "param_example" // String | field1 +let param2 = "param2_example" // String | field2 + +// test json serialization of form data +FakeAPI.testJsonFormData(param: param, param2: param2).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **String** | field1 | + **param2** | **String** | field2 | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/promisekit/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/promisekit/docs/FakeClassnameTags123API.md new file mode 100644 index 00000000000..1b1b9c14102 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/FakeClassnameTags123API.md @@ -0,0 +1,56 @@ +# FakeClassnameTags123API + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testClassname**](FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case + + +# **testClassname** +```swift + open class func testClassname( body: Client) -> Promise +``` + +To test class name in snake case + +To test class name in snake case + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test class name in snake case +FakeClassnameTags123API.testClassname(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/promisekit/docs/File.md b/samples/client/petstore/swift5/promisekit/docs/File.md new file mode 100644 index 00000000000..3edfef17b79 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/File.md @@ -0,0 +1,10 @@ +# File + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourceURI** | **String** | Test capitalization | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/FileSchemaTestClass.md b/samples/client/petstore/swift5/promisekit/docs/FileSchemaTestClass.md new file mode 100644 index 00000000000..afdacc60b2c --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/FileSchemaTestClass.md @@ -0,0 +1,11 @@ +# FileSchemaTestClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | [**File**](File.md) | | [optional] +**files** | [File] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/FormatTest.md b/samples/client/petstore/swift5/promisekit/docs/FormatTest.md new file mode 100644 index 00000000000..f74d94f6c46 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/FormatTest.md @@ -0,0 +1,22 @@ +# FormatTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Int** | | [optional] +**int32** | **Int** | | [optional] +**int64** | **Int64** | | [optional] +**number** | **Double** | | +**float** | **Float** | | [optional] +**double** | **Double** | | [optional] +**string** | **String** | | [optional] +**byte** | **Data** | | +**binary** | **URL** | | [optional] +**date** | **Date** | | +**dateTime** | **Date** | | [optional] +**uuid** | **UUID** | | [optional] +**password** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift5/promisekit/docs/HasOnlyReadOnly.md new file mode 100644 index 00000000000..45781360154 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/HasOnlyReadOnly.md @@ -0,0 +1,11 @@ +# HasOnlyReadOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] +**foo** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/List.md b/samples/client/petstore/swift5/promisekit/docs/List.md new file mode 100644 index 00000000000..b77718302ed --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/List.md @@ -0,0 +1,10 @@ +# List + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_123list** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/MapTest.md b/samples/client/petstore/swift5/promisekit/docs/MapTest.md new file mode 100644 index 00000000000..56213c4113f --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/MapTest.md @@ -0,0 +1,13 @@ +# MapTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapMapOfString** | [String:[String:String]] | | [optional] +**mapOfEnumString** | **[String:String]** | | [optional] +**directMap** | **[String:Bool]** | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/promisekit/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 00000000000..fcffb8ecdbf --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,12 @@ +# MixedPropertiesAndAdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **UUID** | | [optional] +**dateTime** | **Date** | | [optional] +**map** | [String:Animal] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/Model200Response.md b/samples/client/petstore/swift5/promisekit/docs/Model200Response.md new file mode 100644 index 00000000000..5865ea690cc --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/Model200Response.md @@ -0,0 +1,11 @@ +# Model200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | [optional] +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/Name.md b/samples/client/petstore/swift5/promisekit/docs/Name.md new file mode 100644 index 00000000000..2be75d062e4 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/Name.md @@ -0,0 +1,13 @@ +# Name + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | +**snakeCase** | **Int** | | [optional] +**property** | **String** | | [optional] +**_123number** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/NumberOnly.md b/samples/client/petstore/swift5/promisekit/docs/NumberOnly.md new file mode 100644 index 00000000000..72bd361168b --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/NumberOnly.md @@ -0,0 +1,10 @@ +# NumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justNumber** | **Double** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/Order.md b/samples/client/petstore/swift5/promisekit/docs/Order.md new file mode 100644 index 00000000000..15487f01175 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/Order.md @@ -0,0 +1,15 @@ +# Order + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**petId** | **Int64** | | [optional] +**quantity** | **Int** | | [optional] +**shipDate** | **Date** | | [optional] +**status** | **String** | Order Status | [optional] +**complete** | **Bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/OuterComposite.md b/samples/client/petstore/swift5/promisekit/docs/OuterComposite.md new file mode 100644 index 00000000000..d6b3583bc3f --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/OuterComposite.md @@ -0,0 +1,12 @@ +# OuterComposite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myNumber** | **Double** | | [optional] +**myString** | **String** | | [optional] +**myBoolean** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/OuterEnum.md b/samples/client/petstore/swift5/promisekit/docs/OuterEnum.md new file mode 100644 index 00000000000..06d413b0168 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/OuterEnum.md @@ -0,0 +1,9 @@ +# OuterEnum + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/Pet.md b/samples/client/petstore/swift5/promisekit/docs/Pet.md new file mode 100644 index 00000000000..5c05f98fad4 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/Pet.md @@ -0,0 +1,15 @@ +# Pet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **String** | | +**photoUrls** | **[String]** | | +**tags** | [Tag] | | [optional] +**status** | **String** | pet status in the store | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/PetAPI.md b/samples/client/petstore/swift5/promisekit/docs/PetAPI.md new file mode 100644 index 00000000000..e767ea772f8 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/PetAPI.md @@ -0,0 +1,442 @@ +# PetAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) + + +# **addPet** +```swift + open class func addPet( body: Pet) -> Promise +``` + +Add a new pet to the store + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Add a new pet to the store +PetAPI.addPet(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deletePet** +```swift + open class func deletePet( petId: Int64, apiKey: String? = nil) -> Promise +``` + +Deletes a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | Pet id to delete +let apiKey = "apiKey_example" // String | (optional) + +// Deletes a pet +PetAPI.deletePet(petId: petId, apiKey: apiKey).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | Pet id to delete | + **apiKey** | **String** | | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByStatus** +```swift + open class func findPetsByStatus( status: [String]) -> Promise<[Pet]> +``` + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let status = ["status_example"] // [String] | Status values that need to be considered for filter + +// Finds Pets by status +PetAPI.findPetsByStatus(status: status).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**[String]**](String.md) | Status values that need to be considered for filter | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByTags** +```swift + open class func findPetsByTags( tags: [String]) -> Promise<[Pet]> +``` + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let tags = ["inner_example"] // [String] | Tags to filter by + +// Finds Pets by tags +PetAPI.findPetsByTags(tags: tags).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**[String]**](String.md) | Tags to filter by | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getPetById** +```swift + open class func getPetById( petId: Int64) -> Promise +``` + +Find pet by ID + +Returns a single pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to return + +// Find pet by ID +PetAPI.getPetById(petId: petId).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePet** +```swift + open class func updatePet( body: Pet) -> Promise +``` + +Update an existing pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Update an existing pet +PetAPI.updatePet(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePetWithForm** +```swift + open class func updatePetWithForm( petId: Int64, name: String? = nil, status: String? = nil) -> Promise +``` + +Updates a pet in the store with form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet that needs to be updated +let name = "name_example" // String | Updated name of the pet (optional) +let status = "status_example" // String | Updated status of the pet (optional) + +// Updates a pet in the store with form data +PetAPI.updatePetWithForm(petId: petId, name: name, status: status).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet that needs to be updated | + **name** | **String** | Updated name of the pet | [optional] + **status** | **String** | Updated status of the pet | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFile** +```swift + open class func uploadFile( petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> Promise +``` + +uploads an image + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) +let file = URL(string: "https://example.com")! // URL | file to upload (optional) + +// uploads an image +PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + **file** | **URL** | file to upload | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFileWithRequiredFile** +```swift + open class func uploadFileWithRequiredFile( petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> Promise +``` + +uploads an image (required) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) + +// uploads an image (required) +PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **requiredFile** | **URL** | file to upload | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/promisekit/docs/ReadOnlyFirst.md b/samples/client/petstore/swift5/promisekit/docs/ReadOnlyFirst.md new file mode 100644 index 00000000000..e3f16038b97 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/ReadOnlyFirst.md @@ -0,0 +1,11 @@ +# ReadOnlyFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] +**baz** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/Return.md b/samples/client/petstore/swift5/promisekit/docs/Return.md new file mode 100644 index 00000000000..66d17c27c88 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/Return.md @@ -0,0 +1,10 @@ +# Return + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/SpecialModelName.md b/samples/client/petstore/swift5/promisekit/docs/SpecialModelName.md new file mode 100644 index 00000000000..3ec27a38c2a --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/SpecialModelName.md @@ -0,0 +1,10 @@ +# SpecialModelName + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**specialPropertyName** | **Int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/StoreAPI.md b/samples/client/petstore/swift5/promisekit/docs/StoreAPI.md new file mode 100644 index 00000000000..085d479bce2 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/StoreAPI.md @@ -0,0 +1,194 @@ +# StoreAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[**getInventory**](StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +[**placeOrder**](StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet + + +# **deleteOrder** +```swift + open class func deleteOrder( orderId: String) -> Promise +``` + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = "orderId_example" // String | ID of the order that needs to be deleted + +// Delete purchase order by ID +StoreAPI.deleteOrder(orderId: orderId).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String** | ID of the order that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getInventory** +```swift + open class func getInventory() -> Promise<[String:Int]> +``` + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Returns pet inventories by status +StoreAPI.getInventory().then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**[String:Int]** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrderById** +```swift + open class func getOrderById( orderId: Int64) -> Promise +``` + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = 987 // Int64 | ID of pet that needs to be fetched + +// Find purchase order by ID +StoreAPI.getOrderById(orderId: orderId).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **Int64** | ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **placeOrder** +```swift + open class func placeOrder( body: Order) -> Promise +``` + +Place an order for a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Order(id: 123, petId: 123, quantity: 123, shipDate: Date(), status: "status_example", complete: false) // Order | order placed for purchasing the pet + +// Place an order for a pet +StoreAPI.placeOrder(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md) | order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/promisekit/docs/StringBooleanMap.md b/samples/client/petstore/swift5/promisekit/docs/StringBooleanMap.md new file mode 100644 index 00000000000..7abf11ec68b --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/StringBooleanMap.md @@ -0,0 +1,9 @@ +# StringBooleanMap + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/Tag.md b/samples/client/petstore/swift5/promisekit/docs/Tag.md new file mode 100644 index 00000000000..ff4ac8aa451 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/Tag.md @@ -0,0 +1,11 @@ +# Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/TypeHolderDefault.md b/samples/client/petstore/swift5/promisekit/docs/TypeHolderDefault.md new file mode 100644 index 00000000000..5161394bdc3 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/TypeHolderDefault.md @@ -0,0 +1,14 @@ +# TypeHolderDefault + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | [default to "what"] +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | [default to true] +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/TypeHolderExample.md b/samples/client/petstore/swift5/promisekit/docs/TypeHolderExample.md new file mode 100644 index 00000000000..46d0471cd71 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/TypeHolderExample.md @@ -0,0 +1,14 @@ +# TypeHolderExample + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/User.md b/samples/client/petstore/swift5/promisekit/docs/User.md new file mode 100644 index 00000000000..5a439de0ff9 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/User.md @@ -0,0 +1,17 @@ +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**username** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] +**email** | **String** | | [optional] +**password** | **String** | | [optional] +**phone** | **String** | | [optional] +**userStatus** | **Int** | User Status | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekit/docs/UserAPI.md b/samples/client/petstore/swift5/promisekit/docs/UserAPI.md new file mode 100644 index 00000000000..e18cc451e98 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/docs/UserAPI.md @@ -0,0 +1,382 @@ +# UserAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserAPI.md#createuser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +# **createUser** +```swift + open class func createUser( body: User) -> Promise +``` + +Create user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Created user object + +// Create user +UserAPI.createUser(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md) | Created user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithArrayInput** +```swift + open class func createUsersWithArrayInput( body: [User]) -> Promise +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithArrayInput(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithListInput** +```swift + open class func createUsersWithListInput( body: [User]) -> Promise +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithListInput(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteUser** +```swift + open class func deleteUser( username: String) -> Promise +``` + +Delete user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be deleted + +// Delete user +UserAPI.deleteUser(username: username).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getUserByName** +```swift + open class func getUserByName( username: String) -> Promise +``` + +Get user by user name + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be fetched. Use user1 for testing. + +// Get user by user name +UserAPI.getUserByName(username: username).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loginUser** +```swift + open class func loginUser( username: String, password: String) -> Promise +``` + +Logs user into the system + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The user name for login +let password = "password_example" // String | The password for login in clear text + +// Logs user into the system +UserAPI.loginUser(username: username, password: password).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The user name for login | + **password** | **String** | The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **logoutUser** +```swift + open class func logoutUser() -> Promise +``` + +Logs out current logged in user session + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Logs out current logged in user session +UserAPI.logoutUser().then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +```swift + open class func updateUser( username: String, body: User) -> Promise +``` + +Updated user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | name that need to be deleted +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Updated user object + +// Updated user +UserAPI.updateUser(username: username, body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | name that need to be deleted | + **body** | [**User**](User.md) | Updated user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/promisekit/git_push.sh b/samples/client/petstore/swift5/promisekit/git_push.sh new file mode 100644 index 00000000000..8442b80bb44 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/samples/client/petstore/swift5/promisekit/project.yml b/samples/client/petstore/swift5/promisekit/project.yml new file mode 100644 index 00000000000..e1d39a038b5 --- /dev/null +++ b/samples/client/petstore/swift5/promisekit/project.yml @@ -0,0 +1,17 @@ +name: PetstoreClient +targets: + PetstoreClient: + type: framework + platform: iOS + deploymentTarget: "10.0" + sources: [PetstoreClient] + info: + path: ./Info.plist + version: 1.0.0 + settings: + APPLICATION_EXTENSION_API_ONLY: true + SWIFT_VERSION: "5.0" + scheme: {} + dependencies: + - carthage: Alamofire + - carthage: PromiseKit diff --git a/samples/client/petstore/swift5/rxswift/.gitignore b/samples/client/petstore/swift5/rxswift/.gitignore new file mode 100644 index 00000000000..5e5d5cebcf4 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/.gitignore @@ -0,0 +1,63 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots diff --git a/samples/client/petstore/swift5/rxswift/.openapi-generator-ignore b/samples/client/petstore/swift5/rxswift/.openapi-generator-ignore new file mode 100644 index 00000000000..7484ee590a3 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/swift5/rxswift/.openapi-generator/VERSION b/samples/client/petstore/swift5/rxswift/.openapi-generator/VERSION new file mode 100644 index 00000000000..83a328a9227 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/rxswift/Cartfile b/samples/client/petstore/swift5/rxswift/Cartfile new file mode 100644 index 00000000000..a4bafe781c8 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/Cartfile @@ -0,0 +1,2 @@ +github "Alamofire/Alamofire" +github "ReactiveX/RxSwift" diff --git a/samples/client/petstore/swift5/rxswift/Info.plist b/samples/client/petstore/swift5/rxswift/Info.plist new file mode 100644 index 00000000000..323e5ecfc42 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient.podspec b/samples/client/petstore/swift5/rxswift/PetstoreClient.podspec new file mode 100644 index 00000000000..665543e91bf --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient.podspec @@ -0,0 +1,15 @@ +Pod::Spec.new do |s| + s.name = 'PetstoreClient' + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.11' + s.tvos.deployment_target = '9.0' + s.version = '1.0.0' + s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' } + s.authors = '' + s.license = 'Proprietary' + s.homepage = 'https://github.com/openapitools/openapi-generator' + s.summary = 'PetstoreClient' + s.source_files = 'PetstoreClient/Classes/**/*.swift' + s.dependency 'RxSwift', '~> 4.0' + s.dependency 'Alamofire', '~> 4.7.0' +end diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/rxswift/PetstoreClient.xcodeproj/project.pbxproj new file mode 100644 index 00000000000..3a330028fde --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient.xcodeproj/project.pbxproj @@ -0,0 +1,575 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; + 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */; }; + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83D /* Alamofire.framework */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; + 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + BC097E527F96131FEA12D864 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 69DB3E1D94EB0566C0052331 /* RxSwift.framework */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 69DB3E1D94EB0566C0052331 /* RxSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = RxSwift.framework; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; + 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D1990C2A394CCF025EF98A2F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */, + BC097E527F96131FEA12D864 /* RxSwift.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1E464C0937FE0D3A7A0FE29A /* Frameworks */ = { + isa = PBXGroup; + children = ( + 7861EE241895128F64DD7873 /* Carthage */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4FBDCF1330A9AB9122780DB3 /* Models */ = { + isa = PBXGroup; + children = ( + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, + ); + path = Models; + sourceTree = ""; + }; + 5FBA6AE5F64CD737F88B4565 = { + isa = PBXGroup; + children = ( + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 1E464C0937FE0D3A7A0FE29A /* Frameworks */, + 857F0DEA1890CE66D6DAD556 /* Products */, + ); + sourceTree = ""; + }; + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { + isa = PBXGroup; + children = ( + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */, + 897716962D472FE162B723CB /* APIHelper.swift */, + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, + 28A444949BBC254798C3B3DD /* Configuration.swift */, + B8C298FC8929DCB369053F11 /* Extensions.swift */, + 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */, + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, + 8699F7966F748ED026A6FB4C /* Models.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, + ); + path = OpenAPIs; + sourceTree = ""; + }; + 7861EE241895128F64DD7873 /* Carthage */ = { + isa = PBXGroup; + children = ( + A012205B41CB71A62B86EECD /* iOS */, + ); + name = Carthage; + path = Carthage/Build; + sourceTree = ""; + }; + 857F0DEA1890CE66D6DAD556 /* Products */ = { + isa = PBXGroup; + children = ( + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, + ); + name = Products; + sourceTree = ""; + }; + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { + isa = PBXGroup; + children = ( + EF4C81BDD734856ED5023B77 /* Classes */, + ); + path = PetstoreClient; + sourceTree = ""; + }; + A012205B41CB71A62B86EECD /* iOS */ = { + isa = PBXGroup; + children = ( + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */, + 69DB3E1D94EB0566C0052331 /* RxSwift.framework */, + ); + path = iOS; + sourceTree = ""; + }; + EF4C81BDD734856ED5023B77 /* Classes */ = { + isa = PBXGroup; + children = ( + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, + ); + path = Classes; + sourceTree = ""; + }; + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { + isa = PBXGroup; + children = ( + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, + ); + path = APIs; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C1282C2230015E0D204BEAED /* PetstoreClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildPhases = ( + E539708354CE60FE486F81ED /* Sources */, + D1990C2A394CCF025EF98A2F /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PetstoreClient; + productName = PetstoreClient; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E7D276EE2369D8C455513C2E /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + }; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 5FBA6AE5F64CD737F88B4565; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C1282C2230015E0D204BEAED /* PetstoreClient */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + E539708354CE60FE486F81ED /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, + 72547ECFB451A509409311EE /* Configuration.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */, + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 3B2C02AFB91CB5C82766ED5C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + A9EB0A02B94C427CBACFEC7C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "DEBUG=1", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + DD3EEB93949E9EBA4437E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ""; + }; + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/rxswift/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000000..919434a6254 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/client/petstore/swift5/rxswift/PetstoreClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000000..18d981003d6 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift5/rxswift/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme new file mode 100644 index 00000000000..e8ac84fa992 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIHelper.swift new file mode 100644 index 00000000000..75dea243957 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -0,0 +1,70 @@ +// APIHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct APIHelper { + public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + let destination = source.reduce(into: [String: Any]()) { (result, item) in + if let value = item.value { + result[item.key] = value + } + } + + if destination.isEmpty { + return nil + } + return destination + } + + public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + return source.reduce(into: [String: String]()) { (result, item) in + if let collection = item.value as? Array { + result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") + } else if let value: Any = item.value { + result[item.key] = "\(value)" + } + } + } + + public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { + guard let source = source else { + return nil + } + + return source.reduce(into: [String: Any](), { (result, item) in + switch item.value { + case let x as Bool: + result[item.key] = x.description + default: + result[item.key] = item.value + } + }) + } + + public static func mapValueToPathItem(_ source: Any) -> Any { + if let collection = source as? Array { + return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + } + return source + } + + public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in + if let collection = item.value as? Array { + let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + result.append(URLQueryItem(name: item.key, value: value)) + } else if let value = item.value { + result.append(URLQueryItem(name: item.key, value: "\(value)")) + } + } + + if destination.isEmpty { + return nil + } + return destination + } +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIs.swift new file mode 100644 index 00000000000..295f1934af7 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -0,0 +1,54 @@ +// APIs.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct RequestBuilder { + public let endpoint: String + public let method: String + public let parameters: [Parameters] + public let headers: [String: String] + + public init(endpoint: String, method: String, parameters: [Parameters] = [], headers: [String: String] = [:]) { + self.endpoint = endpoint + self.method = method + self.parameters = parameters + self.headers = headers + } +} + +public enum Parameters { + case query([String: Any?]) + case form([String: String?]) + case json(AnyEncodable) + + public init(_ raw: [String: Any?]) { + self = .query(raw) + } + + public init(_ raw: [String: String?]) { + self = .form(raw) + } + + public init(_ raw: T) { + self = .json(AnyEncodable(raw)) + } +} + +public struct AnyEncodable: Encodable { + var encode: (Encoder) throws -> Void + + init(_ encodable: Encodable) { + func encode(to encoder: Encoder) throws { + try encodable.encode(to: encoder) + } + self.encode = encode + } + + public func encode(to encoder: Encoder) throws { + try encode(encoder) + } +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift new file mode 100644 index 00000000000..827ab21b6b5 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -0,0 +1,28 @@ +// +// AnotherFakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct AnotherFakeAPI { + /** + To test special tags + - PATCH /another-fake/dummy + - To test special tags and operation ID starting with number + - parameter body: (body) client model + - returns: RequestBuilder + */ + public func call123testSpecialTags(body: Client) -> RequestBuilder { + let path = "/another-fake/dummy" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PATCH", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift new file mode 100644 index 00000000000..af04243b096 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -0,0 +1,340 @@ +// +// FakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FakeAPI { + /** + - POST /fake/outer/boolean + - Test serialization of outer boolean types + - parameter body: (body) Input boolean as post body (optional) + - returns: RequestBuilder + */ + public func fakeOuterBooleanSerialize(body: Bool? = nil) -> RequestBuilder { + let path = "/fake/outer/boolean" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + - POST /fake/outer/composite + - Test serialization of object with outer number type + - parameter body: (body) Input composite as post body (optional) + - returns: RequestBuilder + */ + public func fakeOuterCompositeSerialize(body: OuterComposite? = nil) -> RequestBuilder { + let path = "/fake/outer/composite" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + - POST /fake/outer/number + - Test serialization of outer number types + - parameter body: (body) Input number as post body (optional) + - returns: RequestBuilder + */ + public func fakeOuterNumberSerialize(body: Double? = nil) -> RequestBuilder { + let path = "/fake/outer/number" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + - POST /fake/outer/string + - Test serialization of outer string types + - parameter body: (body) Input string as post body (optional) + - returns: RequestBuilder + */ + public func fakeOuterStringSerialize(body: String? = nil) -> RequestBuilder { + let path = "/fake/outer/string" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + - PUT /fake/body-with-file-schema + - For this test, the body for this request much reference a schema named `File`. + - parameter body: (body) + - returns: RequestBuilder + */ + public func testBodyWithFileSchema(body: FileSchemaTestClass) -> RequestBuilder { + let path = "/fake/body-with-file-schema" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PUT", parameters: parameters) + } + + /** + - PUT /fake/body-with-query-params + - parameter query: (query) + - parameter body: (body) + - returns: RequestBuilder + */ + public func testBodyWithQueryParams(query: String, body: User) -> RequestBuilder { + let path = "/fake/body-with-query-params" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + let queryParams: [String: Any?] = [ + "query": query + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder(endpoint: path, method: "PUT", parameters: parameters) + } + + /** + To test \"client\" model + - PATCH /fake + - To test \"client\" model + - parameter body: (body) client model + - returns: RequestBuilder + */ + public func testClientModel(body: Client) -> RequestBuilder { + let path = "/fake" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PATCH", parameters: parameters) + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - POST /fake + - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - BASIC: + - type: http + - name: http_basic_test + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - returns: RequestBuilder + */ + public func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + let path = "/fake" + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "integer": integer?.description, + "int32": int32?.description, + "int64": int64?.description, + "number": number.description, + "float": float?.description, + "double": double.description, + "string": string, + "pattern_without_delimiter": patternWithoutDelimiter, + "byte": byte.description, + "binary": binary?.description, + "date": date?.description, + "dateTime": dateTime?.description, + "password": password, + "callback": callback + ] + parameters.append(Parameters(formParams)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + * enum for parameter enumHeaderStringArray + */ + public enum EnumHeaderStringArray_testEnumParameters: String { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumHeaderString + */ + public enum EnumHeaderString_testEnumParameters: String { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryStringArray + */ + public enum EnumQueryStringArray_testEnumParameters: String { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumQueryString + */ + public enum EnumQueryString_testEnumParameters: String { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryInteger + */ + public enum EnumQueryInteger_testEnumParameters: Int { + case _1 = 1 + case number2 = -2 + } + + /** + * enum for parameter enumQueryDouble + */ + public enum EnumQueryDouble_testEnumParameters: Double { + case _11 = 1.1 + case number12 = -1.2 + } + + /** + * enum for parameter enumFormStringArray + */ + public enum EnumFormStringArray_testEnumParameters: String { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumFormString + */ + public enum EnumFormString_testEnumParameters: String { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + To test enum parameters + - GET /fake + - To test enum parameters + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .-efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .-efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .$) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .-efg) + - returns: RequestBuilder + */ + public func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { + let path = "/fake" + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "enum_form_string_array": enumFormStringArray?.description, + "enum_form_string": enumFormString?.rawValue + ] + parameters.append(Parameters(formParams)) + + let queryParams: [String: Any?] = [ + "enum_query_string_array": enumQueryStringArray, + "enum_query_string": enumQueryString, + "enum_query_integer": enumQueryInteger, + "enum_query_double": enumQueryDouble + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder(endpoint: path, method: "GET", parameters: parameters) + } + + /** + Fake endpoint to test group parameters (optional) + - DELETE /fake + - Fake endpoint to test group parameters (optional) + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - returns: RequestBuilder + */ + public func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { + let path = "/fake" + + var parameters: [Parameters] = [] + + let queryParams: [String: Any?] = [ + "required_string_group": requiredStringGroup, + "required_int64_group": requiredInt64Group, + "string_group": stringGroup, + "int64_group": int64Group + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder(endpoint: path, method: "DELETE", parameters: parameters) + } + + /** + test inline additionalProperties + - POST /fake/inline-additionalProperties + - parameter param: (body) request body + - returns: RequestBuilder + */ + public func testInlineAdditionalProperties(param: [String: String]) -> RequestBuilder { + let path = "/fake/inline-additionalProperties" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(param)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + test json serialization of form data + - GET /fake/jsonFormData + - parameter param: (form) field1 + - parameter param2: (form) field2 + - returns: RequestBuilder + */ + public func testJsonFormData(param: String, param2: String) -> RequestBuilder { + let path = "/fake/jsonFormData" + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "param": param, + "param2": param2 + ] + parameters.append(Parameters(formParams)) + + return RequestBuilder(endpoint: path, method: "GET", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift new file mode 100644 index 00000000000..96131d9c1fb --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -0,0 +1,31 @@ +// +// FakeClassnameTags123API.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FakeClassnameTags123API { + /** + To test class name in snake case + - PATCH /fake_classname_test + - To test class name in snake case + - API Key: + - type: apiKey api_key_query (QUERY) + - name: api_key_query + - parameter body: (body) client model + - returns: RequestBuilder + */ + public func testClassname(body: Client) -> RequestBuilder { + let path = "/fake_classname_test" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PATCH", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift new file mode 100644 index 00000000000..8240720cdb3 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -0,0 +1,216 @@ +// +// PetAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PetAPI { + /** + Add a new pet to the store + - POST /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + public func addPet(body: Pet) -> RequestBuilder { + let path = "/pet" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + Deletes a pet + - DELETE /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - returns: RequestBuilder + */ + public func deletePet(petId: Int64, apiKey: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdEscaped = "\(petId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "DELETE") + } + + /** + * enum for parameter status + */ + public enum Status_findPetsByStatus: String { + case available = "available" + case pending = "pending" + case sold = "sold" + } + + /** + Finds Pets by status + - GET /pet/findByStatus + - Multiple status values can be provided with comma separated strings + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter status: (query) Status values that need to be considered for filter + - returns: RequestBuilder<[Pet]> + */ + public func findPetsByStatus(status: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByStatus" + + var parameters: [Parameters] = [] + + let queryParams: [String: Any?] = [ + "status": status + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder<[Pet]>(endpoint: path, method: "GET", parameters: parameters) + } + + /** + Finds Pets by tags + - GET /pet/findByTags + - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter tags: (query) Tags to filter by + - returns: RequestBuilder<[Pet]> + */ + public func findPetsByTags(tags: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByTags" + + var parameters: [Parameters] = [] + + let queryParams: [String: Any?] = [ + "tags": tags + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder<[Pet]>(endpoint: path, method: "GET", parameters: parameters) + } + + /** + Find pet by ID + - GET /pet/{petId} + - Returns a single pet + - API Key: + - type: apiKey api_key + - name: api_key + - parameter petId: (path) ID of pet to return + - returns: RequestBuilder + */ + public func getPetById(petId: Int64) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdEscaped = "\(petId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "GET") + } + + /** + Update an existing pet + - PUT /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + public func updatePet(body: Pet) -> RequestBuilder { + let path = "/pet" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PUT", parameters: parameters) + } + + /** + Updates a pet in the store with form data + - POST /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - returns: RequestBuilder + */ + public func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdEscaped = "\(petId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdEscaped, options: .literal, range: nil) + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "name": name, + "status": status + ] + parameters.append(Parameters(formParams)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + uploads an image + - POST /pet/{petId}/uploadImage + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - returns: RequestBuilder + */ + public func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImage" + let petIdEscaped = "\(petId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdEscaped, options: .literal, range: nil) + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "additionalMetadata": additionalMetadata, + "file": file?.description + ] + parameters.append(Parameters(formParams)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + uploads an image (required) + - POST /fake/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + public func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/fake/{petId}/uploadImageWithRequiredFile" + let petIdEscaped = "\(petId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdEscaped, options: .literal, range: nil) + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "additionalMetadata": additionalMetadata, + "requiredFile": requiredFile.description + ] + parameters.append(Parameters(formParams)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift new file mode 100644 index 00000000000..6b5488e5246 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -0,0 +1,72 @@ +// +// StoreAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct StoreAPI { + /** + Delete purchase order by ID + - DELETE /store/order/{order_id} + - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + - parameter orderId: (path) ID of the order that needs to be deleted + - returns: RequestBuilder + */ + public func deleteOrder(orderId: String) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdEscaped = "\(orderId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "DELETE") + } + + /** + Returns pet inventories by status + - GET /store/inventory + - Returns a map of status codes to quantities + - API Key: + - type: apiKey api_key + - name: api_key + - returns: RequestBuilder<[String:Int]> + */ + public func getInventory() -> RequestBuilder<[String: Int]> { + let path = "/store/inventory" + + return RequestBuilder<[String: Int]>(endpoint: path, method: "GET") + } + + /** + Find purchase order by ID + - GET /store/order/{order_id} + - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - parameter orderId: (path) ID of pet that needs to be fetched + - returns: RequestBuilder + */ + public func getOrderById(orderId: Int64) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdEscaped = "\(orderId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "GET") + } + + /** + Place an order for a pet + - POST /store/order + - parameter body: (body) order placed for purchasing the pet + - returns: RequestBuilder + */ + public func placeOrder(body: Order) -> RequestBuilder { + let path = "/store/order" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift new file mode 100644 index 00000000000..d7d61295e8f --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -0,0 +1,141 @@ +// +// UserAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct UserAPI { + /** + Create user + - POST /user + - This can only be done by the logged in user. + - parameter body: (body) Created user object + - returns: RequestBuilder + */ + public func createUser(body: User) -> RequestBuilder { + let path = "/user" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + Creates list of users with given input array + - POST /user/createWithArray + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + public func createUsersWithArrayInput(body: [User]) -> RequestBuilder { + let path = "/user/createWithArray" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + Creates list of users with given input array + - POST /user/createWithList + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + public func createUsersWithListInput(body: [User]) -> RequestBuilder { + let path = "/user/createWithList" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + Delete user + - DELETE /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) The name that needs to be deleted + - returns: RequestBuilder + */ + public func deleteUser(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernameEscaped = "\(username)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernameEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "DELETE") + } + + /** + Get user by user name + - GET /user/{username} + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - returns: RequestBuilder + */ + public func getUserByName(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernameEscaped = "\(username)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernameEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "GET") + } + + /** + Logs user into the system + - GET /user/login + - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - returns: RequestBuilder + */ + public func loginUser(username: String, password: String) -> RequestBuilder { + let path = "/user/login" + + var parameters: [Parameters] = [] + + let queryParams: [String: Any?] = [ + "username": username, + "password": password + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder(endpoint: path, method: "GET", parameters: parameters) + } + + /** + Logs out current logged in user session + - GET /user/logout + - returns: RequestBuilder + */ + public func logoutUser() -> RequestBuilder { + let path = "/user/logout" + + return RequestBuilder(endpoint: path, method: "GET") + } + + /** + Updated user + - PUT /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - returns: RequestBuilder + */ + public func updateUser(username: String, body: User) -> RequestBuilder { + var path = "/user/{username}" + let usernameEscaped = "\(username)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernameEscaped, options: .literal, range: nil) + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PUT", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift new file mode 100644 index 00000000000..60ce28c66a2 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift @@ -0,0 +1,450 @@ +// AlamofireImplementations.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Alamofire + +class AlamofireRequestBuilderFactory: RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type { + return AlamofireRequestBuilder.self + } + + func getBuilder() -> RequestBuilder.Type { + return AlamofireDecodableRequestBuilder.self + } +} + +private struct SynchronizedDictionary { + + private var dictionary = [K: V]() + private let queue = DispatchQueue( + label: "SynchronizedDictionary", + qos: DispatchQoS.userInitiated, + attributes: [DispatchQueue.Attributes.concurrent], + autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, + target: nil + ) + + public subscript(key: K) -> V? { + get { + var value: V? + + queue.sync { + value = self.dictionary[key] + } + + return value + } + set { + queue.sync(flags: DispatchWorkItemFlags.barrier) { + self.dictionary[key] = newValue + } + } + } + } + +// Store manager to retain its reference +private var managerStore = SynchronizedDictionary() + +open class AlamofireRequestBuilder: RequestBuilder { + required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) + } + + /** + May be overridden by a subclass if you want to control the session + configuration. + */ + open func createSessionManager() -> Alamofire.SessionManager { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = buildHeaders() + return Alamofire.SessionManager(configuration: configuration) + } + + /** + May be overridden by a subclass if you want to custom request constructor. + */ + open func createURLRequest() -> URLRequest? { + let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() + guard let originalRequest = try? URLRequest(url: URLString, method: HTTPMethod(rawValue: method)!, headers: buildHeaders()) else { return nil } + return try? encoding.encode(originalRequest, with: parameters) + } + + /** + May be overridden by a subclass if you want to control the Content-Type + that is given to an uploaded form part. + + Return nil to use the default behavior (inferring the Content-Type from + the file extension). Return the desired Content-Type otherwise. + */ + open func contentTypeForFormPart(fileURL: URL) -> String? { + return nil + } + + /** + May be overridden by a subclass if you want to control the request + configuration (e.g. to override the cache policy). + */ + open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) -> DataRequest { + return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) + } + + override open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { + let managerId: String = UUID().uuidString + // Create a new manager for each request to customize its request header + let manager = createSessionManager() + managerStore[managerId] = manager + + let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() + + let xMethod = Alamofire.HTTPMethod(rawValue: method) + let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } + .map { $0.0 } + + if fileKeys.count > 0 { + manager.upload(multipartFormData: { mpForm in + for (k, v) in self.parameters! { + switch v { + case let fileURL as URL: + if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { + mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) + } else { + mpForm.append(fileURL, withName: k) + } + case let string as String: + mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k) + case let number as NSNumber: + mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k) + default: + fatalError("Unprocessable value \(v) with key \(k)") + } + } + }, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in + switch encodingResult { + case .success(let upload, _, _): + if let onProgressReady = self.onProgressReady { + onProgressReady(upload.uploadProgress) + } + self.processRequest(request: upload, managerId, completion) + case .failure(let encodingError): + completion(nil, ErrorResponse.error(415, nil, encodingError)) + } + }) + } else { + let request = makeRequest(manager: manager, method: xMethod!, encoding: encoding, headers: headers) + if let onProgressReady = self.onProgressReady { + onProgressReady(request.progress) + } + processRequest(request: request, managerId, completion) + } + + } + + fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { + if let credential = self.credential { + request.authenticate(usingCredential: credential) + } + + let cleanupRequest = { + managerStore[managerId] = nil + } + + let validatedRequest = request.validate() + + switch T.self { + case is String.Type: + validatedRequest.responseString(completionHandler: { (stringResponse) in + cleanupRequest() + + if stringResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) + ) + return + } + + completion( + Response( + response: stringResponse.response!, + body: ((stringResponse.result.value ?? "") as! T) + ), + nil + ) + }) + case is URL.Type: + validatedRequest.responseData(completionHandler: { (dataResponse) in + cleanupRequest() + + do { + + guard !dataResponse.result.isFailure else { + throw DownloadException.responseFailed + } + + guard let data = dataResponse.data else { + throw DownloadException.responseDataMissing + } + + guard let request = request.request else { + throw DownloadException.requestMissing + } + + let fileManager = FileManager.default + let urlRequest = try request.asURLRequest() + let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] + let requestURL = try self.getURL(from: urlRequest) + + var requestPath = try self.getPath(from: requestURL) + + if let headerFileName = self.getFileName(fromContentDisposition: dataResponse.response?.allHeaderFields["Content-Disposition"] as? String) { + requestPath = requestPath.appending("/\(headerFileName)") + } + + let filePath = documentsDirectory.appendingPathComponent(requestPath) + let directoryPath = filePath.deletingLastPathComponent().path + + try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) + try data.write(to: filePath, options: .atomic) + + completion( + Response( + response: dataResponse.response!, + body: (filePath as! T) + ), + nil + ) + + } catch let requestParserError as DownloadException { + completion(nil, ErrorResponse.error(400, dataResponse.data, requestParserError)) + } catch let error { + completion(nil, ErrorResponse.error(400, dataResponse.data, error)) + } + return + }) + case is Void.Type: + validatedRequest.responseData(completionHandler: { (voidResponse) in + cleanupRequest() + + if voidResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) + ) + return + } + + completion( + Response( + response: voidResponse.response!, + body: nil), + nil + ) + }) + default: + validatedRequest.responseData(completionHandler: { (dataResponse) in + cleanupRequest() + + if dataResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) + ) + return + } + + completion( + Response( + response: dataResponse.response!, + body: (dataResponse.data as! T) + ), + nil + ) + }) + } + } + + open func buildHeaders() -> [String: String] { + var httpHeaders = SessionManager.defaultHTTPHeaders + for (key, value) in self.headers { + httpHeaders[key] = value + } + return httpHeaders + } + + fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + + guard let contentDisposition = contentDisposition else { + return nil + } + + let items = contentDisposition.components(separatedBy: ";") + + var filename: String? + + for contentItem in items { + + let filenameKey = "filename=" + guard let range = contentItem.range(of: filenameKey) else { + break + } + + filename = contentItem + return filename? + .replacingCharacters(in: range, with: "") + .replacingOccurrences(of: "\"", with: "") + .trimmingCharacters(in: .whitespacesAndNewlines) + } + + return filename + + } + + fileprivate func getPath(from url: URL) throws -> String { + + guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { + throw DownloadException.requestMissingPath + } + + if path.hasPrefix("/") { + path.remove(at: path.startIndex) + } + + return path + + } + + fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + return url + } + +} + +private enum DownloadException: Error { + case responseDataMissing + case responseFailed + case requestMissing + case requestMissingPath + case requestMissingURL +} + +public enum AlamofireDecodableRequestBuilderError: Error { + case emptyDataResponse + case nilHTTPResponse + case jsonDecoding(DecodingError) + case generalError(Error) +} + +open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { + + override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { + if let credential = self.credential { + request.authenticate(usingCredential: credential) + } + + let cleanupRequest = { + managerStore[managerId] = nil + } + + let validatedRequest = request.validate() + + switch T.self { + case is String.Type: + validatedRequest.responseString(completionHandler: { (stringResponse) in + cleanupRequest() + + if stringResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) + ) + return + } + + completion( + Response( + response: stringResponse.response!, + body: ((stringResponse.result.value ?? "") as! T) + ), + nil + ) + }) + case is Void.Type: + validatedRequest.responseData(completionHandler: { (voidResponse) in + cleanupRequest() + + if voidResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) + ) + return + } + + completion( + Response( + response: voidResponse.response!, + body: nil), + nil + ) + }) + case is Data.Type: + validatedRequest.responseData(completionHandler: { (dataResponse) in + cleanupRequest() + + if dataResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) + ) + return + } + + completion( + Response( + response: dataResponse.response!, + body: (dataResponse.data as! T) + ), + nil + ) + }) + default: + validatedRequest.responseData(completionHandler: { (dataResponse: DataResponse) in + cleanupRequest() + + guard dataResponse.result.isSuccess else { + completion(nil, ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)) + return + } + + guard let data = dataResponse.data, !data.isEmpty else { + completion(nil, ErrorResponse.error(-1, nil, AlamofireDecodableRequestBuilderError.emptyDataResponse)) + return + } + + guard let httpResponse = dataResponse.response else { + completion(nil, ErrorResponse.error(-2, nil, AlamofireDecodableRequestBuilderError.nilHTTPResponse)) + return + } + + var responseObj: Response? + + let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) + if decodeResult.error == nil { + responseObj = Response(response: httpResponse, body: decodeResult.decodableObj) + } + + completion(responseObj, decodeResult.error) + }) + } + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift new file mode 100644 index 00000000000..0a333db0d10 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -0,0 +1,71 @@ +// +// CodableHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public typealias EncodeResult = (data: Data?, error: Error?) + +open class CodableHelper { + + public static var dateformatter: DateFormatter? + + open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T: Decodable { + var returnedDecodable: T? + var returnedError: Error? + + let decoder = JSONDecoder() + if let df = self.dateformatter { + decoder.dateDecodingStrategy = .formatted(df) + } else { + decoder.dataDecodingStrategy = .base64 + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = Configuration.dateFormat + decoder.dateDecodingStrategy = .formatted(formatter) + } + + do { + returnedDecodable = try decoder.decode(type, from: data) + } catch { + returnedError = error + } + + return (returnedDecodable, returnedError) + } + + open class func encode(_ value: T, prettyPrint: Bool = false) -> EncodeResult where T: Encodable { + var returnedData: Data? + var returnedError: Error? + + let encoder = JSONEncoder() + if prettyPrint { + encoder.outputFormatting = .prettyPrinted + } + if let df = self.dateformatter { + encoder.dateEncodingStrategy = .formatted(df) + } else { + encoder.dataEncodingStrategy = .base64 + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = Configuration.dateFormat + encoder.dateEncodingStrategy = .formatted(formatter) + } + + do { + returnedData = try encoder.encode(value) + } catch { + returnedError = error + } + + return (returnedData, returnedError) + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Configuration.swift new file mode 100644 index 00000000000..e1ecb39726e --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -0,0 +1,15 @@ +// Configuration.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class Configuration { + + // This value is used to configure the date formatter that is used to serialize dates into JSON format. + // You must set it prior to encoding any dates, and it will only be read once. + public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Extensions.swift new file mode 100644 index 00000000000..2fa32b9e0f3 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -0,0 +1,177 @@ +// Extensions.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Alamofire + +extension Bool: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Float: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int32: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } +} + +extension Int64: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } +} + +extension Double: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension String: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +private func encodeIfPossible(_ object: T) -> Any { + if let encodableObject = object as? JSONEncodable { + return encodableObject.encodeToJSON() + } else { + return object as Any + } +} + +extension Array: JSONEncodable { + func encodeToJSON() -> Any { + return self.map(encodeIfPossible) + } +} + +extension Dictionary: JSONEncodable { + func encodeToJSON() -> Any { + var dictionary = [AnyHashable: Any]() + for (key, value) in self { + dictionary[key] = encodeIfPossible(value) + } + return dictionary as Any + } +} + +extension Data: JSONEncodable { + func encodeToJSON() -> Any { + return self.base64EncodedString(options: Data.Base64EncodingOptions()) + } +} + +private let dateFormatter: DateFormatter = { + if let formatter = CodableHelper.dateformatter { + return formatter + } else { + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = Configuration.dateFormat + return formatter + } +}() + +extension Date: JSONEncodable { + func encodeToJSON() -> Any { + return dateFormatter.string(from: self) as Any + } +} + +extension UUID: JSONEncodable { + func encodeToJSON() -> Any { + return self.uuidString + } +} + +extension String: CodingKey { + + public var stringValue: String { + return self + } + + public init?(stringValue: String) { + self.init(stringLiteral: stringValue) + } + + public var intValue: Int? { + return nil + } + + public init?(intValue: Int) { + return nil + } + +} + +extension KeyedEncodingContainerProtocol { + + public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + var arrayContainer = nestedUnkeyedContainer(forKey: key) + try arrayContainer.encode(contentsOf: values) + } + + public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { + if let values = values { + try encodeArray(values, forKey: key) + } + } + + public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { + for (key, value) in pairs { + try encode(value, forKey: key) + } + } + + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { + if let pairs = pairs { + try encodeMap(pairs) + } + } + +} + +extension KeyedDecodingContainerProtocol { + + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + var tmpArray = [T]() + + var nestedContainer = try nestedUnkeyedContainer(forKey: key) + while !nestedContainer.isAtEnd { + let arrayValue = try nestedContainer.decode(T.self) + tmpArray.append(arrayValue) + } + + return tmpArray + } + + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { + var tmpArray: [T]? + + if contains(key) { + tmpArray = try decodeArray(T.self, forKey: key) + } + + return tmpArray + } + + public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { + var map: [Self.Key: T] = [:] + + for key in allKeys { + if !excludedKeys.contains(key) { + let value = try decode(T.self, forKey: key) + map[key] = value + } + } + + return map + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift new file mode 100644 index 00000000000..fb76bbed26f --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift @@ -0,0 +1,54 @@ +// +// JSONDataEncoding.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Alamofire + +public struct JSONDataEncoding: ParameterEncoding { + + // MARK: Properties + + private static let jsonDataKey = "jsonData" + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. This should have a single key/value + /// pair with "jsonData" as the key and a Data object as the value. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { + var urlRequest = try urlRequest.asURLRequest() + + guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { + return urlRequest + } + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = jsonData + + return urlRequest + } + + public static func encodingParameters(jsonData: Data?) -> Parameters? { + var returnedParams: Parameters? + if let jsonData = jsonData, !jsonData.isEmpty { + var params = Parameters() + params[jsonDataKey] = jsonData + returnedParams = params + } + return returnedParams + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift new file mode 100644 index 00000000000..7bd1267e95f --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -0,0 +1,43 @@ +// +// JSONEncodingHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Alamofire + +open class JSONEncodingHelper { + + open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { + var params: Parameters? + + // Encode the Encodable object + if let encodableObj = encodableObj { + let encodeResult = CodableHelper.encode(encodableObj, prettyPrint: true) + if encodeResult.error == nil { + params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) + } + } + + return params + } + + open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { + var params: Parameters? + + if let encodableObj = encodableObj { + do { + let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error) + return nil + } + } + + return params + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models.swift new file mode 100644 index 00000000000..25161165865 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -0,0 +1,36 @@ +// Models.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +protocol JSONEncodable { + func encodeToJSON() -> Any +} + +public enum ErrorResponse: Error { + case error(Int, Data?, Error) +} + +open class Response { + public let statusCode: Int + public let header: [String: String] + public let body: T? + + public init(statusCode: Int, header: [String: String], body: T?) { + self.statusCode = statusCode + self.header = header + self.body = body + } + + public convenience init(response: HTTPURLResponse, body: T?) { + let rawHeader = response.allHeaderFields + var header = [String: String]() + for case let (key, value) as (String, String) in rawHeader { + header[key] = value + } + self.init(statusCode: response.statusCode, header: header, body: body) + } +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift new file mode 100644 index 00000000000..a64e64065c9 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -0,0 +1,24 @@ +// +// AdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct AdditionalPropertiesClass: Codable { + + public var mapString: [String: String]? + public var mapMapString: [String: [String: String]]? + public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + self.mapString = mapString + self.mapMapString = mapMapString + } + + public enum CodingKeys: String, CodingKey { + case mapString = "map_string" + case mapMapString = "map_map_string" + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift new file mode 100644 index 00000000000..cf5de2351a9 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -0,0 +1,19 @@ +// +// Animal.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Animal: Codable { + + public var className: String + public var color: String? = "red" + public init(className: String, color: String?) { + self.className = className + self.color = color + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift new file mode 100644 index 00000000000..e09b0e9efdc --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -0,0 +1,10 @@ +// +// AnimalFarm.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift new file mode 100644 index 00000000000..28eacf580dd --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -0,0 +1,21 @@ +// +// ApiResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ApiResponse: Codable { + + public var code: Int? + public var type: String? + public var message: String? + public init(code: Int?, type: String?, message: String?) { + self.code = code + self.type = type + self.message = message + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift new file mode 100644 index 00000000000..c2ef4cc41f1 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -0,0 +1,21 @@ +// +// ArrayOfArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfArrayOfNumberOnly: Codable { + + public var arrayArrayNumber: [[Double]]? + public init(arrayArrayNumber: [[Double]]?) { + self.arrayArrayNumber = arrayArrayNumber + } + + public enum CodingKeys: String, CodingKey { + case arrayArrayNumber = "ArrayArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift new file mode 100644 index 00000000000..36a6b5adbe7 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -0,0 +1,21 @@ +// +// ArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfNumberOnly: Codable { + + public var arrayNumber: [Double]? + public init(arrayNumber: [Double]?) { + self.arrayNumber = arrayNumber + } + + public enum CodingKeys: String, CodingKey { + case arrayNumber = "ArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift new file mode 100644 index 00000000000..a9617771b40 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -0,0 +1,27 @@ +// +// ArrayTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayTest: Codable { + + public var arrayOfString: [String]? + public var arrayArrayOfInteger: [[Int64]]? + public var arrayArrayOfModel: [[ReadOnlyFirst]]? + public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { + self.arrayOfString = arrayOfString + self.arrayArrayOfInteger = arrayArrayOfInteger + self.arrayArrayOfModel = arrayArrayOfModel + } + + public enum CodingKeys: String, CodingKey { + case arrayOfString = "array_of_string" + case arrayArrayOfInteger = "array_array_of_integer" + case arrayArrayOfModel = "array_array_of_model" + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift new file mode 100644 index 00000000000..660ebd30aaa --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -0,0 +1,37 @@ +// +// Capitalization.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Capitalization: Codable { + + public var smallCamel: String? + public var capitalCamel: String? + public var smallSnake: String? + public var capitalSnake: String? + public var sCAETHFlowPoints: String? + /** Name of the pet */ + public var ATT_NAME: String? + public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { + self.smallCamel = smallCamel + self.capitalCamel = capitalCamel + self.smallSnake = smallSnake + self.capitalSnake = capitalSnake + self.sCAETHFlowPoints = sCAETHFlowPoints + self.ATT_NAME = ATT_NAME + } + + public enum CodingKeys: String, CodingKey { + case smallCamel + case capitalCamel = "CapitalCamel" + case smallSnake = "small_Snake" + case capitalSnake = "Capital_Snake" + case sCAETHFlowPoints = "SCA_ETH_Flow_Points" + case ATT_NAME + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift new file mode 100644 index 00000000000..cb9f812b935 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -0,0 +1,21 @@ +// +// Cat.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Cat: Codable { + + public var className: String + public var color: String? = "red" + public var declawed: Bool? + public init(className: String, color: String?, declawed: Bool?) { + self.className = className + self.color = color + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift new file mode 100644 index 00000000000..4f9a5b5a648 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -0,0 +1,17 @@ +// +// CatAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct CatAllOf: Codable { + + public var declawed: Bool? + public init(declawed: Bool?) { + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Category.swift new file mode 100644 index 00000000000..cdb57d6e39d --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -0,0 +1,19 @@ +// +// Category.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Category: Codable { + + public var id: Int64? + public var name: String = "default-name" + public init(id: Int64?, name: String) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift new file mode 100644 index 00000000000..8968e876037 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -0,0 +1,19 @@ +// +// ClassModel.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model with \"_class\" property */ + +public struct ClassModel: Codable { + + public var _class: String? + public init(_class: String?) { + self._class = _class + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Client.swift new file mode 100644 index 00000000000..85d2bf59f88 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -0,0 +1,17 @@ +// +// Client.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Client: Codable { + + public var client: String? + public init(client: String?) { + self.client = client + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift new file mode 100644 index 00000000000..99e7abc2038 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -0,0 +1,21 @@ +// +// Dog.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Dog: Codable { + + public var className: String + public var color: String? = "red" + public var breed: String? + public init(className: String, color: String?, breed: String?) { + self.className = className + self.color = color + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift new file mode 100644 index 00000000000..cff2c19160c --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -0,0 +1,17 @@ +// +// DogAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct DogAllOf: Codable { + + public var breed: String? + public init(breed: String?) { + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift new file mode 100644 index 00000000000..3796fefc5b5 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -0,0 +1,32 @@ +// +// EnumArrays.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumArrays: Codable { + + public enum JustSymbol: String, Codable { + case greaterThanOrEqualTo = ">=" + case dollar = "$" + } + public enum ArrayEnum: String, Codable { + case fish = "fish" + case crab = "crab" + } + public var justSymbol: JustSymbol? + public var arrayEnum: [ArrayEnum]? + public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { + self.justSymbol = justSymbol + self.arrayEnum = arrayEnum + } + + public enum CodingKeys: String, CodingKey { + case justSymbol = "just_symbol" + case arrayEnum = "array_enum" + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift new file mode 100644 index 00000000000..3c1dfcac577 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -0,0 +1,14 @@ +// +// EnumClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum EnumClass: String, Codable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift new file mode 100644 index 00000000000..8a5a061c350 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -0,0 +1,51 @@ +// +// EnumTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumTest: Codable { + + public enum EnumString: String, Codable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumStringRequired: String, Codable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumInteger: Int, Codable { + case _1 = 1 + case number1 = -1 + } + public enum EnumNumber: Double, Codable { + case _11 = 1.1 + case number12 = -1.2 + } + public var enumString: EnumString? + public var enumStringRequired: EnumStringRequired + public var enumInteger: EnumInteger? + public var enumNumber: EnumNumber? + public var outerEnum: OuterEnum? + public init(enumString: EnumString?, enumStringRequired: EnumStringRequired, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { + self.enumString = enumString + self.enumStringRequired = enumStringRequired + self.enumInteger = enumInteger + self.enumNumber = enumNumber + self.outerEnum = outerEnum + } + + public enum CodingKeys: String, CodingKey { + case enumString = "enum_string" + case enumStringRequired = "enum_string_required" + case enumInteger = "enum_integer" + case enumNumber = "enum_number" + case outerEnum + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/File.swift new file mode 100644 index 00000000000..4a7ad73b13b --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -0,0 +1,20 @@ +// +// File.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Must be named `File` for test. */ + +public struct File: Codable { + + /** Test capitalization */ + public var sourceURI: String? + public init(sourceURI: String?) { + self.sourceURI = sourceURI + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift new file mode 100644 index 00000000000..2e10cf79ee7 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -0,0 +1,19 @@ +// +// FileSchemaTestClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FileSchemaTestClass: Codable { + + public var file: File? + public var files: [File]? + public init(file: File?, files: [File]?) { + self.file = file + self.files = files + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift new file mode 100644 index 00000000000..360dc2f2daa --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -0,0 +1,41 @@ +// +// FormatTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FormatTest: Codable { + + public var integer: Int? + public var int32: Int? + public var int64: Int64? + public var number: Double + public var float: Float? + public var double: Double? + public var string: String? + public var byte: Data + public var binary: URL? + public var date: Date + public var dateTime: Date? + public var uuid: UUID? + public var password: String + public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: URL?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { + self.integer = integer + self.int32 = int32 + self.int64 = int64 + self.number = number + self.float = float + self.double = double + self.string = string + self.byte = byte + self.binary = binary + self.date = date + self.dateTime = dateTime + self.uuid = uuid + self.password = password + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift new file mode 100644 index 00000000000..92d25b4035b --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -0,0 +1,19 @@ +// +// HasOnlyReadOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct HasOnlyReadOnly: Codable { + + public var bar: String? + public var foo: String? + public init(bar: String?, foo: String?) { + self.bar = bar + self.foo = foo + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/List.swift new file mode 100644 index 00000000000..0a12547ee44 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -0,0 +1,21 @@ +// +// List.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct List: Codable { + + public var _123list: String? + public init(_123list: String?) { + self._123list = _123list + } + + public enum CodingKeys: String, CodingKey { + case _123list = "123-list" + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift new file mode 100644 index 00000000000..f146a8651c7 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -0,0 +1,34 @@ +// +// MapTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MapTest: Codable { + + public enum MapOfEnumString: String, Codable { + case upper = "UPPER" + case lower = "lower" + } + public var mapMapOfString: [String: [String: String]]? + public var mapOfEnumString: [String: String]? + public var directMap: [String: Bool]? + public var indirectMap: StringBooleanMap? + public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { + self.mapMapOfString = mapMapOfString + self.mapOfEnumString = mapOfEnumString + self.directMap = directMap + self.indirectMap = indirectMap + } + + public enum CodingKeys: String, CodingKey { + case mapMapOfString = "map_map_of_string" + case mapOfEnumString = "map_of_enum_string" + case directMap = "direct_map" + case indirectMap = "indirect_map" + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift new file mode 100644 index 00000000000..16fb430a8b2 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -0,0 +1,21 @@ +// +// MixedPropertiesAndAdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + + public var uuid: UUID? + public var dateTime: Date? + public var map: [String: Animal]? + public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { + self.uuid = uuid + self.dateTime = dateTime + self.map = map + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift new file mode 100644 index 00000000000..96af48ec264 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -0,0 +1,26 @@ +// +// Model200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name starting with number */ + +public struct Model200Response: Codable { + + public var name: Int? + public var _class: String? + public init(name: Int?, _class: String?) { + self.name = name + self._class = _class + } + + public enum CodingKeys: String, CodingKey { + case name + case _class = "class" + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Name.swift new file mode 100644 index 00000000000..1970d8c67cd --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -0,0 +1,32 @@ +// +// Name.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name same as property name */ + +public struct Name: Codable { + + public var name: Int + public var snakeCase: Int? + public var property: String? + public var _123number: Int? + public init(name: Int, snakeCase: Int?, property: String?, _123number: Int?) { + self.name = name + self.snakeCase = snakeCase + self.property = property + self._123number = _123number + } + + public enum CodingKeys: String, CodingKey { + case name + case snakeCase = "snake_case" + case property + case _123number = "123Number" + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift new file mode 100644 index 00000000000..20146b8c408 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -0,0 +1,21 @@ +// +// NumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct NumberOnly: Codable { + + public var justNumber: Double? + public init(justNumber: Double?) { + self.justNumber = justNumber + } + + public enum CodingKeys: String, CodingKey { + case justNumber = "JustNumber" + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Order.swift new file mode 100644 index 00000000000..318d1c4127c --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -0,0 +1,33 @@ +// +// Order.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Order: Codable { + + public enum Status: String, Codable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" + } + public var id: Int64? + public var petId: Int64? + public var quantity: Int? + public var shipDate: Date? + /** Order Status */ + public var status: Status? + public var complete: Bool? = false + public init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { + self.id = id + self.petId = petId + self.quantity = quantity + self.shipDate = shipDate + self.status = status + self.complete = complete + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift new file mode 100644 index 00000000000..9da80f3b277 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -0,0 +1,27 @@ +// +// OuterComposite.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct OuterComposite: Codable { + + public var myNumber: Double? + public var myString: String? + public var myBoolean: Bool? + public init(myNumber: Double?, myString: String?, myBoolean: Bool?) { + self.myNumber = myNumber + self.myString = myString + self.myBoolean = myBoolean + } + + public enum CodingKeys: String, CodingKey { + case myNumber = "my_number" + case myString = "my_string" + case myBoolean = "my_boolean" + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift new file mode 100644 index 00000000000..9f80fc95ecf --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -0,0 +1,14 @@ +// +// OuterEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum OuterEnum: String, Codable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift new file mode 100644 index 00000000000..35911df349b --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -0,0 +1,33 @@ +// +// Pet.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Pet: Codable { + + public enum Status: String, Codable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + public var id: Int64? + public var category: Category? + public var name: String + public var photoUrls: [String] + public var tags: [Tag]? + /** pet status in the store */ + public var status: Status? + public init(id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { + self.id = id + self.category = category + self.name = name + self.photoUrls = photoUrls + self.tags = tags + self.status = status + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift new file mode 100644 index 00000000000..06a842a672d --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -0,0 +1,19 @@ +// +// ReadOnlyFirst.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ReadOnlyFirst: Codable { + + public var bar: String? + public var baz: String? + public init(bar: String?, baz: String?) { + self.bar = bar + self.baz = baz + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Return.swift new file mode 100644 index 00000000000..a763353d12c --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -0,0 +1,23 @@ +// +// Return.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing reserved words */ + +public struct Return: Codable { + + public var _return: Int? + public init(_return: Int?) { + self._return = _return + } + + public enum CodingKeys: String, CodingKey { + case _return = "return" + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift new file mode 100644 index 00000000000..ea11261e7b6 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -0,0 +1,21 @@ +// +// SpecialModelName.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct SpecialModelName: Codable { + + public var specialPropertyName: Int64? + public init(specialPropertyName: Int64?) { + self.specialPropertyName = specialPropertyName + } + + public enum CodingKeys: String, CodingKey { + case specialPropertyName = "$special[property.name]" + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift new file mode 100644 index 00000000000..682ef3359d3 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -0,0 +1,14 @@ +// +// StringBooleanMap.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct StringBooleanMap: Codable { + + public var additionalProperties: [String: Bool] = [:] + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift new file mode 100644 index 00000000000..50cfb7610bd --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -0,0 +1,19 @@ +// +// Tag.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Tag: Codable { + + public var id: Int64? + public var name: String? + public init(id: Int64?, name: String?) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift new file mode 100644 index 00000000000..640de5b4345 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -0,0 +1,33 @@ +// +// TypeHolderDefault.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderDefault: Codable { + + public var stringItem: String = "what" + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool = true + public var arrayItem: [Int] + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift new file mode 100644 index 00000000000..3c0d33456b2 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -0,0 +1,33 @@ +// +// TypeHolderExample.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderExample: Codable { + + public var stringItem: String + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool + public var arrayItem: [Int] + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/User.swift new file mode 100644 index 00000000000..e27318ef80c --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -0,0 +1,32 @@ +// +// User.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct User: Codable { + + public var id: Int64? + public var username: String? + public var firstName: String? + public var lastName: String? + public var email: String? + public var password: String? + public var phone: String? + /** User Status */ + public var userStatus: Int? + public init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { + self.id = id + self.username = username + self.firstName = firstName + self.lastName = lastName + self.email = email + self.password = password + self.phone = phone + self.userStatus = userStatus + } + +} diff --git a/samples/client/petstore/swift5/rxswift/README.md b/samples/client/petstore/swift5/rxswift/README.md new file mode 100644 index 00000000000..595aca25752 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/README.md @@ -0,0 +1,141 @@ +# Swift4 API client for PetstoreClient + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build package: org.openapitools.codegen.languages.Swift5Codegen + +## Installation + +### Carthage + +Run `carthage update` + +### CocoaPods + +Run `pod install` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AnotherFakeAPI* | [**call123testSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags +*FakeAPI* | [**fakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +*FakeAPI* | [**fakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +*FakeAPI* | [**fakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +*FakeAPI* | [**fakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*FakeAPI* | [**testBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +*FakeAPI* | [**testBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +*FakeAPI* | [**testClientModel**](docs/FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +*FakeAPI* | [**testEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeAPI* | [**testEnumParameters**](docs/FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +*FakeAPI* | [**testGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +*FakeAPI* | [**testInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeAPI* | [**testJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeClassnameTags123API* | [**testClassname**](docs/FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case +*PetAPI* | [**addPet**](docs/PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +*PetAPI* | [**deletePet**](docs/PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetAPI* | [**findPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetAPI* | [**findPetsByTags**](docs/PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetAPI* | [**getPetById**](docs/PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetAPI* | [**updatePet**](docs/PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +*PetAPI* | [**updatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetAPI* | [**uploadFile**](docs/PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetAPI* | [**uploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreAPI* | [**deleteOrder**](docs/StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +*StoreAPI* | [**getInventory**](docs/StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreAPI* | [**getOrderById**](docs/StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +*StoreAPI* | [**placeOrder**](docs/StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserAPI* | [**createUser**](docs/UserAPI.md#createuser) | **POST** /user | Create user +*UserAPI* | [**createUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserAPI* | [**createUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserAPI* | [**deleteUser**](docs/UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserAPI* | [**getUserByName**](docs/UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserAPI* | [**loginUser**](docs/UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +*UserAPI* | [**logoutUser**](docs/UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserAPI* | [**updateUser**](docs/UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +## Documentation For Models + + - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [Animal](docs/Animal.md) + - [AnimalFarm](docs/AnimalFarm.md) + - [ApiResponse](docs/ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [ArrayTest](docs/ArrayTest.md) + - [Capitalization](docs/Capitalization.md) + - [Cat](docs/Cat.md) + - [CatAllOf](docs/CatAllOf.md) + - [Category](docs/Category.md) + - [ClassModel](docs/ClassModel.md) + - [Client](docs/Client.md) + - [Dog](docs/Dog.md) + - [DogAllOf](docs/DogAllOf.md) + - [EnumArrays](docs/EnumArrays.md) + - [EnumClass](docs/EnumClass.md) + - [EnumTest](docs/EnumTest.md) + - [File](docs/File.md) + - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [FormatTest](docs/FormatTest.md) + - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [List](docs/List.md) + - [MapTest](docs/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](docs/Model200Response.md) + - [Name](docs/Name.md) + - [NumberOnly](docs/NumberOnly.md) + - [Order](docs/Order.md) + - [OuterComposite](docs/OuterComposite.md) + - [OuterEnum](docs/OuterEnum.md) + - [Pet](docs/Pet.md) + - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [Return](docs/Return.md) + - [SpecialModelName](docs/SpecialModelName.md) + - [StringBooleanMap](docs/StringBooleanMap.md) + - [Tag](docs/Tag.md) + - [TypeHolderDefault](docs/TypeHolderDefault.md) + - [TypeHolderExample](docs/TypeHolderExample.md) + - [User](docs/User.md) + + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +## api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +## http_basic_test + +- **Type**: HTTP basic authentication + +## petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + + +## Author + + + diff --git a/samples/client/petstore/swift5/rxswift/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/rxswift/docs/AdditionalPropertiesClass.md new file mode 100644 index 00000000000..e22d28be1de --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/AdditionalPropertiesClass.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapString** | **[String:String]** | | [optional] +**mapMapString** | [String:[String:String]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/Animal.md b/samples/client/petstore/swift5/rxswift/docs/Animal.md new file mode 100644 index 00000000000..69c601455cd --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/Animal.md @@ -0,0 +1,11 @@ +# Animal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] [default to "red"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/AnimalFarm.md b/samples/client/petstore/swift5/rxswift/docs/AnimalFarm.md new file mode 100644 index 00000000000..df6bab21dae --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/AnimalFarm.md @@ -0,0 +1,9 @@ +# AnimalFarm + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/rxswift/docs/AnotherFakeAPI.md new file mode 100644 index 00000000000..dcd62507d96 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/AnotherFakeAPI.md @@ -0,0 +1,49 @@ +# AnotherFakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**call123testSpecialTags**](AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags + + +# **call123testSpecialTags** +```swift + open class func call123testSpecialTags(body: Client) -> Observable +``` + +To test special tags + +To test special tags and operation ID starting with number + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/rxswift/docs/ApiResponse.md b/samples/client/petstore/swift5/rxswift/docs/ApiResponse.md new file mode 100644 index 00000000000..c6d9768fe9b --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/ApiResponse.md @@ -0,0 +1,12 @@ +# ApiResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Int** | | [optional] +**type** | **String** | | [optional] +**message** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/swift5/rxswift/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 00000000000..c6fceff5e08 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayArrayNumber** | [[Double]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/ArrayOfNumberOnly.md b/samples/client/petstore/swift5/rxswift/docs/ArrayOfNumberOnly.md new file mode 100644 index 00000000000..f09f8fa6f70 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/ArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayNumber** | **[Double]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/ArrayTest.md b/samples/client/petstore/swift5/rxswift/docs/ArrayTest.md new file mode 100644 index 00000000000..bf416b8330c --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/ArrayTest.md @@ -0,0 +1,12 @@ +# ArrayTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayOfString** | **[String]** | | [optional] +**arrayArrayOfInteger** | [[Int64]] | | [optional] +**arrayArrayOfModel** | [[ReadOnlyFirst]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/Capitalization.md b/samples/client/petstore/swift5/rxswift/docs/Capitalization.md new file mode 100644 index 00000000000..95374216c77 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/Capitalization.md @@ -0,0 +1,15 @@ +# Capitalization + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] +**smallSnake** | **String** | | [optional] +**capitalSnake** | **String** | | [optional] +**sCAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/Cat.md b/samples/client/petstore/swift5/rxswift/docs/Cat.md new file mode 100644 index 00000000000..fb5949b1576 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/Cat.md @@ -0,0 +1,10 @@ +# Cat + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/CatAllOf.md b/samples/client/petstore/swift5/rxswift/docs/CatAllOf.md new file mode 100644 index 00000000000..79789be61c0 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/CatAllOf.md @@ -0,0 +1,10 @@ +# CatAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/Category.md b/samples/client/petstore/swift5/rxswift/docs/Category.md new file mode 100644 index 00000000000..5ca5408c0f9 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/Category.md @@ -0,0 +1,11 @@ +# Category + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [default to "default-name"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/ClassModel.md b/samples/client/petstore/swift5/rxswift/docs/ClassModel.md new file mode 100644 index 00000000000..e3912fdf0fd --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/ClassModel.md @@ -0,0 +1,10 @@ +# ClassModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/Client.md b/samples/client/petstore/swift5/rxswift/docs/Client.md new file mode 100644 index 00000000000..0de1b238c36 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/Client.md @@ -0,0 +1,10 @@ +# Client + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/Dog.md b/samples/client/petstore/swift5/rxswift/docs/Dog.md new file mode 100644 index 00000000000..4824786da04 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/Dog.md @@ -0,0 +1,10 @@ +# Dog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/DogAllOf.md b/samples/client/petstore/swift5/rxswift/docs/DogAllOf.md new file mode 100644 index 00000000000..9302ef52e93 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/DogAllOf.md @@ -0,0 +1,10 @@ +# DogAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/EnumArrays.md b/samples/client/petstore/swift5/rxswift/docs/EnumArrays.md new file mode 100644 index 00000000000..b9a9807d3c8 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/EnumArrays.md @@ -0,0 +1,11 @@ +# EnumArrays + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justSymbol** | **String** | | [optional] +**arrayEnum** | **[String]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/EnumClass.md b/samples/client/petstore/swift5/rxswift/docs/EnumClass.md new file mode 100644 index 00000000000..67f017becd0 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/EnumClass.md @@ -0,0 +1,9 @@ +# EnumClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/EnumTest.md b/samples/client/petstore/swift5/rxswift/docs/EnumTest.md new file mode 100644 index 00000000000..bc9b036dd76 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/EnumTest.md @@ -0,0 +1,14 @@ +# EnumTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumString** | **String** | | [optional] +**enumStringRequired** | **String** | | +**enumInteger** | **Int** | | [optional] +**enumNumber** | **Double** | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/FakeAPI.md b/samples/client/petstore/swift5/rxswift/docs/FakeAPI.md new file mode 100644 index 00000000000..a67ef1c2815 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/FakeAPI.md @@ -0,0 +1,548 @@ +# FakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fakeOuterBooleanSerialize**](FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +[**fakeOuterCompositeSerialize**](FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +[**fakeOuterNumberSerialize**](FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +[**fakeOuterStringSerialize**](FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +[**testBodyWithFileSchema**](FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +[**testBodyWithQueryParams**](FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +[**testClientModel**](FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +[**testEndpointParameters**](FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEnumParameters**](FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +[**testGroupParameters**](FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**testInlineAdditionalProperties**](FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**testJsonFormData**](FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data + + +# **fakeOuterBooleanSerialize** +```swift + open class func fakeOuterBooleanSerialize(body: Bool? = nil) -> Observable +``` + + + +Test serialization of outer boolean types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = false // Bool | Input boolean as post body (optional) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Bool** | Input boolean as post body | [optional] + +### Return type + +**Bool** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterCompositeSerialize** +```swift + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil) -> Observable +``` + + + +Test serialization of object with outer number type + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = OuterComposite(myNumber: 123, myString: "myString_example", myBoolean: false) // OuterComposite | Input composite as post body (optional) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterNumberSerialize** +```swift + open class func fakeOuterNumberSerialize(body: Double? = nil) -> Observable +``` + + + +Test serialization of outer number types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = 987 // Double | Input number as post body (optional) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Double** | Input number as post body | [optional] + +### Return type + +**Double** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterStringSerialize** +```swift + open class func fakeOuterStringSerialize(body: String? = nil) -> Observable +``` + + + +Test serialization of outer string types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = "body_example" // String | Input string as post body (optional) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **String** | Input string as post body | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithFileSchema** +```swift + open class func testBodyWithFileSchema(body: FileSchemaTestClass) -> Observable +``` + + + +For this test, the body for this request much reference a schema named `File`. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithQueryParams** +```swift + open class func testBodyWithQueryParams(query: String, body: User) -> Observable +``` + + + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let query = "query_example" // String | +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **String** | | + **body** | [**User**](User.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testClientModel** +```swift + open class func testClientModel(body: Client) -> Observable +``` + +To test \"client\" model + +To test \"client\" model + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEndpointParameters** +```swift + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> Observable +``` + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let number = 987 // Double | None +let double = 987 // Double | None +let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None +let byte = 987 // Data | None +let integer = 987 // Int | None (optional) +let int32 = 987 // Int | None (optional) +let int64 = 987 // Int64 | None (optional) +let float = 987 // Float | None (optional) +let string = "string_example" // String | None (optional) +let binary = URL(string: "https://example.com")! // URL | None (optional) +let date = Date() // Date | None (optional) +let dateTime = Date() // Date | None (optional) +let password = "password_example" // String | None (optional) +let callback = "callback_example" // String | None (optional) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **Double** | None | + **double** | **Double** | None | + **patternWithoutDelimiter** | **String** | None | + **byte** | **Data** | None | + **integer** | **Int** | None | [optional] + **int32** | **Int** | None | [optional] + **int64** | **Int64** | None | [optional] + **float** | **Float** | None | [optional] + **string** | **String** | None | [optional] + **binary** | **URL** | None | [optional] + **date** | **Date** | None | [optional] + **dateTime** | **Date** | None | [optional] + **password** | **String** | None | [optional] + **callback** | **String** | None | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEnumParameters** +```swift + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> Observable +``` + +To test enum parameters + +To test enum parameters + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let enumHeaderStringArray = ["enumHeaderStringArray_example"] // [String] | Header parameter enum test (string array) (optional) +let enumHeaderString = "enumHeaderString_example" // String | Header parameter enum test (string) (optional) (default to .-efg) +let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query parameter enum test (string array) (optional) +let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .-efg) +let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) +let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) +let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .$) +let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .-efg) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumHeaderStringArray** | [**[String]**](String.md) | Header parameter enum test (string array) | [optional] + **enumHeaderString** | **String** | Header parameter enum test (string) | [optional] [default to .-efg] + **enumQueryStringArray** | [**[String]**](String.md) | Query parameter enum test (string array) | [optional] + **enumQueryString** | **String** | Query parameter enum test (string) | [optional] [default to .-efg] + **enumQueryInteger** | **Int** | Query parameter enum test (double) | [optional] + **enumQueryDouble** | **Double** | Query parameter enum test (double) | [optional] + **enumFormStringArray** | [**[String]**](String.md) | Form parameter enum test (string array) | [optional] [default to .$] + **enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to .-efg] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testGroupParameters** +```swift + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> Observable +``` + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let requiredStringGroup = 987 // Int | Required String in group parameters +let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredInt64Group = 987 // Int64 | Required Integer in group parameters +let stringGroup = 987 // Int | String in group parameters (optional) +let booleanGroup = false // Bool | Boolean in group parameters (optional) +let int64Group = 987 // Int64 | Integer in group parameters (optional) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requiredStringGroup** | **Int** | Required String in group parameters | + **requiredBooleanGroup** | **Bool** | Required Boolean in group parameters | + **requiredInt64Group** | **Int64** | Required Integer in group parameters | + **stringGroup** | **Int** | String in group parameters | [optional] + **booleanGroup** | **Bool** | Boolean in group parameters | [optional] + **int64Group** | **Int64** | Integer in group parameters | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testInlineAdditionalProperties** +```swift + open class func testInlineAdditionalProperties(param: [String:String]) -> Observable +``` + +test inline additionalProperties + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "TODO" // [String:String] | request body + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | [**[String:String]**](String.md) | request body | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testJsonFormData** +```swift + open class func testJsonFormData(param: String, param2: String) -> Observable +``` + +test json serialization of form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "param_example" // String | field1 +let param2 = "param2_example" // String | field2 + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **String** | field1 | + **param2** | **String** | field2 | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/rxswift/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/rxswift/docs/FakeClassnameTags123API.md new file mode 100644 index 00000000000..1b94500e794 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/FakeClassnameTags123API.md @@ -0,0 +1,49 @@ +# FakeClassnameTags123API + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testClassname**](FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case + + +# **testClassname** +```swift + open class func testClassname(body: Client) -> Observable +``` + +To test class name in snake case + +To test class name in snake case + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/rxswift/docs/File.md b/samples/client/petstore/swift5/rxswift/docs/File.md new file mode 100644 index 00000000000..3edfef17b79 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/File.md @@ -0,0 +1,10 @@ +# File + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourceURI** | **String** | Test capitalization | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/FileSchemaTestClass.md b/samples/client/petstore/swift5/rxswift/docs/FileSchemaTestClass.md new file mode 100644 index 00000000000..afdacc60b2c --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/FileSchemaTestClass.md @@ -0,0 +1,11 @@ +# FileSchemaTestClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | [**File**](File.md) | | [optional] +**files** | [File] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/FormatTest.md b/samples/client/petstore/swift5/rxswift/docs/FormatTest.md new file mode 100644 index 00000000000..f74d94f6c46 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/FormatTest.md @@ -0,0 +1,22 @@ +# FormatTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Int** | | [optional] +**int32** | **Int** | | [optional] +**int64** | **Int64** | | [optional] +**number** | **Double** | | +**float** | **Float** | | [optional] +**double** | **Double** | | [optional] +**string** | **String** | | [optional] +**byte** | **Data** | | +**binary** | **URL** | | [optional] +**date** | **Date** | | +**dateTime** | **Date** | | [optional] +**uuid** | **UUID** | | [optional] +**password** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift5/rxswift/docs/HasOnlyReadOnly.md new file mode 100644 index 00000000000..45781360154 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/HasOnlyReadOnly.md @@ -0,0 +1,11 @@ +# HasOnlyReadOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] +**foo** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/List.md b/samples/client/petstore/swift5/rxswift/docs/List.md new file mode 100644 index 00000000000..b77718302ed --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/List.md @@ -0,0 +1,10 @@ +# List + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_123list** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/MapTest.md b/samples/client/petstore/swift5/rxswift/docs/MapTest.md new file mode 100644 index 00000000000..56213c4113f --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/MapTest.md @@ -0,0 +1,13 @@ +# MapTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapMapOfString** | [String:[String:String]] | | [optional] +**mapOfEnumString** | **[String:String]** | | [optional] +**directMap** | **[String:Bool]** | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/rxswift/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 00000000000..fcffb8ecdbf --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,12 @@ +# MixedPropertiesAndAdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **UUID** | | [optional] +**dateTime** | **Date** | | [optional] +**map** | [String:Animal] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/Model200Response.md b/samples/client/petstore/swift5/rxswift/docs/Model200Response.md new file mode 100644 index 00000000000..5865ea690cc --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/Model200Response.md @@ -0,0 +1,11 @@ +# Model200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | [optional] +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/Name.md b/samples/client/petstore/swift5/rxswift/docs/Name.md new file mode 100644 index 00000000000..2be75d062e4 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/Name.md @@ -0,0 +1,13 @@ +# Name + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | +**snakeCase** | **Int** | | [optional] +**property** | **String** | | [optional] +**_123number** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/NumberOnly.md b/samples/client/petstore/swift5/rxswift/docs/NumberOnly.md new file mode 100644 index 00000000000..72bd361168b --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/NumberOnly.md @@ -0,0 +1,10 @@ +# NumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justNumber** | **Double** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/Order.md b/samples/client/petstore/swift5/rxswift/docs/Order.md new file mode 100644 index 00000000000..15487f01175 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/Order.md @@ -0,0 +1,15 @@ +# Order + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**petId** | **Int64** | | [optional] +**quantity** | **Int** | | [optional] +**shipDate** | **Date** | | [optional] +**status** | **String** | Order Status | [optional] +**complete** | **Bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/OuterComposite.md b/samples/client/petstore/swift5/rxswift/docs/OuterComposite.md new file mode 100644 index 00000000000..d6b3583bc3f --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/OuterComposite.md @@ -0,0 +1,12 @@ +# OuterComposite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myNumber** | **Double** | | [optional] +**myString** | **String** | | [optional] +**myBoolean** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/OuterEnum.md b/samples/client/petstore/swift5/rxswift/docs/OuterEnum.md new file mode 100644 index 00000000000..06d413b0168 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/OuterEnum.md @@ -0,0 +1,9 @@ +# OuterEnum + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/Pet.md b/samples/client/petstore/swift5/rxswift/docs/Pet.md new file mode 100644 index 00000000000..5c05f98fad4 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/Pet.md @@ -0,0 +1,15 @@ +# Pet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **String** | | +**photoUrls** | **[String]** | | +**tags** | [Tag] | | [optional] +**status** | **String** | pet status in the store | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/PetAPI.md b/samples/client/petstore/swift5/rxswift/docs/PetAPI.md new file mode 100644 index 00000000000..c0ec8a91fb4 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/PetAPI.md @@ -0,0 +1,379 @@ +# PetAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) + + +# **addPet** +```swift + open class func addPet(body: Pet) -> Observable +``` + +Add a new pet to the store + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deletePet** +```swift + open class func deletePet(petId: Int64, apiKey: String? = nil) -> Observable +``` + +Deletes a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | Pet id to delete +let apiKey = "apiKey_example" // String | (optional) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | Pet id to delete | + **apiKey** | **String** | | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByStatus** +```swift + open class func findPetsByStatus(status: [String]) -> Observable<[Pet]> +``` + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let status = ["status_example"] // [String] | Status values that need to be considered for filter + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**[String]**](String.md) | Status values that need to be considered for filter | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByTags** +```swift + open class func findPetsByTags(tags: [String]) -> Observable<[Pet]> +``` + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let tags = ["inner_example"] // [String] | Tags to filter by + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**[String]**](String.md) | Tags to filter by | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getPetById** +```swift + open class func getPetById(petId: Int64) -> Observable +``` + +Find pet by ID + +Returns a single pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to return + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePet** +```swift + open class func updatePet(body: Pet) -> Observable +``` + +Update an existing pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePetWithForm** +```swift + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil) -> Observable +``` + +Updates a pet in the store with form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet that needs to be updated +let name = "name_example" // String | Updated name of the pet (optional) +let status = "status_example" // String | Updated status of the pet (optional) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet that needs to be updated | + **name** | **String** | Updated name of the pet | [optional] + **status** | **String** | Updated status of the pet | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFile** +```swift + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> Observable +``` + +uploads an image + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) +let file = URL(string: "https://example.com")! // URL | file to upload (optional) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + **file** | **URL** | file to upload | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFileWithRequiredFile** +```swift + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> Observable +``` + +uploads an image (required) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **requiredFile** | **URL** | file to upload | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/rxswift/docs/ReadOnlyFirst.md b/samples/client/petstore/swift5/rxswift/docs/ReadOnlyFirst.md new file mode 100644 index 00000000000..e3f16038b97 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/ReadOnlyFirst.md @@ -0,0 +1,11 @@ +# ReadOnlyFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] +**baz** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/Return.md b/samples/client/petstore/swift5/rxswift/docs/Return.md new file mode 100644 index 00000000000..66d17c27c88 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/Return.md @@ -0,0 +1,10 @@ +# Return + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/SpecialModelName.md b/samples/client/petstore/swift5/rxswift/docs/SpecialModelName.md new file mode 100644 index 00000000000..3ec27a38c2a --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/SpecialModelName.md @@ -0,0 +1,10 @@ +# SpecialModelName + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**specialPropertyName** | **Int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/StoreAPI.md b/samples/client/petstore/swift5/rxswift/docs/StoreAPI.md new file mode 100644 index 00000000000..a648ce8859b --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/StoreAPI.md @@ -0,0 +1,166 @@ +# StoreAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[**getInventory**](StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +[**placeOrder**](StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet + + +# **deleteOrder** +```swift + open class func deleteOrder(orderId: String) -> Observable +``` + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = "orderId_example" // String | ID of the order that needs to be deleted + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String** | ID of the order that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getInventory** +```swift + open class func getInventory() -> Observable<[String:Int]> +``` + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**[String:Int]** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrderById** +```swift + open class func getOrderById(orderId: Int64) -> Observable +``` + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = 987 // Int64 | ID of pet that needs to be fetched + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **Int64** | ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **placeOrder** +```swift + open class func placeOrder(body: Order) -> Observable +``` + +Place an order for a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Order(id: 123, petId: 123, quantity: 123, shipDate: Date(), status: "status_example", complete: false) // Order | order placed for purchasing the pet + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md) | order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/rxswift/docs/StringBooleanMap.md b/samples/client/petstore/swift5/rxswift/docs/StringBooleanMap.md new file mode 100644 index 00000000000..7abf11ec68b --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/StringBooleanMap.md @@ -0,0 +1,9 @@ +# StringBooleanMap + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/Tag.md b/samples/client/petstore/swift5/rxswift/docs/Tag.md new file mode 100644 index 00000000000..ff4ac8aa451 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/Tag.md @@ -0,0 +1,11 @@ +# Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/TypeHolderDefault.md b/samples/client/petstore/swift5/rxswift/docs/TypeHolderDefault.md new file mode 100644 index 00000000000..5161394bdc3 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/TypeHolderDefault.md @@ -0,0 +1,14 @@ +# TypeHolderDefault + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | [default to "what"] +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | [default to true] +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/TypeHolderExample.md b/samples/client/petstore/swift5/rxswift/docs/TypeHolderExample.md new file mode 100644 index 00000000000..46d0471cd71 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/TypeHolderExample.md @@ -0,0 +1,14 @@ +# TypeHolderExample + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/User.md b/samples/client/petstore/swift5/rxswift/docs/User.md new file mode 100644 index 00000000000..5a439de0ff9 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/User.md @@ -0,0 +1,17 @@ +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**username** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] +**email** | **String** | | [optional] +**password** | **String** | | [optional] +**phone** | **String** | | [optional] +**userStatus** | **Int** | User Status | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswift/docs/UserAPI.md b/samples/client/petstore/swift5/rxswift/docs/UserAPI.md new file mode 100644 index 00000000000..a707c7085a3 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/docs/UserAPI.md @@ -0,0 +1,326 @@ +# UserAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserAPI.md#createuser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +# **createUser** +```swift + open class func createUser(body: User) -> Observable +``` + +Create user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Created user object + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md) | Created user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithArrayInput** +```swift + open class func createUsersWithArrayInput(body: [User]) -> Observable +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithListInput** +```swift + open class func createUsersWithListInput(body: [User]) -> Observable +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteUser** +```swift + open class func deleteUser(username: String) -> Observable +``` + +Delete user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be deleted + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getUserByName** +```swift + open class func getUserByName(username: String) -> Observable +``` + +Get user by user name + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be fetched. Use user1 for testing. + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loginUser** +```swift + open class func loginUser(username: String, password: String) -> Observable +``` + +Logs user into the system + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The user name for login +let password = "password_example" // String | The password for login in clear text + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The user name for login | + **password** | **String** | The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **logoutUser** +```swift + open class func logoutUser() -> Observable +``` + +Logs out current logged in user session + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +```swift + open class func updateUser(username: String, body: User) -> Observable +``` + +Updated user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | name that need to be deleted +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Updated user object + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | name that need to be deleted | + **body** | [**User**](User.md) | Updated user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/rxswift/git_push.sh b/samples/client/petstore/swift5/rxswift/git_push.sh new file mode 100644 index 00000000000..8442b80bb44 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/samples/client/petstore/swift5/rxswift/project.yml b/samples/client/petstore/swift5/rxswift/project.yml new file mode 100644 index 00000000000..5738e08dfb4 --- /dev/null +++ b/samples/client/petstore/swift5/rxswift/project.yml @@ -0,0 +1,17 @@ +name: PetstoreClient +targets: + PetstoreClient: + type: framework + platform: iOS + deploymentTarget: "10.0" + sources: [PetstoreClient] + info: + path: ./Info.plist + version: 1.0.0 + settings: + APPLICATION_EXTENSION_API_ONLY: true + SWIFT_VERSION: "5.0" + scheme: {} + dependencies: + - carthage: Alamofire + - carthage: RxSwift diff --git a/samples/client/petstore/swift5/unwrapRequired/.gitignore b/samples/client/petstore/swift5/unwrapRequired/.gitignore new file mode 100644 index 00000000000..5e5d5cebcf4 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/.gitignore @@ -0,0 +1,63 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots diff --git a/samples/client/petstore/swift5/unwrapRequired/.openapi-generator-ignore b/samples/client/petstore/swift5/unwrapRequired/.openapi-generator-ignore new file mode 100644 index 00000000000..7484ee590a3 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/swift5/unwrapRequired/.openapi-generator/VERSION b/samples/client/petstore/swift5/unwrapRequired/.openapi-generator/VERSION new file mode 100644 index 00000000000..83a328a9227 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/unwrapRequired/Info.plist b/samples/client/petstore/swift5/unwrapRequired/Info.plist new file mode 100644 index 00000000000..323e5ecfc42 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient.podspec b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient.podspec new file mode 100644 index 00000000000..c9e486d0dc4 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient.podspec @@ -0,0 +1,14 @@ +Pod::Spec.new do |s| + s.name = 'PetstoreClient' + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.11' + s.tvos.deployment_target = '9.0' + s.version = '1.0.0' + s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' } + s.authors = '' + s.license = 'Proprietary' + s.homepage = 'https://github.com/openapitools/openapi-generator' + s.summary = 'PetstoreClient' + s.source_files = 'PetstoreClient/Classes/**/*.swift' + +end diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient.xcodeproj/project.pbxproj new file mode 100644 index 00000000000..5d6aed595c9 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient.xcodeproj/project.pbxproj @@ -0,0 +1,491 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXGroup section */ + 4FBDCF1330A9AB9122780DB3 /* Models */ = { + isa = PBXGroup; + children = ( + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, + ); + path = Models; + sourceTree = ""; + }; + 5FBA6AE5F64CD737F88B4565 = { + isa = PBXGroup; + children = ( + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 857F0DEA1890CE66D6DAD556 /* Products */, + ); + sourceTree = ""; + }; + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { + isa = PBXGroup; + children = ( + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, + ); + path = OpenAPIs; + sourceTree = ""; + }; + 857F0DEA1890CE66D6DAD556 /* Products */ = { + isa = PBXGroup; + children = ( + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, + ); + name = Products; + sourceTree = ""; + }; + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { + isa = PBXGroup; + children = ( + EF4C81BDD734856ED5023B77 /* Classes */, + ); + path = PetstoreClient; + sourceTree = ""; + }; + EF4C81BDD734856ED5023B77 /* Classes */ = { + isa = PBXGroup; + children = ( + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, + ); + path = Classes; + sourceTree = ""; + }; + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { + isa = PBXGroup; + children = ( + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, + ); + path = APIs; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C1282C2230015E0D204BEAED /* PetstoreClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildPhases = ( + E539708354CE60FE486F81ED /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PetstoreClient; + productName = PetstoreClient; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E7D276EE2369D8C455513C2E /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + }; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 5FBA6AE5F64CD737F88B4565; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C1282C2230015E0D204BEAED /* PetstoreClient */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + E539708354CE60FE486F81ED /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 3B2C02AFB91CB5C82766ED5C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + A9EB0A02B94C427CBACFEC7C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "DEBUG=1", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + DD3EEB93949E9EBA4437E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ""; + }; + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000000..919434a6254 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme new file mode 100644 index 00000000000..e8ac84fa992 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs.swift new file mode 100644 index 00000000000..295f1934af7 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -0,0 +1,54 @@ +// APIs.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct RequestBuilder { + public let endpoint: String + public let method: String + public let parameters: [Parameters] + public let headers: [String: String] + + public init(endpoint: String, method: String, parameters: [Parameters] = [], headers: [String: String] = [:]) { + self.endpoint = endpoint + self.method = method + self.parameters = parameters + self.headers = headers + } +} + +public enum Parameters { + case query([String: Any?]) + case form([String: String?]) + case json(AnyEncodable) + + public init(_ raw: [String: Any?]) { + self = .query(raw) + } + + public init(_ raw: [String: String?]) { + self = .form(raw) + } + + public init(_ raw: T) { + self = .json(AnyEncodable(raw)) + } +} + +public struct AnyEncodable: Encodable { + var encode: (Encoder) throws -> Void + + init(_ encodable: Encodable) { + func encode(to encoder: Encoder) throws { + try encodable.encode(to: encoder) + } + self.encode = encode + } + + public func encode(to encoder: Encoder) throws { + try encode(encoder) + } +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift new file mode 100644 index 00000000000..827ab21b6b5 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -0,0 +1,28 @@ +// +// AnotherFakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct AnotherFakeAPI { + /** + To test special tags + - PATCH /another-fake/dummy + - To test special tags and operation ID starting with number + - parameter body: (body) client model + - returns: RequestBuilder + */ + public func call123testSpecialTags(body: Client) -> RequestBuilder { + let path = "/another-fake/dummy" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PATCH", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift new file mode 100644 index 00000000000..af04243b096 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -0,0 +1,340 @@ +// +// FakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FakeAPI { + /** + - POST /fake/outer/boolean + - Test serialization of outer boolean types + - parameter body: (body) Input boolean as post body (optional) + - returns: RequestBuilder + */ + public func fakeOuterBooleanSerialize(body: Bool? = nil) -> RequestBuilder { + let path = "/fake/outer/boolean" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + - POST /fake/outer/composite + - Test serialization of object with outer number type + - parameter body: (body) Input composite as post body (optional) + - returns: RequestBuilder + */ + public func fakeOuterCompositeSerialize(body: OuterComposite? = nil) -> RequestBuilder { + let path = "/fake/outer/composite" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + - POST /fake/outer/number + - Test serialization of outer number types + - parameter body: (body) Input number as post body (optional) + - returns: RequestBuilder + */ + public func fakeOuterNumberSerialize(body: Double? = nil) -> RequestBuilder { + let path = "/fake/outer/number" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + - POST /fake/outer/string + - Test serialization of outer string types + - parameter body: (body) Input string as post body (optional) + - returns: RequestBuilder + */ + public func fakeOuterStringSerialize(body: String? = nil) -> RequestBuilder { + let path = "/fake/outer/string" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + - PUT /fake/body-with-file-schema + - For this test, the body for this request much reference a schema named `File`. + - parameter body: (body) + - returns: RequestBuilder + */ + public func testBodyWithFileSchema(body: FileSchemaTestClass) -> RequestBuilder { + let path = "/fake/body-with-file-schema" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PUT", parameters: parameters) + } + + /** + - PUT /fake/body-with-query-params + - parameter query: (query) + - parameter body: (body) + - returns: RequestBuilder + */ + public func testBodyWithQueryParams(query: String, body: User) -> RequestBuilder { + let path = "/fake/body-with-query-params" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + let queryParams: [String: Any?] = [ + "query": query + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder(endpoint: path, method: "PUT", parameters: parameters) + } + + /** + To test \"client\" model + - PATCH /fake + - To test \"client\" model + - parameter body: (body) client model + - returns: RequestBuilder + */ + public func testClientModel(body: Client) -> RequestBuilder { + let path = "/fake" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PATCH", parameters: parameters) + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - POST /fake + - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - BASIC: + - type: http + - name: http_basic_test + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - returns: RequestBuilder + */ + public func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + let path = "/fake" + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "integer": integer?.description, + "int32": int32?.description, + "int64": int64?.description, + "number": number.description, + "float": float?.description, + "double": double.description, + "string": string, + "pattern_without_delimiter": patternWithoutDelimiter, + "byte": byte.description, + "binary": binary?.description, + "date": date?.description, + "dateTime": dateTime?.description, + "password": password, + "callback": callback + ] + parameters.append(Parameters(formParams)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + * enum for parameter enumHeaderStringArray + */ + public enum EnumHeaderStringArray_testEnumParameters: String { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumHeaderString + */ + public enum EnumHeaderString_testEnumParameters: String { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryStringArray + */ + public enum EnumQueryStringArray_testEnumParameters: String { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumQueryString + */ + public enum EnumQueryString_testEnumParameters: String { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryInteger + */ + public enum EnumQueryInteger_testEnumParameters: Int { + case _1 = 1 + case number2 = -2 + } + + /** + * enum for parameter enumQueryDouble + */ + public enum EnumQueryDouble_testEnumParameters: Double { + case _11 = 1.1 + case number12 = -1.2 + } + + /** + * enum for parameter enumFormStringArray + */ + public enum EnumFormStringArray_testEnumParameters: String { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumFormString + */ + public enum EnumFormString_testEnumParameters: String { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + To test enum parameters + - GET /fake + - To test enum parameters + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .-efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .-efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .$) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .-efg) + - returns: RequestBuilder + */ + public func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { + let path = "/fake" + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "enum_form_string_array": enumFormStringArray?.description, + "enum_form_string": enumFormString?.rawValue + ] + parameters.append(Parameters(formParams)) + + let queryParams: [String: Any?] = [ + "enum_query_string_array": enumQueryStringArray, + "enum_query_string": enumQueryString, + "enum_query_integer": enumQueryInteger, + "enum_query_double": enumQueryDouble + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder(endpoint: path, method: "GET", parameters: parameters) + } + + /** + Fake endpoint to test group parameters (optional) + - DELETE /fake + - Fake endpoint to test group parameters (optional) + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - returns: RequestBuilder + */ + public func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { + let path = "/fake" + + var parameters: [Parameters] = [] + + let queryParams: [String: Any?] = [ + "required_string_group": requiredStringGroup, + "required_int64_group": requiredInt64Group, + "string_group": stringGroup, + "int64_group": int64Group + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder(endpoint: path, method: "DELETE", parameters: parameters) + } + + /** + test inline additionalProperties + - POST /fake/inline-additionalProperties + - parameter param: (body) request body + - returns: RequestBuilder + */ + public func testInlineAdditionalProperties(param: [String: String]) -> RequestBuilder { + let path = "/fake/inline-additionalProperties" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(param)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + test json serialization of form data + - GET /fake/jsonFormData + - parameter param: (form) field1 + - parameter param2: (form) field2 + - returns: RequestBuilder + */ + public func testJsonFormData(param: String, param2: String) -> RequestBuilder { + let path = "/fake/jsonFormData" + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "param": param, + "param2": param2 + ] + parameters.append(Parameters(formParams)) + + return RequestBuilder(endpoint: path, method: "GET", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift new file mode 100644 index 00000000000..96131d9c1fb --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -0,0 +1,31 @@ +// +// FakeClassnameTags123API.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FakeClassnameTags123API { + /** + To test class name in snake case + - PATCH /fake_classname_test + - To test class name in snake case + - API Key: + - type: apiKey api_key_query (QUERY) + - name: api_key_query + - parameter body: (body) client model + - returns: RequestBuilder + */ + public func testClassname(body: Client) -> RequestBuilder { + let path = "/fake_classname_test" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PATCH", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift new file mode 100644 index 00000000000..8240720cdb3 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -0,0 +1,216 @@ +// +// PetAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PetAPI { + /** + Add a new pet to the store + - POST /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + public func addPet(body: Pet) -> RequestBuilder { + let path = "/pet" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + Deletes a pet + - DELETE /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - returns: RequestBuilder + */ + public func deletePet(petId: Int64, apiKey: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdEscaped = "\(petId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "DELETE") + } + + /** + * enum for parameter status + */ + public enum Status_findPetsByStatus: String { + case available = "available" + case pending = "pending" + case sold = "sold" + } + + /** + Finds Pets by status + - GET /pet/findByStatus + - Multiple status values can be provided with comma separated strings + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter status: (query) Status values that need to be considered for filter + - returns: RequestBuilder<[Pet]> + */ + public func findPetsByStatus(status: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByStatus" + + var parameters: [Parameters] = [] + + let queryParams: [String: Any?] = [ + "status": status + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder<[Pet]>(endpoint: path, method: "GET", parameters: parameters) + } + + /** + Finds Pets by tags + - GET /pet/findByTags + - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter tags: (query) Tags to filter by + - returns: RequestBuilder<[Pet]> + */ + public func findPetsByTags(tags: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByTags" + + var parameters: [Parameters] = [] + + let queryParams: [String: Any?] = [ + "tags": tags + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder<[Pet]>(endpoint: path, method: "GET", parameters: parameters) + } + + /** + Find pet by ID + - GET /pet/{petId} + - Returns a single pet + - API Key: + - type: apiKey api_key + - name: api_key + - parameter petId: (path) ID of pet to return + - returns: RequestBuilder + */ + public func getPetById(petId: Int64) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdEscaped = "\(petId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "GET") + } + + /** + Update an existing pet + - PUT /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + public func updatePet(body: Pet) -> RequestBuilder { + let path = "/pet" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PUT", parameters: parameters) + } + + /** + Updates a pet in the store with form data + - POST /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - returns: RequestBuilder + */ + public func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdEscaped = "\(petId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdEscaped, options: .literal, range: nil) + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "name": name, + "status": status + ] + parameters.append(Parameters(formParams)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + uploads an image + - POST /pet/{petId}/uploadImage + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - returns: RequestBuilder + */ + public func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImage" + let petIdEscaped = "\(petId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdEscaped, options: .literal, range: nil) + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "additionalMetadata": additionalMetadata, + "file": file?.description + ] + parameters.append(Parameters(formParams)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + uploads an image (required) + - POST /fake/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + public func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/fake/{petId}/uploadImageWithRequiredFile" + let petIdEscaped = "\(petId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdEscaped, options: .literal, range: nil) + var parameters: [Parameters] = [] + + let formParams: [String: String?] = [ + "additionalMetadata": additionalMetadata, + "requiredFile": requiredFile.description + ] + parameters.append(Parameters(formParams)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift new file mode 100644 index 00000000000..6b5488e5246 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -0,0 +1,72 @@ +// +// StoreAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct StoreAPI { + /** + Delete purchase order by ID + - DELETE /store/order/{order_id} + - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + - parameter orderId: (path) ID of the order that needs to be deleted + - returns: RequestBuilder + */ + public func deleteOrder(orderId: String) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdEscaped = "\(orderId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "DELETE") + } + + /** + Returns pet inventories by status + - GET /store/inventory + - Returns a map of status codes to quantities + - API Key: + - type: apiKey api_key + - name: api_key + - returns: RequestBuilder<[String:Int]> + */ + public func getInventory() -> RequestBuilder<[String: Int]> { + let path = "/store/inventory" + + return RequestBuilder<[String: Int]>(endpoint: path, method: "GET") + } + + /** + Find purchase order by ID + - GET /store/order/{order_id} + - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - parameter orderId: (path) ID of pet that needs to be fetched + - returns: RequestBuilder + */ + public func getOrderById(orderId: Int64) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdEscaped = "\(orderId)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "GET") + } + + /** + Place an order for a pet + - POST /store/order + - parameter body: (body) order placed for purchasing the pet + - returns: RequestBuilder + */ + public func placeOrder(body: Order) -> RequestBuilder { + let path = "/store/order" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift new file mode 100644 index 00000000000..d7d61295e8f --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -0,0 +1,141 @@ +// +// UserAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct UserAPI { + /** + Create user + - POST /user + - This can only be done by the logged in user. + - parameter body: (body) Created user object + - returns: RequestBuilder + */ + public func createUser(body: User) -> RequestBuilder { + let path = "/user" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + Creates list of users with given input array + - POST /user/createWithArray + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + public func createUsersWithArrayInput(body: [User]) -> RequestBuilder { + let path = "/user/createWithArray" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + Creates list of users with given input array + - POST /user/createWithList + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + public func createUsersWithListInput(body: [User]) -> RequestBuilder { + let path = "/user/createWithList" + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "POST", parameters: parameters) + } + + /** + Delete user + - DELETE /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) The name that needs to be deleted + - returns: RequestBuilder + */ + public func deleteUser(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernameEscaped = "\(username)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernameEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "DELETE") + } + + /** + Get user by user name + - GET /user/{username} + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - returns: RequestBuilder + */ + public func getUserByName(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernameEscaped = "\(username)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernameEscaped, options: .literal, range: nil) + + return RequestBuilder(endpoint: path, method: "GET") + } + + /** + Logs user into the system + - GET /user/login + - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - returns: RequestBuilder + */ + public func loginUser(username: String, password: String) -> RequestBuilder { + let path = "/user/login" + + var parameters: [Parameters] = [] + + let queryParams: [String: Any?] = [ + "username": username, + "password": password + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder(endpoint: path, method: "GET", parameters: parameters) + } + + /** + Logs out current logged in user session + - GET /user/logout + - returns: RequestBuilder + */ + public func logoutUser() -> RequestBuilder { + let path = "/user/logout" + + return RequestBuilder(endpoint: path, method: "GET") + } + + /** + Updated user + - PUT /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - returns: RequestBuilder + */ + public func updateUser(username: String, body: User) -> RequestBuilder { + var path = "/user/{username}" + let usernameEscaped = "\(username)".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernameEscaped, options: .literal, range: nil) + + var parameters: [Parameters] = [] + + parameters.append(Parameters(body)) + + return RequestBuilder(endpoint: path, method: "PUT", parameters: parameters) + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift new file mode 100644 index 00000000000..a64e64065c9 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -0,0 +1,24 @@ +// +// AdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct AdditionalPropertiesClass: Codable { + + public var mapString: [String: String]? + public var mapMapString: [String: [String: String]]? + public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + self.mapString = mapString + self.mapMapString = mapMapString + } + + public enum CodingKeys: String, CodingKey { + case mapString = "map_string" + case mapMapString = "map_map_string" + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift new file mode 100644 index 00000000000..749bc84802d --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -0,0 +1,19 @@ +// +// Animal.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Animal: Codable { + + public var className: String? + public var color: String? = "red" + public init(className: String?, color: String?) { + self.className = className + self.color = color + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift new file mode 100644 index 00000000000..e09b0e9efdc --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -0,0 +1,10 @@ +// +// AnimalFarm.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift new file mode 100644 index 00000000000..28eacf580dd --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -0,0 +1,21 @@ +// +// ApiResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ApiResponse: Codable { + + public var code: Int? + public var type: String? + public var message: String? + public init(code: Int?, type: String?, message: String?) { + self.code = code + self.type = type + self.message = message + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift new file mode 100644 index 00000000000..c2ef4cc41f1 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -0,0 +1,21 @@ +// +// ArrayOfArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfArrayOfNumberOnly: Codable { + + public var arrayArrayNumber: [[Double]]? + public init(arrayArrayNumber: [[Double]]?) { + self.arrayArrayNumber = arrayArrayNumber + } + + public enum CodingKeys: String, CodingKey { + case arrayArrayNumber = "ArrayArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift new file mode 100644 index 00000000000..36a6b5adbe7 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -0,0 +1,21 @@ +// +// ArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfNumberOnly: Codable { + + public var arrayNumber: [Double]? + public init(arrayNumber: [Double]?) { + self.arrayNumber = arrayNumber + } + + public enum CodingKeys: String, CodingKey { + case arrayNumber = "ArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift new file mode 100644 index 00000000000..a9617771b40 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -0,0 +1,27 @@ +// +// ArrayTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayTest: Codable { + + public var arrayOfString: [String]? + public var arrayArrayOfInteger: [[Int64]]? + public var arrayArrayOfModel: [[ReadOnlyFirst]]? + public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { + self.arrayOfString = arrayOfString + self.arrayArrayOfInteger = arrayArrayOfInteger + self.arrayArrayOfModel = arrayArrayOfModel + } + + public enum CodingKeys: String, CodingKey { + case arrayOfString = "array_of_string" + case arrayArrayOfInteger = "array_array_of_integer" + case arrayArrayOfModel = "array_array_of_model" + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift new file mode 100644 index 00000000000..660ebd30aaa --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -0,0 +1,37 @@ +// +// Capitalization.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Capitalization: Codable { + + public var smallCamel: String? + public var capitalCamel: String? + public var smallSnake: String? + public var capitalSnake: String? + public var sCAETHFlowPoints: String? + /** Name of the pet */ + public var ATT_NAME: String? + public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { + self.smallCamel = smallCamel + self.capitalCamel = capitalCamel + self.smallSnake = smallSnake + self.capitalSnake = capitalSnake + self.sCAETHFlowPoints = sCAETHFlowPoints + self.ATT_NAME = ATT_NAME + } + + public enum CodingKeys: String, CodingKey { + case smallCamel + case capitalCamel = "CapitalCamel" + case smallSnake = "small_Snake" + case capitalSnake = "Capital_Snake" + case sCAETHFlowPoints = "SCA_ETH_Flow_Points" + case ATT_NAME + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift new file mode 100644 index 00000000000..1de6c6b9f46 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -0,0 +1,21 @@ +// +// Cat.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Cat: Codable { + + public var className: String? + public var color: String? = "red" + public var declawed: Bool? + public init(className: String?, color: String?, declawed: Bool?) { + self.className = className + self.color = color + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift new file mode 100644 index 00000000000..4f9a5b5a648 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -0,0 +1,17 @@ +// +// CatAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct CatAllOf: Codable { + + public var declawed: Bool? + public init(declawed: Bool?) { + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Category.swift new file mode 100644 index 00000000000..b1e8789c40e --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -0,0 +1,19 @@ +// +// Category.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Category: Codable { + + public var id: Int64? + public var name: String? = "default-name" + public init(id: Int64?, name: String?) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift new file mode 100644 index 00000000000..8968e876037 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -0,0 +1,19 @@ +// +// ClassModel.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model with \"_class\" property */ + +public struct ClassModel: Codable { + + public var _class: String? + public init(_class: String?) { + self._class = _class + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Client.swift new file mode 100644 index 00000000000..85d2bf59f88 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -0,0 +1,17 @@ +// +// Client.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Client: Codable { + + public var client: String? + public init(client: String?) { + self.client = client + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift new file mode 100644 index 00000000000..4c70d59e3fe --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -0,0 +1,21 @@ +// +// Dog.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Dog: Codable { + + public var className: String? + public var color: String? = "red" + public var breed: String? + public init(className: String?, color: String?, breed: String?) { + self.className = className + self.color = color + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift new file mode 100644 index 00000000000..cff2c19160c --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -0,0 +1,17 @@ +// +// DogAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct DogAllOf: Codable { + + public var breed: String? + public init(breed: String?) { + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift new file mode 100644 index 00000000000..3796fefc5b5 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -0,0 +1,32 @@ +// +// EnumArrays.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumArrays: Codable { + + public enum JustSymbol: String, Codable { + case greaterThanOrEqualTo = ">=" + case dollar = "$" + } + public enum ArrayEnum: String, Codable { + case fish = "fish" + case crab = "crab" + } + public var justSymbol: JustSymbol? + public var arrayEnum: [ArrayEnum]? + public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { + self.justSymbol = justSymbol + self.arrayEnum = arrayEnum + } + + public enum CodingKeys: String, CodingKey { + case justSymbol = "just_symbol" + case arrayEnum = "array_enum" + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift new file mode 100644 index 00000000000..3c1dfcac577 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -0,0 +1,14 @@ +// +// EnumClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum EnumClass: String, Codable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift new file mode 100644 index 00000000000..462136aac4d --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -0,0 +1,51 @@ +// +// EnumTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumTest: Codable { + + public enum EnumString: String, Codable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumStringRequired: String, Codable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumInteger: Int, Codable { + case _1 = 1 + case number1 = -1 + } + public enum EnumNumber: Double, Codable { + case _11 = 1.1 + case number12 = -1.2 + } + public var enumString: EnumString? + public var enumStringRequired: EnumStringRequired? + public var enumInteger: EnumInteger? + public var enumNumber: EnumNumber? + public var outerEnum: OuterEnum? + public init(enumString: EnumString?, enumStringRequired: EnumStringRequired?, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { + self.enumString = enumString + self.enumStringRequired = enumStringRequired + self.enumInteger = enumInteger + self.enumNumber = enumNumber + self.outerEnum = outerEnum + } + + public enum CodingKeys: String, CodingKey { + case enumString = "enum_string" + case enumStringRequired = "enum_string_required" + case enumInteger = "enum_integer" + case enumNumber = "enum_number" + case outerEnum + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/File.swift new file mode 100644 index 00000000000..4a7ad73b13b --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -0,0 +1,20 @@ +// +// File.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Must be named `File` for test. */ + +public struct File: Codable { + + /** Test capitalization */ + public var sourceURI: String? + public init(sourceURI: String?) { + self.sourceURI = sourceURI + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift new file mode 100644 index 00000000000..2e10cf79ee7 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -0,0 +1,19 @@ +// +// FileSchemaTestClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FileSchemaTestClass: Codable { + + public var file: File? + public var files: [File]? + public init(file: File?, files: [File]?) { + self.file = file + self.files = files + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift new file mode 100644 index 00000000000..a182f3f3e63 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -0,0 +1,41 @@ +// +// FormatTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FormatTest: Codable { + + public var integer: Int? + public var int32: Int? + public var int64: Int64? + public var number: Double? + public var float: Float? + public var double: Double? + public var string: String? + public var byte: Data? + public var binary: URL? + public var date: Date? + public var dateTime: Date? + public var uuid: UUID? + public var password: String? + public init(integer: Int?, int32: Int?, int64: Int64?, number: Double?, float: Float?, double: Double?, string: String?, byte: Data?, binary: URL?, date: Date?, dateTime: Date?, uuid: UUID?, password: String?) { + self.integer = integer + self.int32 = int32 + self.int64 = int64 + self.number = number + self.float = float + self.double = double + self.string = string + self.byte = byte + self.binary = binary + self.date = date + self.dateTime = dateTime + self.uuid = uuid + self.password = password + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift new file mode 100644 index 00000000000..92d25b4035b --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -0,0 +1,19 @@ +// +// HasOnlyReadOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct HasOnlyReadOnly: Codable { + + public var bar: String? + public var foo: String? + public init(bar: String?, foo: String?) { + self.bar = bar + self.foo = foo + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/List.swift new file mode 100644 index 00000000000..0a12547ee44 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -0,0 +1,21 @@ +// +// List.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct List: Codable { + + public var _123list: String? + public init(_123list: String?) { + self._123list = _123list + } + + public enum CodingKeys: String, CodingKey { + case _123list = "123-list" + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift new file mode 100644 index 00000000000..f146a8651c7 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -0,0 +1,34 @@ +// +// MapTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MapTest: Codable { + + public enum MapOfEnumString: String, Codable { + case upper = "UPPER" + case lower = "lower" + } + public var mapMapOfString: [String: [String: String]]? + public var mapOfEnumString: [String: String]? + public var directMap: [String: Bool]? + public var indirectMap: StringBooleanMap? + public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { + self.mapMapOfString = mapMapOfString + self.mapOfEnumString = mapOfEnumString + self.directMap = directMap + self.indirectMap = indirectMap + } + + public enum CodingKeys: String, CodingKey { + case mapMapOfString = "map_map_of_string" + case mapOfEnumString = "map_of_enum_string" + case directMap = "direct_map" + case indirectMap = "indirect_map" + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift new file mode 100644 index 00000000000..16fb430a8b2 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -0,0 +1,21 @@ +// +// MixedPropertiesAndAdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + + public var uuid: UUID? + public var dateTime: Date? + public var map: [String: Animal]? + public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { + self.uuid = uuid + self.dateTime = dateTime + self.map = map + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift new file mode 100644 index 00000000000..96af48ec264 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -0,0 +1,26 @@ +// +// Model200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name starting with number */ + +public struct Model200Response: Codable { + + public var name: Int? + public var _class: String? + public init(name: Int?, _class: String?) { + self.name = name + self._class = _class + } + + public enum CodingKeys: String, CodingKey { + case name + case _class = "class" + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Name.swift new file mode 100644 index 00000000000..fe05497fd31 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -0,0 +1,32 @@ +// +// Name.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name same as property name */ + +public struct Name: Codable { + + public var name: Int? + public var snakeCase: Int? + public var property: String? + public var _123number: Int? + public init(name: Int?, snakeCase: Int?, property: String?, _123number: Int?) { + self.name = name + self.snakeCase = snakeCase + self.property = property + self._123number = _123number + } + + public enum CodingKeys: String, CodingKey { + case name + case snakeCase = "snake_case" + case property + case _123number = "123Number" + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift new file mode 100644 index 00000000000..20146b8c408 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -0,0 +1,21 @@ +// +// NumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct NumberOnly: Codable { + + public var justNumber: Double? + public init(justNumber: Double?) { + self.justNumber = justNumber + } + + public enum CodingKeys: String, CodingKey { + case justNumber = "JustNumber" + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Order.swift new file mode 100644 index 00000000000..318d1c4127c --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -0,0 +1,33 @@ +// +// Order.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Order: Codable { + + public enum Status: String, Codable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" + } + public var id: Int64? + public var petId: Int64? + public var quantity: Int? + public var shipDate: Date? + /** Order Status */ + public var status: Status? + public var complete: Bool? = false + public init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { + self.id = id + self.petId = petId + self.quantity = quantity + self.shipDate = shipDate + self.status = status + self.complete = complete + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift new file mode 100644 index 00000000000..9da80f3b277 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -0,0 +1,27 @@ +// +// OuterComposite.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct OuterComposite: Codable { + + public var myNumber: Double? + public var myString: String? + public var myBoolean: Bool? + public init(myNumber: Double?, myString: String?, myBoolean: Bool?) { + self.myNumber = myNumber + self.myString = myString + self.myBoolean = myBoolean + } + + public enum CodingKeys: String, CodingKey { + case myNumber = "my_number" + case myString = "my_string" + case myBoolean = "my_boolean" + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift new file mode 100644 index 00000000000..9f80fc95ecf --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -0,0 +1,14 @@ +// +// OuterEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum OuterEnum: String, Codable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift new file mode 100644 index 00000000000..fb0dcce52cd --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -0,0 +1,33 @@ +// +// Pet.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Pet: Codable { + + public enum Status: String, Codable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + public var id: Int64? + public var category: Category? + public var name: String? + public var photoUrls: [String]? + public var tags: [Tag]? + /** pet status in the store */ + public var status: Status? + public init(id: Int64?, category: Category?, name: String?, photoUrls: [String]?, tags: [Tag]?, status: Status?) { + self.id = id + self.category = category + self.name = name + self.photoUrls = photoUrls + self.tags = tags + self.status = status + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift new file mode 100644 index 00000000000..06a842a672d --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -0,0 +1,19 @@ +// +// ReadOnlyFirst.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ReadOnlyFirst: Codable { + + public var bar: String? + public var baz: String? + public init(bar: String?, baz: String?) { + self.bar = bar + self.baz = baz + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Return.swift new file mode 100644 index 00000000000..a763353d12c --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -0,0 +1,23 @@ +// +// Return.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing reserved words */ + +public struct Return: Codable { + + public var _return: Int? + public init(_return: Int?) { + self._return = _return + } + + public enum CodingKeys: String, CodingKey { + case _return = "return" + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift new file mode 100644 index 00000000000..ea11261e7b6 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -0,0 +1,21 @@ +// +// SpecialModelName.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct SpecialModelName: Codable { + + public var specialPropertyName: Int64? + public init(specialPropertyName: Int64?) { + self.specialPropertyName = specialPropertyName + } + + public enum CodingKeys: String, CodingKey { + case specialPropertyName = "$special[property.name]" + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift new file mode 100644 index 00000000000..682ef3359d3 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -0,0 +1,14 @@ +// +// StringBooleanMap.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct StringBooleanMap: Codable { + + public var additionalProperties: [String: Bool] = [:] + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift new file mode 100644 index 00000000000..50cfb7610bd --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -0,0 +1,19 @@ +// +// Tag.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Tag: Codable { + + public var id: Int64? + public var name: String? + public init(id: Int64?, name: String?) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift new file mode 100644 index 00000000000..050d56de4fa --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -0,0 +1,33 @@ +// +// TypeHolderDefault.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderDefault: Codable { + + public var stringItem: String? = "what" + public var numberItem: Double? + public var integerItem: Int? + public var boolItem: Bool? = true + public var arrayItem: [Int]? + public init(stringItem: String?, numberItem: Double?, integerItem: Int?, boolItem: Bool?, arrayItem: [Int]?) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift new file mode 100644 index 00000000000..cbf470c0548 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -0,0 +1,33 @@ +// +// TypeHolderExample.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderExample: Codable { + + public var stringItem: String? + public var numberItem: Double? + public var integerItem: Int? + public var boolItem: Bool? + public var arrayItem: [Int]? + public init(stringItem: String?, numberItem: Double?, integerItem: Int?, boolItem: Bool?, arrayItem: [Int]?) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/User.swift new file mode 100644 index 00000000000..e27318ef80c --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -0,0 +1,32 @@ +// +// User.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct User: Codable { + + public var id: Int64? + public var username: String? + public var firstName: String? + public var lastName: String? + public var email: String? + public var password: String? + public var phone: String? + /** User Status */ + public var userStatus: Int? + public init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { + self.id = id + self.username = username + self.firstName = firstName + self.lastName = lastName + self.email = email + self.password = password + self.phone = phone + self.userStatus = userStatus + } + +} diff --git a/samples/client/petstore/swift5/unwrapRequired/README.md b/samples/client/petstore/swift5/unwrapRequired/README.md new file mode 100644 index 00000000000..595aca25752 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/README.md @@ -0,0 +1,141 @@ +# Swift4 API client for PetstoreClient + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build package: org.openapitools.codegen.languages.Swift5Codegen + +## Installation + +### Carthage + +Run `carthage update` + +### CocoaPods + +Run `pod install` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AnotherFakeAPI* | [**call123testSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags +*FakeAPI* | [**fakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +*FakeAPI* | [**fakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +*FakeAPI* | [**fakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +*FakeAPI* | [**fakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*FakeAPI* | [**testBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +*FakeAPI* | [**testBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +*FakeAPI* | [**testClientModel**](docs/FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +*FakeAPI* | [**testEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeAPI* | [**testEnumParameters**](docs/FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +*FakeAPI* | [**testGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +*FakeAPI* | [**testInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeAPI* | [**testJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeClassnameTags123API* | [**testClassname**](docs/FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case +*PetAPI* | [**addPet**](docs/PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +*PetAPI* | [**deletePet**](docs/PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetAPI* | [**findPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetAPI* | [**findPetsByTags**](docs/PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetAPI* | [**getPetById**](docs/PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetAPI* | [**updatePet**](docs/PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +*PetAPI* | [**updatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetAPI* | [**uploadFile**](docs/PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetAPI* | [**uploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreAPI* | [**deleteOrder**](docs/StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +*StoreAPI* | [**getInventory**](docs/StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreAPI* | [**getOrderById**](docs/StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +*StoreAPI* | [**placeOrder**](docs/StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserAPI* | [**createUser**](docs/UserAPI.md#createuser) | **POST** /user | Create user +*UserAPI* | [**createUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserAPI* | [**createUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserAPI* | [**deleteUser**](docs/UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserAPI* | [**getUserByName**](docs/UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserAPI* | [**loginUser**](docs/UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +*UserAPI* | [**logoutUser**](docs/UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserAPI* | [**updateUser**](docs/UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +## Documentation For Models + + - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [Animal](docs/Animal.md) + - [AnimalFarm](docs/AnimalFarm.md) + - [ApiResponse](docs/ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [ArrayTest](docs/ArrayTest.md) + - [Capitalization](docs/Capitalization.md) + - [Cat](docs/Cat.md) + - [CatAllOf](docs/CatAllOf.md) + - [Category](docs/Category.md) + - [ClassModel](docs/ClassModel.md) + - [Client](docs/Client.md) + - [Dog](docs/Dog.md) + - [DogAllOf](docs/DogAllOf.md) + - [EnumArrays](docs/EnumArrays.md) + - [EnumClass](docs/EnumClass.md) + - [EnumTest](docs/EnumTest.md) + - [File](docs/File.md) + - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [FormatTest](docs/FormatTest.md) + - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [List](docs/List.md) + - [MapTest](docs/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](docs/Model200Response.md) + - [Name](docs/Name.md) + - [NumberOnly](docs/NumberOnly.md) + - [Order](docs/Order.md) + - [OuterComposite](docs/OuterComposite.md) + - [OuterEnum](docs/OuterEnum.md) + - [Pet](docs/Pet.md) + - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [Return](docs/Return.md) + - [SpecialModelName](docs/SpecialModelName.md) + - [StringBooleanMap](docs/StringBooleanMap.md) + - [Tag](docs/Tag.md) + - [TypeHolderDefault](docs/TypeHolderDefault.md) + - [TypeHolderExample](docs/TypeHolderExample.md) + - [User](docs/User.md) + + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +## api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +## http_basic_test + +- **Type**: HTTP basic authentication + +## petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + + +## Author + + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/unwrapRequired/docs/AdditionalPropertiesClass.md new file mode 100644 index 00000000000..e22d28be1de --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/AdditionalPropertiesClass.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapString** | **[String:String]** | | [optional] +**mapMapString** | [String:[String:String]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/Animal.md b/samples/client/petstore/swift5/unwrapRequired/docs/Animal.md new file mode 100644 index 00000000000..69c601455cd --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/Animal.md @@ -0,0 +1,11 @@ +# Animal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] [default to "red"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/AnimalFarm.md b/samples/client/petstore/swift5/unwrapRequired/docs/AnimalFarm.md new file mode 100644 index 00000000000..df6bab21dae --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/AnimalFarm.md @@ -0,0 +1,9 @@ +# AnimalFarm + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/unwrapRequired/docs/AnotherFakeAPI.md new file mode 100644 index 00000000000..aead5f1f980 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/AnotherFakeAPI.md @@ -0,0 +1,59 @@ +# AnotherFakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**call123testSpecialTags**](AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags + + +# **call123testSpecialTags** +```swift + open class func call123testSpecialTags(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test special tags + +To test special tags and operation ID starting with number + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test special tags +AnotherFakeAPI.call123testSpecialTags(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/ApiResponse.md b/samples/client/petstore/swift5/unwrapRequired/docs/ApiResponse.md new file mode 100644 index 00000000000..c6d9768fe9b --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/ApiResponse.md @@ -0,0 +1,12 @@ +# ApiResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Int** | | [optional] +**type** | **String** | | [optional] +**message** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/swift5/unwrapRequired/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 00000000000..c6fceff5e08 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayArrayNumber** | [[Double]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/ArrayOfNumberOnly.md b/samples/client/petstore/swift5/unwrapRequired/docs/ArrayOfNumberOnly.md new file mode 100644 index 00000000000..f09f8fa6f70 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/ArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayNumber** | **[Double]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/ArrayTest.md b/samples/client/petstore/swift5/unwrapRequired/docs/ArrayTest.md new file mode 100644 index 00000000000..bf416b8330c --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/ArrayTest.md @@ -0,0 +1,12 @@ +# ArrayTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayOfString** | **[String]** | | [optional] +**arrayArrayOfInteger** | [[Int64]] | | [optional] +**arrayArrayOfModel** | [[ReadOnlyFirst]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/Capitalization.md b/samples/client/petstore/swift5/unwrapRequired/docs/Capitalization.md new file mode 100644 index 00000000000..95374216c77 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/Capitalization.md @@ -0,0 +1,15 @@ +# Capitalization + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] +**smallSnake** | **String** | | [optional] +**capitalSnake** | **String** | | [optional] +**sCAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/Cat.md b/samples/client/petstore/swift5/unwrapRequired/docs/Cat.md new file mode 100644 index 00000000000..fb5949b1576 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/Cat.md @@ -0,0 +1,10 @@ +# Cat + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/CatAllOf.md b/samples/client/petstore/swift5/unwrapRequired/docs/CatAllOf.md new file mode 100644 index 00000000000..79789be61c0 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/CatAllOf.md @@ -0,0 +1,10 @@ +# CatAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/Category.md b/samples/client/petstore/swift5/unwrapRequired/docs/Category.md new file mode 100644 index 00000000000..5ca5408c0f9 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/Category.md @@ -0,0 +1,11 @@ +# Category + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [default to "default-name"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/ClassModel.md b/samples/client/petstore/swift5/unwrapRequired/docs/ClassModel.md new file mode 100644 index 00000000000..e3912fdf0fd --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/ClassModel.md @@ -0,0 +1,10 @@ +# ClassModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/Client.md b/samples/client/petstore/swift5/unwrapRequired/docs/Client.md new file mode 100644 index 00000000000..0de1b238c36 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/Client.md @@ -0,0 +1,10 @@ +# Client + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/Dog.md b/samples/client/petstore/swift5/unwrapRequired/docs/Dog.md new file mode 100644 index 00000000000..4824786da04 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/Dog.md @@ -0,0 +1,10 @@ +# Dog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/DogAllOf.md b/samples/client/petstore/swift5/unwrapRequired/docs/DogAllOf.md new file mode 100644 index 00000000000..9302ef52e93 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/DogAllOf.md @@ -0,0 +1,10 @@ +# DogAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/EnumArrays.md b/samples/client/petstore/swift5/unwrapRequired/docs/EnumArrays.md new file mode 100644 index 00000000000..b9a9807d3c8 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/EnumArrays.md @@ -0,0 +1,11 @@ +# EnumArrays + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justSymbol** | **String** | | [optional] +**arrayEnum** | **[String]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/EnumClass.md b/samples/client/petstore/swift5/unwrapRequired/docs/EnumClass.md new file mode 100644 index 00000000000..67f017becd0 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/EnumClass.md @@ -0,0 +1,9 @@ +# EnumClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/EnumTest.md b/samples/client/petstore/swift5/unwrapRequired/docs/EnumTest.md new file mode 100644 index 00000000000..bc9b036dd76 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/EnumTest.md @@ -0,0 +1,14 @@ +# EnumTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumString** | **String** | | [optional] +**enumStringRequired** | **String** | | +**enumInteger** | **Int** | | [optional] +**enumNumber** | **Double** | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/FakeAPI.md b/samples/client/petstore/swift5/unwrapRequired/docs/FakeAPI.md new file mode 100644 index 00000000000..18fbf8147d8 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/FakeAPI.md @@ -0,0 +1,662 @@ +# FakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fakeOuterBooleanSerialize**](FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +[**fakeOuterCompositeSerialize**](FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +[**fakeOuterNumberSerialize**](FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +[**fakeOuterStringSerialize**](FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +[**testBodyWithFileSchema**](FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +[**testBodyWithQueryParams**](FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +[**testClientModel**](FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +[**testEndpointParameters**](FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEnumParameters**](FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +[**testGroupParameters**](FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**testInlineAdditionalProperties**](FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**testJsonFormData**](FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data + + +# **fakeOuterBooleanSerialize** +```swift + open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping (_ data: Bool?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer boolean types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = false // Bool | Input boolean as post body (optional) + +FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Bool** | Input boolean as post body | [optional] + +### Return type + +**Bool** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterCompositeSerialize** +```swift + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping (_ data: OuterComposite?, _ error: Error?) -> Void) +``` + + + +Test serialization of object with outer number type + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = OuterComposite(myNumber: 123, myString: "myString_example", myBoolean: false) // OuterComposite | Input composite as post body (optional) + +FakeAPI.fakeOuterCompositeSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterNumberSerialize** +```swift + open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping (_ data: Double?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer number types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = 987 // Double | Input number as post body (optional) + +FakeAPI.fakeOuterNumberSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Double** | Input number as post body | [optional] + +### Return type + +**Double** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterStringSerialize** +```swift + open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping (_ data: String?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer string types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = "body_example" // String | Input string as post body (optional) + +FakeAPI.fakeOuterStringSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **String** | Input string as post body | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithFileSchema** +```swift + open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + + + +For this test, the body for this request much reference a schema named `File`. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | + +FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithQueryParams** +```swift + open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + + + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let query = "query_example" // String | +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | + +FakeAPI.testBodyWithQueryParams(query: query, body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **String** | | + **body** | [**User**](User.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testClientModel** +```swift + open class func testClientModel(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test \"client\" model + +To test \"client\" model + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test \"client\" model +FakeAPI.testClientModel(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEndpointParameters** +```swift + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let number = 987 // Double | None +let double = 987 // Double | None +let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None +let byte = 987 // Data | None +let integer = 987 // Int | None (optional) +let int32 = 987 // Int | None (optional) +let int64 = 987 // Int64 | None (optional) +let float = 987 // Float | None (optional) +let string = "string_example" // String | None (optional) +let binary = URL(string: "https://example.com")! // URL | None (optional) +let date = Date() // Date | None (optional) +let dateTime = Date() // Date | None (optional) +let password = "password_example" // String | None (optional) +let callback = "callback_example" // String | None (optional) + +// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +FakeAPI.testEndpointParameters(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **Double** | None | + **double** | **Double** | None | + **patternWithoutDelimiter** | **String** | None | + **byte** | **Data** | None | + **integer** | **Int** | None | [optional] + **int32** | **Int** | None | [optional] + **int64** | **Int64** | None | [optional] + **float** | **Float** | None | [optional] + **string** | **String** | None | [optional] + **binary** | **URL** | None | [optional] + **date** | **Date** | None | [optional] + **dateTime** | **Date** | None | [optional] + **password** | **String** | None | [optional] + **callback** | **String** | None | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEnumParameters** +```swift + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +To test enum parameters + +To test enum parameters + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let enumHeaderStringArray = ["enumHeaderStringArray_example"] // [String] | Header parameter enum test (string array) (optional) +let enumHeaderString = "enumHeaderString_example" // String | Header parameter enum test (string) (optional) (default to .-efg) +let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query parameter enum test (string array) (optional) +let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .-efg) +let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) +let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) +let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .$) +let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .-efg) + +// To test enum parameters +FakeAPI.testEnumParameters(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumHeaderStringArray** | [**[String]**](String.md) | Header parameter enum test (string array) | [optional] + **enumHeaderString** | **String** | Header parameter enum test (string) | [optional] [default to .-efg] + **enumQueryStringArray** | [**[String]**](String.md) | Query parameter enum test (string array) | [optional] + **enumQueryString** | **String** | Query parameter enum test (string) | [optional] [default to .-efg] + **enumQueryInteger** | **Int** | Query parameter enum test (double) | [optional] + **enumQueryDouble** | **Double** | Query parameter enum test (double) | [optional] + **enumFormStringArray** | [**[String]**](String.md) | Form parameter enum test (string array) | [optional] [default to .$] + **enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to .-efg] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testGroupParameters** +```swift + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let requiredStringGroup = 987 // Int | Required String in group parameters +let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredInt64Group = 987 // Int64 | Required Integer in group parameters +let stringGroup = 987 // Int | String in group parameters (optional) +let booleanGroup = false // Bool | Boolean in group parameters (optional) +let int64Group = 987 // Int64 | Integer in group parameters (optional) + +// Fake endpoint to test group parameters (optional) +FakeAPI.testGroupParameters(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requiredStringGroup** | **Int** | Required String in group parameters | + **requiredBooleanGroup** | **Bool** | Required Boolean in group parameters | + **requiredInt64Group** | **Int64** | Required Integer in group parameters | + **stringGroup** | **Int** | String in group parameters | [optional] + **booleanGroup** | **Bool** | Boolean in group parameters | [optional] + **int64Group** | **Int64** | Integer in group parameters | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testInlineAdditionalProperties** +```swift + open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +test inline additionalProperties + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "TODO" // [String:String] | request body + +// test inline additionalProperties +FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | [**[String:String]**](String.md) | request body | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testJsonFormData** +```swift + open class func testJsonFormData(param: String, param2: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +test json serialization of form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "param_example" // String | field1 +let param2 = "param2_example" // String | field2 + +// test json serialization of form data +FakeAPI.testJsonFormData(param: param, param2: param2) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **String** | field1 | + **param2** | **String** | field2 | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/unwrapRequired/docs/FakeClassnameTags123API.md new file mode 100644 index 00000000000..9f24b46edbc --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/FakeClassnameTags123API.md @@ -0,0 +1,59 @@ +# FakeClassnameTags123API + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testClassname**](FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case + + +# **testClassname** +```swift + open class func testClassname(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test class name in snake case + +To test class name in snake case + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test class name in snake case +FakeClassnameTags123API.testClassname(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/File.md b/samples/client/petstore/swift5/unwrapRequired/docs/File.md new file mode 100644 index 00000000000..3edfef17b79 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/File.md @@ -0,0 +1,10 @@ +# File + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourceURI** | **String** | Test capitalization | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/FileSchemaTestClass.md b/samples/client/petstore/swift5/unwrapRequired/docs/FileSchemaTestClass.md new file mode 100644 index 00000000000..afdacc60b2c --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/FileSchemaTestClass.md @@ -0,0 +1,11 @@ +# FileSchemaTestClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | [**File**](File.md) | | [optional] +**files** | [File] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/FormatTest.md b/samples/client/petstore/swift5/unwrapRequired/docs/FormatTest.md new file mode 100644 index 00000000000..f74d94f6c46 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/FormatTest.md @@ -0,0 +1,22 @@ +# FormatTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Int** | | [optional] +**int32** | **Int** | | [optional] +**int64** | **Int64** | | [optional] +**number** | **Double** | | +**float** | **Float** | | [optional] +**double** | **Double** | | [optional] +**string** | **String** | | [optional] +**byte** | **Data** | | +**binary** | **URL** | | [optional] +**date** | **Date** | | +**dateTime** | **Date** | | [optional] +**uuid** | **UUID** | | [optional] +**password** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift5/unwrapRequired/docs/HasOnlyReadOnly.md new file mode 100644 index 00000000000..45781360154 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/HasOnlyReadOnly.md @@ -0,0 +1,11 @@ +# HasOnlyReadOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] +**foo** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/List.md b/samples/client/petstore/swift5/unwrapRequired/docs/List.md new file mode 100644 index 00000000000..b77718302ed --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/List.md @@ -0,0 +1,10 @@ +# List + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_123list** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/MapTest.md b/samples/client/petstore/swift5/unwrapRequired/docs/MapTest.md new file mode 100644 index 00000000000..56213c4113f --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/MapTest.md @@ -0,0 +1,13 @@ +# MapTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapMapOfString** | [String:[String:String]] | | [optional] +**mapOfEnumString** | **[String:String]** | | [optional] +**directMap** | **[String:Bool]** | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/unwrapRequired/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 00000000000..fcffb8ecdbf --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,12 @@ +# MixedPropertiesAndAdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **UUID** | | [optional] +**dateTime** | **Date** | | [optional] +**map** | [String:Animal] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/Model200Response.md b/samples/client/petstore/swift5/unwrapRequired/docs/Model200Response.md new file mode 100644 index 00000000000..5865ea690cc --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/Model200Response.md @@ -0,0 +1,11 @@ +# Model200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | [optional] +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/Name.md b/samples/client/petstore/swift5/unwrapRequired/docs/Name.md new file mode 100644 index 00000000000..2be75d062e4 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/Name.md @@ -0,0 +1,13 @@ +# Name + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | +**snakeCase** | **Int** | | [optional] +**property** | **String** | | [optional] +**_123number** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/NumberOnly.md b/samples/client/petstore/swift5/unwrapRequired/docs/NumberOnly.md new file mode 100644 index 00000000000..72bd361168b --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/NumberOnly.md @@ -0,0 +1,10 @@ +# NumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justNumber** | **Double** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/Order.md b/samples/client/petstore/swift5/unwrapRequired/docs/Order.md new file mode 100644 index 00000000000..15487f01175 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/Order.md @@ -0,0 +1,15 @@ +# Order + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**petId** | **Int64** | | [optional] +**quantity** | **Int** | | [optional] +**shipDate** | **Date** | | [optional] +**status** | **String** | Order Status | [optional] +**complete** | **Bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/OuterComposite.md b/samples/client/petstore/swift5/unwrapRequired/docs/OuterComposite.md new file mode 100644 index 00000000000..d6b3583bc3f --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/OuterComposite.md @@ -0,0 +1,12 @@ +# OuterComposite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myNumber** | **Double** | | [optional] +**myString** | **String** | | [optional] +**myBoolean** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/OuterEnum.md b/samples/client/petstore/swift5/unwrapRequired/docs/OuterEnum.md new file mode 100644 index 00000000000..06d413b0168 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/OuterEnum.md @@ -0,0 +1,9 @@ +# OuterEnum + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/Pet.md b/samples/client/petstore/swift5/unwrapRequired/docs/Pet.md new file mode 100644 index 00000000000..5c05f98fad4 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/Pet.md @@ -0,0 +1,15 @@ +# Pet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **String** | | +**photoUrls** | **[String]** | | +**tags** | [Tag] | | [optional] +**status** | **String** | pet status in the store | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/PetAPI.md b/samples/client/petstore/swift5/unwrapRequired/docs/PetAPI.md new file mode 100644 index 00000000000..27efe083347 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/PetAPI.md @@ -0,0 +1,469 @@ +# PetAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) + + +# **addPet** +```swift + open class func addPet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Add a new pet to the store + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Add a new pet to the store +PetAPI.addPet(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deletePet** +```swift + open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Deletes a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | Pet id to delete +let apiKey = "apiKey_example" // String | (optional) + +// Deletes a pet +PetAPI.deletePet(petId: petId, apiKey: apiKey) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | Pet id to delete | + **apiKey** | **String** | | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByStatus** +```swift + open class func findPetsByStatus(status: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) +``` + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let status = ["status_example"] // [String] | Status values that need to be considered for filter + +// Finds Pets by status +PetAPI.findPetsByStatus(status: status) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**[String]**](String.md) | Status values that need to be considered for filter | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByTags** +```swift + open class func findPetsByTags(tags: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) +``` + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let tags = ["inner_example"] // [String] | Tags to filter by + +// Finds Pets by tags +PetAPI.findPetsByTags(tags: tags) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**[String]**](String.md) | Tags to filter by | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getPetById** +```swift + open class func getPetById(petId: Int64, completion: @escaping (_ data: Pet?, _ error: Error?) -> Void) +``` + +Find pet by ID + +Returns a single pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to return + +// Find pet by ID +PetAPI.getPetById(petId: petId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePet** +```swift + open class func updatePet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Update an existing pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Update an existing pet +PetAPI.updatePet(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePetWithForm** +```swift + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Updates a pet in the store with form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet that needs to be updated +let name = "name_example" // String | Updated name of the pet (optional) +let status = "status_example" // String | Updated status of the pet (optional) + +// Updates a pet in the store with form data +PetAPI.updatePetWithForm(petId: petId, name: name, status: status) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet that needs to be updated | + **name** | **String** | Updated name of the pet | [optional] + **status** | **String** | Updated status of the pet | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFile** +```swift + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) +``` + +uploads an image + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) +let file = URL(string: "https://example.com")! // URL | file to upload (optional) + +// uploads an image +PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + **file** | **URL** | file to upload | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFileWithRequiredFile** +```swift + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) +``` + +uploads an image (required) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) + +// uploads an image (required) +PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **requiredFile** | **URL** | file to upload | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/ReadOnlyFirst.md b/samples/client/petstore/swift5/unwrapRequired/docs/ReadOnlyFirst.md new file mode 100644 index 00000000000..e3f16038b97 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/ReadOnlyFirst.md @@ -0,0 +1,11 @@ +# ReadOnlyFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] +**baz** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/Return.md b/samples/client/petstore/swift5/unwrapRequired/docs/Return.md new file mode 100644 index 00000000000..66d17c27c88 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/Return.md @@ -0,0 +1,10 @@ +# Return + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/SpecialModelName.md b/samples/client/petstore/swift5/unwrapRequired/docs/SpecialModelName.md new file mode 100644 index 00000000000..3ec27a38c2a --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/SpecialModelName.md @@ -0,0 +1,10 @@ +# SpecialModelName + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**specialPropertyName** | **Int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/StoreAPI.md b/samples/client/petstore/swift5/unwrapRequired/docs/StoreAPI.md new file mode 100644 index 00000000000..36365ca5199 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/StoreAPI.md @@ -0,0 +1,206 @@ +# StoreAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[**getInventory**](StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +[**placeOrder**](StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet + + +# **deleteOrder** +```swift + open class func deleteOrder(orderId: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = "orderId_example" // String | ID of the order that needs to be deleted + +// Delete purchase order by ID +StoreAPI.deleteOrder(orderId: orderId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String** | ID of the order that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getInventory** +```swift + open class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void) +``` + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Returns pet inventories by status +StoreAPI.getInventory() { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**[String:Int]** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrderById** +```swift + open class func getOrderById(orderId: Int64, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) +``` + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = 987 // Int64 | ID of pet that needs to be fetched + +// Find purchase order by ID +StoreAPI.getOrderById(orderId: orderId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **Int64** | ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **placeOrder** +```swift + open class func placeOrder(body: Order, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) +``` + +Place an order for a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Order(id: 123, petId: 123, quantity: 123, shipDate: Date(), status: "status_example", complete: false) // Order | order placed for purchasing the pet + +// Place an order for a pet +StoreAPI.placeOrder(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md) | order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/StringBooleanMap.md b/samples/client/petstore/swift5/unwrapRequired/docs/StringBooleanMap.md new file mode 100644 index 00000000000..7abf11ec68b --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/StringBooleanMap.md @@ -0,0 +1,9 @@ +# StringBooleanMap + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/Tag.md b/samples/client/petstore/swift5/unwrapRequired/docs/Tag.md new file mode 100644 index 00000000000..ff4ac8aa451 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/Tag.md @@ -0,0 +1,11 @@ +# Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/TypeHolderDefault.md b/samples/client/petstore/swift5/unwrapRequired/docs/TypeHolderDefault.md new file mode 100644 index 00000000000..5161394bdc3 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/TypeHolderDefault.md @@ -0,0 +1,14 @@ +# TypeHolderDefault + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | [default to "what"] +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | [default to true] +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/TypeHolderExample.md b/samples/client/petstore/swift5/unwrapRequired/docs/TypeHolderExample.md new file mode 100644 index 00000000000..46d0471cd71 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/TypeHolderExample.md @@ -0,0 +1,14 @@ +# TypeHolderExample + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/User.md b/samples/client/petstore/swift5/unwrapRequired/docs/User.md new file mode 100644 index 00000000000..5a439de0ff9 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/User.md @@ -0,0 +1,17 @@ +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**username** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] +**email** | **String** | | [optional] +**password** | **String** | | [optional] +**phone** | **String** | | [optional] +**userStatus** | **Int** | User Status | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/unwrapRequired/docs/UserAPI.md b/samples/client/petstore/swift5/unwrapRequired/docs/UserAPI.md new file mode 100644 index 00000000000..380813bc68c --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/docs/UserAPI.md @@ -0,0 +1,406 @@ +# UserAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserAPI.md#createuser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +# **createUser** +```swift + open class func createUser(body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Create user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Created user object + +// Create user +UserAPI.createUser(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md) | Created user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithArrayInput** +```swift + open class func createUsersWithArrayInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithArrayInput(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithListInput** +```swift + open class func createUsersWithListInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithListInput(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteUser** +```swift + open class func deleteUser(username: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Delete user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be deleted + +// Delete user +UserAPI.deleteUser(username: username) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getUserByName** +```swift + open class func getUserByName(username: String, completion: @escaping (_ data: User?, _ error: Error?) -> Void) +``` + +Get user by user name + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be fetched. Use user1 for testing. + +// Get user by user name +UserAPI.getUserByName(username: username) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loginUser** +```swift + open class func loginUser(username: String, password: String, completion: @escaping (_ data: String?, _ error: Error?) -> Void) +``` + +Logs user into the system + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The user name for login +let password = "password_example" // String | The password for login in clear text + +// Logs user into the system +UserAPI.loginUser(username: username, password: password) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The user name for login | + **password** | **String** | The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **logoutUser** +```swift + open class func logoutUser(completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Logs out current logged in user session + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Logs out current logged in user session +UserAPI.logoutUser() { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +```swift + open class func updateUser(username: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Updated user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | name that need to be deleted +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Updated user object + +// Updated user +UserAPI.updateUser(username: username, body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | name that need to be deleted | + **body** | [**User**](User.md) | Updated user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/unwrapRequired/git_push.sh b/samples/client/petstore/swift5/unwrapRequired/git_push.sh new file mode 100644 index 00000000000..8442b80bb44 --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/samples/client/petstore/swift5/unwrapRequired/project.yml b/samples/client/petstore/swift5/unwrapRequired/project.yml new file mode 100644 index 00000000000..92f5767755b --- /dev/null +++ b/samples/client/petstore/swift5/unwrapRequired/project.yml @@ -0,0 +1,15 @@ +name: PetstoreClient +targets: + PetstoreClient: + type: framework + platform: iOS + deploymentTarget: "10.0" + sources: [PetstoreClient] + info: + path: ./Info.plist + version: 1.0.0 + settings: + APPLICATION_EXTENSION_API_ONLY: true + SWIFT_VERSION: "5.0" + scheme: {} + diff --git a/samples/client/test/swift5default/.gitignore b/samples/client/test/swift5default/.gitignore new file mode 100644 index 00000000000..5e5d5cebcf4 --- /dev/null +++ b/samples/client/test/swift5default/.gitignore @@ -0,0 +1,63 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots diff --git a/samples/client/test/swift5default/.openapi-generator-ignore b/samples/client/test/swift5default/.openapi-generator-ignore new file mode 100644 index 00000000000..7484ee590a3 --- /dev/null +++ b/samples/client/test/swift5default/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/test/swift5default/.openapi-generator/VERSION b/samples/client/test/swift5default/.openapi-generator/VERSION new file mode 100644 index 00000000000..83a328a9227 --- /dev/null +++ b/samples/client/test/swift5default/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/test/swift5default/Info.plist b/samples/client/test/swift5default/Info.plist new file mode 100644 index 00000000000..323e5ecfc42 --- /dev/null +++ b/samples/client/test/swift5default/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/samples/client/test/swift5default/README.md b/samples/client/test/swift5default/README.md new file mode 100644 index 00000000000..b4628b47848 --- /dev/null +++ b/samples/client/test/swift5default/README.md @@ -0,0 +1,58 @@ +# Swift4 API client for TestClient + +This is a test schema which exercises Swagger schema features for testing the swift4 language codegen module. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client. + +- API version: 1.0 +- Package version: +- Build package: org.openapitools.codegen.languages.Swift5Codegen +For more information, please visit [http://www.example.com](http://www.example.com) + +## Installation + +### Carthage + +Run `carthage update` + +### CocoaPods + +Run `pod install` + +## Documentation for API Endpoints + +All URIs are relative to *http://api.example.com/basePath* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*Swift4TestAPI* | [**getAllModels**](docs/Swift4TestAPI.md#getallmodels) | **GET** /allModels | Get all of the models + + +## Documentation For Models + + - [AllPrimitives](docs/AllPrimitives.md) + - [BaseCard](docs/BaseCard.md) + - [ErrorInfo](docs/ErrorInfo.md) + - [GetAllModelsResult](docs/GetAllModelsResult.md) + - [ModelWithPropertiesAndAdditionalProperties](docs/ModelWithPropertiesAndAdditionalProperties.md) + - [PersonCard](docs/PersonCard.md) + - [PersonCardAllOf](docs/PersonCardAllOf.md) + - [PlaceCard](docs/PlaceCard.md) + - [PlaceCardAllOf](docs/PlaceCardAllOf.md) + - [SampleBase](docs/SampleBase.md) + - [SampleSubClass](docs/SampleSubClass.md) + - [SampleSubClassAllOf](docs/SampleSubClassAllOf.md) + - [StringEnum](docs/StringEnum.md) + - [VariableNameTest](docs/VariableNameTest.md) + + +## Documentation For Authorization + + All endpoints do not require authorization. + + +## Author + +jdoe@example.com + diff --git a/samples/client/test/swift5default/TestClient.podspec b/samples/client/test/swift5default/TestClient.podspec new file mode 100644 index 00000000000..3dd111f2919 --- /dev/null +++ b/samples/client/test/swift5default/TestClient.podspec @@ -0,0 +1,14 @@ +Pod::Spec.new do |s| + s.name = 'TestClient' + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.11' + s.tvos.deployment_target = '9.0' + s.version = '1.0' + s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0' } + s.authors = '' + s.license = 'Proprietary' + s.homepage = 'https://github.com/openapitools/openapi-generator' + s.summary = 'TestClient' + s.source_files = 'TestClient/Classes/**/*.swift' + +end diff --git a/samples/client/test/swift5default/TestClient.xcodeproj/project.pbxproj b/samples/client/test/swift5default/TestClient.xcodeproj/project.pbxproj new file mode 100644 index 00000000000..3a4a1d5f26b --- /dev/null +++ b/samples/client/test/swift5default/TestClient.xcodeproj/project.pbxproj @@ -0,0 +1,382 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 0061472DD11FF6D7742349C7 /* PersonCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30CDB0CB291617B59C7E29CB /* PersonCard.swift */; }; + 1415101700773F07D9E14327 /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F6F3F378FFC3FC0AC42268D /* APIs.swift */; }; + 2002BB13501E9D1F5952C760 /* SampleSubClassAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6555C6E30D09EAE39142D186 /* SampleSubClassAllOf.swift */; }; + 397D2FF23D2C1021F59C1244 /* project.yml in Resources */ = {isa = PBXBuildFile; fileRef = C27B7F2DE38733DB9FA171AC /* project.yml */; }; + 3DC6743F3ECD7005940DED98 /* GetAllModelsResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACAEAEEB934E57798AED0602 /* GetAllModelsResult.swift */; }; + 3F20DE4CB1AD4F3A2ED05326 /* SampleSubClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA9C1F9551FB619240EC0F70 /* SampleSubClass.swift */; }; + 4209C8951507A706227F2A85 /* SampleBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAB9BE4C49A34C2D3AE2D4E3 /* SampleBase.swift */; }; + 493DB82F57B410C3C40CDD6B /* ModelWithPropertiesAndAdditionalProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17B59E56BC42D7F70BBC0D08 /* ModelWithPropertiesAndAdditionalProperties.swift */; }; + 4D1CD48EC9034A49C536DF05 /* BaseCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = C209BA7D3B7026133ACB6149 /* BaseCard.swift */; }; + 561FBF0BA4127AAA4B2EB66D /* AllPrimitives.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EE13D018B8E8F7283534E94 /* AllPrimitives.swift */; }; + 633435C240C960AFE29EEF3A /* StringEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BD76CE1B85046CF575F42B /* StringEnum.swift */; }; + 6CADD5CF7C8834F9ACA88E4F /* Swift4TestAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF9E03057B35B32AC59ADC1B /* Swift4TestAPI.swift */; }; + 7C22E572E92D490CC366F0C2 /* ErrorInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A813A17AF964F26FB864212 /* ErrorInfo.swift */; }; + 8F02FB3DCBA785F15F6BA602 /* PlaceCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13DD01D5ABD4BE352CB6FCBF /* PlaceCard.swift */; }; + 9193BA83FEDAFA9788D03ACF /* PlaceCardAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 889ABCD292051498ACCC66E8 /* PlaceCardAllOf.swift */; }; + D43D0FC46CD094545F0284F3 /* PersonCardAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C4F016421122219AE4DCDF9 /* PersonCardAllOf.swift */; }; + FD7D9D3454F9C64656CDCB8B /* VariableNameTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C09C1DB6708AB2D8997BEE2 /* VariableNameTest.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 13DD01D5ABD4BE352CB6FCBF /* PlaceCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlaceCard.swift; sourceTree = ""; }; + 17B59E56BC42D7F70BBC0D08 /* ModelWithPropertiesAndAdditionalProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelWithPropertiesAndAdditionalProperties.swift; sourceTree = ""; }; + 1A813A17AF964F26FB864212 /* ErrorInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ErrorInfo.swift; sourceTree = ""; }; + 2C4F016421122219AE4DCDF9 /* PersonCardAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersonCardAllOf.swift; sourceTree = ""; }; + 30CDB0CB291617B59C7E29CB /* PersonCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersonCard.swift; sourceTree = ""; }; + 4F6F3F378FFC3FC0AC42268D /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 6555C6E30D09EAE39142D186 /* SampleSubClassAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleSubClassAllOf.swift; sourceTree = ""; }; + 7C09C1DB6708AB2D8997BEE2 /* VariableNameTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VariableNameTest.swift; sourceTree = ""; }; + 7EE13D018B8E8F7283534E94 /* AllPrimitives.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllPrimitives.swift; sourceTree = ""; }; + 889ABCD292051498ACCC66E8 /* PlaceCardAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlaceCardAllOf.swift; sourceTree = ""; }; + 9FD147676BF8F2DD7E471810 /* TestClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TestClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A3BD76CE1B85046CF575F42B /* StringEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringEnum.swift; sourceTree = ""; }; + ACAEAEEB934E57798AED0602 /* GetAllModelsResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetAllModelsResult.swift; sourceTree = ""; }; + C209BA7D3B7026133ACB6149 /* BaseCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseCard.swift; sourceTree = ""; }; + C27B7F2DE38733DB9FA171AC /* project.yml */ = {isa = PBXFileReference; path = project.yml; sourceTree = ""; }; + CAB9BE4C49A34C2D3AE2D4E3 /* SampleBase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleBase.swift; sourceTree = ""; }; + CF9E03057B35B32AC59ADC1B /* Swift4TestAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Swift4TestAPI.swift; sourceTree = ""; }; + EA9C1F9551FB619240EC0F70 /* SampleSubClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleSubClass.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXGroup section */ + 3049D31996790CF8E31B6F01 = { + isa = PBXGroup; + children = ( + 8C649F3AF4A7C6D66B52AA38 /* TestClient */, + CBA5AD47CD6A6AF075403DD1 /* Products */, + ); + sourceTree = ""; + }; + 3A1CFAB4CC75547815260F88 /* OpenAPIs */ = { + isa = PBXGroup; + children = ( + 4F6F3F378FFC3FC0AC42268D /* APIs.swift */, + C27B7F2DE38733DB9FA171AC /* project.yml */, + AC6589BAFE1BDABB49267C33 /* APIs */, + 9A5460679035417A84B6C884 /* Models */, + ); + path = OpenAPIs; + sourceTree = ""; + }; + 3E4B2B40F4EEE4F7E6149EBF /* Classes */ = { + isa = PBXGroup; + children = ( + 3A1CFAB4CC75547815260F88 /* OpenAPIs */, + ); + path = Classes; + sourceTree = ""; + }; + 8C649F3AF4A7C6D66B52AA38 /* TestClient */ = { + isa = PBXGroup; + children = ( + 3E4B2B40F4EEE4F7E6149EBF /* Classes */, + ); + path = TestClient; + sourceTree = ""; + }; + 9A5460679035417A84B6C884 /* Models */ = { + isa = PBXGroup; + children = ( + 7EE13D018B8E8F7283534E94 /* AllPrimitives.swift */, + C209BA7D3B7026133ACB6149 /* BaseCard.swift */, + 1A813A17AF964F26FB864212 /* ErrorInfo.swift */, + ACAEAEEB934E57798AED0602 /* GetAllModelsResult.swift */, + 17B59E56BC42D7F70BBC0D08 /* ModelWithPropertiesAndAdditionalProperties.swift */, + 30CDB0CB291617B59C7E29CB /* PersonCard.swift */, + 2C4F016421122219AE4DCDF9 /* PersonCardAllOf.swift */, + 13DD01D5ABD4BE352CB6FCBF /* PlaceCard.swift */, + 889ABCD292051498ACCC66E8 /* PlaceCardAllOf.swift */, + CAB9BE4C49A34C2D3AE2D4E3 /* SampleBase.swift */, + EA9C1F9551FB619240EC0F70 /* SampleSubClass.swift */, + 6555C6E30D09EAE39142D186 /* SampleSubClassAllOf.swift */, + A3BD76CE1B85046CF575F42B /* StringEnum.swift */, + 7C09C1DB6708AB2D8997BEE2 /* VariableNameTest.swift */, + ); + path = Models; + sourceTree = ""; + }; + AC6589BAFE1BDABB49267C33 /* APIs */ = { + isa = PBXGroup; + children = ( + CF9E03057B35B32AC59ADC1B /* Swift4TestAPI.swift */, + ); + path = APIs; + sourceTree = ""; + }; + CBA5AD47CD6A6AF075403DD1 /* Products */ = { + isa = PBXGroup; + children = ( + 9FD147676BF8F2DD7E471810 /* TestClient.framework */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 57071453919863518A53B6C4 /* TestClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8C5DAAB4D2F2BC3EB2A18339 /* Build configuration list for PBXNativeTarget "TestClient" */; + buildPhases = ( + 411C0E7C892A386592910621 /* Sources */, + BC372954BD4F3FA7476FF7BA /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = TestClient; + productName = TestClient; + productReference = 9FD147676BF8F2DD7E471810 /* TestClient.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 498565B44CD0696E30C61F1F /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + }; + buildConfigurationList = 87FDCE50021B77EB5CF8EF08 /* Build configuration list for PBXProject "TestClient" */; + compatibilityVersion = "Xcode 10.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 3049D31996790CF8E31B6F01; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 57071453919863518A53B6C4 /* TestClient */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + BC372954BD4F3FA7476FF7BA /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 397D2FF23D2C1021F59C1244 /* project.yml in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 411C0E7C892A386592910621 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1415101700773F07D9E14327 /* APIs.swift in Sources */, + 561FBF0BA4127AAA4B2EB66D /* AllPrimitives.swift in Sources */, + 4D1CD48EC9034A49C536DF05 /* BaseCard.swift in Sources */, + 7C22E572E92D490CC366F0C2 /* ErrorInfo.swift in Sources */, + 3DC6743F3ECD7005940DED98 /* GetAllModelsResult.swift in Sources */, + 493DB82F57B410C3C40CDD6B /* ModelWithPropertiesAndAdditionalProperties.swift in Sources */, + 0061472DD11FF6D7742349C7 /* PersonCard.swift in Sources */, + D43D0FC46CD094545F0284F3 /* PersonCardAllOf.swift in Sources */, + 8F02FB3DCBA785F15F6BA602 /* PlaceCard.swift in Sources */, + 9193BA83FEDAFA9788D03ACF /* PlaceCardAllOf.swift in Sources */, + 4209C8951507A706227F2A85 /* SampleBase.swift in Sources */, + 3F20DE4CB1AD4F3A2ED05326 /* SampleSubClass.swift in Sources */, + 2002BB13501E9D1F5952C760 /* SampleSubClassAllOf.swift in Sources */, + 633435C240C960AFE29EEF3A /* StringEnum.swift in Sources */, + 6CADD5CF7C8834F9ACA88E4F /* Swift4TestAPI.swift in Sources */, + FD7D9D3454F9C64656CDCB8B /* VariableNameTest.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1D58A58AE8D976D68029505F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 20BF9E8F2FA4569489A9CEAC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "DEBUG=1", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 295215B264B439F2CFBEFBA2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 4CDAC84BFAB424A21776ADCA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 87FDCE50021B77EB5CF8EF08 /* Build configuration list for PBXProject "TestClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 20BF9E8F2FA4569489A9CEAC /* Debug */, + 295215B264B439F2CFBEFBA2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 8C5DAAB4D2F2BC3EB2A18339 /* Build configuration list for PBXNativeTarget "TestClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1D58A58AE8D976D68029505F /* Debug */, + 4CDAC84BFAB424A21776ADCA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ""; + }; +/* End XCConfigurationList section */ + }; + rootObject = 498565B44CD0696E30C61F1F /* Project object */; +} diff --git a/samples/client/test/swift5default/TestClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/test/swift5default/TestClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000000..919434a6254 --- /dev/null +++ b/samples/client/test/swift5default/TestClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/test/swift5default/TestClient.xcodeproj/xcshareddata/xcschemes/TestClient.xcscheme b/samples/client/test/swift5default/TestClient.xcodeproj/xcshareddata/xcschemes/TestClient.xcscheme new file mode 100644 index 00000000000..0be5e2334a8 --- /dev/null +++ b/samples/client/test/swift5default/TestClient.xcodeproj/xcshareddata/xcschemes/TestClient.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/APIs.swift b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/APIs.swift new file mode 100644 index 00000000000..295f1934af7 --- /dev/null +++ b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/APIs.swift @@ -0,0 +1,54 @@ +// APIs.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct RequestBuilder { + public let endpoint: String + public let method: String + public let parameters: [Parameters] + public let headers: [String: String] + + public init(endpoint: String, method: String, parameters: [Parameters] = [], headers: [String: String] = [:]) { + self.endpoint = endpoint + self.method = method + self.parameters = parameters + self.headers = headers + } +} + +public enum Parameters { + case query([String: Any?]) + case form([String: String?]) + case json(AnyEncodable) + + public init(_ raw: [String: Any?]) { + self = .query(raw) + } + + public init(_ raw: [String: String?]) { + self = .form(raw) + } + + public init(_ raw: T) { + self = .json(AnyEncodable(raw)) + } +} + +public struct AnyEncodable: Encodable { + var encode: (Encoder) throws -> Void + + init(_ encodable: Encodable) { + func encode(to encoder: Encoder) throws { + try encodable.encode(to: encoder) + } + self.encode = encode + } + + public func encode(to encoder: Encoder) throws { + try encode(encoder) + } +} diff --git a/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift new file mode 100644 index 00000000000..7da80d98929 --- /dev/null +++ b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift @@ -0,0 +1,30 @@ +// +// Swift4TestAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Swift4TestAPI { + /** + Get all of the models + - GET /allModels + - This endpoint tests get a dictionary which contains examples of all of the models. + - parameter clientId: (query) id that represent the Api client + - returns: RequestBuilder + */ + public func getAllModels(clientId: String) -> RequestBuilder { + let path = "/allModels" + + var parameters: [Parameters] = [] + + let queryParams: [String: Any?] = [ + "client_id": clientId + ] + parameters.append(Parameters(queryParams)) + return RequestBuilder(endpoint: path, method: "GET", parameters: parameters) + } + +} diff --git a/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift new file mode 100644 index 00000000000..79c8f9afffd --- /dev/null +++ b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift @@ -0,0 +1,72 @@ +// +// AllPrimitives.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Object which contains lots of different primitive Swagger types */ + +public struct AllPrimitives: Codable { + + public enum MyInlineStringEnum: String, Codable { + case inlinestringenumvalue1 = "inlineStringEnumValue1" + case inlinestringenumvalue2 = "inlineStringEnumValue2" + case inlinestringenumvalue3 = "inlineStringEnumValue3" + } + public var myInteger: Int? + public var myIntegerArray: [Int]? + public var myLong: Int64? + public var myLongArray: [Int64]? + public var myFloat: Float? + public var myFloatArray: [Float]? + public var myDouble: Double? + public var myDoubleArray: [Double]? + public var myString: String? + public var myStringArray: [String]? + public var myBytes: Data? + public var myBytesArray: [Data]? + public var myBoolean: Bool? + public var myBooleanArray: [Bool]? + public var myDate: Date? + public var myDateArray: [Date]? + public var myDateTime: Date? + public var myDateTimeArray: [Date]? + public var myFile: URL? + public var myFileArray: [URL]? + public var myUUID: UUID? + public var myUUIDArray: [UUID]? + public var myStringEnum: StringEnum? + public var myStringEnumArray: [StringEnum]? + public var myInlineStringEnum: MyInlineStringEnum? + public init(myInteger: Int?, myIntegerArray: [Int]?, myLong: Int64?, myLongArray: [Int64]?, myFloat: Float?, myFloatArray: [Float]?, myDouble: Double?, myDoubleArray: [Double]?, myString: String?, myStringArray: [String]?, myBytes: Data?, myBytesArray: [Data]?, myBoolean: Bool?, myBooleanArray: [Bool]?, myDate: Date?, myDateArray: [Date]?, myDateTime: Date?, myDateTimeArray: [Date]?, myFile: URL?, myFileArray: [URL]?, myUUID: UUID?, myUUIDArray: [UUID]?, myStringEnum: StringEnum?, myStringEnumArray: [StringEnum]?, myInlineStringEnum: MyInlineStringEnum?) { + self.myInteger = myInteger + self.myIntegerArray = myIntegerArray + self.myLong = myLong + self.myLongArray = myLongArray + self.myFloat = myFloat + self.myFloatArray = myFloatArray + self.myDouble = myDouble + self.myDoubleArray = myDoubleArray + self.myString = myString + self.myStringArray = myStringArray + self.myBytes = myBytes + self.myBytesArray = myBytesArray + self.myBoolean = myBoolean + self.myBooleanArray = myBooleanArray + self.myDate = myDate + self.myDateArray = myDateArray + self.myDateTime = myDateTime + self.myDateTimeArray = myDateTimeArray + self.myFile = myFile + self.myFileArray = myFileArray + self.myUUID = myUUID + self.myUUIDArray = myUUIDArray + self.myStringEnum = myStringEnum + self.myStringEnumArray = myStringEnumArray + self.myInlineStringEnum = myInlineStringEnum + } + +} diff --git a/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift new file mode 100644 index 00000000000..bbee6518fce --- /dev/null +++ b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift @@ -0,0 +1,19 @@ +// +// BaseCard.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** This is a base card object which uses a 'cardType' discriminator. */ + +public struct BaseCard: Codable { + + public var cardType: String + public init(cardType: String) { + self.cardType = cardType + } + +} diff --git a/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift new file mode 100644 index 00000000000..00d12de0de3 --- /dev/null +++ b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift @@ -0,0 +1,23 @@ +// +// ErrorInfo.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Example Error object */ + +public struct ErrorInfo: Codable { + + public var code: Int? + public var message: String? + public var details: [String]? + public init(code: Int?, message: String?, details: [String]?) { + self.code = code + self.message = message + self.details = details + } + +} diff --git a/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift new file mode 100644 index 00000000000..5edf1018d0e --- /dev/null +++ b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift @@ -0,0 +1,23 @@ +// +// GetAllModelsResult.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Response object containing AllPrimitives object */ + +public struct GetAllModelsResult: Codable { + + public var myPrimitiveArray: [AllPrimitives]? + public var myPrimitive: AllPrimitives? + public var myVariableNameTest: VariableNameTest? + public init(myPrimitiveArray: [AllPrimitives]?, myPrimitive: AllPrimitives?, myVariableNameTest: VariableNameTest?) { + self.myPrimitiveArray = myPrimitiveArray + self.myPrimitive = myPrimitive + self.myVariableNameTest = myVariableNameTest + } + +} diff --git a/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/ModelWithPropertiesAndAdditionalProperties.swift b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/ModelWithPropertiesAndAdditionalProperties.swift new file mode 100644 index 00000000000..8977218b48d --- /dev/null +++ b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/ModelWithPropertiesAndAdditionalProperties.swift @@ -0,0 +1,34 @@ +// +// ModelWithPropertiesAndAdditionalProperties.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** This is an empty model with no properties and only additionalProperties of type int32 */ + +public struct ModelWithPropertiesAndAdditionalProperties: Codable { + + public var myIntegerReq: Int + public var myIntegerOpt: Int? + public var myPrimitiveReq: AllPrimitives + public var myPrimitiveOpt: AllPrimitives? + public var myStringArrayReq: [String] + public var myStringArrayOpt: [String]? + public var myPrimitiveArrayReq: [AllPrimitives] + public var myPrimitiveArrayOpt: [AllPrimitives]? + public init(myIntegerReq: Int, myIntegerOpt: Int?, myPrimitiveReq: AllPrimitives, myPrimitiveOpt: AllPrimitives?, myStringArrayReq: [String], myStringArrayOpt: [String]?, myPrimitiveArrayReq: [AllPrimitives], myPrimitiveArrayOpt: [AllPrimitives]?) { + self.myIntegerReq = myIntegerReq + self.myIntegerOpt = myIntegerOpt + self.myPrimitiveReq = myPrimitiveReq + self.myPrimitiveOpt = myPrimitiveOpt + self.myStringArrayReq = myStringArrayReq + self.myStringArrayOpt = myStringArrayOpt + self.myPrimitiveArrayReq = myPrimitiveArrayReq + self.myPrimitiveArrayOpt = myPrimitiveArrayOpt + } + public var additionalProperties: [String: String] = [:] + +} diff --git a/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift new file mode 100644 index 00000000000..80b3b8e9d40 --- /dev/null +++ b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift @@ -0,0 +1,23 @@ +// +// PersonCard.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** This is a card object for a Person derived from BaseCard. */ + +public struct PersonCard: Codable { + + public var cardType: String + public var firstName: String? + public var lastName: String? + public init(cardType: String, firstName: String?, lastName: String?) { + self.cardType = cardType + self.firstName = firstName + self.lastName = lastName + } + +} diff --git a/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/PersonCardAllOf.swift b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/PersonCardAllOf.swift new file mode 100644 index 00000000000..62fd4002d9a --- /dev/null +++ b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/PersonCardAllOf.swift @@ -0,0 +1,19 @@ +// +// PersonCardAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PersonCardAllOf: Codable { + + public var firstName: String? + public var lastName: String? + public init(firstName: String?, lastName: String?) { + self.firstName = firstName + self.lastName = lastName + } + +} diff --git a/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift new file mode 100644 index 00000000000..2f7e4b04427 --- /dev/null +++ b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift @@ -0,0 +1,23 @@ +// +// PlaceCard.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** This is a card object for a Person derived from BaseCard. */ + +public struct PlaceCard: Codable { + + public var cardType: String + public var placeName: String? + public var placeAddress: String? + public init(cardType: String, placeName: String?, placeAddress: String?) { + self.cardType = cardType + self.placeName = placeName + self.placeAddress = placeAddress + } + +} diff --git a/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/PlaceCardAllOf.swift b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/PlaceCardAllOf.swift new file mode 100644 index 00000000000..436b412d287 --- /dev/null +++ b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/PlaceCardAllOf.swift @@ -0,0 +1,19 @@ +// +// PlaceCardAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PlaceCardAllOf: Codable { + + public var placeName: String? + public var placeAddress: String? + public init(placeName: String?, placeAddress: String?) { + self.placeName = placeName + self.placeAddress = placeAddress + } + +} diff --git a/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift new file mode 100644 index 00000000000..45b7833cd20 --- /dev/null +++ b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift @@ -0,0 +1,21 @@ +// +// SampleBase.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** This is a base class object from which other classes will derive. */ + +public struct SampleBase: Codable { + + public var baseClassStringProp: String? + public var baseClassIntegerProp: Int? + public init(baseClassStringProp: String?, baseClassIntegerProp: Int?) { + self.baseClassStringProp = baseClassStringProp + self.baseClassIntegerProp = baseClassIntegerProp + } + +} diff --git a/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift new file mode 100644 index 00000000000..a33ee92f226 --- /dev/null +++ b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift @@ -0,0 +1,17 @@ +// +// SampleSubClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** This is a subclass defived from the SampleBase class. */ + +public struct SampleSubClass: Codable { + + public init() { + } + +} diff --git a/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/SampleSubClassAllOf.swift b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/SampleSubClassAllOf.swift new file mode 100644 index 00000000000..f6c6d90a6ae --- /dev/null +++ b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/SampleSubClassAllOf.swift @@ -0,0 +1,19 @@ +// +// SampleSubClassAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct SampleSubClassAllOf: Codable { + + public var subClassStringProp: String? + public var subClassIntegerProp: Int? + public init(subClassStringProp: String?, subClassIntegerProp: Int?) { + self.subClassStringProp = subClassStringProp + self.subClassIntegerProp = subClassIntegerProp + } + +} diff --git a/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift new file mode 100644 index 00000000000..67c1c22deda --- /dev/null +++ b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift @@ -0,0 +1,14 @@ +// +// StringEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum StringEnum: String, Codable { + case stringenumvalue1 = "stringEnumValue1" + case stringenumvalue2 = "stringEnumValue2" + case stringenumvalue3 = "stringEnumValue3" +} diff --git a/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift new file mode 100644 index 00000000000..ba4c3d8a320 --- /dev/null +++ b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift @@ -0,0 +1,32 @@ +// +// VariableNameTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** This object contains property names which we know will be different from their variable name. Examples of this include snake case property names and property names which are Swift 4 reserved words. */ + +public struct VariableNameTest: Codable { + + /** This snake-case examle_name property name should be converted to a camelCase variable name like exampleName */ + public var exampleName: String? + /** This property name is a reserved word in most languages, including Swift 4. */ + public var _for: String? + /** This model object property name should be unchanged from the JSON property name. */ + public var normalName: String? + public init(exampleName: String?, _for: String?, normalName: String?) { + self.exampleName = exampleName + self._for = _for + self.normalName = normalName + } + + public enum CodingKeys: String, CodingKey { + case exampleName = "example_name" + case _for = "for" + case normalName + } + +} diff --git a/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/project.yml b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/project.yml new file mode 100644 index 00000000000..04b89e422f0 --- /dev/null +++ b/samples/client/test/swift5default/TestClient/Classes/OpenAPIs/project.yml @@ -0,0 +1,15 @@ +name: TestClient +targets: + TestClient: + type: framework + platform: iOS + deploymentTarget: "10.0" + sources: [TestClient] + info: + path: ./Info.plist + settings: + APPLICATION_EXTENSION_API_ONLY: true + SWIFT_VERSION: "5.0" + dependencies: + - carthage: Alamofire + diff --git a/samples/client/test/swift5default/docs/AllPrimitives.md b/samples/client/test/swift5default/docs/AllPrimitives.md new file mode 100644 index 00000000000..1cfa94eaf73 --- /dev/null +++ b/samples/client/test/swift5default/docs/AllPrimitives.md @@ -0,0 +1,34 @@ +# AllPrimitives + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myInteger** | **Int** | | [optional] +**myIntegerArray** | **[Int]** | | [optional] +**myLong** | **Int64** | | [optional] +**myLongArray** | **[Int64]** | | [optional] +**myFloat** | **Float** | | [optional] +**myFloatArray** | **[Float]** | | [optional] +**myDouble** | **Double** | | [optional] +**myDoubleArray** | **[Double]** | | [optional] +**myString** | **String** | | [optional] +**myStringArray** | **[String]** | | [optional] +**myBytes** | **Data** | | [optional] +**myBytesArray** | **[Data]** | | [optional] +**myBoolean** | **Bool** | | [optional] +**myBooleanArray** | **[Bool]** | | [optional] +**myDate** | **Date** | | [optional] +**myDateArray** | **[Date]** | | [optional] +**myDateTime** | **Date** | | [optional] +**myDateTimeArray** | **[Date]** | | [optional] +**myFile** | **URL** | | [optional] +**myFileArray** | **[URL]** | | [optional] +**myUUID** | **UUID** | | [optional] +**myUUIDArray** | **[UUID]** | | [optional] +**myStringEnum** | [**StringEnum**](StringEnum.md) | | [optional] +**myStringEnumArray** | [StringEnum] | | [optional] +**myInlineStringEnum** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5default/docs/BaseCard.md b/samples/client/test/swift5default/docs/BaseCard.md new file mode 100644 index 00000000000..42d41b7db13 --- /dev/null +++ b/samples/client/test/swift5default/docs/BaseCard.md @@ -0,0 +1,10 @@ +# BaseCard + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cardType** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5default/docs/ErrorInfo.md b/samples/client/test/swift5default/docs/ErrorInfo.md new file mode 100644 index 00000000000..5cc21d73ae1 --- /dev/null +++ b/samples/client/test/swift5default/docs/ErrorInfo.md @@ -0,0 +1,12 @@ +# ErrorInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Int** | | [optional] +**message** | **String** | | [optional] +**details** | **[String]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5default/docs/GetAllModelsResult.md b/samples/client/test/swift5default/docs/GetAllModelsResult.md new file mode 100644 index 00000000000..4de449547ae --- /dev/null +++ b/samples/client/test/swift5default/docs/GetAllModelsResult.md @@ -0,0 +1,12 @@ +# GetAllModelsResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myPrimitiveArray** | [AllPrimitives] | | [optional] +**myPrimitive** | [**AllPrimitives**](AllPrimitives.md) | | [optional] +**myVariableNameTest** | [**VariableNameTest**](VariableNameTest.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5default/docs/ModelWithPropertiesAndAdditionalProperties.md b/samples/client/test/swift5default/docs/ModelWithPropertiesAndAdditionalProperties.md new file mode 100644 index 00000000000..098c03d6882 --- /dev/null +++ b/samples/client/test/swift5default/docs/ModelWithPropertiesAndAdditionalProperties.md @@ -0,0 +1,17 @@ +# ModelWithPropertiesAndAdditionalProperties + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myIntegerReq** | **Int** | | +**myIntegerOpt** | **Int** | | [optional] +**myPrimitiveReq** | [**AllPrimitives**](AllPrimitives.md) | | +**myPrimitiveOpt** | [**AllPrimitives**](AllPrimitives.md) | | [optional] +**myStringArrayReq** | **[String]** | | +**myStringArrayOpt** | **[String]** | | [optional] +**myPrimitiveArrayReq** | [AllPrimitives] | | +**myPrimitiveArrayOpt** | [AllPrimitives] | | [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/test/swift5default/docs/PersonCard.md b/samples/client/test/swift5default/docs/PersonCard.md new file mode 100644 index 00000000000..385299f8768 --- /dev/null +++ b/samples/client/test/swift5default/docs/PersonCard.md @@ -0,0 +1,11 @@ +# PersonCard + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5default/docs/PersonCardAllOf.md b/samples/client/test/swift5default/docs/PersonCardAllOf.md new file mode 100644 index 00000000000..e4b78f76c9e --- /dev/null +++ b/samples/client/test/swift5default/docs/PersonCardAllOf.md @@ -0,0 +1,11 @@ +# PersonCardAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5default/docs/PlaceCard.md b/samples/client/test/swift5default/docs/PlaceCard.md new file mode 100644 index 00000000000..87002357ce0 --- /dev/null +++ b/samples/client/test/swift5default/docs/PlaceCard.md @@ -0,0 +1,11 @@ +# PlaceCard + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**placeName** | **String** | | [optional] +**placeAddress** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5default/docs/PlaceCardAllOf.md b/samples/client/test/swift5default/docs/PlaceCardAllOf.md new file mode 100644 index 00000000000..5ed8d8a4d0e --- /dev/null +++ b/samples/client/test/swift5default/docs/PlaceCardAllOf.md @@ -0,0 +1,11 @@ +# PlaceCardAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**placeName** | **String** | | [optional] +**placeAddress** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5default/docs/SampleBase.md b/samples/client/test/swift5default/docs/SampleBase.md new file mode 100644 index 00000000000..a7c7ac9722d --- /dev/null +++ b/samples/client/test/swift5default/docs/SampleBase.md @@ -0,0 +1,11 @@ +# SampleBase + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**baseClassStringProp** | **String** | | [optional] +**baseClassIntegerProp** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5default/docs/SampleSubClass.md b/samples/client/test/swift5default/docs/SampleSubClass.md new file mode 100644 index 00000000000..435633ccde1 --- /dev/null +++ b/samples/client/test/swift5default/docs/SampleSubClass.md @@ -0,0 +1,13 @@ +# SampleSubClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**baseClassStringProp** | **String** | | [optional] +**baseClassIntegerProp** | **Int** | | [optional] +**subClassStringProp** | **String** | | [optional] +**subClassIntegerProp** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5default/docs/SampleSubClassAllOf.md b/samples/client/test/swift5default/docs/SampleSubClassAllOf.md new file mode 100644 index 00000000000..50a64944e82 --- /dev/null +++ b/samples/client/test/swift5default/docs/SampleSubClassAllOf.md @@ -0,0 +1,11 @@ +# SampleSubClassAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**subClassStringProp** | **String** | | [optional] +**subClassIntegerProp** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5default/docs/StringEnum.md b/samples/client/test/swift5default/docs/StringEnum.md new file mode 100644 index 00000000000..b0009f7e826 --- /dev/null +++ b/samples/client/test/swift5default/docs/StringEnum.md @@ -0,0 +1,9 @@ +# StringEnum + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5default/docs/Swift4TestAPI.md b/samples/client/test/swift5default/docs/Swift4TestAPI.md new file mode 100644 index 00000000000..b6ea64ba252 --- /dev/null +++ b/samples/client/test/swift5default/docs/Swift4TestAPI.md @@ -0,0 +1,59 @@ +# Swift4TestAPI + +All URIs are relative to *http://api.example.com/basePath* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getAllModels**](Swift4TestAPI.md#getallmodels) | **GET** /allModels | Get all of the models + + +# **getAllModels** +```swift + open class func getAllModels(clientId: String, completion: @escaping (_ data: GetAllModelsResult?, _ error: Error?) -> Void) +``` + +Get all of the models + +This endpoint tests get a dictionary which contains examples of all of the models. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import TestClient + +let clientId = "clientId_example" // String | id that represent the Api client + +// Get all of the models +Swift4TestAPI.getAllModels(clientId: clientId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **clientId** | **String** | id that represent the Api client | + +### Return type + +[**GetAllModelsResult**](GetAllModelsResult.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/test/swift5default/docs/VariableNameTest.md b/samples/client/test/swift5default/docs/VariableNameTest.md new file mode 100644 index 00000000000..d5369e75f1b --- /dev/null +++ b/samples/client/test/swift5default/docs/VariableNameTest.md @@ -0,0 +1,12 @@ +# VariableNameTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exampleName** | **String** | This snake-case examle_name property name should be converted to a camelCase variable name like exampleName | [optional] +**_for** | **String** | This property name is a reserved word in most languages, including Swift 4. | [optional] +**normalName** | **String** | This model object property name should be unchanged from the JSON property name. | [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/test/swift5default/git_push.sh b/samples/client/test/swift5default/git_push.sh new file mode 100644 index 00000000000..8442b80bb44 --- /dev/null +++ b/samples/client/test/swift5default/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/samples/client/test/swift5default/project.yml b/samples/client/test/swift5default/project.yml new file mode 100644 index 00000000000..95eb15bdf3f --- /dev/null +++ b/samples/client/test/swift5default/project.yml @@ -0,0 +1,15 @@ +name: TestClient +targets: + TestClient: + type: framework + platform: iOS + deploymentTarget: "10.0" + sources: [TestClient] + info: + path: ./Info.plist + version: 1.0 + settings: + APPLICATION_EXTENSION_API_ONLY: true + SWIFT_VERSION: "5.0" + scheme: {} +