mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-06 02:25:20 +00:00
[Swift4] Introduce XcodeGen (#3396)
* add XcodeGen.mustache * generate code * add dependencies
This commit is contained in:
parent
1413775e0e
commit
5cba55f8fb
@ -30,3 +30,13 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift4 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore-objcCompatible.json -o samples/client/petstore/swift4/objcCompatible $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/objcCompatible
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/objcCompatible
|
||||
swiftlint autocorrect
|
||||
fi
|
@ -30,3 +30,13 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore-promisekit.json -o samples/client/petstore/swift4/promisekit --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/promisekit
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/promisekit
|
||||
swiftlint autocorrect
|
||||
fi
|
@ -30,3 +30,13 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore-rxswift.json -o samples/client/petstore/swift4/rxswift --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/rxswift
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/rxswift
|
||||
swiftlint autocorrect
|
||||
fi
|
@ -30,3 +30,13 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore-unwrapRequired.json -o samples/client/petstore/swift4/unwrapRequired --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/unwrapRequired
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/unwrapRequired
|
||||
swiftlint autocorrect
|
||||
fi
|
@ -30,3 +30,13 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore.json -o samples/client/petstore/swift4/default --generate-alias-as-model $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/default
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/petstore/swift4/default
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
|
@ -30,3 +30,13 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift4Test.json -g swift4 -c ./bin/swift4-test.json -o samples/client/test/swift4/default $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
if type "xcodegen" > /dev/null 2>&1; then
|
||||
cd samples/client/test/swift4/default
|
||||
xcodegen generate
|
||||
fi
|
||||
|
||||
if type "swiftlint" > /dev/null 2>&1; then
|
||||
cd samples/client/test/swift4/default
|
||||
swiftlint autocorrect
|
||||
fi
|
||||
|
@ -421,6 +421,9 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig {
|
||||
supportingFiles.add(new SupportingFile("README.mustache",
|
||||
"",
|
||||
"README.md"));
|
||||
supportingFiles.add(new SupportingFile("XcodeGen.mustache",
|
||||
"",
|
||||
"project.yml"));
|
||||
|
||||
}
|
||||
|
||||
|
17
modules/openapi-generator/src/main/resources/swift4/XcodeGen.mustache
vendored
Normal file
17
modules/openapi-generator/src/main/resources/swift4/XcodeGen.mustache
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
name: {{projectName}}
|
||||
targets:
|
||||
{{projectName}}:
|
||||
type: framework
|
||||
platform: iOS
|
||||
deploymentTarget: "10.0"
|
||||
sources: [{{projectName}}]
|
||||
info:
|
||||
path: ./Info.plist
|
||||
version: {{#podVersion}}{{podVersion}}{{/podVersion}}{{^podVersion}}{{#apiInfo}}{{version}}{{/apiInfo}}{{^apiInfo}}}0.0.1{{/apiInfo}}{{/podVersion}}
|
||||
settings:
|
||||
APPLICATION_EXTENSION_API_ONLY: true
|
||||
scheme: {}
|
||||
dependencies:
|
||||
- carthage: Alamofire{{#useRxSwift}}
|
||||
- carthage: RxSwift{{/useRxSwift}}{{#usePromiseKit}}
|
||||
- carthage: PromiseKit{{/usePromiseKit}}
|
@ -1 +1 @@
|
||||
4.0.0-SNAPSHOT
|
||||
4.1.0-SNAPSHOT
|
22
samples/client/petstore/swift4/default/Info.plist
Normal file
22
samples/client/petstore/swift4/default/Info.plist
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1,569 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 50;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
02903CEC38DC202565BC08CB040AC4E9 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */; };
|
||||
0462F801432CF94C7EF51D0532737A7E /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */; };
|
||||
08D87E4FECF24910F0DA0F1D2E2D955A /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */; };
|
||||
1143FFF06DEE01E5B0F1368AA05BE1B4 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */; };
|
||||
122BBAE8245606CC040EEB6B9254E376 /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */; };
|
||||
12327BF7304AA897C5D2A1250B1659B7 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */; };
|
||||
12BB95C66D63090732BB9E0379836E3C /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */; };
|
||||
16E9A5E22B4823DE282E7F4C18A21EA8 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */; };
|
||||
18F19872A0DFB4CC3D9C696BBCA64EFD /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */; };
|
||||
196E9846B27D736630CCF90497696859 /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */; };
|
||||
271D94A05C47B602A2433B9CD3D9DCDC /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */; };
|
||||
293F4E0FBFC8297E414A3CDBB7F29A96 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */; };
|
||||
297E365D1E4672C43C56E0AFD855FFBF /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */; };
|
||||
2A35688C985E9CB1EB7732AC2AD46B82 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */; };
|
||||
2DF4544D4D3D6CF7047A59FB89ED31BD /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */; };
|
||||
3251A3722981CE46261615CFBA96A08D /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */; };
|
||||
36734C4EB3362A114A7CB5F25EE39E6D /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */; };
|
||||
3D8E407B1DF4FA5A5F16B64E3A285781 /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */; };
|
||||
41D8A105135868152A56E2AC475049BB /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */; };
|
||||
42C51BC034E8B0CAA29A068F6B0DC815 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */; };
|
||||
491676EC91BFEF95A12556888EED87B5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */; };
|
||||
4C28BFEC5E7C8150DEFD83E09C1A1D32 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */; };
|
||||
58F9704B295AC436D6FB98FA669E2344 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */; };
|
||||
59C00CBB07761CAC8DCE7054E34AD5D9 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */; };
|
||||
59C2F5495C98836BFA9E10BF5C13BC2C /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */; };
|
||||
5ACDD7CC312167589335E9CA5998E770 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */; };
|
||||
655AA371771C7BD72EE0AAC0C90DFFF0 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */; };
|
||||
6600BB1500AE35A3C80F7C83F6444552 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */; };
|
||||
6CD20EE568DDAD2304BF0C4B1A70C8DC /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */; };
|
||||
7367A9D91D4B101F2D28AC56ED89F175 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */; };
|
||||
82D4D0C8AD0354A700C8ACD421ABED55 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */; };
|
||||
83A2D1863FB136C0DFC423319F4EED65 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */; };
|
||||
92FB161BF1E57D11B116AF0292D5835C /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718FF4525C81 /* Client.swift */; };
|
||||
97C99615237E1B662242E04F527B38B9 /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */; };
|
||||
A190AF5A3988639ED4B78163D0EA3CA4 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */; };
|
||||
A438970025AE69ED407BC1E67CC6359E /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */; };
|
||||
A9F1AAF6CE029DD3B4F8AC841F0B6BC6 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */; };
|
||||
AE9D2E1DB59AF6575AC4AC6756C5A937 /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */; };
|
||||
B399A1742F23330FDCA450EAB98F51F1 /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */; };
|
||||
BF7D58FBCF5E4D3F2932FCC0E62BED40 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */; };
|
||||
C15AC1CC631E96D0360EB8C15BF30452 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */; };
|
||||
C1CACABE18A7ADCE37D1CD9DC9128304 /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A4315C49A /* List.swift */; };
|
||||
C2EDEB747887399B13A6DFD72A219CB2 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */; };
|
||||
C329EE55B2FCC9174ED3B128D67C5E8C /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */; };
|
||||
D3A17B7FAFA8A7A210875BBCDCC30116 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */; };
|
||||
D70EC94E346077DE1482231DD4498BED /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */; };
|
||||
DB1CE39011A741D07E187663291B5DE5 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */; };
|
||||
DB724C4F1AD5DF025B53A9A2E0A49E3D /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */; };
|
||||
DDBC3CF5E447D8D838F0FE200420EEE3 /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */; };
|
||||
DEC892724574BB29BD65869374F83982 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */; };
|
||||
E2C40F0E34DB8C21A806262C72841A51 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118F057604D /* SpecialModelName.swift */; };
|
||||
E51ADEC931806B20A041303E539A8BE2 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */; };
|
||||
F02BEF9A8503B3848B045370451E85F6 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4CF550442B /* Models.swift */; };
|
||||
F21D10C71A9DE7D0467AFD23FD391D2E /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08AA65292F7 /* Return.swift */; };
|
||||
FB4A053CDCD75E48B755CC22D463A3FC /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */; };
|
||||
FECA03F0388E84AE1B22638605D8AC9F /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = "<group>"; };
|
||||
10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = "<group>"; };
|
||||
164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = "<group>"; };
|
||||
212AA914B7F1793A4E32C119370FB05F /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = "<group>"; };
|
||||
27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = "<group>"; };
|
||||
28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = "<group>"; };
|
||||
3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = "<group>"; };
|
||||
35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = "<group>"; };
|
||||
37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = "<group>"; };
|
||||
386FD590658E90509C121118F057604D /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = "<group>"; };
|
||||
3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = "<group>"; };
|
||||
396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = "<group>"; };
|
||||
3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = "<group>"; };
|
||||
3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = "<group>"; };
|
||||
47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = "<group>"; };
|
||||
4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = "<group>"; };
|
||||
4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = "<group>"; };
|
||||
4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = "<group>"; };
|
||||
5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = "<group>"; };
|
||||
6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = "<group>"; };
|
||||
6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = "<group>"; };
|
||||
6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = "<group>"; };
|
||||
7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = "<group>"; };
|
||||
7A6070F581E611FF44AFD40A4315C49A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = "<group>"; };
|
||||
7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = "<group>"; };
|
||||
7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = "<group>"; };
|
||||
82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = "<group>"; };
|
||||
84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = "<group>"; };
|
||||
8699F7966F748ED026A6FB4CF550442B /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = "<group>"; };
|
||||
897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = "<group>"; };
|
||||
8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = "<group>"; };
|
||||
95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = "<group>"; };
|
||||
9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = "<group>"; };
|
||||
9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = "<group>"; };
|
||||
9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = "<group>"; };
|
||||
9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = "<group>"; };
|
||||
A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = "<group>"; };
|
||||
A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = "<group>"; };
|
||||
A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = "<group>"; };
|
||||
A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = "<group>"; };
|
||||
A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = "<group>"; };
|
||||
A913A57E72D723632E9A718FF4525C81 /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = "<group>"; };
|
||||
B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = "<group>"; };
|
||||
B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = "<group>"; };
|
||||
B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = "<group>"; };
|
||||
B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; };
|
||||
B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = "<group>"; };
|
||||
C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = "<group>"; };
|
||||
C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = "<group>"; };
|
||||
C81447828475F76C5CF4F08AA65292F7 /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = "<group>"; };
|
||||
E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = "<group>"; };
|
||||
EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = "<group>"; };
|
||||
ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = "<group>"; };
|
||||
F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = "<group>"; };
|
||||
F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = "<group>"; };
|
||||
FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
D1990C2A394CCF025EF98A2FB828C79A /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4C28BFEC5E7C8150DEFD83E09C1A1D32 /* Alamofire.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
1E464C0937FE0D3A7A0FE29AF446553C /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7861EE241895128F64DD787367B3022D /* Carthage */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4FBDCF1330A9AB9122780DB3FA21DE4C /* Models */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */,
|
||||
95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */,
|
||||
8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */,
|
||||
A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */,
|
||||
7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */,
|
||||
B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */,
|
||||
F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */,
|
||||
A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */,
|
||||
212AA914B7F1793A4E32C119370FB05F /* Cat.swift */,
|
||||
3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */,
|
||||
6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */,
|
||||
3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */,
|
||||
A913A57E72D723632E9A718FF4525C81 /* Client.swift */,
|
||||
C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */,
|
||||
A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */,
|
||||
10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */,
|
||||
4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */,
|
||||
FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */,
|
||||
3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */,
|
||||
4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */,
|
||||
3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */,
|
||||
4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */,
|
||||
7A6070F581E611FF44AFD40A4315C49A /* List.swift */,
|
||||
7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */,
|
||||
9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */,
|
||||
82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */,
|
||||
5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */,
|
||||
B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */,
|
||||
27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */,
|
||||
F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */,
|
||||
C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */,
|
||||
ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */,
|
||||
6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */,
|
||||
C81447828475F76C5CF4F08AA65292F7 /* Return.swift */,
|
||||
386FD590658E90509C121118F057604D /* SpecialModelName.swift */,
|
||||
47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */,
|
||||
B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */,
|
||||
EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */,
|
||||
19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */,
|
||||
E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */,
|
||||
);
|
||||
path = Models;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5FBA6AE5F64CD737F88B4565AC3CCD3B = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9B364C01750D7AA4F983B9E77B01BCC6 /* PetstoreClient */,
|
||||
1E464C0937FE0D3A7A0FE29AF446553C /* Frameworks */,
|
||||
857F0DEA1890CE66D6DAD556C55821A6 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
67BF3478113E6B4DF1C4E04F40BF58C4 /* OpenAPIs */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */,
|
||||
897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */,
|
||||
37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */,
|
||||
02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */,
|
||||
28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */,
|
||||
B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */,
|
||||
9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */,
|
||||
35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */,
|
||||
8699F7966F748ED026A6FB4CF550442B /* Models.swift */,
|
||||
F956D0CCAE23BCFD1C7BDD5D47944AA5 /* APIs */,
|
||||
4FBDCF1330A9AB9122780DB3FA21DE4C /* Models */,
|
||||
);
|
||||
path = OpenAPIs;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
7861EE241895128F64DD787367B3022D /* Carthage */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A012205B41CB71A62B86EECDEAFB0990 /* iOS */,
|
||||
);
|
||||
name = Carthage;
|
||||
path = Carthage/Build;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
857F0DEA1890CE66D6DAD556C55821A6 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9B364C01750D7AA4F983B9E77B01BCC6 /* PetstoreClient */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EF4C81BDD734856ED5023B777D35098B /* Classes */,
|
||||
);
|
||||
path = PetstoreClient;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A012205B41CB71A62B86EECDEAFB0990 /* iOS */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */,
|
||||
);
|
||||
path = iOS;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EF4C81BDD734856ED5023B777D35098B /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
67BF3478113E6B4DF1C4E04F40BF58C4 /* OpenAPIs */,
|
||||
);
|
||||
path = Classes;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F956D0CCAE23BCFD1C7BDD5D47944AA5 /* APIs */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */,
|
||||
6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */,
|
||||
B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */,
|
||||
9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */,
|
||||
A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */,
|
||||
7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */,
|
||||
);
|
||||
path = APIs;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
C1282C2230015E0D204BEAEDDFB49453 /* PetstoreClient */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = B46EDEB1A7F0D78FE6394544C60169D1 /* Build configuration list for PBXNativeTarget "PetstoreClient" */;
|
||||
buildPhases = (
|
||||
E539708354CE60FE486F81EDE56D13C8 /* Sources */,
|
||||
D1990C2A394CCF025EF98A2FB828C79A /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = PetstoreClient;
|
||||
productName = PetstoreClient;
|
||||
productReference = 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
E7D276EE2369D8C455513C2E05F9AED0 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1000;
|
||||
};
|
||||
buildConfigurationList = ECAB17FF35111B5E14DAAC0883031714 /* Build configuration list for PBXProject "PetstoreClient" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 5FBA6AE5F64CD737F88B4565AC3CCD3B;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
C1282C2230015E0D204BEAEDDFB49453 /* PetstoreClient */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
E539708354CE60FE486F81EDE56D13C8 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2A35688C985E9CB1EB7732AC2AD46B82 /* APIHelper.swift in Sources */,
|
||||
0462F801432CF94C7EF51D0532737A7E /* APIs.swift in Sources */,
|
||||
12327BF7304AA897C5D2A1250B1659B7 /* AdditionalPropertiesClass.swift in Sources */,
|
||||
58F9704B295AC436D6FB98FA669E2344 /* AlamofireImplementations.swift in Sources */,
|
||||
02903CEC38DC202565BC08CB040AC4E9 /* Animal.swift in Sources */,
|
||||
DB1CE39011A741D07E187663291B5DE5 /* AnimalFarm.swift in Sources */,
|
||||
83A2D1863FB136C0DFC423319F4EED65 /* AnotherFakeAPI.swift in Sources */,
|
||||
97C99615237E1B662242E04F527B38B9 /* ApiResponse.swift in Sources */,
|
||||
3251A3722981CE46261615CFBA96A08D /* ArrayOfArrayOfNumberOnly.swift in Sources */,
|
||||
A190AF5A3988639ED4B78163D0EA3CA4 /* ArrayOfNumberOnly.swift in Sources */,
|
||||
C2EDEB747887399B13A6DFD72A219CB2 /* ArrayTest.swift in Sources */,
|
||||
7367A9D91D4B101F2D28AC56ED89F175 /* Capitalization.swift in Sources */,
|
||||
18F19872A0DFB4CC3D9C696BBCA64EFD /* Cat.swift in Sources */,
|
||||
41D8A105135868152A56E2AC475049BB /* CatAllOf.swift in Sources */,
|
||||
42C51BC034E8B0CAA29A068F6B0DC815 /* Category.swift in Sources */,
|
||||
5ACDD7CC312167589335E9CA5998E770 /* ClassModel.swift in Sources */,
|
||||
92FB161BF1E57D11B116AF0292D5835C /* Client.swift in Sources */,
|
||||
6CD20EE568DDAD2304BF0C4B1A70C8DC /* CodableHelper.swift in Sources */,
|
||||
DEC892724574BB29BD65869374F83982 /* Configuration.swift in Sources */,
|
||||
D70EC94E346077DE1482231DD4498BED /* Dog.swift in Sources */,
|
||||
271D94A05C47B602A2433B9CD3D9DCDC /* DogAllOf.swift in Sources */,
|
||||
A438970025AE69ED407BC1E67CC6359E /* EnumArrays.swift in Sources */,
|
||||
59C00CBB07761CAC8DCE7054E34AD5D9 /* EnumClass.swift in Sources */,
|
||||
08D87E4FECF24910F0DA0F1D2E2D955A /* EnumTest.swift in Sources */,
|
||||
C329EE55B2FCC9174ED3B128D67C5E8C /* Extensions.swift in Sources */,
|
||||
297E365D1E4672C43C56E0AFD855FFBF /* FakeAPI.swift in Sources */,
|
||||
A9F1AAF6CE029DD3B4F8AC841F0B6BC6 /* FakeClassnameTags123API.swift in Sources */,
|
||||
FECA03F0388E84AE1B22638605D8AC9F /* File.swift in Sources */,
|
||||
491676EC91BFEF95A12556888EED87B5 /* FileSchemaTestClass.swift in Sources */,
|
||||
36734C4EB3362A114A7CB5F25EE39E6D /* FormatTest.swift in Sources */,
|
||||
DDBC3CF5E447D8D838F0FE200420EEE3 /* HasOnlyReadOnly.swift in Sources */,
|
||||
16E9A5E22B4823DE282E7F4C18A21EA8 /* JSONEncodableEncoding.swift in Sources */,
|
||||
12BB95C66D63090732BB9E0379836E3C /* JSONEncodingHelper.swift in Sources */,
|
||||
C1CACABE18A7ADCE37D1CD9DC9128304 /* List.swift in Sources */,
|
||||
655AA371771C7BD72EE0AAC0C90DFFF0 /* MapTest.swift in Sources */,
|
||||
D3A17B7FAFA8A7A210875BBCDCC30116 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */,
|
||||
2DF4544D4D3D6CF7047A59FB89ED31BD /* Model200Response.swift in Sources */,
|
||||
F02BEF9A8503B3848B045370451E85F6 /* Models.swift in Sources */,
|
||||
C15AC1CC631E96D0360EB8C15BF30452 /* Name.swift in Sources */,
|
||||
AE9D2E1DB59AF6575AC4AC6756C5A937 /* NumberOnly.swift in Sources */,
|
||||
59C2F5495C98836BFA9E10BF5C13BC2C /* Order.swift in Sources */,
|
||||
82D4D0C8AD0354A700C8ACD421ABED55 /* OuterComposite.swift in Sources */,
|
||||
1143FFF06DEE01E5B0F1368AA05BE1B4 /* OuterEnum.swift in Sources */,
|
||||
B399A1742F23330FDCA450EAB98F51F1 /* Pet.swift in Sources */,
|
||||
3D8E407B1DF4FA5A5F16B64E3A285781 /* PetAPI.swift in Sources */,
|
||||
293F4E0FBFC8297E414A3CDBB7F29A96 /* ReadOnlyFirst.swift in Sources */,
|
||||
F21D10C71A9DE7D0467AFD23FD391D2E /* Return.swift in Sources */,
|
||||
E2C40F0E34DB8C21A806262C72841A51 /* SpecialModelName.swift in Sources */,
|
||||
122BBAE8245606CC040EEB6B9254E376 /* StoreAPI.swift in Sources */,
|
||||
196E9846B27D736630CCF90497696859 /* StringBooleanMap.swift in Sources */,
|
||||
E51ADEC931806B20A041303E539A8BE2 /* Tag.swift in Sources */,
|
||||
6600BB1500AE35A3C80F7C83F6444552 /* TypeHolderDefault.swift in Sources */,
|
||||
FB4A053CDCD75E48B755CC22D463A3FC /* TypeHolderExample.swift in Sources */,
|
||||
BF7D58FBCF5E4D3F2932FCC0E62BED40 /* User.swift in Sources */,
|
||||
DB724C4F1AD5DF025B53A9A2E0A49E3D /* UserAPI.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
3B2C02AFB91CB5C82766ED5CF21FF628 /* 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;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
A9EB0A02B94C427CBACFEC7CFFC6A816 /* 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 = 4.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
DD3EEB93949E9EBA4437E9CDBF4A26F6 /* 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;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
F81D4E5FECD46E9AA6DD2C299CEBEF64 /* 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_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_VERSION = 4.2;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
B46EDEB1A7F0D78FE6394544C60169D1 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
DD3EEB93949E9EBA4437E9CDBF4A26F6 /* Debug */,
|
||||
3B2C02AFB91CB5C82766ED5CF21FF628 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = "";
|
||||
};
|
||||
ECAB17FF35111B5E14DAAC0883031714 /* Build configuration list for PBXProject "PetstoreClient" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
A9EB0A02B94C427CBACFEC7CFFC6A816 /* Debug */,
|
||||
F81D4E5FECD46E9AA6DD2C299CEBEF64 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = E7D276EE2369D8C455513C2E05F9AED0 /* Project object */;
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1000"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C1282C2230015E0D204BEAEDDFB49453"
|
||||
BuildableName = "PetstoreClient.framework"
|
||||
BlueprintName = "PetstoreClient"
|
||||
ReferencedContainer = "container:PetstoreClient.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C1282C2230015E0D204BEAEDDFB49453"
|
||||
BuildableName = "PetstoreClient.framework"
|
||||
BlueprintName = "PetstoreClient"
|
||||
ReferencedContainer = "container:PetstoreClient.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C1282C2230015E0D204BEAEDDFB49453"
|
||||
BuildableName = "PetstoreClient.framework"
|
||||
BlueprintName = "PetstoreClient"
|
||||
ReferencedContainer = "container:PetstoreClient.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C1282C2230015E0D204BEAEDDFB49453"
|
||||
BuildableName = "PetstoreClient.framework"
|
||||
BlueprintName = "PetstoreClient"
|
||||
ReferencedContainer = "container:PetstoreClient.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -7,7 +7,7 @@
|
||||
import Foundation
|
||||
|
||||
public struct APIHelper {
|
||||
public static func rejectNil(_ source: [String:Any?]) -> [String:Any]? {
|
||||
public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? {
|
||||
let destination = source.reduce(into: [String: Any]()) { (result, item) in
|
||||
if let value = item.value {
|
||||
result[item.key] = value
|
||||
@ -20,17 +20,17 @@ public struct APIHelper {
|
||||
return destination
|
||||
}
|
||||
|
||||
public static func rejectNilHeaders(_ source: [String:Any?]) -> [String:String] {
|
||||
public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] {
|
||||
return source.reduce(into: [String: String]()) { (result, item) in
|
||||
if let collection = item.value as? Array<Any?> {
|
||||
result[item.key] = collection.filter({ $0 != nil }).map{ "\($0!)" }.joined(separator: ",")
|
||||
result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",")
|
||||
} else if let value: Any = item.value {
|
||||
result[item.key] = "\(value)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? {
|
||||
public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? {
|
||||
guard let source = source else {
|
||||
return nil
|
||||
}
|
||||
@ -52,7 +52,7 @@ public struct APIHelper {
|
||||
return source
|
||||
}
|
||||
|
||||
public static func mapValuesToQueryItems(_ source: [String:Any?]) -> [URLQueryItem]? {
|
||||
public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? {
|
||||
let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in
|
||||
if let collection = item.value as? Array<Any?> {
|
||||
let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",")
|
||||
@ -68,4 +68,3 @@ public struct APIHelper {
|
||||
return destination
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,22 +9,22 @@ import Foundation
|
||||
open class PetstoreClientAPI {
|
||||
public static var basePath = "http://petstore.swagger.io:80/v2"
|
||||
public static var credential: URLCredential?
|
||||
public static var customHeaders: [String:String] = [:]
|
||||
public static var customHeaders: [String: String] = [:]
|
||||
public static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()
|
||||
}
|
||||
|
||||
open class RequestBuilder<T> {
|
||||
var credential: URLCredential?
|
||||
var headers: [String:String]
|
||||
public let parameters: [String:Any]?
|
||||
var headers: [String: String]
|
||||
public let parameters: [String: Any]?
|
||||
public let isBody: Bool
|
||||
public let method: String
|
||||
public let URLString: String
|
||||
|
||||
/// Optional block to obtain a reference to the request's progress instance when available.
|
||||
public var onProgressReady: ((Progress) -> ())?
|
||||
public var onProgressReady: ((Progress) -> Void)?
|
||||
|
||||
required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) {
|
||||
required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
|
||||
self.method = method
|
||||
self.URLString = URLString
|
||||
self.parameters = parameters
|
||||
@ -34,7 +34,7 @@ open class RequestBuilder<T> {
|
||||
addHeaders(PetstoreClientAPI.customHeaders)
|
||||
}
|
||||
|
||||
open func addHeaders(_ aHeaders:[String:String]) {
|
||||
open func addHeaders(_ aHeaders: [String: String]) {
|
||||
for (header, value) in aHeaders {
|
||||
headers[header] = value
|
||||
}
|
||||
@ -57,5 +57,5 @@ open class RequestBuilder<T> {
|
||||
|
||||
public protocol RequestBuilderFactory {
|
||||
func getNonDecodableBuilder<T>() -> RequestBuilder<T>.Type
|
||||
func getBuilder<T:Decodable>() -> RequestBuilder<T>.Type
|
||||
func getBuilder<T: Decodable>() -> RequestBuilder<T>.Type
|
||||
}
|
||||
|
@ -8,8 +8,6 @@
|
||||
import Foundation
|
||||
import Alamofire
|
||||
|
||||
|
||||
|
||||
open class AnotherFakeAPI {
|
||||
/**
|
||||
To test special tags
|
||||
@ -17,7 +15,7 @@ open class AnotherFakeAPI {
|
||||
- parameter body: (body) client model
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func call123testSpecialTags(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) {
|
||||
open class func call123testSpecialTags(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) {
|
||||
call123testSpecialTagsWithRequestBuilder(body: body).execute { (response, error) -> Void in
|
||||
completion(response?.body, error)
|
||||
}
|
||||
|
@ -8,15 +8,13 @@
|
||||
import Foundation
|
||||
import Alamofire
|
||||
|
||||
|
||||
|
||||
open class FakeAPI {
|
||||
/**
|
||||
|
||||
- parameter body: (body) Input boolean as post body (optional)
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping ((_ data: Bool?,_ error: Error?) -> Void)) {
|
||||
open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) {
|
||||
fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in
|
||||
completion(response?.body, error)
|
||||
}
|
||||
@ -45,7 +43,7 @@ open class FakeAPI {
|
||||
- parameter body: (body) Input composite as post body (optional)
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping ((_ data: OuterComposite?,_ error: Error?) -> Void)) {
|
||||
open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) {
|
||||
fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in
|
||||
completion(response?.body, error)
|
||||
}
|
||||
@ -74,7 +72,7 @@ open class FakeAPI {
|
||||
- parameter body: (body) Input number as post body (optional)
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping ((_ data: Double?,_ error: Error?) -> Void)) {
|
||||
open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) {
|
||||
fakeOuterNumberSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in
|
||||
completion(response?.body, error)
|
||||
}
|
||||
@ -103,7 +101,7 @@ open class FakeAPI {
|
||||
- parameter body: (body) Input string as post body (optional)
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) {
|
||||
open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) {
|
||||
fakeOuterStringSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in
|
||||
completion(response?.body, error)
|
||||
}
|
||||
@ -132,7 +130,7 @@ open class FakeAPI {
|
||||
- parameter body: (body)
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
||||
open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (response, error) -> Void in
|
||||
if error == nil {
|
||||
completion((), error)
|
||||
@ -166,7 +164,7 @@ open class FakeAPI {
|
||||
- parameter body: (body)
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
||||
open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (response, error) -> Void in
|
||||
if error == nil {
|
||||
completion((), error)
|
||||
@ -203,7 +201,7 @@ open class FakeAPI {
|
||||
- parameter body: (body) client model
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func testClientModel(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) {
|
||||
open class func testClientModel(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) {
|
||||
testClientModelWithRequestBuilder(body: body).execute { (response, error) -> Void in
|
||||
completion(response?.body, error)
|
||||
}
|
||||
@ -247,7 +245,7 @@ open class FakeAPI {
|
||||
- parameter callback: (form) None (optional)
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
||||
open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (response, error) -> Void in
|
||||
if error == nil {
|
||||
completion((), error)
|
||||
@ -283,7 +281,7 @@ open class FakeAPI {
|
||||
open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder<Void> {
|
||||
let path = "/fake"
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let formParams: [String:Any?] = [
|
||||
let formParams: [String: Any?] = [
|
||||
"integer": integer?.encodeToJSON(),
|
||||
"int32": int32?.encodeToJSON(),
|
||||
"int64": int64?.encodeToJSON(),
|
||||
@ -302,7 +300,7 @@ open class FakeAPI {
|
||||
|
||||
let nonNullParameters = APIHelper.rejectNil(formParams)
|
||||
let parameters = APIHelper.convertBoolToString(nonNullParameters)
|
||||
|
||||
|
||||
let url = URLComponents(string: URLString)
|
||||
|
||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
|
||||
@ -390,7 +388,7 @@ open class FakeAPI {
|
||||
- parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .-efg)
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
||||
open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (response, error) -> Void in
|
||||
if error == nil {
|
||||
completion((), error)
|
||||
@ -417,19 +415,19 @@ open class FakeAPI {
|
||||
open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder<Void> {
|
||||
let path = "/fake"
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let formParams: [String:Any?] = [
|
||||
let formParams: [String: Any?] = [
|
||||
"enum_form_string_array": enumFormStringArray,
|
||||
"enum_form_string": enumFormString?.rawValue
|
||||
]
|
||||
|
||||
let nonNullParameters = APIHelper.rejectNil(formParams)
|
||||
let parameters = APIHelper.convertBoolToString(nonNullParameters)
|
||||
|
||||
|
||||
var url = URLComponents(string: URLString)
|
||||
url?.queryItems = APIHelper.mapValuesToQueryItems([
|
||||
"enum_query_string_array": enumQueryStringArray,
|
||||
"enum_query_string": enumQueryString?.rawValue,
|
||||
"enum_query_integer": enumQueryInteger?.rawValue,
|
||||
"enum_query_string_array": enumQueryStringArray,
|
||||
"enum_query_string": enumQueryString?.rawValue,
|
||||
"enum_query_integer": enumQueryInteger?.rawValue,
|
||||
"enum_query_double": enumQueryDouble?.rawValue
|
||||
])
|
||||
let nillableHeaders: [String: Any?] = [
|
||||
@ -454,7 +452,7 @@ open class FakeAPI {
|
||||
- parameter int64Group: (query) Integer in group parameters (optional)
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
||||
open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (response, error) -> Void in
|
||||
if error == nil {
|
||||
completion((), error)
|
||||
@ -479,13 +477,13 @@ open class FakeAPI {
|
||||
open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder<Void> {
|
||||
let path = "/fake"
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let parameters: [String:Any]? = nil
|
||||
|
||||
let parameters: [String: Any]? = nil
|
||||
|
||||
var url = URLComponents(string: URLString)
|
||||
url?.queryItems = APIHelper.mapValuesToQueryItems([
|
||||
"required_string_group": requiredStringGroup.encodeToJSON(),
|
||||
"required_int64_group": requiredInt64Group.encodeToJSON(),
|
||||
"string_group": stringGroup?.encodeToJSON(),
|
||||
"required_string_group": requiredStringGroup.encodeToJSON(),
|
||||
"required_int64_group": requiredInt64Group.encodeToJSON(),
|
||||
"string_group": stringGroup?.encodeToJSON(),
|
||||
"int64_group": int64Group?.encodeToJSON()
|
||||
])
|
||||
let nillableHeaders: [String: Any?] = [
|
||||
@ -505,7 +503,7 @@ open class FakeAPI {
|
||||
- parameter param: (body) request body
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
||||
open class func testInlineAdditionalProperties(param: [String: String], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (response, error) -> Void in
|
||||
if error == nil {
|
||||
completion((), error)
|
||||
@ -521,7 +519,7 @@ open class FakeAPI {
|
||||
- parameter param: (body) request body
|
||||
- returns: RequestBuilder<Void>
|
||||
*/
|
||||
open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String:String]) -> RequestBuilder<Void> {
|
||||
open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder<Void> {
|
||||
let path = "/fake/inline-additionalProperties"
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param)
|
||||
@ -540,7 +538,7 @@ open class FakeAPI {
|
||||
- parameter param2: (form) field2
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func testJsonFormData(param: String, param2: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
||||
open class func testJsonFormData(param: String, param2: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (response, error) -> Void in
|
||||
if error == nil {
|
||||
completion((), error)
|
||||
@ -560,14 +558,14 @@ open class FakeAPI {
|
||||
open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder<Void> {
|
||||
let path = "/fake/jsonFormData"
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let formParams: [String:Any?] = [
|
||||
let formParams: [String: Any?] = [
|
||||
"param": param,
|
||||
"param2": param2
|
||||
]
|
||||
|
||||
let nonNullParameters = APIHelper.rejectNil(formParams)
|
||||
let parameters = APIHelper.convertBoolToString(nonNullParameters)
|
||||
|
||||
|
||||
let url = URLComponents(string: URLString)
|
||||
|
||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
|
||||
|
@ -8,8 +8,6 @@
|
||||
import Foundation
|
||||
import Alamofire
|
||||
|
||||
|
||||
|
||||
open class FakeClassnameTags123API {
|
||||
/**
|
||||
To test class name in snake case
|
||||
@ -17,7 +15,7 @@ open class FakeClassnameTags123API {
|
||||
- parameter body: (body) client model
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func testClassname(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) {
|
||||
open class func testClassname(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) {
|
||||
testClassnameWithRequestBuilder(body: body).execute { (response, error) -> Void in
|
||||
completion(response?.body, error)
|
||||
}
|
||||
|
@ -8,8 +8,6 @@
|
||||
import Foundation
|
||||
import Alamofire
|
||||
|
||||
|
||||
|
||||
open class PetAPI {
|
||||
/**
|
||||
Add a new pet to the store
|
||||
@ -17,7 +15,7 @@ open class PetAPI {
|
||||
- parameter body: (body) Pet object that needs to be added to the store
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func addPet(body: Pet, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
||||
open class func addPet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
addPetWithRequestBuilder(body: body).execute { (response, error) -> Void in
|
||||
if error == nil {
|
||||
completion((), error)
|
||||
@ -55,7 +53,7 @@ open class PetAPI {
|
||||
- parameter apiKey: (header) (optional)
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
||||
open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (response, error) -> Void in
|
||||
if error == nil {
|
||||
completion((), error)
|
||||
@ -81,8 +79,8 @@ open class PetAPI {
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil)
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let parameters: [String:Any]? = nil
|
||||
|
||||
let parameters: [String: Any]? = nil
|
||||
|
||||
let url = URLComponents(string: URLString)
|
||||
let nillableHeaders: [String: Any?] = [
|
||||
"api_key": apiKey
|
||||
@ -109,7 +107,7 @@ open class PetAPI {
|
||||
- parameter status: (query) Status values that need to be considered for filter
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func findPetsByStatus(status: [String], completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) {
|
||||
open class func findPetsByStatus(status: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) {
|
||||
findPetsByStatusWithRequestBuilder(status: status).execute { (response, error) -> Void in
|
||||
completion(response?.body, error)
|
||||
}
|
||||
@ -128,8 +126,8 @@ open class PetAPI {
|
||||
open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> {
|
||||
let path = "/pet/findByStatus"
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let parameters: [String:Any]? = nil
|
||||
|
||||
let parameters: [String: Any]? = nil
|
||||
|
||||
var url = URLComponents(string: URLString)
|
||||
url?.queryItems = APIHelper.mapValuesToQueryItems([
|
||||
"status": status
|
||||
@ -146,7 +144,7 @@ open class PetAPI {
|
||||
- parameter tags: (query) Tags to filter by
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func findPetsByTags(tags: [String], completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) {
|
||||
open class func findPetsByTags(tags: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) {
|
||||
findPetsByTagsWithRequestBuilder(tags: tags).execute { (response, error) -> Void in
|
||||
completion(response?.body, error)
|
||||
}
|
||||
@ -165,8 +163,8 @@ open class PetAPI {
|
||||
open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> {
|
||||
let path = "/pet/findByTags"
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let parameters: [String:Any]? = nil
|
||||
|
||||
let parameters: [String: Any]? = nil
|
||||
|
||||
var url = URLComponents(string: URLString)
|
||||
url?.queryItems = APIHelper.mapValuesToQueryItems([
|
||||
"tags": tags
|
||||
@ -183,7 +181,7 @@ open class PetAPI {
|
||||
- parameter petId: (path) ID of pet to return
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func getPetById(petId: Int64, completion: @escaping ((_ data: Pet?,_ error: Error?) -> Void)) {
|
||||
open class func getPetById(petId: Int64, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) {
|
||||
getPetByIdWithRequestBuilder(petId: petId).execute { (response, error) -> Void in
|
||||
completion(response?.body, error)
|
||||
}
|
||||
@ -205,8 +203,8 @@ open class PetAPI {
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil)
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let parameters: [String:Any]? = nil
|
||||
|
||||
let parameters: [String: Any]? = nil
|
||||
|
||||
let url = URLComponents(string: URLString)
|
||||
|
||||
let requestBuilder: RequestBuilder<Pet>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||
@ -220,7 +218,7 @@ open class PetAPI {
|
||||
- parameter body: (body) Pet object that needs to be added to the store
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func updatePet(body: Pet, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
||||
open class func updatePet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
updatePetWithRequestBuilder(body: body).execute { (response, error) -> Void in
|
||||
if error == nil {
|
||||
completion((), error)
|
||||
@ -259,7 +257,7 @@ open class PetAPI {
|
||||
- parameter status: (form) Updated status of the pet (optional)
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
||||
open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (response, error) -> Void in
|
||||
if error == nil {
|
||||
completion((), error)
|
||||
@ -286,14 +284,14 @@ open class PetAPI {
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil)
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let formParams: [String:Any?] = [
|
||||
let formParams: [String: Any?] = [
|
||||
"name": name,
|
||||
"status": status
|
||||
]
|
||||
|
||||
let nonNullParameters = APIHelper.rejectNil(formParams)
|
||||
let parameters = APIHelper.convertBoolToString(nonNullParameters)
|
||||
|
||||
|
||||
let url = URLComponents(string: URLString)
|
||||
|
||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
|
||||
@ -309,7 +307,7 @@ open class PetAPI {
|
||||
- parameter file: (form) file to upload (optional)
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) {
|
||||
open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (response, error) -> Void in
|
||||
completion(response?.body, error)
|
||||
}
|
||||
@ -332,14 +330,14 @@ open class PetAPI {
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil)
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let formParams: [String:Any?] = [
|
||||
let formParams: [String: Any?] = [
|
||||
"additionalMetadata": additionalMetadata,
|
||||
"file": file
|
||||
]
|
||||
|
||||
let nonNullParameters = APIHelper.rejectNil(formParams)
|
||||
let parameters = APIHelper.convertBoolToString(nonNullParameters)
|
||||
|
||||
|
||||
let url = URLComponents(string: URLString)
|
||||
|
||||
let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||
@ -355,7 +353,7 @@ open class PetAPI {
|
||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) {
|
||||
open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) {
|
||||
uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in
|
||||
completion(response?.body, error)
|
||||
}
|
||||
@ -378,14 +376,14 @@ open class PetAPI {
|
||||
let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil)
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let formParams: [String:Any?] = [
|
||||
let formParams: [String: Any?] = [
|
||||
"additionalMetadata": additionalMetadata,
|
||||
"requiredFile": requiredFile
|
||||
]
|
||||
|
||||
let nonNullParameters = APIHelper.rejectNil(formParams)
|
||||
let parameters = APIHelper.convertBoolToString(nonNullParameters)
|
||||
|
||||
|
||||
let url = URLComponents(string: URLString)
|
||||
|
||||
let requestBuilder: RequestBuilder<ApiResponse>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||
|
@ -8,8 +8,6 @@
|
||||
import Foundation
|
||||
import Alamofire
|
||||
|
||||
|
||||
|
||||
open class StoreAPI {
|
||||
/**
|
||||
Delete purchase order by ID
|
||||
@ -17,7 +15,7 @@ open class StoreAPI {
|
||||
- parameter orderId: (path) ID of the order that needs to be deleted
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func deleteOrder(orderId: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
||||
open class func deleteOrder(orderId: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
deleteOrderWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in
|
||||
if error == nil {
|
||||
completion((), error)
|
||||
@ -40,8 +38,8 @@ open class StoreAPI {
|
||||
let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil)
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let parameters: [String:Any]? = nil
|
||||
|
||||
let parameters: [String: Any]? = nil
|
||||
|
||||
let url = URLComponents(string: URLString)
|
||||
|
||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
|
||||
@ -54,7 +52,7 @@ open class StoreAPI {
|
||||
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func getInventory(completion: @escaping ((_ data: [String:Int]?,_ error: Error?) -> Void)) {
|
||||
open class func getInventory(completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) {
|
||||
getInventoryWithRequestBuilder().execute { (response, error) -> Void in
|
||||
completion(response?.body, error)
|
||||
}
|
||||
@ -69,14 +67,14 @@ open class StoreAPI {
|
||||
- name: api_key
|
||||
- returns: RequestBuilder<[String:Int]>
|
||||
*/
|
||||
open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String:Int]> {
|
||||
open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> {
|
||||
let path = "/store/inventory"
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let parameters: [String:Any]? = nil
|
||||
|
||||
let parameters: [String: Any]? = nil
|
||||
|
||||
let url = URLComponents(string: URLString)
|
||||
|
||||
let requestBuilder: RequestBuilder<[String:Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||
let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||
|
||||
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
||||
}
|
||||
@ -87,7 +85,7 @@ open class StoreAPI {
|
||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func getOrderById(orderId: Int64, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) {
|
||||
open class func getOrderById(orderId: Int64, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) {
|
||||
getOrderByIdWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in
|
||||
completion(response?.body, error)
|
||||
}
|
||||
@ -106,8 +104,8 @@ open class StoreAPI {
|
||||
let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil)
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let parameters: [String:Any]? = nil
|
||||
|
||||
let parameters: [String: Any]? = nil
|
||||
|
||||
let url = URLComponents(string: URLString)
|
||||
|
||||
let requestBuilder: RequestBuilder<Order>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||
@ -121,7 +119,7 @@ open class StoreAPI {
|
||||
- parameter body: (body) order placed for purchasing the pet
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func placeOrder(body: Order, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) {
|
||||
open class func placeOrder(body: Order, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) {
|
||||
placeOrderWithRequestBuilder(body: body).execute { (response, error) -> Void in
|
||||
completion(response?.body, error)
|
||||
}
|
||||
|
@ -8,8 +8,6 @@
|
||||
import Foundation
|
||||
import Alamofire
|
||||
|
||||
|
||||
|
||||
open class UserAPI {
|
||||
/**
|
||||
Create user
|
||||
@ -17,7 +15,7 @@ open class UserAPI {
|
||||
- parameter body: (body) Created user object
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func createUser(body: User, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
||||
open class func createUser(body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
createUserWithRequestBuilder(body: body).execute { (response, error) -> Void in
|
||||
if error == nil {
|
||||
completion((), error)
|
||||
@ -52,7 +50,7 @@ open class UserAPI {
|
||||
- parameter body: (body) List of user object
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func createUsersWithArrayInput(body: [User], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
||||
open class func createUsersWithArrayInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
createUsersWithArrayInputWithRequestBuilder(body: body).execute { (response, error) -> Void in
|
||||
if error == nil {
|
||||
completion((), error)
|
||||
@ -86,7 +84,7 @@ open class UserAPI {
|
||||
- parameter body: (body) List of user object
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func createUsersWithListInput(body: [User], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
||||
open class func createUsersWithListInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
createUsersWithListInputWithRequestBuilder(body: body).execute { (response, error) -> Void in
|
||||
if error == nil {
|
||||
completion((), error)
|
||||
@ -120,7 +118,7 @@ open class UserAPI {
|
||||
- parameter username: (path) The name that needs to be deleted
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func deleteUser(username: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
||||
open class func deleteUser(username: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
deleteUserWithRequestBuilder(username: username).execute { (response, error) -> Void in
|
||||
if error == nil {
|
||||
completion((), error)
|
||||
@ -143,8 +141,8 @@ open class UserAPI {
|
||||
let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil)
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let parameters: [String:Any]? = nil
|
||||
|
||||
let parameters: [String: Any]? = nil
|
||||
|
||||
let url = URLComponents(string: URLString)
|
||||
|
||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
|
||||
@ -158,7 +156,7 @@ open class UserAPI {
|
||||
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func getUserByName(username: String, completion: @escaping ((_ data: User?,_ error: Error?) -> Void)) {
|
||||
open class func getUserByName(username: String, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) {
|
||||
getUserByNameWithRequestBuilder(username: username).execute { (response, error) -> Void in
|
||||
completion(response?.body, error)
|
||||
}
|
||||
@ -176,8 +174,8 @@ open class UserAPI {
|
||||
let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
||||
path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil)
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let parameters: [String:Any]? = nil
|
||||
|
||||
let parameters: [String: Any]? = nil
|
||||
|
||||
let url = URLComponents(string: URLString)
|
||||
|
||||
let requestBuilder: RequestBuilder<User>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
|
||||
@ -192,7 +190,7 @@ open class UserAPI {
|
||||
- parameter password: (query) The password for login in clear text
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func loginUser(username: String, password: String, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) {
|
||||
open class func loginUser(username: String, password: String, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) {
|
||||
loginUserWithRequestBuilder(username: username, password: password).execute { (response, error) -> Void in
|
||||
completion(response?.body, error)
|
||||
}
|
||||
@ -209,11 +207,11 @@ open class UserAPI {
|
||||
open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder<String> {
|
||||
let path = "/user/login"
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let parameters: [String:Any]? = nil
|
||||
|
||||
let parameters: [String: Any]? = nil
|
||||
|
||||
var url = URLComponents(string: URLString)
|
||||
url?.queryItems = APIHelper.mapValuesToQueryItems([
|
||||
"username": username,
|
||||
"username": username,
|
||||
"password": password
|
||||
])
|
||||
|
||||
@ -227,7 +225,7 @@ open class UserAPI {
|
||||
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func logoutUser(completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
||||
open class func logoutUser(completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
logoutUserWithRequestBuilder().execute { (response, error) -> Void in
|
||||
if error == nil {
|
||||
completion((), error)
|
||||
@ -245,8 +243,8 @@ open class UserAPI {
|
||||
open class func logoutUserWithRequestBuilder() -> RequestBuilder<Void> {
|
||||
let path = "/user/logout"
|
||||
let URLString = PetstoreClientAPI.basePath + path
|
||||
let parameters: [String:Any]? = nil
|
||||
|
||||
let parameters: [String: Any]? = nil
|
||||
|
||||
let url = URLComponents(string: URLString)
|
||||
|
||||
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
|
||||
@ -261,7 +259,7 @@ open class UserAPI {
|
||||
- parameter body: (body) Updated user object
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func updateUser(username: String, body: User, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
|
||||
open class func updateUser(username: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) {
|
||||
updateUserWithRequestBuilder(username: username, body: body).execute { (response, error) -> Void in
|
||||
if error == nil {
|
||||
completion((), error)
|
||||
|
@ -12,7 +12,7 @@ class AlamofireRequestBuilderFactory: RequestBuilderFactory {
|
||||
return AlamofireRequestBuilder<T>.self
|
||||
}
|
||||
|
||||
func getBuilder<T:Decodable>() -> RequestBuilder<T>.Type {
|
||||
func getBuilder<T: Decodable>() -> RequestBuilder<T>.Type {
|
||||
return AlamofireDecodableRequestBuilder<T>.self
|
||||
}
|
||||
}
|
||||
@ -50,7 +50,7 @@ private struct SynchronizedDictionary<K: Hashable, V> {
|
||||
private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManager>()
|
||||
|
||||
open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
|
||||
required public init(method: String, URLString: String, parameters: [String : Any]?, isBody: Bool, headers: [String : String] = [:]) {
|
||||
required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
|
||||
super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers)
|
||||
}
|
||||
|
||||
@ -88,17 +88,17 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
|
||||
May be overridden by a subclass if you want to control the request
|
||||
configuration (e.g. to override the cache policy).
|
||||
*/
|
||||
open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) -> DataRequest {
|
||||
open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) -> DataRequest {
|
||||
return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers)
|
||||
}
|
||||
|
||||
override open func execute(_ completion: @escaping (_ response: Response<T>?, _ error: Error?) -> Void) {
|
||||
let managerId:String = UUID().uuidString
|
||||
let managerId: String = UUID().uuidString
|
||||
// Create a new manager for each request to customize its request header
|
||||
let manager = createSessionManager()
|
||||
managerStore[managerId] = manager
|
||||
|
||||
let encoding:ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding()
|
||||
let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding()
|
||||
|
||||
let xMethod = Alamofire.HTTPMethod(rawValue: method)
|
||||
let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL }
|
||||
@ -111,8 +111,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
|
||||
case let fileURL as URL:
|
||||
if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) {
|
||||
mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType)
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
mpForm.append(fileURL, withName: k)
|
||||
}
|
||||
case let string as String:
|
||||
@ -276,7 +275,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
|
||||
return httpHeaders
|
||||
}
|
||||
|
||||
fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? {
|
||||
fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? {
|
||||
|
||||
guard let contentDisposition = contentDisposition else {
|
||||
return nil
|
||||
@ -284,7 +283,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
|
||||
|
||||
let items = contentDisposition.components(separatedBy: ";")
|
||||
|
||||
var filename : String? = nil
|
||||
var filename: String? = nil
|
||||
|
||||
for contentItem in items {
|
||||
|
||||
@ -304,7 +303,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
|
||||
|
||||
}
|
||||
|
||||
fileprivate func getPath(from url : URL) throws -> String {
|
||||
fileprivate func getPath(from url: URL) throws -> String {
|
||||
|
||||
guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else {
|
||||
throw DownloadException.requestMissingPath
|
||||
@ -318,7 +317,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
|
||||
|
||||
}
|
||||
|
||||
fileprivate func getURL(from urlRequest : URLRequest) throws -> URL {
|
||||
fileprivate func getURL(from urlRequest: URLRequest) throws -> URL {
|
||||
|
||||
guard let url = urlRequest.url else {
|
||||
throw DownloadException.requestMissingURL
|
||||
@ -329,7 +328,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
|
||||
|
||||
}
|
||||
|
||||
fileprivate enum DownloadException : Error {
|
||||
private enum DownloadException: Error {
|
||||
case responseDataMissing
|
||||
case responseFailed
|
||||
case requestMissing
|
||||
@ -344,7 +343,7 @@ public enum AlamofireDecodableRequestBuilderError: Error {
|
||||
case generalError(Error)
|
||||
}
|
||||
|
||||
open class AlamofireDecodableRequestBuilder<T:Decodable>: AlamofireRequestBuilder<T> {
|
||||
open class AlamofireDecodableRequestBuilder<T: Decodable>: AlamofireRequestBuilder<T> {
|
||||
|
||||
override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response<T>?, _ error: Error?) -> Void) {
|
||||
if let credential = self.credential {
|
||||
|
@ -13,7 +13,7 @@ open class CodableHelper {
|
||||
|
||||
public static var dateformatter: DateFormatter?
|
||||
|
||||
open class func decode<T>(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T : Decodable {
|
||||
open class func decode<T>(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T: Decodable {
|
||||
var returnedDecodable: T? = nil
|
||||
var returnedError: Error? = nil
|
||||
|
||||
@ -39,7 +39,7 @@ open class CodableHelper {
|
||||
return (returnedDecodable, returnedError)
|
||||
}
|
||||
|
||||
open class func encode<T>(_ value: T, prettyPrint: Bool = false) -> EncodeResult where T : Encodable {
|
||||
open class func encode<T>(_ value: T, prettyPrint: Bool = false) -> EncodeResult where T: Encodable {
|
||||
var returnedData: Data?
|
||||
var returnedError: Error? = nil
|
||||
|
||||
|
@ -7,9 +7,9 @@
|
||||
import Foundation
|
||||
|
||||
open class Configuration {
|
||||
|
||||
|
||||
// This value is used to configure the date formatter that is used to serialize dates into JSON format.
|
||||
// You must set it prior to encoding any dates, and it will only be read once.
|
||||
public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ"
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -112,24 +112,24 @@ extension String: CodingKey {
|
||||
|
||||
extension KeyedEncodingContainerProtocol {
|
||||
|
||||
public mutating func encodeArray<T>(_ values: [T], forKey key: Self.Key) throws where T : Encodable {
|
||||
public mutating func encodeArray<T>(_ values: [T], forKey key: Self.Key) throws where T: Encodable {
|
||||
var arrayContainer = nestedUnkeyedContainer(forKey: key)
|
||||
try arrayContainer.encode(contentsOf: values)
|
||||
}
|
||||
|
||||
public mutating func encodeArrayIfPresent<T>(_ values: [T]?, forKey key: Self.Key) throws where T : Encodable {
|
||||
public mutating func encodeArrayIfPresent<T>(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable {
|
||||
if let values = values {
|
||||
try encodeArray(values, forKey: key)
|
||||
}
|
||||
}
|
||||
|
||||
public mutating func encodeMap<T>(_ pairs: [Self.Key: T]) throws where T : Encodable {
|
||||
public mutating func encodeMap<T>(_ pairs: [Self.Key: T]) throws where T: Encodable {
|
||||
for (key, value) in pairs {
|
||||
try encode(value, forKey: key)
|
||||
}
|
||||
}
|
||||
|
||||
public mutating func encodeMapIfPresent<T>(_ pairs: [Self.Key: T]?) throws where T : Encodable {
|
||||
public mutating func encodeMapIfPresent<T>(_ pairs: [Self.Key: T]?) throws where T: Encodable {
|
||||
if let pairs = pairs {
|
||||
try encodeMap(pairs)
|
||||
}
|
||||
@ -139,7 +139,7 @@ extension KeyedEncodingContainerProtocol {
|
||||
|
||||
extension KeyedDecodingContainerProtocol {
|
||||
|
||||
public func decodeArray<T>(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable {
|
||||
public func decodeArray<T>(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable {
|
||||
var tmpArray = [T]()
|
||||
|
||||
var nestedContainer = try nestedUnkeyedContainer(forKey: key)
|
||||
@ -151,7 +151,7 @@ extension KeyedDecodingContainerProtocol {
|
||||
return tmpArray
|
||||
}
|
||||
|
||||
public func decodeArrayIfPresent<T>(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable {
|
||||
public func decodeArrayIfPresent<T>(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable {
|
||||
var tmpArray: [T]? = nil
|
||||
|
||||
if contains(key) {
|
||||
@ -161,8 +161,8 @@ extension KeyedDecodingContainerProtocol {
|
||||
return tmpArray
|
||||
}
|
||||
|
||||
public func decodeMap<T>(_ type: T.Type, excludedKeys: Set<Self.Key>) throws -> [Self.Key: T] where T : Decodable {
|
||||
var map: [Self.Key : T] = [:]
|
||||
public func decodeMap<T>(_ type: T.Type, excludedKeys: Set<Self.Key>) throws -> [Self.Key: T] where T: Decodable {
|
||||
var map: [Self.Key: T] = [:]
|
||||
|
||||
for key in allKeys {
|
||||
if !excludedKeys.contains(key) {
|
||||
@ -175,5 +175,3 @@ extension KeyedDecodingContainerProtocol {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,7 +10,7 @@ import Alamofire
|
||||
|
||||
open class JSONEncodingHelper {
|
||||
|
||||
open class func encodingParameters<T:Encodable>(forEncodableObject encodableObj: T?) -> Parameters? {
|
||||
open class func encodingParameters<T: Encodable>(forEncodableObject encodableObj: T?) -> Parameters? {
|
||||
var params: Parameters? = nil
|
||||
|
||||
// Encode the Encodable object
|
||||
@ -39,5 +39,5 @@ open class JSONEncodingHelper {
|
||||
|
||||
return params
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ protocol JSONEncodable {
|
||||
func encodeToJSON() -> Any
|
||||
}
|
||||
|
||||
public enum ErrorResponse : Error {
|
||||
public enum ErrorResponse: Error {
|
||||
case error(Int, Data?, Error)
|
||||
}
|
||||
|
||||
|
@ -7,23 +7,19 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct AdditionalPropertiesClass: Codable {
|
||||
|
||||
public var mapString: [String:String]?
|
||||
public var mapMapString: [String:[String:String]]?
|
||||
public var mapString: [String: String]?
|
||||
public var mapMapString: [String: [String: String]]?
|
||||
|
||||
public init(mapString: [String:String]?, mapMapString: [String:[String:String]]?) {
|
||||
public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) {
|
||||
self.mapString = mapString
|
||||
self.mapMapString = mapMapString
|
||||
}
|
||||
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
case mapString = "map_string"
|
||||
case mapMapString = "map_map_string"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct Animal: Codable {
|
||||
|
||||
public var className: String
|
||||
@ -19,6 +17,4 @@ public struct Animal: Codable {
|
||||
self.color = color
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,5 +7,4 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
public typealias AnimalFarm = [Animal]
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct ApiResponse: Codable {
|
||||
|
||||
public var code: Int?
|
||||
@ -21,6 +19,4 @@ public struct ApiResponse: Codable {
|
||||
self.message = message
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct ArrayOfArrayOfNumberOnly: Codable {
|
||||
|
||||
public var arrayArrayNumber: [[Double]]?
|
||||
@ -17,10 +15,8 @@ public struct ArrayOfArrayOfNumberOnly: Codable {
|
||||
self.arrayArrayNumber = arrayArrayNumber
|
||||
}
|
||||
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
case arrayArrayNumber = "ArrayArrayNumber"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct ArrayOfNumberOnly: Codable {
|
||||
|
||||
public var arrayNumber: [Double]?
|
||||
@ -17,10 +15,8 @@ public struct ArrayOfNumberOnly: Codable {
|
||||
self.arrayNumber = arrayNumber
|
||||
}
|
||||
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
case arrayNumber = "ArrayNumber"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct ArrayTest: Codable {
|
||||
|
||||
public var arrayOfString: [String]?
|
||||
@ -21,12 +19,10 @@ public struct ArrayTest: Codable {
|
||||
self.arrayArrayOfModel = arrayArrayOfModel
|
||||
}
|
||||
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
case arrayOfString = "array_of_string"
|
||||
case arrayArrayOfInteger = "array_array_of_integer"
|
||||
case arrayArrayOfModel = "array_array_of_model"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct Capitalization: Codable {
|
||||
|
||||
public var smallCamel: String?
|
||||
@ -28,7 +26,7 @@ public struct Capitalization: Codable {
|
||||
self.ATT_NAME = ATT_NAME
|
||||
}
|
||||
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
case smallCamel
|
||||
case capitalCamel = "CapitalCamel"
|
||||
case smallSnake = "small_Snake"
|
||||
@ -37,6 +35,4 @@ public struct Capitalization: Codable {
|
||||
case ATT_NAME
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct Cat: Codable {
|
||||
|
||||
public var className: String
|
||||
@ -21,6 +19,4 @@ public struct Cat: Codable {
|
||||
self.declawed = declawed
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,18 @@
|
||||
//
|
||||
// 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
|
||||
}
|
||||
|
||||
}
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct Category: Codable {
|
||||
|
||||
public var id: Int64?
|
||||
@ -19,6 +17,4 @@ public struct Category: Codable {
|
||||
self.name = name
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
/** Model for testing model with \"_class\" property */
|
||||
|
||||
public struct ClassModel: Codable {
|
||||
@ -18,6 +17,4 @@ public struct ClassModel: Codable {
|
||||
self._class = _class
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct Client: Codable {
|
||||
|
||||
public var client: String?
|
||||
@ -17,6 +15,4 @@ public struct Client: Codable {
|
||||
self.client = client
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct Dog: Codable {
|
||||
|
||||
public var className: String
|
||||
@ -21,6 +19,4 @@ public struct Dog: Codable {
|
||||
self.breed = breed
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,18 @@
|
||||
//
|
||||
// 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
|
||||
}
|
||||
|
||||
}
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct EnumArrays: Codable {
|
||||
|
||||
public enum JustSymbol: String, Codable {
|
||||
@ -27,11 +25,9 @@ public struct EnumArrays: Codable {
|
||||
self.arrayEnum = arrayEnum
|
||||
}
|
||||
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
case justSymbol = "just_symbol"
|
||||
case arrayEnum = "array_enum"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
public enum EnumClass: String, Codable {
|
||||
case abc = "_abc"
|
||||
case efg = "-efg"
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct EnumTest: Codable {
|
||||
|
||||
public enum EnumString: String, Codable {
|
||||
@ -43,7 +41,7 @@ public struct EnumTest: Codable {
|
||||
self.outerEnum = outerEnum
|
||||
}
|
||||
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
case enumString = "enum_string"
|
||||
case enumStringRequired = "enum_string_required"
|
||||
case enumInteger = "enum_integer"
|
||||
@ -51,6 +49,4 @@ public struct EnumTest: Codable {
|
||||
case outerEnum
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
/** Must be named `File` for test. */
|
||||
|
||||
public struct File: Codable {
|
||||
@ -19,6 +18,4 @@ public struct File: Codable {
|
||||
self.sourceURI = sourceURI
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct FileSchemaTestClass: Codable {
|
||||
|
||||
public var file: File?
|
||||
@ -19,6 +17,4 @@ public struct FileSchemaTestClass: Codable {
|
||||
self.files = files
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct FormatTest: Codable {
|
||||
|
||||
public var integer: Int?
|
||||
@ -41,6 +39,4 @@ public struct FormatTest: Codable {
|
||||
self.password = password
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct HasOnlyReadOnly: Codable {
|
||||
|
||||
public var bar: String?
|
||||
@ -19,6 +17,4 @@ public struct HasOnlyReadOnly: Codable {
|
||||
self.foo = foo
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct List: Codable {
|
||||
|
||||
public var _123list: String?
|
||||
@ -17,10 +15,8 @@ public struct List: Codable {
|
||||
self._123list = _123list
|
||||
}
|
||||
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
case _123list = "123-list"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,33 +7,29 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct MapTest: Codable {
|
||||
|
||||
public enum MapOfEnumString: String, Codable {
|
||||
case upper = "UPPER"
|
||||
case lower = "lower"
|
||||
}
|
||||
public var mapMapOfString: [String:[String:String]]?
|
||||
public var mapOfEnumString: [String:String]?
|
||||
public var directMap: [String:Bool]?
|
||||
public var mapMapOfString: [String: [String: String]]?
|
||||
public var mapOfEnumString: [String: String]?
|
||||
public var directMap: [String: Bool]?
|
||||
public var indirectMap: StringBooleanMap?
|
||||
|
||||
public init(mapMapOfString: [String:[String:String]]?, mapOfEnumString: [String:String]?, directMap: [String:Bool]?, indirectMap: StringBooleanMap?) {
|
||||
public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) {
|
||||
self.mapMapOfString = mapMapOfString
|
||||
self.mapOfEnumString = mapOfEnumString
|
||||
self.directMap = directMap
|
||||
self.indirectMap = indirectMap
|
||||
}
|
||||
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
case mapMapOfString = "map_map_of_string"
|
||||
case mapOfEnumString = "map_of_enum_string"
|
||||
case directMap = "direct_map"
|
||||
case indirectMap = "indirect_map"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,20 +7,16 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct MixedPropertiesAndAdditionalPropertiesClass: Codable {
|
||||
|
||||
public var uuid: UUID?
|
||||
public var dateTime: Date?
|
||||
public var map: [String:Animal]?
|
||||
public var map: [String: Animal]?
|
||||
|
||||
public init(uuid: UUID?, dateTime: Date?, map: [String:Animal]?) {
|
||||
public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) {
|
||||
self.uuid = uuid
|
||||
self.dateTime = dateTime
|
||||
self.map = map
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
/** Model for testing model name starting with number */
|
||||
|
||||
public struct Model200Response: Codable {
|
||||
@ -20,11 +19,9 @@ public struct Model200Response: Codable {
|
||||
self._class = _class
|
||||
}
|
||||
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
case name
|
||||
case _class = "class"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
/** Model for testing model name same as property name */
|
||||
|
||||
public struct Name: Codable {
|
||||
@ -24,13 +23,11 @@ public struct Name: Codable {
|
||||
self._123number = _123number
|
||||
}
|
||||
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
case name
|
||||
case snakeCase = "snake_case"
|
||||
case property
|
||||
case _123number = "123Number"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct NumberOnly: Codable {
|
||||
|
||||
public var justNumber: Double?
|
||||
@ -17,10 +15,8 @@ public struct NumberOnly: Codable {
|
||||
self.justNumber = justNumber
|
||||
}
|
||||
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
case justNumber = "JustNumber"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct Order: Codable {
|
||||
|
||||
public enum Status: String, Codable {
|
||||
@ -33,6 +31,4 @@ public struct Order: Codable {
|
||||
self.complete = complete
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct OuterComposite: Codable {
|
||||
|
||||
public var myNumber: Double?
|
||||
@ -21,12 +19,10 @@ public struct OuterComposite: Codable {
|
||||
self.myBoolean = myBoolean
|
||||
}
|
||||
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
case myNumber = "my_number"
|
||||
case myString = "my_string"
|
||||
case myBoolean = "my_boolean"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
public enum OuterEnum: String, Codable {
|
||||
case placed = "placed"
|
||||
case approved = "approved"
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct Pet: Codable {
|
||||
|
||||
public enum Status: String, Codable {
|
||||
@ -33,6 +31,4 @@ public struct Pet: Codable {
|
||||
self.status = status
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct ReadOnlyFirst: Codable {
|
||||
|
||||
public var bar: String?
|
||||
@ -19,6 +17,4 @@ public struct ReadOnlyFirst: Codable {
|
||||
self.baz = baz
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
/** Model for testing reserved words */
|
||||
|
||||
public struct Return: Codable {
|
||||
@ -18,10 +17,8 @@ public struct Return: Codable {
|
||||
self._return = _return
|
||||
}
|
||||
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
case _return = "return"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct SpecialModelName: Codable {
|
||||
|
||||
public var specialPropertyName: Int64?
|
||||
@ -17,10 +15,8 @@ public struct SpecialModelName: Codable {
|
||||
self.specialPropertyName = specialPropertyName
|
||||
}
|
||||
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
case specialPropertyName = "$special[property.name]"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,12 +7,9 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct StringBooleanMap: Codable {
|
||||
|
||||
|
||||
public var additionalProperties: [String:Bool] = [:]
|
||||
public var additionalProperties: [String: Bool] = [:]
|
||||
|
||||
public subscript(key: String) -> Bool? {
|
||||
get {
|
||||
@ -45,7 +42,4 @@ public struct StringBooleanMap: Codable {
|
||||
additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys)
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct Tag: Codable {
|
||||
|
||||
public var id: Int64?
|
||||
@ -19,6 +17,4 @@ public struct Tag: Codable {
|
||||
self.name = name
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct TypeHolderDefault: Codable {
|
||||
|
||||
public var stringItem: String = "what"
|
||||
@ -25,7 +23,7 @@ public struct TypeHolderDefault: Codable {
|
||||
self.arrayItem = arrayItem
|
||||
}
|
||||
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
case stringItem = "string_item"
|
||||
case numberItem = "number_item"
|
||||
case integerItem = "integer_item"
|
||||
@ -33,6 +31,4 @@ public struct TypeHolderDefault: Codable {
|
||||
case arrayItem = "array_item"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct TypeHolderExample: Codable {
|
||||
|
||||
public var stringItem: String
|
||||
@ -25,7 +23,7 @@ public struct TypeHolderExample: Codable {
|
||||
self.arrayItem = arrayItem
|
||||
}
|
||||
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
public enum CodingKeys: String, CodingKey {
|
||||
case stringItem = "string_item"
|
||||
case numberItem = "number_item"
|
||||
case integerItem = "integer_item"
|
||||
@ -33,6 +31,4 @@ public struct TypeHolderExample: Codable {
|
||||
case arrayItem = "array_item"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
public struct User: Codable {
|
||||
|
||||
public var id: Int64?
|
||||
@ -32,6 +30,4 @@ public struct User: Codable {
|
||||
self.userStatus = userStatus
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -73,10 +73,12 @@ Class | Method | HTTP request | Description
|
||||
- [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)
|
||||
|
@ -135,8 +135,7 @@ public func request(
|
||||
parameters: Parameters? = nil,
|
||||
encoding: ParameterEncoding = URLEncoding.default,
|
||||
headers: HTTPHeaders? = nil)
|
||||
-> DataRequest
|
||||
{
|
||||
-> DataRequest {
|
||||
return SessionManager.default.request(
|
||||
url,
|
||||
method: method,
|
||||
@ -183,8 +182,7 @@ public func download(
|
||||
encoding: ParameterEncoding = URLEncoding.default,
|
||||
headers: HTTPHeaders? = nil,
|
||||
to destination: DownloadRequest.DownloadFileDestination? = nil)
|
||||
-> DownloadRequest
|
||||
{
|
||||
-> DownloadRequest {
|
||||
return SessionManager.default.download(
|
||||
url,
|
||||
method: method,
|
||||
@ -209,8 +207,7 @@ public func download(
|
||||
public func download(
|
||||
_ urlRequest: URLRequestConvertible,
|
||||
to destination: DownloadRequest.DownloadFileDestination? = nil)
|
||||
-> DownloadRequest
|
||||
{
|
||||
-> DownloadRequest {
|
||||
return SessionManager.default.download(urlRequest, to: destination)
|
||||
}
|
||||
|
||||
@ -239,8 +236,7 @@ public func download(
|
||||
public func download(
|
||||
resumingWith resumeData: Data,
|
||||
to destination: DownloadRequest.DownloadFileDestination? = nil)
|
||||
-> DownloadRequest
|
||||
{
|
||||
-> DownloadRequest {
|
||||
return SessionManager.default.download(resumingWith: resumeData, to: destination)
|
||||
}
|
||||
|
||||
@ -263,8 +259,7 @@ public func upload(
|
||||
to url: URLConvertible,
|
||||
method: HTTPMethod = .post,
|
||||
headers: HTTPHeaders? = nil)
|
||||
-> UploadRequest
|
||||
{
|
||||
-> UploadRequest {
|
||||
return SessionManager.default.upload(fileURL, to: url, method: method, headers: headers)
|
||||
}
|
||||
|
||||
@ -297,8 +292,7 @@ public func upload(
|
||||
to url: URLConvertible,
|
||||
method: HTTPMethod = .post,
|
||||
headers: HTTPHeaders? = nil)
|
||||
-> UploadRequest
|
||||
{
|
||||
-> UploadRequest {
|
||||
return SessionManager.default.upload(data, to: url, method: method, headers: headers)
|
||||
}
|
||||
|
||||
@ -331,8 +325,7 @@ public func upload(
|
||||
to url: URLConvertible,
|
||||
method: HTTPMethod = .post,
|
||||
headers: HTTPHeaders? = nil)
|
||||
-> UploadRequest
|
||||
{
|
||||
-> UploadRequest {
|
||||
return SessionManager.default.upload(stream, to: url, method: method, headers: headers)
|
||||
}
|
||||
|
||||
@ -379,8 +372,7 @@ public func upload(
|
||||
to url: URLConvertible,
|
||||
method: HTTPMethod = .post,
|
||||
headers: HTTPHeaders? = nil,
|
||||
encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?)
|
||||
{
|
||||
encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) {
|
||||
return SessionManager.default.upload(
|
||||
multipartFormData: multipartFormData,
|
||||
usingThreshold: encodingMemoryThreshold,
|
||||
@ -416,8 +408,7 @@ public func upload(
|
||||
multipartFormData: @escaping (MultipartFormData) -> Void,
|
||||
usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold,
|
||||
with urlRequest: URLRequestConvertible,
|
||||
encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?)
|
||||
{
|
||||
encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) {
|
||||
return SessionManager.default.upload(
|
||||
multipartFormData: multipartFormData,
|
||||
usingThreshold: encodingMemoryThreshold,
|
||||
|
@ -275,8 +275,7 @@ open class MultipartFormData {
|
||||
}
|
||||
|
||||
bodyContentLength = fileSize.uint64Value
|
||||
}
|
||||
catch {
|
||||
} catch {
|
||||
setBodyPartError(withReason: .bodyPartFileSizeQueryFailedWithError(forURL: fileURL, error: error))
|
||||
return
|
||||
}
|
||||
@ -312,8 +311,7 @@ open class MultipartFormData {
|
||||
withLength length: UInt64,
|
||||
name: String,
|
||||
fileName: String,
|
||||
mimeType: String)
|
||||
{
|
||||
mimeType: String) {
|
||||
let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType)
|
||||
append(stream, withLength: length, headers: headers)
|
||||
}
|
||||
|
@ -146,8 +146,7 @@ open class NetworkReachabilityManager {
|
||||
context.info = Unmanaged.passUnretained(self).toOpaque()
|
||||
|
||||
let callbackEnabled = SCNetworkReachabilitySetCallback(
|
||||
reachability,
|
||||
{ (_, flags, info) in
|
||||
reachability, { (_, flags, info) in
|
||||
let reachability = Unmanaged<NetworkReachabilityManager>.fromOpaque(info!).takeUnretainedValue()
|
||||
reachability.notifyListener(flags)
|
||||
},
|
||||
@ -216,8 +215,7 @@ extension NetworkReachabilityManager.NetworkReachabilityStatus: Equatable {}
|
||||
public func ==(
|
||||
lhs: NetworkReachabilityManager.NetworkReachabilityStatus,
|
||||
rhs: NetworkReachabilityManager.NetworkReachabilityStatus)
|
||||
-> Bool
|
||||
{
|
||||
-> Bool {
|
||||
switch (lhs, rhs) {
|
||||
case (.unknown, .unknown):
|
||||
return true
|
||||
|
@ -435,8 +435,7 @@ public struct PropertyListEncoding: ParameterEncoding {
|
||||
/// - returns: The new `PropertyListEncoding` instance.
|
||||
public init(
|
||||
format: PropertyListSerialization.PropertyListFormat = .xml,
|
||||
options: PropertyListSerialization.WriteOptions = 0)
|
||||
{
|
||||
options: PropertyListSerialization.WriteOptions = 0) {
|
||||
self.format = format
|
||||
self.options = options
|
||||
}
|
||||
|
@ -161,8 +161,7 @@ open class Request {
|
||||
user: String,
|
||||
password: String,
|
||||
persistence: URLCredential.Persistence = .forSession)
|
||||
-> Self
|
||||
{
|
||||
-> Self {
|
||||
let credential = URLCredential(user: user, password: password, persistence: persistence)
|
||||
return authenticate(usingCredential: credential)
|
||||
}
|
||||
@ -538,8 +537,7 @@ open class DownloadRequest: Request {
|
||||
open class func suggestedDownloadDestination(
|
||||
for directory: FileManager.SearchPathDirectory = .documentDirectory,
|
||||
in domain: FileManager.SearchPathDomainMask = .userDomainMask)
|
||||
-> DownloadFileDestination
|
||||
{
|
||||
-> DownloadFileDestination {
|
||||
return { temporaryURL, response in
|
||||
let directoryURLs = FileManager.default.urls(for: directory, in: domain)
|
||||
|
||||
|
@ -58,8 +58,7 @@ public struct DefaultDataResponse {
|
||||
data: Data?,
|
||||
error: Error?,
|
||||
timeline: Timeline = Timeline(),
|
||||
metrics: AnyObject? = nil)
|
||||
{
|
||||
metrics: AnyObject? = nil) {
|
||||
self.request = request
|
||||
self.response = response
|
||||
self.data = data
|
||||
@ -109,8 +108,7 @@ public struct DataResponse<Value> {
|
||||
response: HTTPURLResponse?,
|
||||
data: Data?,
|
||||
result: Result<Value>,
|
||||
timeline: Timeline = Timeline())
|
||||
{
|
||||
timeline: Timeline = Timeline()) {
|
||||
self.request = request
|
||||
self.response = response
|
||||
self.data = data
|
||||
@ -296,8 +294,7 @@ public struct DefaultDownloadResponse {
|
||||
resumeData: Data?,
|
||||
error: Error?,
|
||||
timeline: Timeline = Timeline(),
|
||||
metrics: AnyObject? = nil)
|
||||
{
|
||||
metrics: AnyObject? = nil) {
|
||||
self.request = request
|
||||
self.response = response
|
||||
self.temporaryURL = temporaryURL
|
||||
@ -359,8 +356,7 @@ public struct DownloadResponse<Value> {
|
||||
destinationURL: URL?,
|
||||
resumeData: Data?,
|
||||
result: Result<Value>,
|
||||
timeline: Timeline = Timeline())
|
||||
{
|
||||
timeline: Timeline = Timeline()) {
|
||||
self.request = request
|
||||
self.response = response
|
||||
self.temporaryURL = temporaryURL
|
||||
|
@ -144,8 +144,7 @@ extension DataRequest {
|
||||
queue: DispatchQueue? = nil,
|
||||
responseSerializer: T,
|
||||
completionHandler: @escaping (DataResponse<T.SerializedObject>) -> Void)
|
||||
-> Self
|
||||
{
|
||||
-> Self {
|
||||
delegate.queue.addOperation {
|
||||
let result = responseSerializer.serializeResponse(
|
||||
self.request,
|
||||
@ -182,8 +181,7 @@ extension DownloadRequest {
|
||||
public func response(
|
||||
queue: DispatchQueue? = nil,
|
||||
completionHandler: @escaping (DefaultDownloadResponse) -> Void)
|
||||
-> Self
|
||||
{
|
||||
-> Self {
|
||||
delegate.queue.addOperation {
|
||||
(queue ?? DispatchQueue.main).async {
|
||||
var downloadResponse = DefaultDownloadResponse(
|
||||
@ -218,8 +216,7 @@ extension DownloadRequest {
|
||||
queue: DispatchQueue? = nil,
|
||||
responseSerializer: T,
|
||||
completionHandler: @escaping (DownloadResponse<T.SerializedObject>) -> Void)
|
||||
-> Self
|
||||
{
|
||||
-> Self {
|
||||
delegate.queue.addOperation {
|
||||
let result = responseSerializer.serializeResponse(
|
||||
self.request,
|
||||
@ -289,8 +286,7 @@ extension DataRequest {
|
||||
public func responseData(
|
||||
queue: DispatchQueue? = nil,
|
||||
completionHandler: @escaping (DataResponse<Data>) -> Void)
|
||||
-> Self
|
||||
{
|
||||
-> Self {
|
||||
return response(
|
||||
queue: queue,
|
||||
responseSerializer: DataRequest.dataResponseSerializer(),
|
||||
@ -329,8 +325,7 @@ extension DownloadRequest {
|
||||
public func responseData(
|
||||
queue: DispatchQueue? = nil,
|
||||
completionHandler: @escaping (DownloadResponse<Data>) -> Void)
|
||||
-> Self
|
||||
{
|
||||
-> Self {
|
||||
return response(
|
||||
queue: queue,
|
||||
responseSerializer: DownloadRequest.dataResponseSerializer(),
|
||||
@ -356,8 +351,7 @@ extension Request {
|
||||
response: HTTPURLResponse?,
|
||||
data: Data?,
|
||||
error: Error?)
|
||||
-> Result<String>
|
||||
{
|
||||
-> Result<String> {
|
||||
guard error == nil else { return .failure(error!) }
|
||||
|
||||
if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success("") }
|
||||
@ -411,8 +405,7 @@ extension DataRequest {
|
||||
queue: DispatchQueue? = nil,
|
||||
encoding: String.Encoding? = nil,
|
||||
completionHandler: @escaping (DataResponse<String>) -> Void)
|
||||
-> Self
|
||||
{
|
||||
-> Self {
|
||||
return response(
|
||||
queue: queue,
|
||||
responseSerializer: DataRequest.stringResponseSerializer(encoding: encoding),
|
||||
@ -459,8 +452,7 @@ extension DownloadRequest {
|
||||
queue: DispatchQueue? = nil,
|
||||
encoding: String.Encoding? = nil,
|
||||
completionHandler: @escaping (DownloadResponse<String>) -> Void)
|
||||
-> Self
|
||||
{
|
||||
-> Self {
|
||||
return response(
|
||||
queue: queue,
|
||||
responseSerializer: DownloadRequest.stringResponseSerializer(encoding: encoding),
|
||||
@ -486,8 +478,7 @@ extension Request {
|
||||
response: HTTPURLResponse?,
|
||||
data: Data?,
|
||||
error: Error?)
|
||||
-> Result<Any>
|
||||
{
|
||||
-> Result<Any> {
|
||||
guard error == nil else { return .failure(error!) }
|
||||
|
||||
if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) }
|
||||
@ -514,8 +505,7 @@ extension DataRequest {
|
||||
/// - returns: A JSON object response serializer.
|
||||
public static func jsonResponseSerializer(
|
||||
options: JSONSerialization.ReadingOptions = .allowFragments)
|
||||
-> DataResponseSerializer<Any>
|
||||
{
|
||||
-> DataResponseSerializer<Any> {
|
||||
return DataResponseSerializer { _, response, data, error in
|
||||
return Request.serializeResponseJSON(options: options, response: response, data: data, error: error)
|
||||
}
|
||||
@ -532,8 +522,7 @@ extension DataRequest {
|
||||
queue: DispatchQueue? = nil,
|
||||
options: JSONSerialization.ReadingOptions = .allowFragments,
|
||||
completionHandler: @escaping (DataResponse<Any>) -> Void)
|
||||
-> Self
|
||||
{
|
||||
-> Self {
|
||||
return response(
|
||||
queue: queue,
|
||||
responseSerializer: DataRequest.jsonResponseSerializer(options: options),
|
||||
@ -551,8 +540,7 @@ extension DownloadRequest {
|
||||
/// - returns: A JSON object response serializer.
|
||||
public static func jsonResponseSerializer(
|
||||
options: JSONSerialization.ReadingOptions = .allowFragments)
|
||||
-> DownloadResponseSerializer<Any>
|
||||
{
|
||||
-> DownloadResponseSerializer<Any> {
|
||||
return DownloadResponseSerializer { _, response, fileURL, error in
|
||||
guard error == nil else { return .failure(error!) }
|
||||
|
||||
@ -580,8 +568,7 @@ extension DownloadRequest {
|
||||
queue: DispatchQueue? = nil,
|
||||
options: JSONSerialization.ReadingOptions = .allowFragments,
|
||||
completionHandler: @escaping (DownloadResponse<Any>) -> Void)
|
||||
-> Self
|
||||
{
|
||||
-> Self {
|
||||
return response(
|
||||
queue: queue,
|
||||
responseSerializer: DownloadRequest.jsonResponseSerializer(options: options),
|
||||
@ -607,8 +594,7 @@ extension Request {
|
||||
response: HTTPURLResponse?,
|
||||
data: Data?,
|
||||
error: Error?)
|
||||
-> Result<Any>
|
||||
{
|
||||
-> Result<Any> {
|
||||
guard error == nil else { return .failure(error!) }
|
||||
|
||||
if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) }
|
||||
@ -635,8 +621,7 @@ extension DataRequest {
|
||||
/// - returns: A property list object response serializer.
|
||||
public static func propertyListResponseSerializer(
|
||||
options: PropertyListSerialization.ReadOptions = [])
|
||||
-> DataResponseSerializer<Any>
|
||||
{
|
||||
-> DataResponseSerializer<Any> {
|
||||
return DataResponseSerializer { _, response, data, error in
|
||||
return Request.serializeResponsePropertyList(options: options, response: response, data: data, error: error)
|
||||
}
|
||||
@ -653,8 +638,7 @@ extension DataRequest {
|
||||
queue: DispatchQueue? = nil,
|
||||
options: PropertyListSerialization.ReadOptions = [],
|
||||
completionHandler: @escaping (DataResponse<Any>) -> Void)
|
||||
-> Self
|
||||
{
|
||||
-> Self {
|
||||
return response(
|
||||
queue: queue,
|
||||
responseSerializer: DataRequest.propertyListResponseSerializer(options: options),
|
||||
@ -672,8 +656,7 @@ extension DownloadRequest {
|
||||
/// - returns: A property list object response serializer.
|
||||
public static func propertyListResponseSerializer(
|
||||
options: PropertyListSerialization.ReadOptions = [])
|
||||
-> DownloadResponseSerializer<Any>
|
||||
{
|
||||
-> DownloadResponseSerializer<Any> {
|
||||
return DownloadResponseSerializer { _, response, fileURL, error in
|
||||
guard error == nil else { return .failure(error!) }
|
||||
|
||||
@ -701,8 +684,7 @@ extension DownloadRequest {
|
||||
queue: DispatchQueue? = nil,
|
||||
options: PropertyListSerialization.ReadOptions = [],
|
||||
completionHandler: @escaping (DownloadResponse<Any>) -> Void)
|
||||
-> Self
|
||||
{
|
||||
-> Self {
|
||||
return response(
|
||||
queue: queue,
|
||||
responseSerializer: DownloadRequest.propertyListResponseSerializer(options: options),
|
||||
|
@ -249,7 +249,6 @@ public enum ServerTrustPolicy {
|
||||
let unspecified = SecTrustResultType.unspecified
|
||||
let proceed = SecTrustResultType.proceed
|
||||
|
||||
|
||||
isValid = result == unspecified || result == proceed
|
||||
}
|
||||
|
||||
|
@ -255,8 +255,7 @@ extension SessionDelegate: URLSessionDelegate {
|
||||
open func urlSession(
|
||||
_ session: URLSession,
|
||||
didReceive challenge: URLAuthenticationChallenge,
|
||||
completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void)
|
||||
{
|
||||
completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
|
||||
guard sessionDidReceiveChallengeWithCompletion == nil else {
|
||||
sessionDidReceiveChallengeWithCompletion?(session, challenge, completionHandler)
|
||||
return
|
||||
@ -315,8 +314,7 @@ extension SessionDelegate: URLSessionTaskDelegate {
|
||||
task: URLSessionTask,
|
||||
willPerformHTTPRedirection response: HTTPURLResponse,
|
||||
newRequest request: URLRequest,
|
||||
completionHandler: @escaping (URLRequest?) -> Void)
|
||||
{
|
||||
completionHandler: @escaping (URLRequest?) -> Void) {
|
||||
guard taskWillPerformHTTPRedirectionWithCompletion == nil else {
|
||||
taskWillPerformHTTPRedirectionWithCompletion?(session, task, response, request, completionHandler)
|
||||
return
|
||||
@ -342,8 +340,7 @@ extension SessionDelegate: URLSessionTaskDelegate {
|
||||
_ session: URLSession,
|
||||
task: URLSessionTask,
|
||||
didReceive challenge: URLAuthenticationChallenge,
|
||||
completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void)
|
||||
{
|
||||
completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
|
||||
guard taskDidReceiveChallengeWithCompletion == nil else {
|
||||
taskDidReceiveChallengeWithCompletion?(session, task, challenge, completionHandler)
|
||||
return
|
||||
@ -372,8 +369,7 @@ extension SessionDelegate: URLSessionTaskDelegate {
|
||||
open func urlSession(
|
||||
_ session: URLSession,
|
||||
task: URLSessionTask,
|
||||
needNewBodyStream completionHandler: @escaping (InputStream?) -> Void)
|
||||
{
|
||||
needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) {
|
||||
guard taskNeedNewBodyStreamWithCompletion == nil else {
|
||||
taskNeedNewBodyStreamWithCompletion?(session, task, completionHandler)
|
||||
return
|
||||
@ -398,8 +394,7 @@ extension SessionDelegate: URLSessionTaskDelegate {
|
||||
task: URLSessionTask,
|
||||
didSendBodyData bytesSent: Int64,
|
||||
totalBytesSent: Int64,
|
||||
totalBytesExpectedToSend: Int64)
|
||||
{
|
||||
totalBytesExpectedToSend: Int64) {
|
||||
if let taskDidSendBodyData = taskDidSendBodyData {
|
||||
taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend)
|
||||
} else if let delegate = self[task]?.delegate as? UploadTaskDelegate {
|
||||
@ -512,8 +507,7 @@ extension SessionDelegate: URLSessionDataDelegate {
|
||||
_ session: URLSession,
|
||||
dataTask: URLSessionDataTask,
|
||||
didReceive response: URLResponse,
|
||||
completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
|
||||
{
|
||||
completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
|
||||
guard dataTaskDidReceiveResponseWithCompletion == nil else {
|
||||
dataTaskDidReceiveResponseWithCompletion?(session, dataTask, response, completionHandler)
|
||||
return
|
||||
@ -536,8 +530,7 @@ extension SessionDelegate: URLSessionDataDelegate {
|
||||
open func urlSession(
|
||||
_ session: URLSession,
|
||||
dataTask: URLSessionDataTask,
|
||||
didBecome downloadTask: URLSessionDownloadTask)
|
||||
{
|
||||
didBecome downloadTask: URLSessionDownloadTask) {
|
||||
if let dataTaskDidBecomeDownloadTask = dataTaskDidBecomeDownloadTask {
|
||||
dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask)
|
||||
} else {
|
||||
@ -573,8 +566,7 @@ extension SessionDelegate: URLSessionDataDelegate {
|
||||
_ session: URLSession,
|
||||
dataTask: URLSessionDataTask,
|
||||
willCacheResponse proposedResponse: CachedURLResponse,
|
||||
completionHandler: @escaping (CachedURLResponse?) -> Void)
|
||||
{
|
||||
completionHandler: @escaping (CachedURLResponse?) -> Void) {
|
||||
guard dataTaskWillCacheResponseWithCompletion == nil else {
|
||||
dataTaskWillCacheResponseWithCompletion?(session, dataTask, proposedResponse, completionHandler)
|
||||
return
|
||||
@ -608,8 +600,7 @@ extension SessionDelegate: URLSessionDownloadDelegate {
|
||||
open func urlSession(
|
||||
_ session: URLSession,
|
||||
downloadTask: URLSessionDownloadTask,
|
||||
didFinishDownloadingTo location: URL)
|
||||
{
|
||||
didFinishDownloadingTo location: URL) {
|
||||
if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL {
|
||||
downloadTaskDidFinishDownloadingToURL(session, downloadTask, location)
|
||||
} else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate {
|
||||
@ -632,8 +623,7 @@ extension SessionDelegate: URLSessionDownloadDelegate {
|
||||
downloadTask: URLSessionDownloadTask,
|
||||
didWriteData bytesWritten: Int64,
|
||||
totalBytesWritten: Int64,
|
||||
totalBytesExpectedToWrite: Int64)
|
||||
{
|
||||
totalBytesExpectedToWrite: Int64) {
|
||||
if let downloadTaskDidWriteData = downloadTaskDidWriteData {
|
||||
downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite)
|
||||
} else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate {
|
||||
@ -661,8 +651,7 @@ extension SessionDelegate: URLSessionDownloadDelegate {
|
||||
_ session: URLSession,
|
||||
downloadTask: URLSessionDownloadTask,
|
||||
didResumeAtOffset fileOffset: Int64,
|
||||
expectedTotalBytes: Int64)
|
||||
{
|
||||
expectedTotalBytes: Int64) {
|
||||
if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset {
|
||||
downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes)
|
||||
} else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate {
|
||||
@ -716,8 +705,7 @@ extension SessionDelegate: URLSessionStreamDelegate {
|
||||
_ session: URLSession,
|
||||
streamTask: URLSessionStreamTask,
|
||||
didBecome inputStream: InputStream,
|
||||
outputStream: OutputStream)
|
||||
{
|
||||
outputStream: OutputStream) {
|
||||
streamTaskDidBecomeInputAndOutputStreams?(session, streamTask, inputStream, outputStream)
|
||||
}
|
||||
}
|
||||
|
@ -166,8 +166,7 @@ open class SessionManager {
|
||||
public init(
|
||||
configuration: URLSessionConfiguration = URLSessionConfiguration.default,
|
||||
delegate: SessionDelegate = SessionDelegate(),
|
||||
serverTrustPolicyManager: ServerTrustPolicyManager? = nil)
|
||||
{
|
||||
serverTrustPolicyManager: ServerTrustPolicyManager? = nil) {
|
||||
self.delegate = delegate
|
||||
self.session = URLSession(configuration: configuration, delegate: delegate, delegateQueue: nil)
|
||||
|
||||
@ -185,8 +184,7 @@ open class SessionManager {
|
||||
public init?(
|
||||
session: URLSession,
|
||||
delegate: SessionDelegate,
|
||||
serverTrustPolicyManager: ServerTrustPolicyManager? = nil)
|
||||
{
|
||||
serverTrustPolicyManager: ServerTrustPolicyManager? = nil) {
|
||||
guard delegate === session.delegate else { return nil }
|
||||
|
||||
self.delegate = delegate
|
||||
@ -229,8 +227,7 @@ open class SessionManager {
|
||||
parameters: Parameters? = nil,
|
||||
encoding: ParameterEncoding = URLEncoding.default,
|
||||
headers: HTTPHeaders? = nil)
|
||||
-> DataRequest
|
||||
{
|
||||
-> DataRequest {
|
||||
var originalRequest: URLRequest?
|
||||
|
||||
do {
|
||||
@ -320,8 +317,7 @@ open class SessionManager {
|
||||
encoding: ParameterEncoding = URLEncoding.default,
|
||||
headers: HTTPHeaders? = nil,
|
||||
to destination: DownloadRequest.DownloadFileDestination? = nil)
|
||||
-> DownloadRequest
|
||||
{
|
||||
-> DownloadRequest {
|
||||
do {
|
||||
let urlRequest = try URLRequest(url: url, method: method, headers: headers)
|
||||
let encodedURLRequest = try encoding.encode(urlRequest, with: parameters)
|
||||
@ -347,8 +343,7 @@ open class SessionManager {
|
||||
open func download(
|
||||
_ urlRequest: URLRequestConvertible,
|
||||
to destination: DownloadRequest.DownloadFileDestination? = nil)
|
||||
-> DownloadRequest
|
||||
{
|
||||
-> DownloadRequest {
|
||||
do {
|
||||
let urlRequest = try urlRequest.asURLRequest()
|
||||
return download(.request(urlRequest), to: destination)
|
||||
@ -384,8 +379,7 @@ open class SessionManager {
|
||||
open func download(
|
||||
resumingWith resumeData: Data,
|
||||
to destination: DownloadRequest.DownloadFileDestination? = nil)
|
||||
-> DownloadRequest
|
||||
{
|
||||
-> DownloadRequest {
|
||||
return download(.resumeData(resumeData), to: destination)
|
||||
}
|
||||
|
||||
@ -394,8 +388,7 @@ open class SessionManager {
|
||||
private func download(
|
||||
_ downloadable: DownloadRequest.Downloadable,
|
||||
to destination: DownloadRequest.DownloadFileDestination?)
|
||||
-> DownloadRequest
|
||||
{
|
||||
-> DownloadRequest {
|
||||
do {
|
||||
let task = try downloadable.task(session: session, adapter: adapter, queue: queue)
|
||||
let download = DownloadRequest(session: session, requestTask: .download(downloadable, task))
|
||||
@ -416,8 +409,7 @@ open class SessionManager {
|
||||
_ downloadable: DownloadRequest.Downloadable?,
|
||||
to destination: DownloadRequest.DownloadFileDestination?,
|
||||
failedWith error: Error)
|
||||
-> DownloadRequest
|
||||
{
|
||||
-> DownloadRequest {
|
||||
var downloadTask: Request.RequestTask = .download(nil, nil)
|
||||
|
||||
if let downloadable = downloadable {
|
||||
@ -458,8 +450,7 @@ open class SessionManager {
|
||||
to url: URLConvertible,
|
||||
method: HTTPMethod = .post,
|
||||
headers: HTTPHeaders? = nil)
|
||||
-> UploadRequest
|
||||
{
|
||||
-> UploadRequest {
|
||||
do {
|
||||
let urlRequest = try URLRequest(url: url, method: method, headers: headers)
|
||||
return upload(fileURL, with: urlRequest)
|
||||
@ -504,8 +495,7 @@ open class SessionManager {
|
||||
to url: URLConvertible,
|
||||
method: HTTPMethod = .post,
|
||||
headers: HTTPHeaders? = nil)
|
||||
-> UploadRequest
|
||||
{
|
||||
-> UploadRequest {
|
||||
do {
|
||||
let urlRequest = try URLRequest(url: url, method: method, headers: headers)
|
||||
return upload(data, with: urlRequest)
|
||||
@ -550,8 +540,7 @@ open class SessionManager {
|
||||
to url: URLConvertible,
|
||||
method: HTTPMethod = .post,
|
||||
headers: HTTPHeaders? = nil)
|
||||
-> UploadRequest
|
||||
{
|
||||
-> UploadRequest {
|
||||
do {
|
||||
let urlRequest = try URLRequest(url: url, method: method, headers: headers)
|
||||
return upload(stream, with: urlRequest)
|
||||
@ -611,8 +600,7 @@ open class SessionManager {
|
||||
to url: URLConvertible,
|
||||
method: HTTPMethod = .post,
|
||||
headers: HTTPHeaders? = nil,
|
||||
encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?)
|
||||
{
|
||||
encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) {
|
||||
do {
|
||||
let urlRequest = try URLRequest(url: url, method: method, headers: headers)
|
||||
|
||||
@ -654,8 +642,7 @@ open class SessionManager {
|
||||
multipartFormData: @escaping (MultipartFormData) -> Void,
|
||||
usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold,
|
||||
with urlRequest: URLRequestConvertible,
|
||||
encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?)
|
||||
{
|
||||
encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) {
|
||||
DispatchQueue.global(qos: .utility).async {
|
||||
let formData = MultipartFormData()
|
||||
multipartFormData(formData)
|
||||
|
@ -94,8 +94,7 @@ open class TaskDelegate: NSObject {
|
||||
task: URLSessionTask,
|
||||
willPerformHTTPRedirection response: HTTPURLResponse,
|
||||
newRequest request: URLRequest,
|
||||
completionHandler: @escaping (URLRequest?) -> Void)
|
||||
{
|
||||
completionHandler: @escaping (URLRequest?) -> Void) {
|
||||
var redirectRequest: URLRequest? = request
|
||||
|
||||
if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection {
|
||||
@ -110,8 +109,7 @@ open class TaskDelegate: NSObject {
|
||||
_ session: URLSession,
|
||||
task: URLSessionTask,
|
||||
didReceive challenge: URLAuthenticationChallenge,
|
||||
completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void)
|
||||
{
|
||||
completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
|
||||
var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling
|
||||
var credential: URLCredential?
|
||||
|
||||
@ -150,8 +148,7 @@ open class TaskDelegate: NSObject {
|
||||
func urlSession(
|
||||
_ session: URLSession,
|
||||
task: URLSessionTask,
|
||||
needNewBodyStream completionHandler: @escaping (InputStream?) -> Void)
|
||||
{
|
||||
needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) {
|
||||
var bodyStream: InputStream?
|
||||
|
||||
if let taskNeedNewBodyStream = taskNeedNewBodyStream {
|
||||
@ -237,8 +234,7 @@ class DataTaskDelegate: TaskDelegate, URLSessionDataDelegate {
|
||||
_ session: URLSession,
|
||||
dataTask: URLSessionDataTask,
|
||||
didReceive response: URLResponse,
|
||||
completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
|
||||
{
|
||||
completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
|
||||
var disposition: URLSession.ResponseDisposition = .allow
|
||||
|
||||
expectedContentLength = response.expectedContentLength
|
||||
@ -253,8 +249,7 @@ class DataTaskDelegate: TaskDelegate, URLSessionDataDelegate {
|
||||
func urlSession(
|
||||
_ session: URLSession,
|
||||
dataTask: URLSessionDataTask,
|
||||
didBecome downloadTask: URLSessionDownloadTask)
|
||||
{
|
||||
didBecome downloadTask: URLSessionDownloadTask) {
|
||||
dataTaskDidBecomeDownloadTask?(session, dataTask, downloadTask)
|
||||
}
|
||||
|
||||
@ -287,8 +282,7 @@ class DataTaskDelegate: TaskDelegate, URLSessionDataDelegate {
|
||||
_ session: URLSession,
|
||||
dataTask: URLSessionDataTask,
|
||||
willCacheResponse proposedResponse: CachedURLResponse,
|
||||
completionHandler: @escaping (CachedURLResponse?) -> Void)
|
||||
{
|
||||
completionHandler: @escaping (CachedURLResponse?) -> Void) {
|
||||
var cachedResponse: CachedURLResponse? = proposedResponse
|
||||
|
||||
if let dataTaskWillCacheResponse = dataTaskWillCacheResponse {
|
||||
@ -343,8 +337,7 @@ class DownloadTaskDelegate: TaskDelegate, URLSessionDownloadDelegate {
|
||||
func urlSession(
|
||||
_ session: URLSession,
|
||||
downloadTask: URLSessionDownloadTask,
|
||||
didFinishDownloadingTo location: URL)
|
||||
{
|
||||
didFinishDownloadingTo location: URL) {
|
||||
temporaryURL = location
|
||||
|
||||
guard
|
||||
@ -379,8 +372,7 @@ class DownloadTaskDelegate: TaskDelegate, URLSessionDownloadDelegate {
|
||||
downloadTask: URLSessionDownloadTask,
|
||||
didWriteData bytesWritten: Int64,
|
||||
totalBytesWritten: Int64,
|
||||
totalBytesExpectedToWrite: Int64)
|
||||
{
|
||||
totalBytesExpectedToWrite: Int64) {
|
||||
if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() }
|
||||
|
||||
if let downloadTaskDidWriteData = downloadTaskDidWriteData {
|
||||
@ -405,8 +397,7 @@ class DownloadTaskDelegate: TaskDelegate, URLSessionDownloadDelegate {
|
||||
_ session: URLSession,
|
||||
downloadTask: URLSessionDownloadTask,
|
||||
didResumeAtOffset fileOffset: Int64,
|
||||
expectedTotalBytes: Int64)
|
||||
{
|
||||
expectedTotalBytes: Int64) {
|
||||
if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset {
|
||||
downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes)
|
||||
} else {
|
||||
@ -448,8 +439,7 @@ class UploadTaskDelegate: DataTaskDelegate {
|
||||
task: URLSessionTask,
|
||||
didSendBodyData bytesSent: Int64,
|
||||
totalBytesSent: Int64,
|
||||
totalBytesExpectedToSend: Int64)
|
||||
{
|
||||
totalBytesExpectedToSend: Int64) {
|
||||
if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() }
|
||||
|
||||
if let taskDidSendBodyData = taskDidSendBodyData {
|
||||
|
@ -64,8 +64,7 @@ public struct Timeline {
|
||||
requestStartTime: CFAbsoluteTime = 0.0,
|
||||
initialResponseTime: CFAbsoluteTime = 0.0,
|
||||
requestCompletedTime: CFAbsoluteTime = 0.0,
|
||||
serializationCompletedTime: CFAbsoluteTime = 0.0)
|
||||
{
|
||||
serializationCompletedTime: CFAbsoluteTime = 0.0) {
|
||||
self.requestStartTime = requestStartTime
|
||||
self.initialResponseTime = initialResponseTime
|
||||
self.requestCompletedTime = requestCompletedTime
|
||||
|
@ -94,8 +94,7 @@ extension Request {
|
||||
statusCode acceptableStatusCodes: S,
|
||||
response: HTTPURLResponse)
|
||||
-> ValidationResult
|
||||
where S.Iterator.Element == Int
|
||||
{
|
||||
where S.Iterator.Element == Int {
|
||||
if acceptableStatusCodes.contains(response.statusCode) {
|
||||
return .success
|
||||
} else {
|
||||
@ -111,8 +110,7 @@ extension Request {
|
||||
response: HTTPURLResponse,
|
||||
data: Data?)
|
||||
-> ValidationResult
|
||||
where S.Iterator.Element == String
|
||||
{
|
||||
where S.Iterator.Element == String {
|
||||
guard let data = data, data.count > 0 else { return .success }
|
||||
|
||||
guard
|
||||
|
@ -13,7 +13,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
|
||||
var window: UIWindow?
|
||||
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||
// Override point for customization after application launch.
|
||||
return true
|
||||
@ -41,6 +40,4 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,4 @@ class ViewController: UIViewController {
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -12,21 +12,21 @@ import XCTest
|
||||
@testable import SwaggerClient
|
||||
|
||||
class DateFormatTests: XCTestCase {
|
||||
|
||||
|
||||
struct DateTest: Codable {
|
||||
let date: Date
|
||||
}
|
||||
|
||||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
|
||||
override func tearDown() {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
|
||||
func testEncodeToJSONAlwaysResultsInUTCEncodedDate() {
|
||||
var dateComponents = DateComponents()
|
||||
dateComponents.calendar = Calendar(identifier: .gregorian)
|
||||
@ -37,40 +37,40 @@ class DateFormatTests: XCTestCase {
|
||||
dateComponents.minute = 35
|
||||
dateComponents.second = 43
|
||||
dateComponents.nanosecond = 500
|
||||
|
||||
|
||||
// Testing a date with a timezone of +00:00 (UTC)
|
||||
dateComponents.timeZone = TimeZone(secondsFromGMT: 0)
|
||||
XCTAssert(dateComponents.isValidDate)
|
||||
|
||||
|
||||
guard let utcDate = dateComponents.date else {
|
||||
XCTFail("Couldn't get a valid date")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
var encodedDate = utcDate.encodeToJSON() as! String
|
||||
XCTAssert(encodedDate.hasSuffix("Z"))
|
||||
|
||||
|
||||
// test with a positive timzone offset from UTC
|
||||
dateComponents.timeZone = TimeZone(secondsFromGMT: 60 * 60) // +01:00
|
||||
XCTAssert(dateComponents.isValidDate)
|
||||
|
||||
|
||||
guard let nonUTCDate1 = dateComponents.date else {
|
||||
XCTFail("Couldn't get a valid date")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
encodedDate = nonUTCDate1.encodeToJSON() as! String
|
||||
XCTAssert(encodedDate.hasSuffix("Z"))
|
||||
|
||||
|
||||
// test with a negative timzone offset from UTC
|
||||
dateComponents.timeZone = TimeZone(secondsFromGMT: -(60 * 60)) // -01:00
|
||||
XCTAssert(dateComponents.isValidDate)
|
||||
|
||||
|
||||
guard let nonUTCDate2 = dateComponents.date else {
|
||||
XCTFail("Couldn't get a valid date")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
encodedDate = nonUTCDate2.encodeToJSON() as! String
|
||||
XCTAssert(encodedDate.hasSuffix("Z"))
|
||||
}
|
||||
@ -79,7 +79,7 @@ class DateFormatTests: XCTestCase {
|
||||
let jsonData = "{\"date\":\"1970-01-01T00:00:00.000Z\"}".data(using: .utf8)!
|
||||
let decodeResult = CodableHelper.decode(DateTest.self, from: jsonData)
|
||||
XCTAssert(decodeResult.decodableObj != nil && decodeResult.error == nil)
|
||||
|
||||
|
||||
var dateComponents = DateComponents()
|
||||
dateComponents.calendar = Calendar(identifier: .gregorian)
|
||||
dateComponents.year = 1970
|
||||
@ -88,16 +88,16 @@ class DateFormatTests: XCTestCase {
|
||||
dateComponents.hour = 00
|
||||
dateComponents.minute = 00
|
||||
dateComponents.second = 00
|
||||
|
||||
|
||||
// Testing a date with a timezone of +00:00 (UTC)
|
||||
dateComponents.timeZone = TimeZone(secondsFromGMT: 0)
|
||||
XCTAssert(dateComponents.isValidDate)
|
||||
|
||||
|
||||
guard let date = dateComponents.date else {
|
||||
XCTFail("Couldn't get a valid date")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
let dateTest = DateTest(date: date)
|
||||
let encodeResult = CodableHelper.encode(dateTest)
|
||||
XCTAssert(encodeResult.data != nil && encodeResult.error == nil)
|
||||
@ -105,9 +105,9 @@ class DateFormatTests: XCTestCase {
|
||||
XCTFail("Unable to convert encoded data to string.")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
let exampleJSONString = "{\"date\":\"1970-01-01T00:00:00.000Z\"}"
|
||||
XCTAssert(jsonString == exampleJSONString, "Encoded JSON String: \(jsonString) should match: \(exampleJSONString)")
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -11,61 +11,61 @@ import XCTest
|
||||
@testable import SwaggerClient
|
||||
|
||||
class PetAPITests: XCTestCase {
|
||||
|
||||
|
||||
let testTimeout = 10.0
|
||||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
|
||||
override func tearDown() {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
|
||||
func test1CreatePet() {
|
||||
let expectation = self.expectation(description: "testCreatePet")
|
||||
let category = PetstoreClient.Category(id: 1234, name: "eyeColor")
|
||||
let tags = [Tag(id: 1234, name: "New York"), Tag(id: 124321, name: "Jose")]
|
||||
let newPet = Pet(id: 1000, category: category, name: "Fluffy", photoUrls: ["https://petstore.com/sample/photo1.jpg", "https://petstore.com/sample/photo2.jpg"], tags: tags, status: .available)
|
||||
|
||||
PetAPI.addPet(body: newPet) { (response, error) in
|
||||
PetAPI.addPet(body: newPet) { (_, error) in
|
||||
guard error == nil else {
|
||||
XCTFail("error creating pet")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
expectation.fulfill()
|
||||
}
|
||||
|
||||
|
||||
self.waitForExpectations(timeout: testTimeout, handler: nil)
|
||||
}
|
||||
|
||||
|
||||
func test2GetPet() {
|
||||
let expectation = self.expectation(description: "testGetPet")
|
||||
|
||||
|
||||
PetAPI.getPetById(petId: 1000) { (pet, error) in
|
||||
guard error == nil else {
|
||||
XCTFail("error retrieving pet")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if let pet = pet {
|
||||
XCTAssert(pet.id == 1000, "invalid id")
|
||||
XCTAssert(pet.name == "Fluffy", "invalid name")
|
||||
|
||||
|
||||
expectation.fulfill()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
self.waitForExpectations(timeout: testTimeout, handler: nil)
|
||||
}
|
||||
|
||||
|
||||
func test3DeletePet() {
|
||||
let expectation = self.expectation(description: "testDeletePet")
|
||||
|
||||
PetAPI.deletePet(petId: 1000) { (response, error) in
|
||||
|
||||
PetAPI.deletePet(petId: 1000) { (_, error) in
|
||||
guard error == nil else {
|
||||
XCTFail("error deleting pet")
|
||||
return
|
||||
@ -73,7 +73,7 @@ class PetAPITests: XCTestCase {
|
||||
|
||||
expectation.fulfill()
|
||||
}
|
||||
|
||||
|
||||
self.waitForExpectations(timeout: testTimeout, handler: nil)
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ import XCTest
|
||||
class StoreAPITests: XCTestCase {
|
||||
|
||||
let isoDateFormat = "yyyy-MM-dd'T'HH:mm:ssZ"
|
||||
|
||||
|
||||
let testTimeout = 10.0
|
||||
|
||||
func test1PlaceOrder() {
|
||||
@ -27,45 +27,45 @@ class StoreAPITests: XCTestCase {
|
||||
XCTFail("error placing order: \(error.debugDescription)")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if let order = order {
|
||||
XCTAssert(order.id == 1000, "invalid id")
|
||||
XCTAssert(order.quantity == 10, "invalid quantity")
|
||||
XCTAssert(order.status == .placed, "invalid status")
|
||||
XCTAssert(order.shipDate!.isEqual(shipDate, format: self.isoDateFormat),
|
||||
"Date should be idempotent")
|
||||
|
||||
|
||||
expectation.fulfill()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
self.waitForExpectations(timeout: testTimeout, handler: nil)
|
||||
}
|
||||
|
||||
|
||||
func test2GetOrder() {
|
||||
let expectation = self.expectation(description: "testGetOrder")
|
||||
|
||||
|
||||
StoreAPI.getOrderById(orderId: 1000) { (order, error) in
|
||||
guard error == nil else {
|
||||
XCTFail("error retrieving order: \(error.debugDescription)")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if let order = order {
|
||||
XCTAssert(order.id == 1000, "invalid id")
|
||||
XCTAssert(order.quantity == 10, "invalid quantity")
|
||||
XCTAssert(order.status == .placed, "invalid status")
|
||||
|
||||
|
||||
expectation.fulfill()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
self.waitForExpectations(timeout: testTimeout, handler: nil)
|
||||
}
|
||||
|
||||
|
||||
func test3DeleteOrder() {
|
||||
let expectation = self.expectation(description: "testDeleteOrder")
|
||||
|
||||
|
||||
StoreAPI.deleteOrder(orderId: "1000") { (response, error) in
|
||||
guard error == nil else {
|
||||
XCTFail("error deleting order")
|
||||
@ -79,7 +79,7 @@ class StoreAPITests: XCTestCase {
|
||||
|
||||
expectation.fulfill()
|
||||
}
|
||||
|
||||
|
||||
self.waitForExpectations(timeout: testTimeout, handler: nil)
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ class StoreAPITests: XCTestCase {
|
||||
progressExpectation.fulfill()
|
||||
}
|
||||
|
||||
requestBuilder.execute { (response, error) in
|
||||
requestBuilder.execute { (_, _) in
|
||||
responseExpectation.fulfill()
|
||||
}
|
||||
|
||||
|
@ -11,22 +11,22 @@ import XCTest
|
||||
@testable import SwaggerClient
|
||||
|
||||
class UserAPITests: XCTestCase {
|
||||
|
||||
|
||||
let testTimeout = 10.0
|
||||
|
||||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
|
||||
override func tearDown() {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
|
||||
func testLogin() {
|
||||
let expectation = self.expectation(description: "testLogin")
|
||||
|
||||
|
||||
UserAPI.loginUser(username: "swiftTester", password: "swift") { (_, error) in
|
||||
guard error == nil else {
|
||||
XCTFail("error logging in")
|
||||
@ -35,14 +35,14 @@ class UserAPITests: XCTestCase {
|
||||
|
||||
expectation.fulfill()
|
||||
}
|
||||
|
||||
|
||||
self.waitForExpectations(timeout: testTimeout, handler: nil)
|
||||
}
|
||||
|
||||
|
||||
func testLogout() {
|
||||
let expectation = self.expectation(description: "testLogout")
|
||||
|
||||
UserAPI.logoutUser { (response, error) in
|
||||
|
||||
UserAPI.logoutUser { (_, error) in
|
||||
guard error == nil else {
|
||||
XCTFail("error logging out")
|
||||
return
|
||||
@ -50,7 +50,7 @@ class UserAPITests: XCTestCase {
|
||||
|
||||
expectation.fulfill()
|
||||
}
|
||||
|
||||
|
||||
self.waitForExpectations(timeout: testTimeout, handler: nil)
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ class UserAPITests: XCTestCase {
|
||||
// into the path. So we intentionally introduce a path with spaces.
|
||||
let userRequestBuilder = UserAPI.getUserByNameWithRequestBuilder(username: "User Name With Spaces")
|
||||
let urlContainsSpace = userRequestBuilder.URLString.contains(" ")
|
||||
|
||||
|
||||
XCTAssert(!urlContainsSpace, "Expected URL to be escaped, but it was not.")
|
||||
}
|
||||
|
||||
|
10
samples/client/petstore/swift4/default/docs/CatAllOf.md
Normal file
10
samples/client/petstore/swift4/default/docs/CatAllOf.md
Normal file
@ -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)
|
||||
|
||||
|
10
samples/client/petstore/swift4/default/docs/DogAllOf.md
Normal file
10
samples/client/petstore/swift4/default/docs/DogAllOf.md
Normal file
@ -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)
|
||||
|
||||
|
@ -95,7 +95,7 @@ UserAPI.createUsersWithArrayInput(body: body) { (response, error) in
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**[User]**](Array.md) | List of user object |
|
||||
**body** | [**[User]**](User.md) | List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -143,7 +143,7 @@ UserAPI.createUsersWithListInput(body: body) { (response, error) in
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**[User]**](Array.md) | List of user object |
|
||||
**body** | [**[User]**](User.md) | List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
|
15
samples/client/petstore/swift4/default/project.yml
Normal file
15
samples/client/petstore/swift4/default/project.yml
Normal file
@ -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
|
||||
scheme: {}
|
||||
dependencies:
|
||||
- carthage: Alamofire
|
@ -1 +1 @@
|
||||
4.0.0-SNAPSHOT
|
||||
4.1.0-SNAPSHOT
|
22
samples/client/petstore/swift4/objcCompatible/Info.plist
Normal file
22
samples/client/petstore/swift4/objcCompatible/Info.plist
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1,601 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 50;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
02903CEC38DC202565BC08CB040AC4E9 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */; };
|
||||
0462F801432CF94C7EF51D0532737A7E /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */; };
|
||||
08D87E4FECF24910F0DA0F1D2E2D955A /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */; };
|
||||
08F5828F0C2BCF07A9E4917DBBB993AE /* AdditionalPropertiesInteger.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA2F3566156A4ABC465F201B4A1F6227 /* AdditionalPropertiesInteger.swift */; };
|
||||
1143FFF06DEE01E5B0F1368AA05BE1B4 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */; };
|
||||
122BBAE8245606CC040EEB6B9254E376 /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */; };
|
||||
12327BF7304AA897C5D2A1250B1659B7 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */; };
|
||||
12BB95C66D63090732BB9E0379836E3C /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */; };
|
||||
16E9A5E22B4823DE282E7F4C18A21EA8 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */; };
|
||||
18F19872A0DFB4CC3D9C696BBCA64EFD /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119370FB05F /* Cat.swift */; };
|
||||
196E9846B27D736630CCF90497696859 /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */; };
|
||||
271D94A05C47B602A2433B9CD3D9DCDC /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */; };
|
||||
293F4E0FBFC8297E414A3CDBB7F29A96 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */; };
|
||||
297E365D1E4672C43C56E0AFD855FFBF /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */; };
|
||||
2A35688C985E9CB1EB7732AC2AD46B82 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */; };
|
||||
2DF4544D4D3D6CF7047A59FB89ED31BD /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */; };
|
||||
3251A3722981CE46261615CFBA96A08D /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */; };
|
||||
36734C4EB3362A114A7CB5F25EE39E6D /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */; };
|
||||
39F9FBA1AC5C2612ECA1FF715EBFC287 /* AdditionalPropertiesString.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFE215C1B526E0418ED301B15357B970 /* AdditionalPropertiesString.swift */; };
|
||||
3D8E407B1DF4FA5A5F16B64E3A285781 /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */; };
|
||||
41D8A105135868152A56E2AC475049BB /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */; };
|
||||
42C51BC034E8B0CAA29A068F6B0DC815 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */; };
|
||||
491676EC91BFEF95A12556888EED87B5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */; };
|
||||
4C28BFEC5E7C8150DEFD83E09C1A1D32 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */; };
|
||||
52B5604F986335DB69CD2B430FB83BAB /* AdditionalPropertiesAnyType.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5AB1037D937AADF8B4A70C96D5E5D61 /* AdditionalPropertiesAnyType.swift */; };
|
||||
58F9704B295AC436D6FB98FA669E2344 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */; };
|
||||
59C00CBB07761CAC8DCE7054E34AD5D9 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */; };
|
||||
59C2F5495C98836BFA9E10BF5C13BC2C /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */; };
|
||||
59EAB3527305A37ED99FB210045B69EA /* AdditionalPropertiesNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E0512B3582586B4C0C598D5DB1C0D39 /* AdditionalPropertiesNumber.swift */; };
|
||||
5ACDD7CC312167589335E9CA5998E770 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */; };
|
||||
655AA371771C7BD72EE0AAC0C90DFFF0 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */; };
|
||||
6600BB1500AE35A3C80F7C83F6444552 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */; };
|
||||
6CD20EE568DDAD2304BF0C4B1A70C8DC /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */; };
|
||||
7367A9D91D4B101F2D28AC56ED89F175 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */; };
|
||||
82D4D0C8AD0354A700C8ACD421ABED55 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */; };
|
||||
83A2D1863FB136C0DFC423319F4EED65 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */; };
|
||||
92FB161BF1E57D11B116AF0292D5835C /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718FF4525C81 /* Client.swift */; };
|
||||
97C99615237E1B662242E04F527B38B9 /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */; };
|
||||
988F461F59E4E1091156840007CB3773 /* AdditionalPropertiesBoolean.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CC24C01A55F644957196F9F81D10F81 /* AdditionalPropertiesBoolean.swift */; };
|
||||
A190AF5A3988639ED4B78163D0EA3CA4 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */; };
|
||||
A438970025AE69ED407BC1E67CC6359E /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */; };
|
||||
A9F1AAF6CE029DD3B4F8AC841F0B6BC6 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */; };
|
||||
AE9D2E1DB59AF6575AC4AC6756C5A937 /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */; };
|
||||
B399A1742F23330FDCA450EAB98F51F1 /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */; };
|
||||
BB02FDCF1B2B0E457E1C2BF39FBB599D /* XmlItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2253391845B73B8BA3680491575CC07 /* XmlItem.swift */; };
|
||||
BF7D58FBCF5E4D3F2932FCC0E62BED40 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */; };
|
||||
C15AC1CC631E96D0360EB8C15BF30452 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */; };
|
||||
C1CACABE18A7ADCE37D1CD9DC9128304 /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A4315C49A /* List.swift */; };
|
||||
C2EDEB747887399B13A6DFD72A219CB2 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */; };
|
||||
C329EE55B2FCC9174ED3B128D67C5E8C /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */; };
|
||||
D3A17B7FAFA8A7A210875BBCDCC30116 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */; };
|
||||
D68F23CD4B5178493CE7AE8DFB868EAE /* AdditionalPropertiesArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FEE553331890581C2FF366F9EA0956D /* AdditionalPropertiesArray.swift */; };
|
||||
D70EC94E346077DE1482231DD4498BED /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */; };
|
||||
DB1CE39011A741D07E187663291B5DE5 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */; };
|
||||
DB724C4F1AD5DF025B53A9A2E0A49E3D /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */; };
|
||||
DDBC3CF5E447D8D838F0FE200420EEE3 /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */; };
|
||||
DEC892724574BB29BD65869374F83982 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */; };
|
||||
E2C40F0E34DB8C21A806262C72841A51 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118F057604D /* SpecialModelName.swift */; };
|
||||
E51ADEC931806B20A041303E539A8BE2 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */; };
|
||||
E57CD12D2F500D40B4135D0F5ECA9866 /* AdditionalPropertiesObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72FEDC94BA0E37214D360871B284BC8A /* AdditionalPropertiesObject.swift */; };
|
||||
F02BEF9A8503B3848B045370451E85F6 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4CF550442B /* Models.swift */; };
|
||||
F21D10C71A9DE7D0467AFD23FD391D2E /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08AA65292F7 /* Return.swift */; };
|
||||
FB4A053CDCD75E48B755CC22D463A3FC /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */; };
|
||||
FECA03F0388E84AE1B22638605D8AC9F /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = "<group>"; };
|
||||
0CC24C01A55F644957196F9F81D10F81 /* AdditionalPropertiesBoolean.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesBoolean.swift; sourceTree = "<group>"; };
|
||||
10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = "<group>"; };
|
||||
164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = "<group>"; };
|
||||
1E0512B3582586B4C0C598D5DB1C0D39 /* AdditionalPropertiesNumber.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesNumber.swift; sourceTree = "<group>"; };
|
||||
212AA914B7F1793A4E32C119370FB05F /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = "<group>"; };
|
||||
27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = "<group>"; };
|
||||
28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = "<group>"; };
|
||||
3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = "<group>"; };
|
||||
35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = "<group>"; };
|
||||
37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = "<group>"; };
|
||||
386FD590658E90509C121118F057604D /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = "<group>"; };
|
||||
3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = "<group>"; };
|
||||
396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = "<group>"; };
|
||||
3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = "<group>"; };
|
||||
3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = "<group>"; };
|
||||
47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = "<group>"; };
|
||||
4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = "<group>"; };
|
||||
4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = "<group>"; };
|
||||
4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = "<group>"; };
|
||||
4FEE553331890581C2FF366F9EA0956D /* AdditionalPropertiesArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesArray.swift; sourceTree = "<group>"; };
|
||||
5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = "<group>"; };
|
||||
6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = "<group>"; };
|
||||
6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = "<group>"; };
|
||||
6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = "<group>"; };
|
||||
72FEDC94BA0E37214D360871B284BC8A /* AdditionalPropertiesObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesObject.swift; sourceTree = "<group>"; };
|
||||
7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = "<group>"; };
|
||||
7A6070F581E611FF44AFD40A4315C49A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = "<group>"; };
|
||||
7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = "<group>"; };
|
||||
7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = "<group>"; };
|
||||
82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = "<group>"; };
|
||||
84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = "<group>"; };
|
||||
8699F7966F748ED026A6FB4CF550442B /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = "<group>"; };
|
||||
897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = "<group>"; };
|
||||
8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = "<group>"; };
|
||||
95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = "<group>"; };
|
||||
9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = "<group>"; };
|
||||
9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = "<group>"; };
|
||||
9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = "<group>"; };
|
||||
9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = "<group>"; };
|
||||
A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = "<group>"; };
|
||||
A2253391845B73B8BA3680491575CC07 /* XmlItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XmlItem.swift; sourceTree = "<group>"; };
|
||||
A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = "<group>"; };
|
||||
A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = "<group>"; };
|
||||
A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = "<group>"; };
|
||||
A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = "<group>"; };
|
||||
A913A57E72D723632E9A718FF4525C81 /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = "<group>"; };
|
||||
B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = "<group>"; };
|
||||
B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = "<group>"; };
|
||||
B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = "<group>"; };
|
||||
B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; };
|
||||
B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = "<group>"; };
|
||||
C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = "<group>"; };
|
||||
C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = "<group>"; };
|
||||
C81447828475F76C5CF4F08AA65292F7 /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = "<group>"; };
|
||||
E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = "<group>"; };
|
||||
EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = "<group>"; };
|
||||
ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = "<group>"; };
|
||||
F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = "<group>"; };
|
||||
F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = "<group>"; };
|
||||
F5AB1037D937AADF8B4A70C96D5E5D61 /* AdditionalPropertiesAnyType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesAnyType.swift; sourceTree = "<group>"; };
|
||||
FA2F3566156A4ABC465F201B4A1F6227 /* AdditionalPropertiesInteger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesInteger.swift; sourceTree = "<group>"; };
|
||||
FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = "<group>"; };
|
||||
FFE215C1B526E0418ED301B15357B970 /* AdditionalPropertiesString.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesString.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
D1990C2A394CCF025EF98A2FB828C79A /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4C28BFEC5E7C8150DEFD83E09C1A1D32 /* Alamofire.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
1E464C0937FE0D3A7A0FE29AF446553C /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7861EE241895128F64DD787367B3022D /* Carthage */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4FBDCF1330A9AB9122780DB3FA21DE4C /* Models */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F5AB1037D937AADF8B4A70C96D5E5D61 /* AdditionalPropertiesAnyType.swift */,
|
||||
4FEE553331890581C2FF366F9EA0956D /* AdditionalPropertiesArray.swift */,
|
||||
0CC24C01A55F644957196F9F81D10F81 /* AdditionalPropertiesBoolean.swift */,
|
||||
396DEF3156BA0D12D0FC5C3C3AAF52C4 /* AdditionalPropertiesClass.swift */,
|
||||
FA2F3566156A4ABC465F201B4A1F6227 /* AdditionalPropertiesInteger.swift */,
|
||||
1E0512B3582586B4C0C598D5DB1C0D39 /* AdditionalPropertiesNumber.swift */,
|
||||
72FEDC94BA0E37214D360871B284BC8A /* AdditionalPropertiesObject.swift */,
|
||||
FFE215C1B526E0418ED301B15357B970 /* AdditionalPropertiesString.swift */,
|
||||
95568E7C35F119EB4A12B4982B3FB31F /* Animal.swift */,
|
||||
8D22BE01748F51106DE0233299A9061E /* AnimalFarm.swift */,
|
||||
A8E7B833748B4F0C7CDA90C6E500B199 /* ApiResponse.swift */,
|
||||
7B1B8B838B5D9D312F2002EBAD946378 /* ArrayOfArrayOfNumberOnly.swift */,
|
||||
B65BB72353DA24536A9049BEC3D234C8 /* ArrayOfNumberOnly.swift */,
|
||||
F1A0379CDFC55705AE76C99867B8DB08 /* ArrayTest.swift */,
|
||||
A7B38FA00A494D13F4C382A3D87FBF59 /* Capitalization.swift */,
|
||||
212AA914B7F1793A4E32C119370FB05F /* Cat.swift */,
|
||||
3AD0F94F512DFBC09F9CC79AF4BD9BFD /* CatAllOf.swift */,
|
||||
6F2985D01F8D60A4B1925C694330E6CB /* Category.swift */,
|
||||
3C30827D8EAF8EA684E7BCEA5A1E93B2 /* ClassModel.swift */,
|
||||
A913A57E72D723632E9A718FF4525C81 /* Client.swift */,
|
||||
C6C3E1129526A353B963EFD74ED8419C /* Dog.swift */,
|
||||
A21A69C8402A60E01116ABBDEE8943DB /* DogAllOf.swift */,
|
||||
10503995D9EFD031A2EFB57603B3132E /* EnumArrays.swift */,
|
||||
4B2C97AE6ACA1E5FB88F5BAA2DB76FDC /* EnumClass.swift */,
|
||||
FD60AEA646791E0EDE885DE1E680A687 /* EnumTest.swift */,
|
||||
3933D3B2A3AC4577094D0C23D1C1B266 /* File.swift */,
|
||||
4B3666552AA854DAF9C480A3354C9D7C /* FileSchemaTestClass.swift */,
|
||||
3156CE41C001C80379B84BDB435DECCB /* FormatTest.swift */,
|
||||
4C7FBC641752D2E13B15097311139DDC /* HasOnlyReadOnly.swift */,
|
||||
7A6070F581E611FF44AFD40A4315C49A /* List.swift */,
|
||||
7986861626C2B1CB49AD7000C6343270 /* MapTest.swift */,
|
||||
9AD714C7CC59BDD18DE8DF4ED40B9DA9 /* MixedPropertiesAndAdditionalPropertiesClass.swift */,
|
||||
82A2C3DC2235F0114C2B08E553F46874 /* Model200Response.swift */,
|
||||
5AD994DFAA0DA93C188A4DBA16688767 /* Name.swift */,
|
||||
B8E0B16084741FCB82389F5854AC5E26 /* NumberOnly.swift */,
|
||||
27B2E9EF856E89FEAA359A3AC4A2CF5D /* Order.swift */,
|
||||
F4E0AD8F60A91F72C768756002C14BF9 /* OuterComposite.swift */,
|
||||
C15008AABC804EB6FB4CDAC6B871E6B0 /* OuterEnum.swift */,
|
||||
ECFEB4C6C257B3BB3CEA36D10A5EDC17 /* Pet.swift */,
|
||||
6FD42727E001E799E458C2924CF813CC /* ReadOnlyFirst.swift */,
|
||||
C81447828475F76C5CF4F08AA65292F7 /* Return.swift */,
|
||||
386FD590658E90509C121118F057604D /* SpecialModelName.swift */,
|
||||
47B4DEBABEFE140768CFB70B19D23029 /* StringBooleanMap.swift */,
|
||||
B2896F8BFD1AA2965C8A30158F0EDA8C /* Tag.swift */,
|
||||
EBC76F6D4D2AA8084B7EB50E5C15E475 /* TypeHolderDefault.swift */,
|
||||
19B65C66C97F082718DDD703F39DE1C2 /* TypeHolderExample.swift */,
|
||||
E5565A447062C7B8F695F4517DB5E4A5 /* User.swift */,
|
||||
A2253391845B73B8BA3680491575CC07 /* XmlItem.swift */,
|
||||
);
|
||||
path = Models;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5FBA6AE5F64CD737F88B4565AC3CCD3B = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9B364C01750D7AA4F983B9E77B01BCC6 /* PetstoreClient */,
|
||||
1E464C0937FE0D3A7A0FE29AF446553C /* Frameworks */,
|
||||
857F0DEA1890CE66D6DAD556C55821A6 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
67BF3478113E6B4DF1C4E04F40BF58C4 /* OpenAPIs */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
84A201508DF2B697D65F263189C08721 /* AlamofireImplementations.swift */,
|
||||
897716962D472FE162B723CB713AA6D3 /* APIHelper.swift */,
|
||||
37DF825B8F3BADA2B2537D17CDC48633 /* APIs.swift */,
|
||||
02A6F6BB2152ACEE1416D44AB3955243 /* CodableHelper.swift */,
|
||||
28A444949BBC254798C3B3DD14AAF2CD /* Configuration.swift */,
|
||||
B8C298FC8929DCB369053F118D7DF28F /* Extensions.swift */,
|
||||
9791B840B8D6EAA35343B00FA277963A /* JSONEncodableEncoding.swift */,
|
||||
35D710108A69DD8A5297F926A66DA21F /* JSONEncodingHelper.swift */,
|
||||
8699F7966F748ED026A6FB4CF550442B /* Models.swift */,
|
||||
F956D0CCAE23BCFD1C7BDD5D47944AA5 /* APIs */,
|
||||
4FBDCF1330A9AB9122780DB3FA21DE4C /* Models */,
|
||||
);
|
||||
path = OpenAPIs;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
7861EE241895128F64DD787367B3022D /* Carthage */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A012205B41CB71A62B86EECDEAFB0990 /* iOS */,
|
||||
);
|
||||
name = Carthage;
|
||||
path = Carthage/Build;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
857F0DEA1890CE66D6DAD556C55821A6 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9B364C01750D7AA4F983B9E77B01BCC6 /* PetstoreClient */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EF4C81BDD734856ED5023B777D35098B /* Classes */,
|
||||
);
|
||||
path = PetstoreClient;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A012205B41CB71A62B86EECDEAFB0990 /* iOS */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A235FA3FDFB086CC69CDE83DFC1F4BC9 /* Alamofire.framework */,
|
||||
);
|
||||
path = iOS;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EF4C81BDD734856ED5023B777D35098B /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
67BF3478113E6B4DF1C4E04F40BF58C4 /* OpenAPIs */,
|
||||
);
|
||||
path = Classes;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F956D0CCAE23BCFD1C7BDD5D47944AA5 /* APIs */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9DF24D2714B9C4CF14146E88FDDC01A5 /* AnotherFakeAPI.swift */,
|
||||
6E00950725DC44436C5E238CDD2EC164 /* FakeAPI.swift */,
|
||||
B42354B407EC173BEB54E0429D946F3B /* FakeClassnameTags123API.swift */,
|
||||
9A019F500E546A3292CE716AB967C673 /* PetAPI.swift */,
|
||||
A53274D99BBDE1B79BF3521CD7CBC276 /* StoreAPI.swift */,
|
||||
7C8D5F382979854D47F18DB1543680FE /* UserAPI.swift */,
|
||||
);
|
||||
path = APIs;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
C1282C2230015E0D204BEAEDDFB49453 /* PetstoreClient */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = B46EDEB1A7F0D78FE6394544C60169D1 /* Build configuration list for PBXNativeTarget "PetstoreClient" */;
|
||||
buildPhases = (
|
||||
E539708354CE60FE486F81EDE56D13C8 /* Sources */,
|
||||
D1990C2A394CCF025EF98A2FB828C79A /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = PetstoreClient;
|
||||
productName = PetstoreClient;
|
||||
productReference = 164AD6EC9C4CCF634D7C45905E99E3A7 /* PetstoreClient.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
E7D276EE2369D8C455513C2E05F9AED0 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1000;
|
||||
};
|
||||
buildConfigurationList = ECAB17FF35111B5E14DAAC0883031714 /* Build configuration list for PBXProject "PetstoreClient" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 5FBA6AE5F64CD737F88B4565AC3CCD3B;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
C1282C2230015E0D204BEAEDDFB49453 /* PetstoreClient */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
E539708354CE60FE486F81EDE56D13C8 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2A35688C985E9CB1EB7732AC2AD46B82 /* APIHelper.swift in Sources */,
|
||||
0462F801432CF94C7EF51D0532737A7E /* APIs.swift in Sources */,
|
||||
52B5604F986335DB69CD2B430FB83BAB /* AdditionalPropertiesAnyType.swift in Sources */,
|
||||
D68F23CD4B5178493CE7AE8DFB868EAE /* AdditionalPropertiesArray.swift in Sources */,
|
||||
988F461F59E4E1091156840007CB3773 /* AdditionalPropertiesBoolean.swift in Sources */,
|
||||
12327BF7304AA897C5D2A1250B1659B7 /* AdditionalPropertiesClass.swift in Sources */,
|
||||
08F5828F0C2BCF07A9E4917DBBB993AE /* AdditionalPropertiesInteger.swift in Sources */,
|
||||
59EAB3527305A37ED99FB210045B69EA /* AdditionalPropertiesNumber.swift in Sources */,
|
||||
E57CD12D2F500D40B4135D0F5ECA9866 /* AdditionalPropertiesObject.swift in Sources */,
|
||||
39F9FBA1AC5C2612ECA1FF715EBFC287 /* AdditionalPropertiesString.swift in Sources */,
|
||||
58F9704B295AC436D6FB98FA669E2344 /* AlamofireImplementations.swift in Sources */,
|
||||
02903CEC38DC202565BC08CB040AC4E9 /* Animal.swift in Sources */,
|
||||
DB1CE39011A741D07E187663291B5DE5 /* AnimalFarm.swift in Sources */,
|
||||
83A2D1863FB136C0DFC423319F4EED65 /* AnotherFakeAPI.swift in Sources */,
|
||||
97C99615237E1B662242E04F527B38B9 /* ApiResponse.swift in Sources */,
|
||||
3251A3722981CE46261615CFBA96A08D /* ArrayOfArrayOfNumberOnly.swift in Sources */,
|
||||
A190AF5A3988639ED4B78163D0EA3CA4 /* ArrayOfNumberOnly.swift in Sources */,
|
||||
C2EDEB747887399B13A6DFD72A219CB2 /* ArrayTest.swift in Sources */,
|
||||
7367A9D91D4B101F2D28AC56ED89F175 /* Capitalization.swift in Sources */,
|
||||
18F19872A0DFB4CC3D9C696BBCA64EFD /* Cat.swift in Sources */,
|
||||
41D8A105135868152A56E2AC475049BB /* CatAllOf.swift in Sources */,
|
||||
42C51BC034E8B0CAA29A068F6B0DC815 /* Category.swift in Sources */,
|
||||
5ACDD7CC312167589335E9CA5998E770 /* ClassModel.swift in Sources */,
|
||||
92FB161BF1E57D11B116AF0292D5835C /* Client.swift in Sources */,
|
||||
6CD20EE568DDAD2304BF0C4B1A70C8DC /* CodableHelper.swift in Sources */,
|
||||
DEC892724574BB29BD65869374F83982 /* Configuration.swift in Sources */,
|
||||
D70EC94E346077DE1482231DD4498BED /* Dog.swift in Sources */,
|
||||
271D94A05C47B602A2433B9CD3D9DCDC /* DogAllOf.swift in Sources */,
|
||||
A438970025AE69ED407BC1E67CC6359E /* EnumArrays.swift in Sources */,
|
||||
59C00CBB07761CAC8DCE7054E34AD5D9 /* EnumClass.swift in Sources */,
|
||||
08D87E4FECF24910F0DA0F1D2E2D955A /* EnumTest.swift in Sources */,
|
||||
C329EE55B2FCC9174ED3B128D67C5E8C /* Extensions.swift in Sources */,
|
||||
297E365D1E4672C43C56E0AFD855FFBF /* FakeAPI.swift in Sources */,
|
||||
A9F1AAF6CE029DD3B4F8AC841F0B6BC6 /* FakeClassnameTags123API.swift in Sources */,
|
||||
FECA03F0388E84AE1B22638605D8AC9F /* File.swift in Sources */,
|
||||
491676EC91BFEF95A12556888EED87B5 /* FileSchemaTestClass.swift in Sources */,
|
||||
36734C4EB3362A114A7CB5F25EE39E6D /* FormatTest.swift in Sources */,
|
||||
DDBC3CF5E447D8D838F0FE200420EEE3 /* HasOnlyReadOnly.swift in Sources */,
|
||||
16E9A5E22B4823DE282E7F4C18A21EA8 /* JSONEncodableEncoding.swift in Sources */,
|
||||
12BB95C66D63090732BB9E0379836E3C /* JSONEncodingHelper.swift in Sources */,
|
||||
C1CACABE18A7ADCE37D1CD9DC9128304 /* List.swift in Sources */,
|
||||
655AA371771C7BD72EE0AAC0C90DFFF0 /* MapTest.swift in Sources */,
|
||||
D3A17B7FAFA8A7A210875BBCDCC30116 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */,
|
||||
2DF4544D4D3D6CF7047A59FB89ED31BD /* Model200Response.swift in Sources */,
|
||||
F02BEF9A8503B3848B045370451E85F6 /* Models.swift in Sources */,
|
||||
C15AC1CC631E96D0360EB8C15BF30452 /* Name.swift in Sources */,
|
||||
AE9D2E1DB59AF6575AC4AC6756C5A937 /* NumberOnly.swift in Sources */,
|
||||
59C2F5495C98836BFA9E10BF5C13BC2C /* Order.swift in Sources */,
|
||||
82D4D0C8AD0354A700C8ACD421ABED55 /* OuterComposite.swift in Sources */,
|
||||
1143FFF06DEE01E5B0F1368AA05BE1B4 /* OuterEnum.swift in Sources */,
|
||||
B399A1742F23330FDCA450EAB98F51F1 /* Pet.swift in Sources */,
|
||||
3D8E407B1DF4FA5A5F16B64E3A285781 /* PetAPI.swift in Sources */,
|
||||
293F4E0FBFC8297E414A3CDBB7F29A96 /* ReadOnlyFirst.swift in Sources */,
|
||||
F21D10C71A9DE7D0467AFD23FD391D2E /* Return.swift in Sources */,
|
||||
E2C40F0E34DB8C21A806262C72841A51 /* SpecialModelName.swift in Sources */,
|
||||
122BBAE8245606CC040EEB6B9254E376 /* StoreAPI.swift in Sources */,
|
||||
196E9846B27D736630CCF90497696859 /* StringBooleanMap.swift in Sources */,
|
||||
E51ADEC931806B20A041303E539A8BE2 /* Tag.swift in Sources */,
|
||||
6600BB1500AE35A3C80F7C83F6444552 /* TypeHolderDefault.swift in Sources */,
|
||||
FB4A053CDCD75E48B755CC22D463A3FC /* TypeHolderExample.swift in Sources */,
|
||||
BF7D58FBCF5E4D3F2932FCC0E62BED40 /* User.swift in Sources */,
|
||||
DB724C4F1AD5DF025B53A9A2E0A49E3D /* UserAPI.swift in Sources */,
|
||||
BB02FDCF1B2B0E457E1C2BF39FBB599D /* XmlItem.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
3B2C02AFB91CB5C82766ED5CF21FF628 /* 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;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
A9EB0A02B94C427CBACFEC7CFFC6A816 /* 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 = 4.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
DD3EEB93949E9EBA4437E9CDBF4A26F6 /* 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;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
F81D4E5FECD46E9AA6DD2C299CEBEF64 /* 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_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_VERSION = 4.2;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
B46EDEB1A7F0D78FE6394544C60169D1 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
DD3EEB93949E9EBA4437E9CDBF4A26F6 /* Debug */,
|
||||
3B2C02AFB91CB5C82766ED5CF21FF628 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = "";
|
||||
};
|
||||
ECAB17FF35111B5E14DAAC0883031714 /* Build configuration list for PBXProject "PetstoreClient" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
A9EB0A02B94C427CBACFEC7CFFC6A816 /* Debug */,
|
||||
F81D4E5FECD46E9AA6DD2C299CEBEF64 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = E7D276EE2369D8C455513C2E05F9AED0 /* Project object */;
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1000"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C1282C2230015E0D204BEAEDDFB49453"
|
||||
BuildableName = "PetstoreClient.framework"
|
||||
BlueprintName = "PetstoreClient"
|
||||
ReferencedContainer = "container:PetstoreClient.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C1282C2230015E0D204BEAEDDFB49453"
|
||||
BuildableName = "PetstoreClient.framework"
|
||||
BlueprintName = "PetstoreClient"
|
||||
ReferencedContainer = "container:PetstoreClient.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C1282C2230015E0D204BEAEDDFB49453"
|
||||
BuildableName = "PetstoreClient.framework"
|
||||
BlueprintName = "PetstoreClient"
|
||||
ReferencedContainer = "container:PetstoreClient.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C1282C2230015E0D204BEAEDDFB49453"
|
||||
BuildableName = "PetstoreClient.framework"
|
||||
BlueprintName = "PetstoreClient"
|
||||
ReferencedContainer = "container:PetstoreClient.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -7,7 +7,7 @@
|
||||
import Foundation
|
||||
|
||||
public struct APIHelper {
|
||||
public static func rejectNil(_ source: [String:Any?]) -> [String:Any]? {
|
||||
public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? {
|
||||
let destination = source.reduce(into: [String: Any]()) { (result, item) in
|
||||
if let value = item.value {
|
||||
result[item.key] = value
|
||||
@ -20,17 +20,17 @@ public struct APIHelper {
|
||||
return destination
|
||||
}
|
||||
|
||||
public static func rejectNilHeaders(_ source: [String:Any?]) -> [String:String] {
|
||||
public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] {
|
||||
return source.reduce(into: [String: String]()) { (result, item) in
|
||||
if let collection = item.value as? Array<Any?> {
|
||||
result[item.key] = collection.filter({ $0 != nil }).map{ "\($0!)" }.joined(separator: ",")
|
||||
result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",")
|
||||
} else if let value: Any = item.value {
|
||||
result[item.key] = "\(value)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? {
|
||||
public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? {
|
||||
guard let source = source else {
|
||||
return nil
|
||||
}
|
||||
@ -52,7 +52,7 @@ public struct APIHelper {
|
||||
return source
|
||||
}
|
||||
|
||||
public static func mapValuesToQueryItems(_ source: [String:Any?]) -> [URLQueryItem]? {
|
||||
public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? {
|
||||
let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in
|
||||
if let collection = item.value as? Array<Any?> {
|
||||
let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",")
|
||||
@ -68,4 +68,3 @@ public struct APIHelper {
|
||||
return destination
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,22 +9,22 @@ import Foundation
|
||||
open class PetstoreClientAPI {
|
||||
public static var basePath = "http://petstore.swagger.io:80/v2"
|
||||
public static var credential: URLCredential?
|
||||
public static var customHeaders: [String:String] = [:]
|
||||
public static var customHeaders: [String: String] = [:]
|
||||
public static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()
|
||||
}
|
||||
|
||||
open class RequestBuilder<T> {
|
||||
var credential: URLCredential?
|
||||
var headers: [String:String]
|
||||
public let parameters: [String:Any]?
|
||||
var headers: [String: String]
|
||||
public let parameters: [String: Any]?
|
||||
public let isBody: Bool
|
||||
public let method: String
|
||||
public let URLString: String
|
||||
|
||||
/// Optional block to obtain a reference to the request's progress instance when available.
|
||||
public var onProgressReady: ((Progress) -> ())?
|
||||
public var onProgressReady: ((Progress) -> Void)?
|
||||
|
||||
required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) {
|
||||
required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) {
|
||||
self.method = method
|
||||
self.URLString = URLString
|
||||
self.parameters = parameters
|
||||
@ -34,7 +34,7 @@ open class RequestBuilder<T> {
|
||||
addHeaders(PetstoreClientAPI.customHeaders)
|
||||
}
|
||||
|
||||
open func addHeaders(_ aHeaders:[String:String]) {
|
||||
open func addHeaders(_ aHeaders: [String: String]) {
|
||||
for (header, value) in aHeaders {
|
||||
headers[header] = value
|
||||
}
|
||||
@ -57,5 +57,5 @@ open class RequestBuilder<T> {
|
||||
|
||||
public protocol RequestBuilderFactory {
|
||||
func getNonDecodableBuilder<T>() -> RequestBuilder<T>.Type
|
||||
func getBuilder<T:Decodable>() -> RequestBuilder<T>.Type
|
||||
func getBuilder<T: Decodable>() -> RequestBuilder<T>.Type
|
||||
}
|
||||
|
@ -8,8 +8,6 @@
|
||||
import Foundation
|
||||
import Alamofire
|
||||
|
||||
|
||||
|
||||
open class AnotherFakeAPI {
|
||||
/**
|
||||
To test special tags
|
||||
@ -17,7 +15,7 @@ open class AnotherFakeAPI {
|
||||
- parameter body: (body) client model
|
||||
- parameter completion: completion handler to receive the data and the error objects
|
||||
*/
|
||||
open class func call123testSpecialTags(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) {
|
||||
open class func call123testSpecialTags(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) {
|
||||
call123testSpecialTagsWithRequestBuilder(body: body).execute { (response, error) -> Void in
|
||||
completion(response?.body, error)
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user