From a3d0f1d4bd8b338603295068e551a2162dd65a01 Mon Sep 17 00:00:00 2001 From: ehyche Date: Thu, 25 Jan 2018 08:33:11 -0500 Subject: [PATCH] Swift4: make generated models structs instead of classes (#7345) * Split up model template into partials * Change models from class to struct. This fixes issue https://github.com/swagger-api/swagger-codegen/issues/6941. In this change, we make our Swift4 generated model objects struct instead of class. However, in order to do this, we needed to handle the following edge cases: * Inheritance and polymorphism (allOf) * With classes, we use inheritance. So therefore, the parent properties are ONLY on the parent generated class, and the model object which derives from the parent class picks up those properties through inheritance. * However, structs do not support inheritance. So we simply duplicate the parent allOf properties in the child struct. * We have to handle the case where the property name on the struct may be different than the property name in the JSON. By default, the Codable protocol assumes that the JSON property name is the same as the struct property name. If they need to be different, then we generate a CodingKeys string enum, which contains the mapping between struct property name and JSON property name. * additionalProperties. We cannot use the default Codable implementation for the additionalProperties, since it will look for an actual dictionary called "additionalProperties" in the JSON. Therefore, for model objects which have additionalProperties, we must generate our own implementation for the Decodable and Encodable protocols. I have run ./bin/swift4-all.sh and ./bin/swift4-test.sh to re-generate all of the sources, and I have verified that the generated code in samples/clients/test/swift4/default builds and the unit tests pass. * Update VERSION in .swagger-codegen * Update generated code for swift4-test schema --- .../codegen/languages/Swift4Codegen.java | 34 +- .../resources/swift4/modelObject.mustache | 50 +- .../src/test/resources/2_0/swift4Test.json | 91 +++ .../swift4/default/.swagger-codegen/VERSION | 2 +- .../Swaggers/APIs/AnotherfakeAPI.swift | 4 +- .../Models/AdditionalPropertiesClass.swift | 27 +- .../Classes/Swaggers/Models/Animal.swift | 26 +- .../Classes/Swaggers/Models/ApiResponse.swift | 29 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 23 +- .../Swaggers/Models/ArrayOfNumberOnly.swift | 23 +- .../Classes/Swaggers/Models/ArrayTest.swift | 31 +- .../Swaggers/Models/Capitalization.swift | 43 +- .../Classes/Swaggers/Models/Cat.swift | 22 +- .../Classes/Swaggers/Models/Category.swift | 29 +- .../Classes/Swaggers/Models/ClassModel.swift | 23 +- .../Classes/Swaggers/Models/Client.swift | 23 +- .../Classes/Swaggers/Models/Dog.swift | 22 +- .../Classes/Swaggers/Models/EnumArrays.swift | 27 +- .../Classes/Swaggers/Models/EnumTest.swift | 35 +- .../Classes/Swaggers/Models/FormatTest.swift | 59 +- .../Swaggers/Models/HasOnlyReadOnly.swift | 26 +- .../Classes/Swaggers/Models/List.swift | 23 +- .../Classes/Swaggers/Models/MapTest.swift | 27 +- ...opertiesAndAdditionalPropertiesClass.swift | 29 +- .../Swaggers/Models/Model200Response.swift | 27 +- .../Classes/Swaggers/Models/Name.swift | 35 +- .../Classes/Swaggers/Models/NumberOnly.swift | 23 +- .../Classes/Swaggers/Models/Order.swift | 45 +- .../Swaggers/Models/OuterBoolean.swift | 17 +- .../Swaggers/Models/OuterComposite.swift | 31 +- .../Classes/Swaggers/Models/OuterNumber.swift | 17 +- .../Classes/Swaggers/Models/OuterString.swift | 17 +- .../Classes/Swaggers/Models/Pet.swift | 45 +- .../Swaggers/Models/ReadOnlyFirst.swift | 26 +- .../Classes/Swaggers/Models/Return.swift | 23 +- .../Swaggers/Models/SpecialModelName.swift | 23 +- .../Classes/Swaggers/Models/Tag.swift | 29 +- .../Classes/Swaggers/Models/User.swift | 53 +- .../objcCompatible/.swagger-codegen/VERSION | 2 +- .../Swaggers/APIs/AnotherfakeAPI.swift | 4 +- .../APIs/FakeClassnameTags123API.swift | 54 ++ .../Models/AdditionalPropertiesClass.swift | 27 +- .../Classes/Swaggers/Models/Animal.swift | 26 +- .../Classes/Swaggers/Models/ApiResponse.swift | 29 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 23 +- .../Swaggers/Models/ArrayOfNumberOnly.swift | 23 +- .../Classes/Swaggers/Models/ArrayTest.swift | 31 +- .../Swaggers/Models/Capitalization.swift | 43 +- .../Classes/Swaggers/Models/Cat.swift | 22 +- .../Classes/Swaggers/Models/Category.swift | 33 +- .../Classes/Swaggers/Models/ClassModel.swift | 23 +- .../Classes/Swaggers/Models/Client.swift | 23 +- .../Classes/Swaggers/Models/Dog.swift | 22 +- .../Classes/Swaggers/Models/EnumArrays.swift | 27 +- .../Classes/Swaggers/Models/EnumTest.swift | 35 +- .../Classes/Swaggers/Models/FormatTest.swift | 64 +- .../Swaggers/Models/HasOnlyReadOnly.swift | 26 +- .../Classes/Swaggers/Models/List.swift | 23 +- .../Classes/Swaggers/Models/MapTest.swift | 27 +- ...opertiesAndAdditionalPropertiesClass.swift | 29 +- .../Swaggers/Models/Model200Response.swift | 27 +- .../Classes/Swaggers/Models/Name.swift | 35 +- .../Classes/Swaggers/Models/NumberOnly.swift | 32 +- .../Classes/Swaggers/Models/Order.swift | 49 +- .../Swaggers/Models/OuterBoolean.swift | 17 +- .../Swaggers/Models/OuterComposite.swift | 31 +- .../Classes/Swaggers/Models/OuterNumber.swift | 17 +- .../Classes/Swaggers/Models/OuterString.swift | 17 +- .../Classes/Swaggers/Models/Pet.swift | 49 +- .../Swaggers/Models/ReadOnlyFirst.swift | 26 +- .../Classes/Swaggers/Models/Return.swift | 23 +- .../Swaggers/Models/SpecialModelName.swift | 23 +- .../Classes/Swaggers/Models/Tag.swift | 33 +- .../Classes/Swaggers/Models/User.swift | 57 +- .../promisekit/.swagger-codegen/VERSION | 2 +- .../Swaggers/APIs/AnotherfakeAPI.swift | 4 +- .../Models/AdditionalPropertiesClass.swift | 27 +- .../Classes/Swaggers/Models/Animal.swift | 26 +- .../Classes/Swaggers/Models/ApiResponse.swift | 29 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 23 +- .../Swaggers/Models/ArrayOfNumberOnly.swift | 23 +- .../Classes/Swaggers/Models/ArrayTest.swift | 31 +- .../Swaggers/Models/Capitalization.swift | 43 +- .../Classes/Swaggers/Models/Cat.swift | 22 +- .../Classes/Swaggers/Models/Category.swift | 29 +- .../Classes/Swaggers/Models/ClassModel.swift | 23 +- .../Classes/Swaggers/Models/Client.swift | 23 +- .../Classes/Swaggers/Models/Dog.swift | 22 +- .../Classes/Swaggers/Models/EnumArrays.swift | 27 +- .../Classes/Swaggers/Models/EnumTest.swift | 35 +- .../Classes/Swaggers/Models/FormatTest.swift | 59 +- .../Swaggers/Models/HasOnlyReadOnly.swift | 26 +- .../Classes/Swaggers/Models/List.swift | 23 +- .../Classes/Swaggers/Models/MapTest.swift | 27 +- ...opertiesAndAdditionalPropertiesClass.swift | 29 +- .../Swaggers/Models/Model200Response.swift | 27 +- .../Classes/Swaggers/Models/Name.swift | 35 +- .../Classes/Swaggers/Models/NumberOnly.swift | 23 +- .../Classes/Swaggers/Models/Order.swift | 45 +- .../Swaggers/Models/OuterBoolean.swift | 17 +- .../Swaggers/Models/OuterComposite.swift | 31 +- .../Classes/Swaggers/Models/OuterNumber.swift | 17 +- .../Classes/Swaggers/Models/OuterString.swift | 17 +- .../Classes/Swaggers/Models/Pet.swift | 45 +- .../Swaggers/Models/ReadOnlyFirst.swift | 26 +- .../Classes/Swaggers/Models/Return.swift | 23 +- .../Swaggers/Models/SpecialModelName.swift | 23 +- .../Classes/Swaggers/Models/Tag.swift | 29 +- .../Classes/Swaggers/Models/User.swift | 53 +- .../swift4/rxswift/.swagger-codegen/VERSION | 2 +- .../Swaggers/APIs/AnotherfakeAPI.swift | 4 +- .../Models/AdditionalPropertiesClass.swift | 27 +- .../Classes/Swaggers/Models/Animal.swift | 26 +- .../Classes/Swaggers/Models/ApiResponse.swift | 29 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 23 +- .../Swaggers/Models/ArrayOfNumberOnly.swift | 23 +- .../Classes/Swaggers/Models/ArrayTest.swift | 31 +- .../Swaggers/Models/Capitalization.swift | 43 +- .../Classes/Swaggers/Models/Cat.swift | 22 +- .../Classes/Swaggers/Models/Category.swift | 29 +- .../Classes/Swaggers/Models/ClassModel.swift | 23 +- .../Classes/Swaggers/Models/Client.swift | 23 +- .../Classes/Swaggers/Models/Dog.swift | 22 +- .../Classes/Swaggers/Models/EnumArrays.swift | 27 +- .../Classes/Swaggers/Models/EnumTest.swift | 35 +- .../Classes/Swaggers/Models/FormatTest.swift | 59 +- .../Swaggers/Models/HasOnlyReadOnly.swift | 26 +- .../Classes/Swaggers/Models/List.swift | 23 +- .../Classes/Swaggers/Models/MapTest.swift | 27 +- ...opertiesAndAdditionalPropertiesClass.swift | 29 +- .../Swaggers/Models/Model200Response.swift | 27 +- .../Classes/Swaggers/Models/Name.swift | 35 +- .../Classes/Swaggers/Models/NumberOnly.swift | 23 +- .../Classes/Swaggers/Models/Order.swift | 45 +- .../Swaggers/Models/OuterBoolean.swift | 17 +- .../Swaggers/Models/OuterComposite.swift | 31 +- .../Classes/Swaggers/Models/OuterNumber.swift | 17 +- .../Classes/Swaggers/Models/OuterString.swift | 17 +- .../Classes/Swaggers/Models/Pet.swift | 45 +- .../Swaggers/Models/ReadOnlyFirst.swift | 26 +- .../Classes/Swaggers/Models/Return.swift | 23 +- .../Swaggers/Models/SpecialModelName.swift | 23 +- .../Classes/Swaggers/Models/Tag.swift | 29 +- .../Classes/Swaggers/Models/User.swift | 53 +- .../swift4/default/.swagger-codegen/VERSION | 2 +- .../Classes/Swaggers/APIs/Swift4TestAPI.swift | 1 + .../Swaggers/Models/AllPrimitives.swift | 95 +-- .../Classes/Swaggers/Models/BaseCard.swift | 20 + .../Classes/Swaggers/Models/ErrorInfo.swift | 29 +- .../Swaggers/Models/GetAllModelsResult.swift | 29 +- ...ModelWithIntAdditionalPropertiesOnly.swift | 9 +- ...ithPropertiesAndAdditionalProperties.swift | 20 +- ...elWithStringAdditionalPropertiesOnly.swift | 9 +- .../Classes/Swaggers/Models/PersonCard.swift | 22 + .../Classes/Swaggers/Models/PlaceCard.swift | 22 + .../Classes/Swaggers/Models/SampleBase.swift | 21 + .../Swaggers/Models/SampleSubClass.swift | 23 + .../Swaggers/Models/VariableNameTest.swift | 30 +- .../swift4/default/TestClientApp/Podfile.lock | 4 +- .../Local Podspecs/TestClient.podspec.json | 3 +- .../default/TestClientApp/Pods/Manifest.lock | 4 +- .../Pods/Pods.xcodeproj/project.pbxproj | 772 +++++++++--------- .../Alamofire/Alamofire-prefix.pch | 8 + .../Alamofire/Alamofire-umbrella.h | 8 + .../Alamofire/Alamofire.xcconfig | 7 +- .../Pods-TestClientApp-frameworks.sh | 50 +- .../Pods-TestClientApp-resources.sh | 28 +- .../Pods-TestClientApp-umbrella.h | 8 + .../Pods-TestClientApp.debug.xcconfig | 9 +- .../Pods-TestClientApp.release.xcconfig | 9 +- .../Pods-TestClientAppTests-frameworks.sh | 42 +- .../Pods-TestClientAppTests-resources.sh | 28 +- .../Pods-TestClientAppTests-umbrella.h | 8 + .../Pods-TestClientAppTests.debug.xcconfig | 10 +- .../Pods-TestClientAppTests.release.xcconfig | 10 +- .../TestClient/TestClient-prefix.pch | 8 + .../TestClient/TestClient-umbrella.h | 8 + .../TestClient/TestClient.xcconfig | 9 +- .../TestClientApp.xcodeproj/project.pbxproj | 15 +- .../TestClientAppTests.swift | 3 +- 180 files changed, 1436 insertions(+), 4066 deletions(-) create mode 100644 samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/APIs/FakeClassnameTags123API.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/BaseCard.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/PersonCard.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/PlaceCard.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/SampleBase.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/SampleSubClass.swift diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/Swift4Codegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/Swift4Codegen.java index 77aca1329da..54162b4e270 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/Swift4Codegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/Swift4Codegen.java @@ -710,8 +710,38 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig { @Override public Map postProcessModels(Map objs) { - // process enum in models - return postProcessModelsEnum(objs); + Map postProcessedModelsEnum = postProcessModelsEnum(objs); + + // We iterate through the list of models, and also iterate through each of the + // properties for each model. For each property, if: + // + // CodegenProperty.name != CodegenProperty.baseName + // + // then we set + // + // CodegenProperty.vendorExtensions["x-codegen-escaped-property-name"] = true + // + // Also, if any property in the model has x-codegen-escaped-property-name=true, then we mark: + // + // CodegenModel.vendorExtensions["x-codegen-has-escaped-property-names"] = true + // + List models = (List) postProcessedModelsEnum.get("models"); + for (Object _mo : models) { + Map mo = (Map) _mo; + CodegenModel cm = (CodegenModel) mo.get("model"); + boolean modelHasPropertyWithEscapedName = false; + for (CodegenProperty prop : cm.allVars) { + if (!prop.name.equals(prop.baseName)) { + prop.vendorExtensions.put("x-codegen-escaped-property-name", true); + modelHasPropertyWithEscapedName = true; + } + } + if (modelHasPropertyWithEscapedName) { + cm.vendorExtensions.put("x-codegen-has-escaped-property-names", true); + } + } + + return postProcessedModelsEnum; } @Override diff --git a/modules/swagger-codegen/src/main/resources/swift4/modelObject.mustache b/modules/swagger-codegen/src/main/resources/swift4/modelObject.mustache index b0c33368164..2add07f24ff 100644 --- a/modules/swagger-codegen/src/main/resources/swift4/modelObject.mustache +++ b/modules/swagger-codegen/src/main/resources/swift4/modelObject.mustache @@ -1,12 +1,12 @@ -open class {{classname}}: {{#parent}}{{{parent}}}{{/parent}}{{^parent}}Codable{{/parent}} { +public struct {{classname}}: Codable { -{{#vars}} +{{#allVars}} {{#isEnum}} {{> modelInlineEnumDeclaration}} {{/isEnum}} -{{/vars}} -{{#vars}} +{{/allVars}} +{{#allVars}} {{#isEnum}} {{#description}}/** {{description}} */ {{/description}}public var {{name}}: {{{datatypeWithEnum}}}{{^required}}?{{/required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}} @@ -20,7 +20,7 @@ open class {{classname}}: {{#parent}}{{{parent}}}{{/parent}}{{^parent}}Codable{{ } }{{/vendorExtensions.x-swift-optional-scalar}}{{/objcCompatible}} {{/isEnum}} -{{/vars}} +{{/allVars}} {{#additionalPropertiesType}} public var additionalProperties: [String:{{{additionalPropertiesType}}}] = [:] @@ -37,47 +37,39 @@ open class {{classname}}: {{#parent}}{{{parent}}}{{/parent}}{{^parent}}Codable{{ additionalProperties[key] = newValue } } -{{/additionalPropertiesType}} - - {{^parent}}{{#hasVars}} - public init({{#vars}}{{name}}: {{{datatypeWithEnum}}}{{^required}}?{{/required}}{{#hasMore}}, {{/hasMore}}{{/vars}}) { - {{#vars}} - self.{{name}} = {{name}} - {{/vars}} - } - {{/hasVars}}{{/parent}} // Encodable protocol methods - public {{#parent}}override {{/parent}}func encode(to encoder: Encoder) throws { + public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: String.self) - {{#vars}} + {{#allVars}} try container.encode{{^required}}IfPresent{{/required}}({{{name}}}, forKey: "{{{baseName}}}") - {{/vars}} - {{#additionalPropertiesType}} + {{/allVars}} try container.encodeMap(additionalProperties) - {{/additionalPropertiesType}} } // Decodable protocol methods - public required init(from decoder: Decoder) throws { + public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: String.self) - {{#vars}} + {{#allVars}} {{name}} = try container.decode{{^required}}IfPresent{{/required}}({{{datatypeWithEnum}}}.self, forKey: "{{{baseName}}}") - {{/vars}} - {{#additionalPropertiesType}} + {{/allVars}} var nonAdditionalPropertyKeys = Set() - {{#vars}} + {{#allVars}} nonAdditionalPropertyKeys.insert("{{{baseName}}}") - {{/vars}} + {{/allVars}} additionalProperties = try container.decodeMap({{{additionalPropertiesType}}}.self, excludedKeys: nonAdditionalPropertyKeys) - {{/additionalPropertiesType}} - {{#parent}} - try super.init(from: decoder) - {{/parent}} } + +{{/additionalPropertiesType}} +{{^additionalPropertiesType}}{{#vendorExtensions.x-codegen-has-escaped-property-names}} + public enum CodingKeys: String, CodingKey { {{#allVars}} + case {{name}}{{#vendorExtensions.x-codegen-escaped-property-name}} = "{{{baseName}}}"{{/vendorExtensions.x-codegen-escaped-property-name}}{{/allVars}} + } +{{/vendorExtensions.x-codegen-has-escaped-property-names}}{{/additionalPropertiesType}} + } diff --git a/modules/swagger-codegen/src/test/resources/2_0/swift4Test.json b/modules/swagger-codegen/src/test/resources/2_0/swift4Test.json index 8607cfc0463..c2f217bf84e 100644 --- a/modules/swagger-codegen/src/test/resources/2_0/swift4Test.json +++ b/modules/swagger-codegen/src/test/resources/2_0/swift4Test.json @@ -284,6 +284,10 @@ "for": { "description": "This property name is a reserved word in most languages, including Swift 4.", "type": "string" + }, + "normalName": { + "description": "This model object property name should be unchanged from the JSON property name.", + "type": "string" } } }, @@ -370,6 +374,93 @@ "additionalProperties": { "type": "string" } + }, + "SampleBase": { + "type": "object", + "description": "This is an base class object from which other classes will derive.", + "properties": { + "baseClassStringProp": { + "type": "string" + }, + "baseClassIntegerProp": { + "type": "integer", + "format": "int32" + } + } + }, + "SampleSubClass": { + "description": "This is an subclass defived from the SampleBase class.", + "allOf": [ + { + "$ref": "#/definitions/SampleBase" + }, + { + "type": "object", + "properties": { + "subClassStringProp": { + "type": "string" + }, + "subClassIntegerProp": { + "type": "integer", + "format": "int32" + } + } + } + ] + }, + "BaseCard": { + "type": "object", + "description": "This is a base card object which uses a 'cardType' discriminator.", + "x-unit-tests": ["B45"], + "discriminator": "cardType", + "required": [ + "cardType" + ], + "properties": { + "cardType": { + "type": "string" + } + } + }, + "PersonCard": { + "description": "This is an card object for a Person derived from BaseCard.", + "x-unit-tests": ["B45"], + "allOf": [ + { + "$ref": "#/definitions/BaseCard" + }, + { + "type": "object", + "properties": { + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + } + } + } + ] + }, + "PlaceCard": { + "description": "This is an card object for a Person derived from BaseCard.", + "x-unit-tests": ["B45"], + "allOf": [ + { + "$ref": "#/definitions/BaseCard" + }, + { + "type": "object", + "properties": { + "placeName": { + "type": "string" + }, + "placeAddress": { + "type": "string" + } + } + } + ] } } } diff --git a/samples/client/petstore/swift4/default/.swagger-codegen/VERSION b/samples/client/petstore/swift4/default/.swagger-codegen/VERSION index f9f7450d135..855ff9501eb 100644 --- a/samples/client/petstore/swift4/default/.swagger-codegen/VERSION +++ b/samples/client/petstore/swift4/default/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/AnotherfakeAPI.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/AnotherfakeAPI.swift index 9c135bdce3a..1d439bf0089 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/AnotherfakeAPI.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/AnotherfakeAPI.swift @@ -1,5 +1,5 @@ // -// AnotherfakeAPI.swift +// AnotherFakeAPI.swift // // Generated by swagger-codegen // https://github.com/swagger-api/swagger-codegen @@ -10,7 +10,7 @@ import Alamofire -open class AnotherfakeAPI { +open class AnotherFakeAPI { /** To test special tags diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/AdditionalPropertiesClass.swift index 02e3d3efd2a..8388bfb035f 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/AdditionalPropertiesClass.swift @@ -9,36 +9,17 @@ import Foundation -open class AdditionalPropertiesClass: Codable { +public struct AdditionalPropertiesClass: Codable { public var mapProperty: [String:String]? public var mapOfMapProperty: [String:[String:String]]? - - public init(mapProperty: [String:String]?, mapOfMapProperty: [String:[String:String]]?) { - self.mapProperty = mapProperty - self.mapOfMapProperty = mapOfMapProperty - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(mapProperty, forKey: "map_property") - try container.encodeIfPresent(mapOfMapProperty, forKey: "map_of_map_property") + public enum CodingKeys: String, CodingKey { + case mapProperty = "map_property" + case mapOfMapProperty = "map_of_map_property" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - mapProperty = try container.decodeIfPresent([String:String].self, forKey: "map_property") - mapOfMapProperty = try container.decodeIfPresent([String:[String:String]].self, forKey: "map_of_map_property") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Animal.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Animal.swift index dec4a605a27..fa13d5e9b9f 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Animal.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Animal.swift @@ -9,36 +9,12 @@ import Foundation -open class Animal: Codable { +public struct Animal: Codable { public var className: String public var color: String? - - public init(className: String, color: String?) { - self.className = className - self.color = color - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encode(className, forKey: "className") - try container.encodeIfPresent(color, forKey: "color") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - className = try container.decode(String.self, forKey: "className") - color = try container.decodeIfPresent(String.self, forKey: "color") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ApiResponse.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ApiResponse.swift index d6c0c3aba30..a4e416b79a8 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ApiResponse.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ApiResponse.swift @@ -9,40 +9,13 @@ import Foundation -open class ApiResponse: Codable { +public struct ApiResponse: Codable { public var code: Int? public var type: String? public var message: String? - - public init(code: Int?, type: String?, message: String?) { - self.code = code - self.type = type - self.message = message - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(code, forKey: "code") - try container.encodeIfPresent(type, forKey: "type") - try container.encodeIfPresent(message, forKey: "message") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - code = try container.decodeIfPresent(Int.self, forKey: "code") - type = try container.decodeIfPresent(String.self, forKey: "type") - message = try container.decodeIfPresent(String.self, forKey: "message") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayOfArrayOfNumberOnly.swift index 6cb60bc9f23..8aea70bfc69 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayOfArrayOfNumberOnly.swift @@ -9,32 +9,15 @@ import Foundation -open class ArrayOfArrayOfNumberOnly: Codable { +public struct ArrayOfArrayOfNumberOnly: Codable { public var arrayArrayNumber: [[Double]]? - - public init(arrayArrayNumber: [[Double]]?) { - self.arrayArrayNumber = arrayArrayNumber - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(arrayArrayNumber, forKey: "ArrayArrayNumber") + public enum CodingKeys: String, CodingKey { + case arrayArrayNumber = "ArrayArrayNumber" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - arrayArrayNumber = try container.decodeIfPresent([[Double]].self, forKey: "ArrayArrayNumber") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayOfNumberOnly.swift index 4e30334ed41..c670c41c217 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayOfNumberOnly.swift @@ -9,32 +9,15 @@ import Foundation -open class ArrayOfNumberOnly: Codable { +public struct ArrayOfNumberOnly: Codable { public var arrayNumber: [Double]? - - public init(arrayNumber: [Double]?) { - self.arrayNumber = arrayNumber - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(arrayNumber, forKey: "ArrayNumber") + public enum CodingKeys: String, CodingKey { + case arrayNumber = "ArrayNumber" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - arrayNumber = try container.decodeIfPresent([Double].self, forKey: "ArrayNumber") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayTest.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayTest.swift index b5084fca928..6257fb4cc9b 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayTest.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ArrayTest.swift @@ -9,40 +9,19 @@ import Foundation -open class ArrayTest: Codable { +public struct ArrayTest: Codable { public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? public var arrayArrayOfModel: [[ReadOnlyFirst]]? - - public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { - self.arrayOfString = arrayOfString - self.arrayArrayOfInteger = arrayArrayOfInteger - self.arrayArrayOfModel = arrayArrayOfModel - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(arrayOfString, forKey: "array_of_string") - try container.encodeIfPresent(arrayArrayOfInteger, forKey: "array_array_of_integer") - try container.encodeIfPresent(arrayArrayOfModel, forKey: "array_array_of_model") + public enum CodingKeys: String, CodingKey { + case arrayOfString = "array_of_string" + case arrayArrayOfInteger = "array_array_of_integer" + case arrayArrayOfModel = "array_array_of_model" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - arrayOfString = try container.decodeIfPresent([String].self, forKey: "array_of_string") - arrayArrayOfInteger = try container.decodeIfPresent([[Int64]].self, forKey: "array_array_of_integer") - arrayArrayOfModel = try container.decodeIfPresent([[ReadOnlyFirst]].self, forKey: "array_array_of_model") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Capitalization.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Capitalization.swift index 61364bf74f1..952c337fa74 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Capitalization.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Capitalization.swift @@ -9,7 +9,7 @@ import Foundation -open class Capitalization: Codable { +public struct Capitalization: Codable { public var smallCamel: String? public var capitalCamel: String? @@ -20,42 +20,15 @@ open class Capitalization: Codable { public var ATT_NAME: String? - - public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { - self.smallCamel = smallCamel - self.capitalCamel = capitalCamel - self.smallSnake = smallSnake - self.capitalSnake = capitalSnake - self.sCAETHFlowPoints = sCAETHFlowPoints - self.ATT_NAME = ATT_NAME - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(smallCamel, forKey: "smallCamel") - try container.encodeIfPresent(capitalCamel, forKey: "CapitalCamel") - try container.encodeIfPresent(smallSnake, forKey: "small_Snake") - try container.encodeIfPresent(capitalSnake, forKey: "Capital_Snake") - try container.encodeIfPresent(sCAETHFlowPoints, forKey: "SCA_ETH_Flow_Points") - try container.encodeIfPresent(ATT_NAME, forKey: "ATT_NAME") + public enum CodingKeys: String, CodingKey { + case smallCamel + case capitalCamel = "CapitalCamel" + case smallSnake = "small_Snake" + case capitalSnake = "Capital_Snake" + case sCAETHFlowPoints = "SCA_ETH_Flow_Points" + case ATT_NAME } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - smallCamel = try container.decodeIfPresent(String.self, forKey: "smallCamel") - capitalCamel = try container.decodeIfPresent(String.self, forKey: "CapitalCamel") - smallSnake = try container.decodeIfPresent(String.self, forKey: "small_Snake") - capitalSnake = try container.decodeIfPresent(String.self, forKey: "Capital_Snake") - sCAETHFlowPoints = try container.decodeIfPresent(String.self, forKey: "SCA_ETH_Flow_Points") - ATT_NAME = try container.decodeIfPresent(String.self, forKey: "ATT_NAME") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Cat.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Cat.swift index 74691f697d5..e9e061b5e36 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Cat.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Cat.swift @@ -9,29 +9,13 @@ import Foundation -open class Cat: Animal { +public struct Cat: Codable { + public var className: String + public var color: String? public var declawed: Bool? - - // Encodable protocol methods - - public override func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(declawed, forKey: "declawed") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - declawed = try container.decodeIfPresent(Bool.self, forKey: "declawed") - try super.init(from: decoder) - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Category.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Category.swift index f2c9726bc7f..2975a53a507 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Category.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Category.swift @@ -9,36 +9,17 @@ import Foundation -open class Category: Codable { +public struct Category: Codable { - public var id: Int64? + public var _id: Int64? public var name: String? - - public init(id: Int64?, name: String?) { - self.id = id - self.name = name - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(id, forKey: "id") - try container.encodeIfPresent(name, forKey: "name") + public enum CodingKeys: String, CodingKey { + case _id = "id" + case name } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - id = try container.decodeIfPresent(Int64.self, forKey: "id") - name = try container.decodeIfPresent(String.self, forKey: "name") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ClassModel.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ClassModel.swift index 1c714097ffd..90da5c2cf4d 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ClassModel.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ClassModel.swift @@ -10,32 +10,11 @@ import Foundation /** Model for testing model with \"_class\" property */ -open class ClassModel: Codable { +public struct ClassModel: Codable { public var _class: String? - - public init(_class: String?) { - self._class = _class - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(_class, forKey: "_class") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - _class = try container.decodeIfPresent(String.self, forKey: "_class") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Client.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Client.swift index b6af0a778cd..f4333883e63 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Client.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Client.swift @@ -9,32 +9,11 @@ import Foundation -open class Client: Codable { +public struct Client: Codable { public var client: String? - - public init(client: String?) { - self.client = client - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(client, forKey: "client") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - client = try container.decodeIfPresent(String.self, forKey: "client") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Dog.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Dog.swift index f10ec5a8189..b86c61c0ee3 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Dog.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Dog.swift @@ -9,29 +9,13 @@ import Foundation -open class Dog: Animal { +public struct Dog: Codable { + public var className: String + public var color: String? public var breed: String? - - // Encodable protocol methods - - public override func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(breed, forKey: "breed") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - breed = try container.decodeIfPresent(String.self, forKey: "breed") - try super.init(from: decoder) - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/EnumArrays.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/EnumArrays.swift index 0cc8b4bbec5..145acd9dd34 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/EnumArrays.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/EnumArrays.swift @@ -9,7 +9,7 @@ import Foundation -open class EnumArrays: Codable { +public struct EnumArrays: Codable { public enum JustSymbol: String, Codable { case greaterThanOrEqualTo = ">=" @@ -23,30 +23,11 @@ open class EnumArrays: Codable { public var arrayEnum: [ArrayEnum]? - - public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { - self.justSymbol = justSymbol - self.arrayEnum = arrayEnum - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(justSymbol, forKey: "just_symbol") - try container.encodeIfPresent(arrayEnum, forKey: "array_enum") + public enum CodingKeys: String, CodingKey { + case justSymbol = "just_symbol" + case arrayEnum = "array_enum" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - justSymbol = try container.decodeIfPresent(JustSymbol.self, forKey: "just_symbol") - arrayEnum = try container.decodeIfPresent([ArrayEnum].self, forKey: "array_enum") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/EnumTest.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/EnumTest.swift index ac6865fb144..74b693c7bb6 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/EnumTest.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/EnumTest.swift @@ -9,7 +9,7 @@ import Foundation -open class EnumTest: Codable { +public struct EnumTest: Codable { public enum EnumString: String, Codable { case upper = "UPPER" @@ -30,36 +30,13 @@ open class EnumTest: Codable { public var outerEnum: OuterEnum? - - public init(enumString: EnumString?, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { - self.enumString = enumString - self.enumInteger = enumInteger - self.enumNumber = enumNumber - self.outerEnum = outerEnum - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(enumString, forKey: "enum_string") - try container.encodeIfPresent(enumInteger, forKey: "enum_integer") - try container.encodeIfPresent(enumNumber, forKey: "enum_number") - try container.encodeIfPresent(outerEnum, forKey: "outerEnum") + public enum CodingKeys: String, CodingKey { + case enumString = "enum_string" + case enumInteger = "enum_integer" + case enumNumber = "enum_number" + case outerEnum } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - enumString = try container.decodeIfPresent(EnumString.self, forKey: "enum_string") - enumInteger = try container.decodeIfPresent(EnumInteger.self, forKey: "enum_integer") - enumNumber = try container.decodeIfPresent(EnumNumber.self, forKey: "enum_number") - outerEnum = try container.decodeIfPresent(OuterEnum.self, forKey: "outerEnum") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift index c3bfe8789c9..0ce1edc16b0 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift @@ -9,7 +9,7 @@ import Foundation -open class FormatTest: Codable { +public struct FormatTest: Codable { public var integer: Int? public var int32: Int? @@ -26,63 +26,6 @@ open class FormatTest: Codable { public var password: String - - public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: Data?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { - self.integer = integer - self.int32 = int32 - self.int64 = int64 - self.number = number - self.float = float - self.double = double - self.string = string - self.byte = byte - self.binary = binary - self.date = date - self.dateTime = dateTime - self.uuid = uuid - self.password = password - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(integer, forKey: "integer") - try container.encodeIfPresent(int32, forKey: "int32") - try container.encodeIfPresent(int64, forKey: "int64") - try container.encode(number, forKey: "number") - try container.encodeIfPresent(float, forKey: "float") - try container.encodeIfPresent(double, forKey: "double") - try container.encodeIfPresent(string, forKey: "string") - try container.encode(byte, forKey: "byte") - try container.encodeIfPresent(binary, forKey: "binary") - try container.encode(date, forKey: "date") - try container.encodeIfPresent(dateTime, forKey: "dateTime") - try container.encodeIfPresent(uuid, forKey: "uuid") - try container.encode(password, forKey: "password") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - integer = try container.decodeIfPresent(Int.self, forKey: "integer") - int32 = try container.decodeIfPresent(Int.self, forKey: "int32") - int64 = try container.decodeIfPresent(Int64.self, forKey: "int64") - number = try container.decode(Double.self, forKey: "number") - float = try container.decodeIfPresent(Float.self, forKey: "float") - double = try container.decodeIfPresent(Double.self, forKey: "double") - string = try container.decodeIfPresent(String.self, forKey: "string") - byte = try container.decode(Data.self, forKey: "byte") - binary = try container.decodeIfPresent(Data.self, forKey: "binary") - date = try container.decode(Date.self, forKey: "date") - dateTime = try container.decodeIfPresent(Date.self, forKey: "dateTime") - uuid = try container.decodeIfPresent(UUID.self, forKey: "uuid") - password = try container.decode(String.self, forKey: "password") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/HasOnlyReadOnly.swift index 14479e661e5..23f5e679faf 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/HasOnlyReadOnly.swift @@ -9,36 +9,12 @@ import Foundation -open class HasOnlyReadOnly: Codable { +public struct HasOnlyReadOnly: Codable { public var bar: String? public var foo: String? - - public init(bar: String?, foo: String?) { - self.bar = bar - self.foo = foo - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(bar, forKey: "bar") - try container.encodeIfPresent(foo, forKey: "foo") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - bar = try container.decodeIfPresent(String.self, forKey: "bar") - foo = try container.decodeIfPresent(String.self, forKey: "foo") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/List.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/List.swift index a011a841193..382702867a8 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/List.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/List.swift @@ -9,32 +9,15 @@ import Foundation -open class List: Codable { +public struct List: Codable { public var _123List: String? - - public init(_123List: String?) { - self._123List = _123List - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(_123List, forKey: "123-list") + public enum CodingKeys: String, CodingKey { + case _123List = "123-list" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - _123List = try container.decodeIfPresent(String.self, forKey: "123-list") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/MapTest.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/MapTest.swift index aa24030f512..e8f11504de5 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/MapTest.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/MapTest.swift @@ -9,7 +9,7 @@ import Foundation -open class MapTest: Codable { +public struct MapTest: Codable { public enum MapOfEnumString: String, Codable { case upper = "UPPER" @@ -19,30 +19,11 @@ open class MapTest: Codable { public var mapOfEnumString: [String:String]? - - public init(mapMapOfString: [String:[String:String]]?, mapOfEnumString: [String:String]?) { - self.mapMapOfString = mapMapOfString - self.mapOfEnumString = mapOfEnumString - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(mapMapOfString, forKey: "map_map_of_string") - try container.encodeIfPresent(mapOfEnumString, forKey: "map_of_enum_string") + public enum CodingKeys: String, CodingKey { + case mapMapOfString = "map_map_of_string" + case mapOfEnumString = "map_of_enum_string" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - mapMapOfString = try container.decodeIfPresent([String:[String:String]].self, forKey: "map_map_of_string") - mapOfEnumString = try container.decodeIfPresent([String:String].self, forKey: "map_of_enum_string") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index 7f9bba54883..554c81317eb 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -9,40 +9,13 @@ import Foundation -open class MixedPropertiesAndAdditionalPropertiesClass: Codable { +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { public var uuid: UUID? public var dateTime: Date? public var map: [String:Animal]? - - public init(uuid: UUID?, dateTime: Date?, map: [String:Animal]?) { - self.uuid = uuid - self.dateTime = dateTime - self.map = map - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(uuid, forKey: "uuid") - try container.encodeIfPresent(dateTime, forKey: "dateTime") - try container.encodeIfPresent(map, forKey: "map") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - uuid = try container.decodeIfPresent(UUID.self, forKey: "uuid") - dateTime = try container.decodeIfPresent(Date.self, forKey: "dateTime") - map = try container.decodeIfPresent([String:Animal].self, forKey: "map") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift index 5a052607e0b..573cb42acfd 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift @@ -10,36 +10,17 @@ import Foundation /** Model for testing model name starting with number */ -open class Model200Response: Codable { +public struct Model200Response: Codable { public var name: Int? public var _class: String? - - public init(name: Int?, _class: String?) { - self.name = name - self._class = _class - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(name, forKey: "name") - try container.encodeIfPresent(_class, forKey: "class") + public enum CodingKeys: String, CodingKey { + case name + case _class = "class" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - name = try container.decodeIfPresent(Int.self, forKey: "name") - _class = try container.decodeIfPresent(String.self, forKey: "class") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Name.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Name.swift index 0d4df5428e4..b4686c2c8a4 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Name.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Name.swift @@ -10,7 +10,7 @@ import Foundation /** Model for testing model name same as property name */ -open class Name: Codable { +public struct Name: Codable { public var name: Int public var snakeCase: Int? @@ -18,36 +18,13 @@ open class Name: Codable { public var _123Number: Int? - - public init(name: Int, snakeCase: Int?, property: String?, _123Number: Int?) { - self.name = name - self.snakeCase = snakeCase - self.property = property - self._123Number = _123Number - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encode(name, forKey: "name") - try container.encodeIfPresent(snakeCase, forKey: "snake_case") - try container.encodeIfPresent(property, forKey: "property") - try container.encodeIfPresent(_123Number, forKey: "123Number") + public enum CodingKeys: String, CodingKey { + case name + case snakeCase = "snake_case" + case property + case _123Number = "123Number" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - name = try container.decode(Int.self, forKey: "name") - snakeCase = try container.decodeIfPresent(Int.self, forKey: "snake_case") - property = try container.decodeIfPresent(String.self, forKey: "property") - _123Number = try container.decodeIfPresent(Int.self, forKey: "123Number") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/NumberOnly.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/NumberOnly.swift index d6ec86b4d08..78bb76f9bfd 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/NumberOnly.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/NumberOnly.swift @@ -9,32 +9,15 @@ import Foundation -open class NumberOnly: Codable { +public struct NumberOnly: Codable { public var justNumber: Double? - - public init(justNumber: Double?) { - self.justNumber = justNumber - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(justNumber, forKey: "JustNumber") + public enum CodingKeys: String, CodingKey { + case justNumber = "JustNumber" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - justNumber = try container.decodeIfPresent(Double.self, forKey: "JustNumber") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Order.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Order.swift index 480de1c3ae8..26de6d8313d 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Order.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Order.swift @@ -9,14 +9,14 @@ import Foundation -open class Order: Codable { +public struct Order: Codable { public enum Status: String, Codable { case placed = "placed" case approved = "approved" case delivered = "delivered" } - public var id: Int64? + public var _id: Int64? public var petId: Int64? public var quantity: Int? public var shipDate: Date? @@ -25,42 +25,15 @@ open class Order: Codable { public var complete: Bool? - - public init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { - self.id = id - self.petId = petId - self.quantity = quantity - self.shipDate = shipDate - self.status = status - self.complete = complete - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(id, forKey: "id") - try container.encodeIfPresent(petId, forKey: "petId") - try container.encodeIfPresent(quantity, forKey: "quantity") - try container.encodeIfPresent(shipDate, forKey: "shipDate") - try container.encodeIfPresent(status, forKey: "status") - try container.encodeIfPresent(complete, forKey: "complete") + public enum CodingKeys: String, CodingKey { + case _id = "id" + case petId + case quantity + case shipDate + case status + case complete } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - id = try container.decodeIfPresent(Int64.self, forKey: "id") - petId = try container.decodeIfPresent(Int64.self, forKey: "petId") - quantity = try container.decodeIfPresent(Int.self, forKey: "quantity") - shipDate = try container.decodeIfPresent(Date.self, forKey: "shipDate") - status = try container.decodeIfPresent(Status.self, forKey: "status") - complete = try container.decodeIfPresent(Bool.self, forKey: "complete") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterBoolean.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterBoolean.swift index ba832854f18..204acfe70c3 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterBoolean.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterBoolean.swift @@ -9,25 +9,10 @@ import Foundation -open class OuterBoolean: Codable { +public struct OuterBoolean: Codable { - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterComposite.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterComposite.swift index 63cedf4e5fb..0c77ca23f50 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterComposite.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterComposite.swift @@ -9,40 +9,19 @@ import Foundation -open class OuterComposite: Codable { +public struct OuterComposite: Codable { public var myNumber: OuterNumber? public var myString: OuterString? public var myBoolean: OuterBoolean? - - public init(myNumber: OuterNumber?, myString: OuterString?, myBoolean: OuterBoolean?) { - self.myNumber = myNumber - self.myString = myString - self.myBoolean = myBoolean - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(myNumber, forKey: "my_number") - try container.encodeIfPresent(myString, forKey: "my_string") - try container.encodeIfPresent(myBoolean, forKey: "my_boolean") + public enum CodingKeys: String, CodingKey { + case myNumber = "my_number" + case myString = "my_string" + case myBoolean = "my_boolean" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - myNumber = try container.decodeIfPresent(OuterNumber.self, forKey: "my_number") - myString = try container.decodeIfPresent(OuterString.self, forKey: "my_string") - myBoolean = try container.decodeIfPresent(OuterBoolean.self, forKey: "my_boolean") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterNumber.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterNumber.swift index 12d8b5fabcd..3e3a6775a6c 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterNumber.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterNumber.swift @@ -9,25 +9,10 @@ import Foundation -open class OuterNumber: Codable { +public struct OuterNumber: Codable { - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterString.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterString.swift index a432707815f..06ff5ccef4b 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterString.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/OuterString.swift @@ -9,25 +9,10 @@ import Foundation -open class OuterString: Codable { +public struct OuterString: Codable { - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Pet.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Pet.swift index 672a174b557..dcb32870f70 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Pet.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Pet.swift @@ -9,14 +9,14 @@ import Foundation -open class Pet: Codable { +public struct Pet: Codable { public enum Status: String, Codable { case available = "available" case pending = "pending" case sold = "sold" } - public var id: Int64? + public var _id: Int64? public var category: Category? public var name: String public var photoUrls: [String] @@ -25,42 +25,15 @@ open class Pet: Codable { public var status: Status? - - public init(id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { - self.id = id - self.category = category - self.name = name - self.photoUrls = photoUrls - self.tags = tags - self.status = status - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(id, forKey: "id") - try container.encodeIfPresent(category, forKey: "category") - try container.encode(name, forKey: "name") - try container.encode(photoUrls, forKey: "photoUrls") - try container.encodeIfPresent(tags, forKey: "tags") - try container.encodeIfPresent(status, forKey: "status") + public enum CodingKeys: String, CodingKey { + case _id = "id" + case category + case name + case photoUrls + case tags + case status } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - id = try container.decodeIfPresent(Int64.self, forKey: "id") - category = try container.decodeIfPresent(Category.self, forKey: "category") - name = try container.decode(String.self, forKey: "name") - photoUrls = try container.decode([String].self, forKey: "photoUrls") - tags = try container.decodeIfPresent([Tag].self, forKey: "tags") - status = try container.decodeIfPresent(Status.self, forKey: "status") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ReadOnlyFirst.swift index 1303add0531..7cec5cb2f92 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/ReadOnlyFirst.swift @@ -9,36 +9,12 @@ import Foundation -open class ReadOnlyFirst: Codable { +public struct ReadOnlyFirst: Codable { public var bar: String? public var baz: String? - - public init(bar: String?, baz: String?) { - self.bar = bar - self.baz = baz - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(bar, forKey: "bar") - try container.encodeIfPresent(baz, forKey: "baz") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - bar = try container.decodeIfPresent(String.self, forKey: "bar") - baz = try container.decodeIfPresent(String.self, forKey: "baz") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Return.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Return.swift index b9fc1607d82..86c3f0d8097 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Return.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Return.swift @@ -10,32 +10,15 @@ import Foundation /** Model for testing reserved words */ -open class Return: Codable { +public struct Return: Codable { public var _return: Int? - - public init(_return: Int?) { - self._return = _return - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(_return, forKey: "return") + public enum CodingKeys: String, CodingKey { + case _return = "return" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - _return = try container.decodeIfPresent(Int.self, forKey: "return") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift index 63bb3881256..f0c0aec5394 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift @@ -9,32 +9,15 @@ import Foundation -open class SpecialModelName: Codable { +public struct SpecialModelName: Codable { public var specialPropertyName: Int64? - - public init(specialPropertyName: Int64?) { - self.specialPropertyName = specialPropertyName - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(specialPropertyName, forKey: "$special[property.name]") + public enum CodingKeys: String, CodingKey { + case specialPropertyName = "$special[property.name]" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - specialPropertyName = try container.decodeIfPresent(Int64.self, forKey: "$special[property.name]") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Tag.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Tag.swift index 506c83a1f07..86c19a254d1 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Tag.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/Tag.swift @@ -9,36 +9,17 @@ import Foundation -open class Tag: Codable { +public struct Tag: Codable { - public var id: Int64? + public var _id: Int64? public var name: String? - - public init(id: Int64?, name: String?) { - self.id = id - self.name = name - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(id, forKey: "id") - try container.encodeIfPresent(name, forKey: "name") + public enum CodingKeys: String, CodingKey { + case _id = "id" + case name } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - id = try container.decodeIfPresent(Int64.self, forKey: "id") - name = try container.decodeIfPresent(String.self, forKey: "name") - } } diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/User.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/User.swift index 8d2f64a57db..ab73f62883e 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/User.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/Models/User.swift @@ -9,9 +9,9 @@ import Foundation -open class User: Codable { +public struct User: Codable { - public var id: Int64? + public var _id: Int64? public var username: String? public var firstName: String? public var lastName: String? @@ -22,48 +22,17 @@ open class User: Codable { public var userStatus: Int? - - public init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { - self.id = id - self.username = username - self.firstName = firstName - self.lastName = lastName - self.email = email - self.password = password - self.phone = phone - self.userStatus = userStatus - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(id, forKey: "id") - try container.encodeIfPresent(username, forKey: "username") - try container.encodeIfPresent(firstName, forKey: "firstName") - try container.encodeIfPresent(lastName, forKey: "lastName") - try container.encodeIfPresent(email, forKey: "email") - try container.encodeIfPresent(password, forKey: "password") - try container.encodeIfPresent(phone, forKey: "phone") - try container.encodeIfPresent(userStatus, forKey: "userStatus") + public enum CodingKeys: String, CodingKey { + case _id = "id" + case username + case firstName + case lastName + case email + case password + case phone + case userStatus } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - id = try container.decodeIfPresent(Int64.self, forKey: "id") - username = try container.decodeIfPresent(String.self, forKey: "username") - firstName = try container.decodeIfPresent(String.self, forKey: "firstName") - lastName = try container.decodeIfPresent(String.self, forKey: "lastName") - email = try container.decodeIfPresent(String.self, forKey: "email") - password = try container.decodeIfPresent(String.self, forKey: "password") - phone = try container.decodeIfPresent(String.self, forKey: "phone") - userStatus = try container.decodeIfPresent(Int.self, forKey: "userStatus") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/.swagger-codegen/VERSION b/samples/client/petstore/swift4/objcCompatible/.swagger-codegen/VERSION index f9f7450d135..855ff9501eb 100644 --- a/samples/client/petstore/swift4/objcCompatible/.swagger-codegen/VERSION +++ b/samples/client/petstore/swift4/objcCompatible/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/APIs/AnotherfakeAPI.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/APIs/AnotherfakeAPI.swift index 9c135bdce3a..1d439bf0089 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/APIs/AnotherfakeAPI.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/APIs/AnotherfakeAPI.swift @@ -1,5 +1,5 @@ // -// AnotherfakeAPI.swift +// AnotherFakeAPI.swift // // Generated by swagger-codegen // https://github.com/swagger-api/swagger-codegen @@ -10,7 +10,7 @@ import Alamofire -open class AnotherfakeAPI { +open class AnotherFakeAPI { /** To test special tags diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/APIs/FakeClassnameTags123API.swift new file mode 100644 index 00000000000..228cee8ffbc --- /dev/null +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/APIs/FakeClassnameTags123API.swift @@ -0,0 +1,54 @@ +// +// FakeClassnameTags123API.swift +// +// Generated by swagger-codegen +// https://github.com/swagger-api/swagger-codegen +// + +import Foundation +import Alamofire + + + +open class FakeClassnameTags123API { + /** + To test class name in snake case + + - 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)) { + testClassnameWithRequestBuilder(body: body).execute { (response, error) -> Void in + completion(response?.body, error); + } + } + + + /** + To test class name in snake case + - PATCH /fake_classname_test + - API Key: + - type: apiKey api_key_query (QUERY) + - name: api_key_query + - examples: [{contentType=application/json, example={ + "client" : "client" +}}] + + - parameter body: (body) client model + + - returns: RequestBuilder + */ + open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/fake_classname_test" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = NSURLComponents(string: URLString) + + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/AdditionalPropertiesClass.swift index 02e3d3efd2a..8388bfb035f 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/AdditionalPropertiesClass.swift @@ -9,36 +9,17 @@ import Foundation -open class AdditionalPropertiesClass: Codable { +public struct AdditionalPropertiesClass: Codable { public var mapProperty: [String:String]? public var mapOfMapProperty: [String:[String:String]]? - - public init(mapProperty: [String:String]?, mapOfMapProperty: [String:[String:String]]?) { - self.mapProperty = mapProperty - self.mapOfMapProperty = mapOfMapProperty - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(mapProperty, forKey: "map_property") - try container.encodeIfPresent(mapOfMapProperty, forKey: "map_of_map_property") + public enum CodingKeys: String, CodingKey { + case mapProperty = "map_property" + case mapOfMapProperty = "map_of_map_property" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - mapProperty = try container.decodeIfPresent([String:String].self, forKey: "map_property") - mapOfMapProperty = try container.decodeIfPresent([String:[String:String]].self, forKey: "map_of_map_property") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Animal.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Animal.swift index dec4a605a27..fa13d5e9b9f 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Animal.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Animal.swift @@ -9,36 +9,12 @@ import Foundation -open class Animal: Codable { +public struct Animal: Codable { public var className: String public var color: String? - - public init(className: String, color: String?) { - self.className = className - self.color = color - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encode(className, forKey: "className") - try container.encodeIfPresent(color, forKey: "color") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - className = try container.decode(String.self, forKey: "className") - color = try container.decodeIfPresent(String.self, forKey: "color") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ApiResponse.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ApiResponse.swift index 0a4a7c7068d..970b52f28e4 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ApiResponse.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ApiResponse.swift @@ -9,7 +9,7 @@ import Foundation -open class ApiResponse: Codable { +public struct ApiResponse: Codable { public var code: Int? public var codeNum: NSNumber? { @@ -21,33 +21,6 @@ open class ApiResponse: Codable { public var message: String? - - public init(code: Int?, type: String?, message: String?) { - self.code = code - self.type = type - self.message = message - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(code, forKey: "code") - try container.encodeIfPresent(type, forKey: "type") - try container.encodeIfPresent(message, forKey: "message") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - code = try container.decodeIfPresent(Int.self, forKey: "code") - type = try container.decodeIfPresent(String.self, forKey: "type") - message = try container.decodeIfPresent(String.self, forKey: "message") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ArrayOfArrayOfNumberOnly.swift index 6cb60bc9f23..8aea70bfc69 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ArrayOfArrayOfNumberOnly.swift @@ -9,32 +9,15 @@ import Foundation -open class ArrayOfArrayOfNumberOnly: Codable { +public struct ArrayOfArrayOfNumberOnly: Codable { public var arrayArrayNumber: [[Double]]? - - public init(arrayArrayNumber: [[Double]]?) { - self.arrayArrayNumber = arrayArrayNumber - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(arrayArrayNumber, forKey: "ArrayArrayNumber") + public enum CodingKeys: String, CodingKey { + case arrayArrayNumber = "ArrayArrayNumber" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - arrayArrayNumber = try container.decodeIfPresent([[Double]].self, forKey: "ArrayArrayNumber") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ArrayOfNumberOnly.swift index 4e30334ed41..c670c41c217 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ArrayOfNumberOnly.swift @@ -9,32 +9,15 @@ import Foundation -open class ArrayOfNumberOnly: Codable { +public struct ArrayOfNumberOnly: Codable { public var arrayNumber: [Double]? - - public init(arrayNumber: [Double]?) { - self.arrayNumber = arrayNumber - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(arrayNumber, forKey: "ArrayNumber") + public enum CodingKeys: String, CodingKey { + case arrayNumber = "ArrayNumber" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - arrayNumber = try container.decodeIfPresent([Double].self, forKey: "ArrayNumber") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ArrayTest.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ArrayTest.swift index b5084fca928..6257fb4cc9b 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ArrayTest.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ArrayTest.swift @@ -9,40 +9,19 @@ import Foundation -open class ArrayTest: Codable { +public struct ArrayTest: Codable { public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? public var arrayArrayOfModel: [[ReadOnlyFirst]]? - - public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { - self.arrayOfString = arrayOfString - self.arrayArrayOfInteger = arrayArrayOfInteger - self.arrayArrayOfModel = arrayArrayOfModel - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(arrayOfString, forKey: "array_of_string") - try container.encodeIfPresent(arrayArrayOfInteger, forKey: "array_array_of_integer") - try container.encodeIfPresent(arrayArrayOfModel, forKey: "array_array_of_model") + public enum CodingKeys: String, CodingKey { + case arrayOfString = "array_of_string" + case arrayArrayOfInteger = "array_array_of_integer" + case arrayArrayOfModel = "array_array_of_model" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - arrayOfString = try container.decodeIfPresent([String].self, forKey: "array_of_string") - arrayArrayOfInteger = try container.decodeIfPresent([[Int64]].self, forKey: "array_array_of_integer") - arrayArrayOfModel = try container.decodeIfPresent([[ReadOnlyFirst]].self, forKey: "array_array_of_model") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Capitalization.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Capitalization.swift index 61364bf74f1..952c337fa74 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Capitalization.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Capitalization.swift @@ -9,7 +9,7 @@ import Foundation -open class Capitalization: Codable { +public struct Capitalization: Codable { public var smallCamel: String? public var capitalCamel: String? @@ -20,42 +20,15 @@ open class Capitalization: Codable { public var ATT_NAME: String? - - public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { - self.smallCamel = smallCamel - self.capitalCamel = capitalCamel - self.smallSnake = smallSnake - self.capitalSnake = capitalSnake - self.sCAETHFlowPoints = sCAETHFlowPoints - self.ATT_NAME = ATT_NAME - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(smallCamel, forKey: "smallCamel") - try container.encodeIfPresent(capitalCamel, forKey: "CapitalCamel") - try container.encodeIfPresent(smallSnake, forKey: "small_Snake") - try container.encodeIfPresent(capitalSnake, forKey: "Capital_Snake") - try container.encodeIfPresent(sCAETHFlowPoints, forKey: "SCA_ETH_Flow_Points") - try container.encodeIfPresent(ATT_NAME, forKey: "ATT_NAME") + public enum CodingKeys: String, CodingKey { + case smallCamel + case capitalCamel = "CapitalCamel" + case smallSnake = "small_Snake" + case capitalSnake = "Capital_Snake" + case sCAETHFlowPoints = "SCA_ETH_Flow_Points" + case ATT_NAME } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - smallCamel = try container.decodeIfPresent(String.self, forKey: "smallCamel") - capitalCamel = try container.decodeIfPresent(String.self, forKey: "CapitalCamel") - smallSnake = try container.decodeIfPresent(String.self, forKey: "small_Snake") - capitalSnake = try container.decodeIfPresent(String.self, forKey: "Capital_Snake") - sCAETHFlowPoints = try container.decodeIfPresent(String.self, forKey: "SCA_ETH_Flow_Points") - ATT_NAME = try container.decodeIfPresent(String.self, forKey: "ATT_NAME") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Cat.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Cat.swift index 64a10132caf..67151f42958 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Cat.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Cat.swift @@ -9,8 +9,10 @@ import Foundation -open class Cat: Animal { +public struct Cat: Codable { + public var className: String + public var color: String? public var declawed: Bool? public var declawedNum: NSNumber? { get { @@ -19,24 +21,6 @@ open class Cat: Animal { } - - // Encodable protocol methods - - public override func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(declawed, forKey: "declawed") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - declawed = try container.decodeIfPresent(Bool.self, forKey: "declawed") - try super.init(from: decoder) - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Category.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Category.swift index 1a2f0048e4e..449407291ab 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Category.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Category.swift @@ -9,41 +9,22 @@ import Foundation -open class Category: Codable { +public struct Category: Codable { - public var id: Int64? - public var idNum: NSNumber? { + public var _id: Int64? + public var _idNum: NSNumber? { get { - return id.map({ return NSNumber(value: $0) }) + return _id.map({ return NSNumber(value: $0) }) } } public var name: String? - - public init(id: Int64?, name: String?) { - self.id = id - self.name = name - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(id, forKey: "id") - try container.encodeIfPresent(name, forKey: "name") + public enum CodingKeys: String, CodingKey { + case _id = "id" + case name } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - id = try container.decodeIfPresent(Int64.self, forKey: "id") - name = try container.decodeIfPresent(String.self, forKey: "name") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ClassModel.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ClassModel.swift index 1c714097ffd..90da5c2cf4d 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ClassModel.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ClassModel.swift @@ -10,32 +10,11 @@ import Foundation /** Model for testing model with \"_class\" property */ -open class ClassModel: Codable { +public struct ClassModel: Codable { public var _class: String? - - public init(_class: String?) { - self._class = _class - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(_class, forKey: "_class") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - _class = try container.decodeIfPresent(String.self, forKey: "_class") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Client.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Client.swift index b6af0a778cd..f4333883e63 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Client.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Client.swift @@ -9,32 +9,11 @@ import Foundation -open class Client: Codable { +public struct Client: Codable { public var client: String? - - public init(client: String?) { - self.client = client - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(client, forKey: "client") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - client = try container.decodeIfPresent(String.self, forKey: "client") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Dog.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Dog.swift index f10ec5a8189..b86c61c0ee3 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Dog.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Dog.swift @@ -9,29 +9,13 @@ import Foundation -open class Dog: Animal { +public struct Dog: Codable { + public var className: String + public var color: String? public var breed: String? - - // Encodable protocol methods - - public override func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(breed, forKey: "breed") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - breed = try container.decodeIfPresent(String.self, forKey: "breed") - try super.init(from: decoder) - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/EnumArrays.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/EnumArrays.swift index 0cc8b4bbec5..145acd9dd34 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/EnumArrays.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/EnumArrays.swift @@ -9,7 +9,7 @@ import Foundation -open class EnumArrays: Codable { +public struct EnumArrays: Codable { public enum JustSymbol: String, Codable { case greaterThanOrEqualTo = ">=" @@ -23,30 +23,11 @@ open class EnumArrays: Codable { public var arrayEnum: [ArrayEnum]? - - public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { - self.justSymbol = justSymbol - self.arrayEnum = arrayEnum - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(justSymbol, forKey: "just_symbol") - try container.encodeIfPresent(arrayEnum, forKey: "array_enum") + public enum CodingKeys: String, CodingKey { + case justSymbol = "just_symbol" + case arrayEnum = "array_enum" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - justSymbol = try container.decodeIfPresent(JustSymbol.self, forKey: "just_symbol") - arrayEnum = try container.decodeIfPresent([ArrayEnum].self, forKey: "array_enum") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/EnumTest.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/EnumTest.swift index ac6865fb144..74b693c7bb6 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/EnumTest.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/EnumTest.swift @@ -9,7 +9,7 @@ import Foundation -open class EnumTest: Codable { +public struct EnumTest: Codable { public enum EnumString: String, Codable { case upper = "UPPER" @@ -30,36 +30,13 @@ open class EnumTest: Codable { public var outerEnum: OuterEnum? - - public init(enumString: EnumString?, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { - self.enumString = enumString - self.enumInteger = enumInteger - self.enumNumber = enumNumber - self.outerEnum = outerEnum - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(enumString, forKey: "enum_string") - try container.encodeIfPresent(enumInteger, forKey: "enum_integer") - try container.encodeIfPresent(enumNumber, forKey: "enum_number") - try container.encodeIfPresent(outerEnum, forKey: "outerEnum") + public enum CodingKeys: String, CodingKey { + case enumString = "enum_string" + case enumInteger = "enum_integer" + case enumNumber = "enum_number" + case outerEnum } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - enumString = try container.decodeIfPresent(EnumString.self, forKey: "enum_string") - enumInteger = try container.decodeIfPresent(EnumInteger.self, forKey: "enum_integer") - enumNumber = try container.decodeIfPresent(EnumNumber.self, forKey: "enum_number") - outerEnum = try container.decodeIfPresent(OuterEnum.self, forKey: "outerEnum") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift index e28cb2a11f1..720854989a3 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift @@ -9,7 +9,7 @@ import Foundation -open class FormatTest: Codable { +public struct FormatTest: Codable { public var integer: Int? public var integerNum: NSNumber? { @@ -30,11 +30,6 @@ open class FormatTest: Codable { } } public var number: Double - public var numberNum: NSNumber? { - get { - return number.map({ return NSNumber(value: $0) }) - } - } public var float: Float? public var floatNum: NSNumber? { get { @@ -56,63 +51,6 @@ open class FormatTest: Codable { public var password: String - - public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: Data?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { - self.integer = integer - self.int32 = int32 - self.int64 = int64 - self.number = number - self.float = float - self.double = double - self.string = string - self.byte = byte - self.binary = binary - self.date = date - self.dateTime = dateTime - self.uuid = uuid - self.password = password - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(integer, forKey: "integer") - try container.encodeIfPresent(int32, forKey: "int32") - try container.encodeIfPresent(int64, forKey: "int64") - try container.encode(number, forKey: "number") - try container.encodeIfPresent(float, forKey: "float") - try container.encodeIfPresent(double, forKey: "double") - try container.encodeIfPresent(string, forKey: "string") - try container.encode(byte, forKey: "byte") - try container.encodeIfPresent(binary, forKey: "binary") - try container.encode(date, forKey: "date") - try container.encodeIfPresent(dateTime, forKey: "dateTime") - try container.encodeIfPresent(uuid, forKey: "uuid") - try container.encode(password, forKey: "password") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - integer = try container.decodeIfPresent(Int.self, forKey: "integer") - int32 = try container.decodeIfPresent(Int.self, forKey: "int32") - int64 = try container.decodeIfPresent(Int64.self, forKey: "int64") - number = try container.decode(Double.self, forKey: "number") - float = try container.decodeIfPresent(Float.self, forKey: "float") - double = try container.decodeIfPresent(Double.self, forKey: "double") - string = try container.decodeIfPresent(String.self, forKey: "string") - byte = try container.decode(Data.self, forKey: "byte") - binary = try container.decodeIfPresent(Data.self, forKey: "binary") - date = try container.decode(Date.self, forKey: "date") - dateTime = try container.decodeIfPresent(Date.self, forKey: "dateTime") - uuid = try container.decodeIfPresent(UUID.self, forKey: "uuid") - password = try container.decode(String.self, forKey: "password") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/HasOnlyReadOnly.swift index 14479e661e5..23f5e679faf 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/HasOnlyReadOnly.swift @@ -9,36 +9,12 @@ import Foundation -open class HasOnlyReadOnly: Codable { +public struct HasOnlyReadOnly: Codable { public var bar: String? public var foo: String? - - public init(bar: String?, foo: String?) { - self.bar = bar - self.foo = foo - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(bar, forKey: "bar") - try container.encodeIfPresent(foo, forKey: "foo") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - bar = try container.decodeIfPresent(String.self, forKey: "bar") - foo = try container.decodeIfPresent(String.self, forKey: "foo") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/List.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/List.swift index a011a841193..382702867a8 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/List.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/List.swift @@ -9,32 +9,15 @@ import Foundation -open class List: Codable { +public struct List: Codable { public var _123List: String? - - public init(_123List: String?) { - self._123List = _123List - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(_123List, forKey: "123-list") + public enum CodingKeys: String, CodingKey { + case _123List = "123-list" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - _123List = try container.decodeIfPresent(String.self, forKey: "123-list") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/MapTest.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/MapTest.swift index aa24030f512..e8f11504de5 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/MapTest.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/MapTest.swift @@ -9,7 +9,7 @@ import Foundation -open class MapTest: Codable { +public struct MapTest: Codable { public enum MapOfEnumString: String, Codable { case upper = "UPPER" @@ -19,30 +19,11 @@ open class MapTest: Codable { public var mapOfEnumString: [String:String]? - - public init(mapMapOfString: [String:[String:String]]?, mapOfEnumString: [String:String]?) { - self.mapMapOfString = mapMapOfString - self.mapOfEnumString = mapOfEnumString - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(mapMapOfString, forKey: "map_map_of_string") - try container.encodeIfPresent(mapOfEnumString, forKey: "map_of_enum_string") + public enum CodingKeys: String, CodingKey { + case mapMapOfString = "map_map_of_string" + case mapOfEnumString = "map_of_enum_string" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - mapMapOfString = try container.decodeIfPresent([String:[String:String]].self, forKey: "map_map_of_string") - mapOfEnumString = try container.decodeIfPresent([String:String].self, forKey: "map_of_enum_string") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index 7f9bba54883..554c81317eb 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -9,40 +9,13 @@ import Foundation -open class MixedPropertiesAndAdditionalPropertiesClass: Codable { +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { public var uuid: UUID? public var dateTime: Date? public var map: [String:Animal]? - - public init(uuid: UUID?, dateTime: Date?, map: [String:Animal]?) { - self.uuid = uuid - self.dateTime = dateTime - self.map = map - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(uuid, forKey: "uuid") - try container.encodeIfPresent(dateTime, forKey: "dateTime") - try container.encodeIfPresent(map, forKey: "map") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - uuid = try container.decodeIfPresent(UUID.self, forKey: "uuid") - dateTime = try container.decodeIfPresent(Date.self, forKey: "dateTime") - map = try container.decodeIfPresent([String:Animal].self, forKey: "map") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift index 9ed1ed3fbf2..8bea4e98d45 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift @@ -10,7 +10,7 @@ import Foundation /** Model for testing model name starting with number */ -open class Model200Response: Codable { +public struct Model200Response: Codable { public var name: Int? public var nameNum: NSNumber? { @@ -21,30 +21,11 @@ open class Model200Response: Codable { public var _class: String? - - public init(name: Int?, _class: String?) { - self.name = name - self._class = _class - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(name, forKey: "name") - try container.encodeIfPresent(_class, forKey: "class") + public enum CodingKeys: String, CodingKey { + case name + case _class = "class" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - name = try container.decodeIfPresent(Int.self, forKey: "name") - _class = try container.decodeIfPresent(String.self, forKey: "class") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Name.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Name.swift index d43450e7a71..090d73e9206 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Name.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Name.swift @@ -10,7 +10,7 @@ import Foundation /** Model for testing model name same as property name */ -open class Name: Codable { +public struct Name: Codable { public var name: Int public var nameNum: NSNumber? { @@ -33,36 +33,13 @@ open class Name: Codable { } - - public init(name: Int, snakeCase: Int?, property: String?, _123Number: Int?) { - self.name = name - self.snakeCase = snakeCase - self.property = property - self._123Number = _123Number - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encode(name, forKey: "name") - try container.encodeIfPresent(snakeCase, forKey: "snake_case") - try container.encodeIfPresent(property, forKey: "property") - try container.encodeIfPresent(_123Number, forKey: "123Number") + public enum CodingKeys: String, CodingKey { + case name + case snakeCase = "snake_case" + case property + case _123Number = "123Number" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - name = try container.decode(Int.self, forKey: "name") - snakeCase = try container.decodeIfPresent(Int.self, forKey: "snake_case") - property = try container.decodeIfPresent(String.self, forKey: "property") - _123Number = try container.decodeIfPresent(Int.self, forKey: "123Number") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/NumberOnly.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/NumberOnly.swift index 10be7af5ff7..78bb76f9bfd 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/NumberOnly.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/NumberOnly.swift @@ -9,37 +9,15 @@ import Foundation -open class NumberOnly: Codable { +public struct NumberOnly: Codable { public var justNumber: Double? - public var justNumberNum: NSNumber? { - get { - return justNumber.map({ return NSNumber(value: $0) }) - } + + + public enum CodingKeys: String, CodingKey { + case justNumber = "JustNumber" } - - public init(justNumber: Double?) { - self.justNumber = justNumber - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(justNumber, forKey: "JustNumber") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - justNumber = try container.decodeIfPresent(Double.self, forKey: "JustNumber") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Order.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Order.swift index c4029303157..0a5a1021329 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Order.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Order.swift @@ -9,17 +9,17 @@ import Foundation -open class Order: Codable { +public struct Order: Codable { public enum Status: String, Codable { case placed = "placed" case approved = "approved" case delivered = "delivered" } - public var id: Int64? - public var idNum: NSNumber? { + public var _id: Int64? + public var _idNum: NSNumber? { get { - return id.map({ return NSNumber(value: $0) }) + return _id.map({ return NSNumber(value: $0) }) } } public var petId: Int64? @@ -45,42 +45,15 @@ open class Order: Codable { } - - public init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { - self.id = id - self.petId = petId - self.quantity = quantity - self.shipDate = shipDate - self.status = status - self.complete = complete - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(id, forKey: "id") - try container.encodeIfPresent(petId, forKey: "petId") - try container.encodeIfPresent(quantity, forKey: "quantity") - try container.encodeIfPresent(shipDate, forKey: "shipDate") - try container.encodeIfPresent(status, forKey: "status") - try container.encodeIfPresent(complete, forKey: "complete") + public enum CodingKeys: String, CodingKey { + case _id = "id" + case petId + case quantity + case shipDate + case status + case complete } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - id = try container.decodeIfPresent(Int64.self, forKey: "id") - petId = try container.decodeIfPresent(Int64.self, forKey: "petId") - quantity = try container.decodeIfPresent(Int.self, forKey: "quantity") - shipDate = try container.decodeIfPresent(Date.self, forKey: "shipDate") - status = try container.decodeIfPresent(Status.self, forKey: "status") - complete = try container.decodeIfPresent(Bool.self, forKey: "complete") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/OuterBoolean.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/OuterBoolean.swift index ba832854f18..204acfe70c3 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/OuterBoolean.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/OuterBoolean.swift @@ -9,25 +9,10 @@ import Foundation -open class OuterBoolean: Codable { +public struct OuterBoolean: Codable { - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/OuterComposite.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/OuterComposite.swift index 63cedf4e5fb..0c77ca23f50 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/OuterComposite.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/OuterComposite.swift @@ -9,40 +9,19 @@ import Foundation -open class OuterComposite: Codable { +public struct OuterComposite: Codable { public var myNumber: OuterNumber? public var myString: OuterString? public var myBoolean: OuterBoolean? - - public init(myNumber: OuterNumber?, myString: OuterString?, myBoolean: OuterBoolean?) { - self.myNumber = myNumber - self.myString = myString - self.myBoolean = myBoolean - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(myNumber, forKey: "my_number") - try container.encodeIfPresent(myString, forKey: "my_string") - try container.encodeIfPresent(myBoolean, forKey: "my_boolean") + public enum CodingKeys: String, CodingKey { + case myNumber = "my_number" + case myString = "my_string" + case myBoolean = "my_boolean" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - myNumber = try container.decodeIfPresent(OuterNumber.self, forKey: "my_number") - myString = try container.decodeIfPresent(OuterString.self, forKey: "my_string") - myBoolean = try container.decodeIfPresent(OuterBoolean.self, forKey: "my_boolean") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/OuterNumber.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/OuterNumber.swift index 12d8b5fabcd..3e3a6775a6c 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/OuterNumber.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/OuterNumber.swift @@ -9,25 +9,10 @@ import Foundation -open class OuterNumber: Codable { +public struct OuterNumber: Codable { - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/OuterString.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/OuterString.swift index a432707815f..06ff5ccef4b 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/OuterString.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/OuterString.swift @@ -9,25 +9,10 @@ import Foundation -open class OuterString: Codable { +public struct OuterString: Codable { - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Pet.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Pet.swift index 03ba3ce8ce5..b0518218011 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Pet.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Pet.swift @@ -9,17 +9,17 @@ import Foundation -open class Pet: Codable { +public struct Pet: Codable { public enum Status: String, Codable { case available = "available" case pending = "pending" case sold = "sold" } - public var id: Int64? - public var idNum: NSNumber? { + public var _id: Int64? + public var _idNum: NSNumber? { get { - return id.map({ return NSNumber(value: $0) }) + return _id.map({ return NSNumber(value: $0) }) } } public var category: Category? @@ -30,42 +30,15 @@ open class Pet: Codable { public var status: Status? - - public init(id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { - self.id = id - self.category = category - self.name = name - self.photoUrls = photoUrls - self.tags = tags - self.status = status - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(id, forKey: "id") - try container.encodeIfPresent(category, forKey: "category") - try container.encode(name, forKey: "name") - try container.encode(photoUrls, forKey: "photoUrls") - try container.encodeIfPresent(tags, forKey: "tags") - try container.encodeIfPresent(status, forKey: "status") + public enum CodingKeys: String, CodingKey { + case _id = "id" + case category + case name + case photoUrls + case tags + case status } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - id = try container.decodeIfPresent(Int64.self, forKey: "id") - category = try container.decodeIfPresent(Category.self, forKey: "category") - name = try container.decode(String.self, forKey: "name") - photoUrls = try container.decode([String].self, forKey: "photoUrls") - tags = try container.decodeIfPresent([Tag].self, forKey: "tags") - status = try container.decodeIfPresent(Status.self, forKey: "status") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ReadOnlyFirst.swift index 1303add0531..7cec5cb2f92 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/ReadOnlyFirst.swift @@ -9,36 +9,12 @@ import Foundation -open class ReadOnlyFirst: Codable { +public struct ReadOnlyFirst: Codable { public var bar: String? public var baz: String? - - public init(bar: String?, baz: String?) { - self.bar = bar - self.baz = baz - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(bar, forKey: "bar") - try container.encodeIfPresent(baz, forKey: "baz") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - bar = try container.decodeIfPresent(String.self, forKey: "bar") - baz = try container.decodeIfPresent(String.self, forKey: "baz") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Return.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Return.swift index 8708ed894b6..d2bb266a9dd 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Return.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Return.swift @@ -10,7 +10,7 @@ import Foundation /** Model for testing reserved words */ -open class Return: Codable { +public struct Return: Codable { public var _return: Int? public var _returnNum: NSNumber? { @@ -20,27 +20,10 @@ open class Return: Codable { } - - public init(_return: Int?) { - self._return = _return - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(_return, forKey: "return") + public enum CodingKeys: String, CodingKey { + case _return = "return" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - _return = try container.decodeIfPresent(Int.self, forKey: "return") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift index 1bbc0087598..e5381f2b4f6 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift @@ -9,7 +9,7 @@ import Foundation -open class SpecialModelName: Codable { +public struct SpecialModelName: Codable { public var specialPropertyName: Int64? public var specialPropertyNameNum: NSNumber? { @@ -19,27 +19,10 @@ open class SpecialModelName: Codable { } - - public init(specialPropertyName: Int64?) { - self.specialPropertyName = specialPropertyName - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(specialPropertyName, forKey: "$special[property.name]") + public enum CodingKeys: String, CodingKey { + case specialPropertyName = "$special[property.name]" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - specialPropertyName = try container.decodeIfPresent(Int64.self, forKey: "$special[property.name]") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Tag.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Tag.swift index ca37c3fbf76..4f90ec8f73d 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Tag.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/Tag.swift @@ -9,41 +9,22 @@ import Foundation -open class Tag: Codable { +public struct Tag: Codable { - public var id: Int64? - public var idNum: NSNumber? { + public var _id: Int64? + public var _idNum: NSNumber? { get { - return id.map({ return NSNumber(value: $0) }) + return _id.map({ return NSNumber(value: $0) }) } } public var name: String? - - public init(id: Int64?, name: String?) { - self.id = id - self.name = name - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(id, forKey: "id") - try container.encodeIfPresent(name, forKey: "name") + public enum CodingKeys: String, CodingKey { + case _id = "id" + case name } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - id = try container.decodeIfPresent(Int64.self, forKey: "id") - name = try container.decodeIfPresent(String.self, forKey: "name") - } } diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/User.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/User.swift index 315b7b9710c..9158195c4eb 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/User.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/Swaggers/Models/User.swift @@ -9,12 +9,12 @@ import Foundation -open class User: Codable { +public struct User: Codable { - public var id: Int64? - public var idNum: NSNumber? { + public var _id: Int64? + public var _idNum: NSNumber? { get { - return id.map({ return NSNumber(value: $0) }) + return _id.map({ return NSNumber(value: $0) }) } } public var username: String? @@ -32,48 +32,17 @@ open class User: Codable { } - - public init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { - self.id = id - self.username = username - self.firstName = firstName - self.lastName = lastName - self.email = email - self.password = password - self.phone = phone - self.userStatus = userStatus - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(id, forKey: "id") - try container.encodeIfPresent(username, forKey: "username") - try container.encodeIfPresent(firstName, forKey: "firstName") - try container.encodeIfPresent(lastName, forKey: "lastName") - try container.encodeIfPresent(email, forKey: "email") - try container.encodeIfPresent(password, forKey: "password") - try container.encodeIfPresent(phone, forKey: "phone") - try container.encodeIfPresent(userStatus, forKey: "userStatus") + public enum CodingKeys: String, CodingKey { + case _id = "id" + case username + case firstName + case lastName + case email + case password + case phone + case userStatus } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - id = try container.decodeIfPresent(Int64.self, forKey: "id") - username = try container.decodeIfPresent(String.self, forKey: "username") - firstName = try container.decodeIfPresent(String.self, forKey: "firstName") - lastName = try container.decodeIfPresent(String.self, forKey: "lastName") - email = try container.decodeIfPresent(String.self, forKey: "email") - password = try container.decodeIfPresent(String.self, forKey: "password") - phone = try container.decodeIfPresent(String.self, forKey: "phone") - userStatus = try container.decodeIfPresent(Int.self, forKey: "userStatus") - } } diff --git a/samples/client/petstore/swift4/promisekit/.swagger-codegen/VERSION b/samples/client/petstore/swift4/promisekit/.swagger-codegen/VERSION index f9f7450d135..855ff9501eb 100644 --- a/samples/client/petstore/swift4/promisekit/.swagger-codegen/VERSION +++ b/samples/client/petstore/swift4/promisekit/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/APIs/AnotherfakeAPI.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/APIs/AnotherfakeAPI.swift index c0ef57a2874..31b7a178c6d 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/APIs/AnotherfakeAPI.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/APIs/AnotherfakeAPI.swift @@ -1,5 +1,5 @@ // -// AnotherfakeAPI.swift +// AnotherFakeAPI.swift // // Generated by swagger-codegen // https://github.com/swagger-api/swagger-codegen @@ -11,7 +11,7 @@ import PromiseKit -open class AnotherfakeAPI { +open class AnotherFakeAPI { /** To test special tags diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/AdditionalPropertiesClass.swift index 02e3d3efd2a..8388bfb035f 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/AdditionalPropertiesClass.swift @@ -9,36 +9,17 @@ import Foundation -open class AdditionalPropertiesClass: Codable { +public struct AdditionalPropertiesClass: Codable { public var mapProperty: [String:String]? public var mapOfMapProperty: [String:[String:String]]? - - public init(mapProperty: [String:String]?, mapOfMapProperty: [String:[String:String]]?) { - self.mapProperty = mapProperty - self.mapOfMapProperty = mapOfMapProperty - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(mapProperty, forKey: "map_property") - try container.encodeIfPresent(mapOfMapProperty, forKey: "map_of_map_property") + public enum CodingKeys: String, CodingKey { + case mapProperty = "map_property" + case mapOfMapProperty = "map_of_map_property" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - mapProperty = try container.decodeIfPresent([String:String].self, forKey: "map_property") - mapOfMapProperty = try container.decodeIfPresent([String:[String:String]].self, forKey: "map_of_map_property") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Animal.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Animal.swift index dec4a605a27..fa13d5e9b9f 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Animal.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Animal.swift @@ -9,36 +9,12 @@ import Foundation -open class Animal: Codable { +public struct Animal: Codable { public var className: String public var color: String? - - public init(className: String, color: String?) { - self.className = className - self.color = color - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encode(className, forKey: "className") - try container.encodeIfPresent(color, forKey: "color") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - className = try container.decode(String.self, forKey: "className") - color = try container.decodeIfPresent(String.self, forKey: "color") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ApiResponse.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ApiResponse.swift index d6c0c3aba30..a4e416b79a8 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ApiResponse.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ApiResponse.swift @@ -9,40 +9,13 @@ import Foundation -open class ApiResponse: Codable { +public struct ApiResponse: Codable { public var code: Int? public var type: String? public var message: String? - - public init(code: Int?, type: String?, message: String?) { - self.code = code - self.type = type - self.message = message - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(code, forKey: "code") - try container.encodeIfPresent(type, forKey: "type") - try container.encodeIfPresent(message, forKey: "message") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - code = try container.decodeIfPresent(Int.self, forKey: "code") - type = try container.decodeIfPresent(String.self, forKey: "type") - message = try container.decodeIfPresent(String.self, forKey: "message") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ArrayOfArrayOfNumberOnly.swift index 6cb60bc9f23..8aea70bfc69 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ArrayOfArrayOfNumberOnly.swift @@ -9,32 +9,15 @@ import Foundation -open class ArrayOfArrayOfNumberOnly: Codable { +public struct ArrayOfArrayOfNumberOnly: Codable { public var arrayArrayNumber: [[Double]]? - - public init(arrayArrayNumber: [[Double]]?) { - self.arrayArrayNumber = arrayArrayNumber - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(arrayArrayNumber, forKey: "ArrayArrayNumber") + public enum CodingKeys: String, CodingKey { + case arrayArrayNumber = "ArrayArrayNumber" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - arrayArrayNumber = try container.decodeIfPresent([[Double]].self, forKey: "ArrayArrayNumber") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ArrayOfNumberOnly.swift index 4e30334ed41..c670c41c217 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ArrayOfNumberOnly.swift @@ -9,32 +9,15 @@ import Foundation -open class ArrayOfNumberOnly: Codable { +public struct ArrayOfNumberOnly: Codable { public var arrayNumber: [Double]? - - public init(arrayNumber: [Double]?) { - self.arrayNumber = arrayNumber - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(arrayNumber, forKey: "ArrayNumber") + public enum CodingKeys: String, CodingKey { + case arrayNumber = "ArrayNumber" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - arrayNumber = try container.decodeIfPresent([Double].self, forKey: "ArrayNumber") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ArrayTest.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ArrayTest.swift index b5084fca928..6257fb4cc9b 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ArrayTest.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ArrayTest.swift @@ -9,40 +9,19 @@ import Foundation -open class ArrayTest: Codable { +public struct ArrayTest: Codable { public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? public var arrayArrayOfModel: [[ReadOnlyFirst]]? - - public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { - self.arrayOfString = arrayOfString - self.arrayArrayOfInteger = arrayArrayOfInteger - self.arrayArrayOfModel = arrayArrayOfModel - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(arrayOfString, forKey: "array_of_string") - try container.encodeIfPresent(arrayArrayOfInteger, forKey: "array_array_of_integer") - try container.encodeIfPresent(arrayArrayOfModel, forKey: "array_array_of_model") + public enum CodingKeys: String, CodingKey { + case arrayOfString = "array_of_string" + case arrayArrayOfInteger = "array_array_of_integer" + case arrayArrayOfModel = "array_array_of_model" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - arrayOfString = try container.decodeIfPresent([String].self, forKey: "array_of_string") - arrayArrayOfInteger = try container.decodeIfPresent([[Int64]].self, forKey: "array_array_of_integer") - arrayArrayOfModel = try container.decodeIfPresent([[ReadOnlyFirst]].self, forKey: "array_array_of_model") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Capitalization.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Capitalization.swift index 61364bf74f1..952c337fa74 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Capitalization.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Capitalization.swift @@ -9,7 +9,7 @@ import Foundation -open class Capitalization: Codable { +public struct Capitalization: Codable { public var smallCamel: String? public var capitalCamel: String? @@ -20,42 +20,15 @@ open class Capitalization: Codable { public var ATT_NAME: String? - - public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { - self.smallCamel = smallCamel - self.capitalCamel = capitalCamel - self.smallSnake = smallSnake - self.capitalSnake = capitalSnake - self.sCAETHFlowPoints = sCAETHFlowPoints - self.ATT_NAME = ATT_NAME - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(smallCamel, forKey: "smallCamel") - try container.encodeIfPresent(capitalCamel, forKey: "CapitalCamel") - try container.encodeIfPresent(smallSnake, forKey: "small_Snake") - try container.encodeIfPresent(capitalSnake, forKey: "Capital_Snake") - try container.encodeIfPresent(sCAETHFlowPoints, forKey: "SCA_ETH_Flow_Points") - try container.encodeIfPresent(ATT_NAME, forKey: "ATT_NAME") + public enum CodingKeys: String, CodingKey { + case smallCamel + case capitalCamel = "CapitalCamel" + case smallSnake = "small_Snake" + case capitalSnake = "Capital_Snake" + case sCAETHFlowPoints = "SCA_ETH_Flow_Points" + case ATT_NAME } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - smallCamel = try container.decodeIfPresent(String.self, forKey: "smallCamel") - capitalCamel = try container.decodeIfPresent(String.self, forKey: "CapitalCamel") - smallSnake = try container.decodeIfPresent(String.self, forKey: "small_Snake") - capitalSnake = try container.decodeIfPresent(String.self, forKey: "Capital_Snake") - sCAETHFlowPoints = try container.decodeIfPresent(String.self, forKey: "SCA_ETH_Flow_Points") - ATT_NAME = try container.decodeIfPresent(String.self, forKey: "ATT_NAME") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Cat.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Cat.swift index 74691f697d5..e9e061b5e36 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Cat.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Cat.swift @@ -9,29 +9,13 @@ import Foundation -open class Cat: Animal { +public struct Cat: Codable { + public var className: String + public var color: String? public var declawed: Bool? - - // Encodable protocol methods - - public override func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(declawed, forKey: "declawed") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - declawed = try container.decodeIfPresent(Bool.self, forKey: "declawed") - try super.init(from: decoder) - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Category.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Category.swift index f2c9726bc7f..2975a53a507 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Category.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Category.swift @@ -9,36 +9,17 @@ import Foundation -open class Category: Codable { +public struct Category: Codable { - public var id: Int64? + public var _id: Int64? public var name: String? - - public init(id: Int64?, name: String?) { - self.id = id - self.name = name - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(id, forKey: "id") - try container.encodeIfPresent(name, forKey: "name") + public enum CodingKeys: String, CodingKey { + case _id = "id" + case name } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - id = try container.decodeIfPresent(Int64.self, forKey: "id") - name = try container.decodeIfPresent(String.self, forKey: "name") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ClassModel.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ClassModel.swift index 1c714097ffd..90da5c2cf4d 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ClassModel.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ClassModel.swift @@ -10,32 +10,11 @@ import Foundation /** Model for testing model with \"_class\" property */ -open class ClassModel: Codable { +public struct ClassModel: Codable { public var _class: String? - - public init(_class: String?) { - self._class = _class - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(_class, forKey: "_class") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - _class = try container.decodeIfPresent(String.self, forKey: "_class") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Client.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Client.swift index b6af0a778cd..f4333883e63 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Client.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Client.swift @@ -9,32 +9,11 @@ import Foundation -open class Client: Codable { +public struct Client: Codable { public var client: String? - - public init(client: String?) { - self.client = client - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(client, forKey: "client") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - client = try container.decodeIfPresent(String.self, forKey: "client") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Dog.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Dog.swift index f10ec5a8189..b86c61c0ee3 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Dog.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Dog.swift @@ -9,29 +9,13 @@ import Foundation -open class Dog: Animal { +public struct Dog: Codable { + public var className: String + public var color: String? public var breed: String? - - // Encodable protocol methods - - public override func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(breed, forKey: "breed") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - breed = try container.decodeIfPresent(String.self, forKey: "breed") - try super.init(from: decoder) - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/EnumArrays.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/EnumArrays.swift index 0cc8b4bbec5..145acd9dd34 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/EnumArrays.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/EnumArrays.swift @@ -9,7 +9,7 @@ import Foundation -open class EnumArrays: Codable { +public struct EnumArrays: Codable { public enum JustSymbol: String, Codable { case greaterThanOrEqualTo = ">=" @@ -23,30 +23,11 @@ open class EnumArrays: Codable { public var arrayEnum: [ArrayEnum]? - - public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { - self.justSymbol = justSymbol - self.arrayEnum = arrayEnum - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(justSymbol, forKey: "just_symbol") - try container.encodeIfPresent(arrayEnum, forKey: "array_enum") + public enum CodingKeys: String, CodingKey { + case justSymbol = "just_symbol" + case arrayEnum = "array_enum" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - justSymbol = try container.decodeIfPresent(JustSymbol.self, forKey: "just_symbol") - arrayEnum = try container.decodeIfPresent([ArrayEnum].self, forKey: "array_enum") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/EnumTest.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/EnumTest.swift index ac6865fb144..74b693c7bb6 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/EnumTest.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/EnumTest.swift @@ -9,7 +9,7 @@ import Foundation -open class EnumTest: Codable { +public struct EnumTest: Codable { public enum EnumString: String, Codable { case upper = "UPPER" @@ -30,36 +30,13 @@ open class EnumTest: Codable { public var outerEnum: OuterEnum? - - public init(enumString: EnumString?, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { - self.enumString = enumString - self.enumInteger = enumInteger - self.enumNumber = enumNumber - self.outerEnum = outerEnum - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(enumString, forKey: "enum_string") - try container.encodeIfPresent(enumInteger, forKey: "enum_integer") - try container.encodeIfPresent(enumNumber, forKey: "enum_number") - try container.encodeIfPresent(outerEnum, forKey: "outerEnum") + public enum CodingKeys: String, CodingKey { + case enumString = "enum_string" + case enumInteger = "enum_integer" + case enumNumber = "enum_number" + case outerEnum } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - enumString = try container.decodeIfPresent(EnumString.self, forKey: "enum_string") - enumInteger = try container.decodeIfPresent(EnumInteger.self, forKey: "enum_integer") - enumNumber = try container.decodeIfPresent(EnumNumber.self, forKey: "enum_number") - outerEnum = try container.decodeIfPresent(OuterEnum.self, forKey: "outerEnum") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift index c3bfe8789c9..0ce1edc16b0 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift @@ -9,7 +9,7 @@ import Foundation -open class FormatTest: Codable { +public struct FormatTest: Codable { public var integer: Int? public var int32: Int? @@ -26,63 +26,6 @@ open class FormatTest: Codable { public var password: String - - public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: Data?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { - self.integer = integer - self.int32 = int32 - self.int64 = int64 - self.number = number - self.float = float - self.double = double - self.string = string - self.byte = byte - self.binary = binary - self.date = date - self.dateTime = dateTime - self.uuid = uuid - self.password = password - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(integer, forKey: "integer") - try container.encodeIfPresent(int32, forKey: "int32") - try container.encodeIfPresent(int64, forKey: "int64") - try container.encode(number, forKey: "number") - try container.encodeIfPresent(float, forKey: "float") - try container.encodeIfPresent(double, forKey: "double") - try container.encodeIfPresent(string, forKey: "string") - try container.encode(byte, forKey: "byte") - try container.encodeIfPresent(binary, forKey: "binary") - try container.encode(date, forKey: "date") - try container.encodeIfPresent(dateTime, forKey: "dateTime") - try container.encodeIfPresent(uuid, forKey: "uuid") - try container.encode(password, forKey: "password") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - integer = try container.decodeIfPresent(Int.self, forKey: "integer") - int32 = try container.decodeIfPresent(Int.self, forKey: "int32") - int64 = try container.decodeIfPresent(Int64.self, forKey: "int64") - number = try container.decode(Double.self, forKey: "number") - float = try container.decodeIfPresent(Float.self, forKey: "float") - double = try container.decodeIfPresent(Double.self, forKey: "double") - string = try container.decodeIfPresent(String.self, forKey: "string") - byte = try container.decode(Data.self, forKey: "byte") - binary = try container.decodeIfPresent(Data.self, forKey: "binary") - date = try container.decode(Date.self, forKey: "date") - dateTime = try container.decodeIfPresent(Date.self, forKey: "dateTime") - uuid = try container.decodeIfPresent(UUID.self, forKey: "uuid") - password = try container.decode(String.self, forKey: "password") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/HasOnlyReadOnly.swift index 14479e661e5..23f5e679faf 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/HasOnlyReadOnly.swift @@ -9,36 +9,12 @@ import Foundation -open class HasOnlyReadOnly: Codable { +public struct HasOnlyReadOnly: Codable { public var bar: String? public var foo: String? - - public init(bar: String?, foo: String?) { - self.bar = bar - self.foo = foo - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(bar, forKey: "bar") - try container.encodeIfPresent(foo, forKey: "foo") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - bar = try container.decodeIfPresent(String.self, forKey: "bar") - foo = try container.decodeIfPresent(String.self, forKey: "foo") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/List.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/List.swift index a011a841193..382702867a8 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/List.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/List.swift @@ -9,32 +9,15 @@ import Foundation -open class List: Codable { +public struct List: Codable { public var _123List: String? - - public init(_123List: String?) { - self._123List = _123List - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(_123List, forKey: "123-list") + public enum CodingKeys: String, CodingKey { + case _123List = "123-list" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - _123List = try container.decodeIfPresent(String.self, forKey: "123-list") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/MapTest.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/MapTest.swift index aa24030f512..e8f11504de5 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/MapTest.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/MapTest.swift @@ -9,7 +9,7 @@ import Foundation -open class MapTest: Codable { +public struct MapTest: Codable { public enum MapOfEnumString: String, Codable { case upper = "UPPER" @@ -19,30 +19,11 @@ open class MapTest: Codable { public var mapOfEnumString: [String:String]? - - public init(mapMapOfString: [String:[String:String]]?, mapOfEnumString: [String:String]?) { - self.mapMapOfString = mapMapOfString - self.mapOfEnumString = mapOfEnumString - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(mapMapOfString, forKey: "map_map_of_string") - try container.encodeIfPresent(mapOfEnumString, forKey: "map_of_enum_string") + public enum CodingKeys: String, CodingKey { + case mapMapOfString = "map_map_of_string" + case mapOfEnumString = "map_of_enum_string" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - mapMapOfString = try container.decodeIfPresent([String:[String:String]].self, forKey: "map_map_of_string") - mapOfEnumString = try container.decodeIfPresent([String:String].self, forKey: "map_of_enum_string") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index 7f9bba54883..554c81317eb 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -9,40 +9,13 @@ import Foundation -open class MixedPropertiesAndAdditionalPropertiesClass: Codable { +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { public var uuid: UUID? public var dateTime: Date? public var map: [String:Animal]? - - public init(uuid: UUID?, dateTime: Date?, map: [String:Animal]?) { - self.uuid = uuid - self.dateTime = dateTime - self.map = map - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(uuid, forKey: "uuid") - try container.encodeIfPresent(dateTime, forKey: "dateTime") - try container.encodeIfPresent(map, forKey: "map") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - uuid = try container.decodeIfPresent(UUID.self, forKey: "uuid") - dateTime = try container.decodeIfPresent(Date.self, forKey: "dateTime") - map = try container.decodeIfPresent([String:Animal].self, forKey: "map") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift index 5a052607e0b..573cb42acfd 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift @@ -10,36 +10,17 @@ import Foundation /** Model for testing model name starting with number */ -open class Model200Response: Codable { +public struct Model200Response: Codable { public var name: Int? public var _class: String? - - public init(name: Int?, _class: String?) { - self.name = name - self._class = _class - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(name, forKey: "name") - try container.encodeIfPresent(_class, forKey: "class") + public enum CodingKeys: String, CodingKey { + case name + case _class = "class" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - name = try container.decodeIfPresent(Int.self, forKey: "name") - _class = try container.decodeIfPresent(String.self, forKey: "class") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Name.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Name.swift index 0d4df5428e4..b4686c2c8a4 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Name.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Name.swift @@ -10,7 +10,7 @@ import Foundation /** Model for testing model name same as property name */ -open class Name: Codable { +public struct Name: Codable { public var name: Int public var snakeCase: Int? @@ -18,36 +18,13 @@ open class Name: Codable { public var _123Number: Int? - - public init(name: Int, snakeCase: Int?, property: String?, _123Number: Int?) { - self.name = name - self.snakeCase = snakeCase - self.property = property - self._123Number = _123Number - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encode(name, forKey: "name") - try container.encodeIfPresent(snakeCase, forKey: "snake_case") - try container.encodeIfPresent(property, forKey: "property") - try container.encodeIfPresent(_123Number, forKey: "123Number") + public enum CodingKeys: String, CodingKey { + case name + case snakeCase = "snake_case" + case property + case _123Number = "123Number" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - name = try container.decode(Int.self, forKey: "name") - snakeCase = try container.decodeIfPresent(Int.self, forKey: "snake_case") - property = try container.decodeIfPresent(String.self, forKey: "property") - _123Number = try container.decodeIfPresent(Int.self, forKey: "123Number") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/NumberOnly.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/NumberOnly.swift index d6ec86b4d08..78bb76f9bfd 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/NumberOnly.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/NumberOnly.swift @@ -9,32 +9,15 @@ import Foundation -open class NumberOnly: Codable { +public struct NumberOnly: Codable { public var justNumber: Double? - - public init(justNumber: Double?) { - self.justNumber = justNumber - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(justNumber, forKey: "JustNumber") + public enum CodingKeys: String, CodingKey { + case justNumber = "JustNumber" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - justNumber = try container.decodeIfPresent(Double.self, forKey: "JustNumber") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Order.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Order.swift index 480de1c3ae8..26de6d8313d 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Order.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Order.swift @@ -9,14 +9,14 @@ import Foundation -open class Order: Codable { +public struct Order: Codable { public enum Status: String, Codable { case placed = "placed" case approved = "approved" case delivered = "delivered" } - public var id: Int64? + public var _id: Int64? public var petId: Int64? public var quantity: Int? public var shipDate: Date? @@ -25,42 +25,15 @@ open class Order: Codable { public var complete: Bool? - - public init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { - self.id = id - self.petId = petId - self.quantity = quantity - self.shipDate = shipDate - self.status = status - self.complete = complete - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(id, forKey: "id") - try container.encodeIfPresent(petId, forKey: "petId") - try container.encodeIfPresent(quantity, forKey: "quantity") - try container.encodeIfPresent(shipDate, forKey: "shipDate") - try container.encodeIfPresent(status, forKey: "status") - try container.encodeIfPresent(complete, forKey: "complete") + public enum CodingKeys: String, CodingKey { + case _id = "id" + case petId + case quantity + case shipDate + case status + case complete } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - id = try container.decodeIfPresent(Int64.self, forKey: "id") - petId = try container.decodeIfPresent(Int64.self, forKey: "petId") - quantity = try container.decodeIfPresent(Int.self, forKey: "quantity") - shipDate = try container.decodeIfPresent(Date.self, forKey: "shipDate") - status = try container.decodeIfPresent(Status.self, forKey: "status") - complete = try container.decodeIfPresent(Bool.self, forKey: "complete") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/OuterBoolean.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/OuterBoolean.swift index ba832854f18..204acfe70c3 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/OuterBoolean.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/OuterBoolean.swift @@ -9,25 +9,10 @@ import Foundation -open class OuterBoolean: Codable { +public struct OuterBoolean: Codable { - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/OuterComposite.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/OuterComposite.swift index 63cedf4e5fb..0c77ca23f50 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/OuterComposite.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/OuterComposite.swift @@ -9,40 +9,19 @@ import Foundation -open class OuterComposite: Codable { +public struct OuterComposite: Codable { public var myNumber: OuterNumber? public var myString: OuterString? public var myBoolean: OuterBoolean? - - public init(myNumber: OuterNumber?, myString: OuterString?, myBoolean: OuterBoolean?) { - self.myNumber = myNumber - self.myString = myString - self.myBoolean = myBoolean - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(myNumber, forKey: "my_number") - try container.encodeIfPresent(myString, forKey: "my_string") - try container.encodeIfPresent(myBoolean, forKey: "my_boolean") + public enum CodingKeys: String, CodingKey { + case myNumber = "my_number" + case myString = "my_string" + case myBoolean = "my_boolean" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - myNumber = try container.decodeIfPresent(OuterNumber.self, forKey: "my_number") - myString = try container.decodeIfPresent(OuterString.self, forKey: "my_string") - myBoolean = try container.decodeIfPresent(OuterBoolean.self, forKey: "my_boolean") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/OuterNumber.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/OuterNumber.swift index 12d8b5fabcd..3e3a6775a6c 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/OuterNumber.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/OuterNumber.swift @@ -9,25 +9,10 @@ import Foundation -open class OuterNumber: Codable { +public struct OuterNumber: Codable { - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/OuterString.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/OuterString.swift index a432707815f..06ff5ccef4b 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/OuterString.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/OuterString.swift @@ -9,25 +9,10 @@ import Foundation -open class OuterString: Codable { +public struct OuterString: Codable { - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Pet.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Pet.swift index 672a174b557..dcb32870f70 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Pet.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Pet.swift @@ -9,14 +9,14 @@ import Foundation -open class Pet: Codable { +public struct Pet: Codable { public enum Status: String, Codable { case available = "available" case pending = "pending" case sold = "sold" } - public var id: Int64? + public var _id: Int64? public var category: Category? public var name: String public var photoUrls: [String] @@ -25,42 +25,15 @@ open class Pet: Codable { public var status: Status? - - public init(id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { - self.id = id - self.category = category - self.name = name - self.photoUrls = photoUrls - self.tags = tags - self.status = status - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(id, forKey: "id") - try container.encodeIfPresent(category, forKey: "category") - try container.encode(name, forKey: "name") - try container.encode(photoUrls, forKey: "photoUrls") - try container.encodeIfPresent(tags, forKey: "tags") - try container.encodeIfPresent(status, forKey: "status") + public enum CodingKeys: String, CodingKey { + case _id = "id" + case category + case name + case photoUrls + case tags + case status } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - id = try container.decodeIfPresent(Int64.self, forKey: "id") - category = try container.decodeIfPresent(Category.self, forKey: "category") - name = try container.decode(String.self, forKey: "name") - photoUrls = try container.decode([String].self, forKey: "photoUrls") - tags = try container.decodeIfPresent([Tag].self, forKey: "tags") - status = try container.decodeIfPresent(Status.self, forKey: "status") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ReadOnlyFirst.swift index 1303add0531..7cec5cb2f92 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/ReadOnlyFirst.swift @@ -9,36 +9,12 @@ import Foundation -open class ReadOnlyFirst: Codable { +public struct ReadOnlyFirst: Codable { public var bar: String? public var baz: String? - - public init(bar: String?, baz: String?) { - self.bar = bar - self.baz = baz - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(bar, forKey: "bar") - try container.encodeIfPresent(baz, forKey: "baz") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - bar = try container.decodeIfPresent(String.self, forKey: "bar") - baz = try container.decodeIfPresent(String.self, forKey: "baz") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Return.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Return.swift index b9fc1607d82..86c3f0d8097 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Return.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Return.swift @@ -10,32 +10,15 @@ import Foundation /** Model for testing reserved words */ -open class Return: Codable { +public struct Return: Codable { public var _return: Int? - - public init(_return: Int?) { - self._return = _return - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(_return, forKey: "return") + public enum CodingKeys: String, CodingKey { + case _return = "return" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - _return = try container.decodeIfPresent(Int.self, forKey: "return") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift index 63bb3881256..f0c0aec5394 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift @@ -9,32 +9,15 @@ import Foundation -open class SpecialModelName: Codable { +public struct SpecialModelName: Codable { public var specialPropertyName: Int64? - - public init(specialPropertyName: Int64?) { - self.specialPropertyName = specialPropertyName - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(specialPropertyName, forKey: "$special[property.name]") + public enum CodingKeys: String, CodingKey { + case specialPropertyName = "$special[property.name]" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - specialPropertyName = try container.decodeIfPresent(Int64.self, forKey: "$special[property.name]") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Tag.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Tag.swift index 506c83a1f07..86c19a254d1 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Tag.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/Tag.swift @@ -9,36 +9,17 @@ import Foundation -open class Tag: Codable { +public struct Tag: Codable { - public var id: Int64? + public var _id: Int64? public var name: String? - - public init(id: Int64?, name: String?) { - self.id = id - self.name = name - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(id, forKey: "id") - try container.encodeIfPresent(name, forKey: "name") + public enum CodingKeys: String, CodingKey { + case _id = "id" + case name } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - id = try container.decodeIfPresent(Int64.self, forKey: "id") - name = try container.decodeIfPresent(String.self, forKey: "name") - } } diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/User.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/User.swift index 8d2f64a57db..ab73f62883e 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/User.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/Models/User.swift @@ -9,9 +9,9 @@ import Foundation -open class User: Codable { +public struct User: Codable { - public var id: Int64? + public var _id: Int64? public var username: String? public var firstName: String? public var lastName: String? @@ -22,48 +22,17 @@ open class User: Codable { public var userStatus: Int? - - public init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { - self.id = id - self.username = username - self.firstName = firstName - self.lastName = lastName - self.email = email - self.password = password - self.phone = phone - self.userStatus = userStatus - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(id, forKey: "id") - try container.encodeIfPresent(username, forKey: "username") - try container.encodeIfPresent(firstName, forKey: "firstName") - try container.encodeIfPresent(lastName, forKey: "lastName") - try container.encodeIfPresent(email, forKey: "email") - try container.encodeIfPresent(password, forKey: "password") - try container.encodeIfPresent(phone, forKey: "phone") - try container.encodeIfPresent(userStatus, forKey: "userStatus") + public enum CodingKeys: String, CodingKey { + case _id = "id" + case username + case firstName + case lastName + case email + case password + case phone + case userStatus } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - id = try container.decodeIfPresent(Int64.self, forKey: "id") - username = try container.decodeIfPresent(String.self, forKey: "username") - firstName = try container.decodeIfPresent(String.self, forKey: "firstName") - lastName = try container.decodeIfPresent(String.self, forKey: "lastName") - email = try container.decodeIfPresent(String.self, forKey: "email") - password = try container.decodeIfPresent(String.self, forKey: "password") - phone = try container.decodeIfPresent(String.self, forKey: "phone") - userStatus = try container.decodeIfPresent(Int.self, forKey: "userStatus") - } } diff --git a/samples/client/petstore/swift4/rxswift/.swagger-codegen/VERSION b/samples/client/petstore/swift4/rxswift/.swagger-codegen/VERSION index f9f7450d135..855ff9501eb 100644 --- a/samples/client/petstore/swift4/rxswift/.swagger-codegen/VERSION +++ b/samples/client/petstore/swift4/rxswift/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/APIs/AnotherfakeAPI.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/APIs/AnotherfakeAPI.swift index f45a84ca857..36bb08d383e 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/APIs/AnotherfakeAPI.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/APIs/AnotherfakeAPI.swift @@ -1,5 +1,5 @@ // -// AnotherfakeAPI.swift +// AnotherFakeAPI.swift // // Generated by swagger-codegen // https://github.com/swagger-api/swagger-codegen @@ -11,7 +11,7 @@ import RxSwift -open class AnotherfakeAPI { +open class AnotherFakeAPI { /** To test special tags diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/AdditionalPropertiesClass.swift index 02e3d3efd2a..8388bfb035f 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/AdditionalPropertiesClass.swift @@ -9,36 +9,17 @@ import Foundation -open class AdditionalPropertiesClass: Codable { +public struct AdditionalPropertiesClass: Codable { public var mapProperty: [String:String]? public var mapOfMapProperty: [String:[String:String]]? - - public init(mapProperty: [String:String]?, mapOfMapProperty: [String:[String:String]]?) { - self.mapProperty = mapProperty - self.mapOfMapProperty = mapOfMapProperty - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(mapProperty, forKey: "map_property") - try container.encodeIfPresent(mapOfMapProperty, forKey: "map_of_map_property") + public enum CodingKeys: String, CodingKey { + case mapProperty = "map_property" + case mapOfMapProperty = "map_of_map_property" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - mapProperty = try container.decodeIfPresent([String:String].self, forKey: "map_property") - mapOfMapProperty = try container.decodeIfPresent([String:[String:String]].self, forKey: "map_of_map_property") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Animal.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Animal.swift index dec4a605a27..fa13d5e9b9f 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Animal.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Animal.swift @@ -9,36 +9,12 @@ import Foundation -open class Animal: Codable { +public struct Animal: Codable { public var className: String public var color: String? - - public init(className: String, color: String?) { - self.className = className - self.color = color - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encode(className, forKey: "className") - try container.encodeIfPresent(color, forKey: "color") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - className = try container.decode(String.self, forKey: "className") - color = try container.decodeIfPresent(String.self, forKey: "color") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ApiResponse.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ApiResponse.swift index d6c0c3aba30..a4e416b79a8 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ApiResponse.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ApiResponse.swift @@ -9,40 +9,13 @@ import Foundation -open class ApiResponse: Codable { +public struct ApiResponse: Codable { public var code: Int? public var type: String? public var message: String? - - public init(code: Int?, type: String?, message: String?) { - self.code = code - self.type = type - self.message = message - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(code, forKey: "code") - try container.encodeIfPresent(type, forKey: "type") - try container.encodeIfPresent(message, forKey: "message") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - code = try container.decodeIfPresent(Int.self, forKey: "code") - type = try container.decodeIfPresent(String.self, forKey: "type") - message = try container.decodeIfPresent(String.self, forKey: "message") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ArrayOfArrayOfNumberOnly.swift index 6cb60bc9f23..8aea70bfc69 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ArrayOfArrayOfNumberOnly.swift @@ -9,32 +9,15 @@ import Foundation -open class ArrayOfArrayOfNumberOnly: Codable { +public struct ArrayOfArrayOfNumberOnly: Codable { public var arrayArrayNumber: [[Double]]? - - public init(arrayArrayNumber: [[Double]]?) { - self.arrayArrayNumber = arrayArrayNumber - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(arrayArrayNumber, forKey: "ArrayArrayNumber") + public enum CodingKeys: String, CodingKey { + case arrayArrayNumber = "ArrayArrayNumber" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - arrayArrayNumber = try container.decodeIfPresent([[Double]].self, forKey: "ArrayArrayNumber") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ArrayOfNumberOnly.swift index 4e30334ed41..c670c41c217 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ArrayOfNumberOnly.swift @@ -9,32 +9,15 @@ import Foundation -open class ArrayOfNumberOnly: Codable { +public struct ArrayOfNumberOnly: Codable { public var arrayNumber: [Double]? - - public init(arrayNumber: [Double]?) { - self.arrayNumber = arrayNumber - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(arrayNumber, forKey: "ArrayNumber") + public enum CodingKeys: String, CodingKey { + case arrayNumber = "ArrayNumber" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - arrayNumber = try container.decodeIfPresent([Double].self, forKey: "ArrayNumber") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ArrayTest.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ArrayTest.swift index b5084fca928..6257fb4cc9b 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ArrayTest.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ArrayTest.swift @@ -9,40 +9,19 @@ import Foundation -open class ArrayTest: Codable { +public struct ArrayTest: Codable { public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? public var arrayArrayOfModel: [[ReadOnlyFirst]]? - - public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { - self.arrayOfString = arrayOfString - self.arrayArrayOfInteger = arrayArrayOfInteger - self.arrayArrayOfModel = arrayArrayOfModel - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(arrayOfString, forKey: "array_of_string") - try container.encodeIfPresent(arrayArrayOfInteger, forKey: "array_array_of_integer") - try container.encodeIfPresent(arrayArrayOfModel, forKey: "array_array_of_model") + public enum CodingKeys: String, CodingKey { + case arrayOfString = "array_of_string" + case arrayArrayOfInteger = "array_array_of_integer" + case arrayArrayOfModel = "array_array_of_model" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - arrayOfString = try container.decodeIfPresent([String].self, forKey: "array_of_string") - arrayArrayOfInteger = try container.decodeIfPresent([[Int64]].self, forKey: "array_array_of_integer") - arrayArrayOfModel = try container.decodeIfPresent([[ReadOnlyFirst]].self, forKey: "array_array_of_model") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Capitalization.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Capitalization.swift index 61364bf74f1..952c337fa74 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Capitalization.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Capitalization.swift @@ -9,7 +9,7 @@ import Foundation -open class Capitalization: Codable { +public struct Capitalization: Codable { public var smallCamel: String? public var capitalCamel: String? @@ -20,42 +20,15 @@ open class Capitalization: Codable { public var ATT_NAME: String? - - public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { - self.smallCamel = smallCamel - self.capitalCamel = capitalCamel - self.smallSnake = smallSnake - self.capitalSnake = capitalSnake - self.sCAETHFlowPoints = sCAETHFlowPoints - self.ATT_NAME = ATT_NAME - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(smallCamel, forKey: "smallCamel") - try container.encodeIfPresent(capitalCamel, forKey: "CapitalCamel") - try container.encodeIfPresent(smallSnake, forKey: "small_Snake") - try container.encodeIfPresent(capitalSnake, forKey: "Capital_Snake") - try container.encodeIfPresent(sCAETHFlowPoints, forKey: "SCA_ETH_Flow_Points") - try container.encodeIfPresent(ATT_NAME, forKey: "ATT_NAME") + public enum CodingKeys: String, CodingKey { + case smallCamel + case capitalCamel = "CapitalCamel" + case smallSnake = "small_Snake" + case capitalSnake = "Capital_Snake" + case sCAETHFlowPoints = "SCA_ETH_Flow_Points" + case ATT_NAME } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - smallCamel = try container.decodeIfPresent(String.self, forKey: "smallCamel") - capitalCamel = try container.decodeIfPresent(String.self, forKey: "CapitalCamel") - smallSnake = try container.decodeIfPresent(String.self, forKey: "small_Snake") - capitalSnake = try container.decodeIfPresent(String.self, forKey: "Capital_Snake") - sCAETHFlowPoints = try container.decodeIfPresent(String.self, forKey: "SCA_ETH_Flow_Points") - ATT_NAME = try container.decodeIfPresent(String.self, forKey: "ATT_NAME") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Cat.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Cat.swift index 74691f697d5..e9e061b5e36 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Cat.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Cat.swift @@ -9,29 +9,13 @@ import Foundation -open class Cat: Animal { +public struct Cat: Codable { + public var className: String + public var color: String? public var declawed: Bool? - - // Encodable protocol methods - - public override func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(declawed, forKey: "declawed") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - declawed = try container.decodeIfPresent(Bool.self, forKey: "declawed") - try super.init(from: decoder) - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Category.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Category.swift index f2c9726bc7f..2975a53a507 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Category.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Category.swift @@ -9,36 +9,17 @@ import Foundation -open class Category: Codable { +public struct Category: Codable { - public var id: Int64? + public var _id: Int64? public var name: String? - - public init(id: Int64?, name: String?) { - self.id = id - self.name = name - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(id, forKey: "id") - try container.encodeIfPresent(name, forKey: "name") + public enum CodingKeys: String, CodingKey { + case _id = "id" + case name } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - id = try container.decodeIfPresent(Int64.self, forKey: "id") - name = try container.decodeIfPresent(String.self, forKey: "name") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ClassModel.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ClassModel.swift index 1c714097ffd..90da5c2cf4d 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ClassModel.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ClassModel.swift @@ -10,32 +10,11 @@ import Foundation /** Model for testing model with \"_class\" property */ -open class ClassModel: Codable { +public struct ClassModel: Codable { public var _class: String? - - public init(_class: String?) { - self._class = _class - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(_class, forKey: "_class") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - _class = try container.decodeIfPresent(String.self, forKey: "_class") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Client.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Client.swift index b6af0a778cd..f4333883e63 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Client.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Client.swift @@ -9,32 +9,11 @@ import Foundation -open class Client: Codable { +public struct Client: Codable { public var client: String? - - public init(client: String?) { - self.client = client - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(client, forKey: "client") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - client = try container.decodeIfPresent(String.self, forKey: "client") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Dog.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Dog.swift index f10ec5a8189..b86c61c0ee3 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Dog.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Dog.swift @@ -9,29 +9,13 @@ import Foundation -open class Dog: Animal { +public struct Dog: Codable { + public var className: String + public var color: String? public var breed: String? - - // Encodable protocol methods - - public override func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(breed, forKey: "breed") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - breed = try container.decodeIfPresent(String.self, forKey: "breed") - try super.init(from: decoder) - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/EnumArrays.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/EnumArrays.swift index 0cc8b4bbec5..145acd9dd34 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/EnumArrays.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/EnumArrays.swift @@ -9,7 +9,7 @@ import Foundation -open class EnumArrays: Codable { +public struct EnumArrays: Codable { public enum JustSymbol: String, Codable { case greaterThanOrEqualTo = ">=" @@ -23,30 +23,11 @@ open class EnumArrays: Codable { public var arrayEnum: [ArrayEnum]? - - public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { - self.justSymbol = justSymbol - self.arrayEnum = arrayEnum - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(justSymbol, forKey: "just_symbol") - try container.encodeIfPresent(arrayEnum, forKey: "array_enum") + public enum CodingKeys: String, CodingKey { + case justSymbol = "just_symbol" + case arrayEnum = "array_enum" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - justSymbol = try container.decodeIfPresent(JustSymbol.self, forKey: "just_symbol") - arrayEnum = try container.decodeIfPresent([ArrayEnum].self, forKey: "array_enum") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/EnumTest.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/EnumTest.swift index ac6865fb144..74b693c7bb6 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/EnumTest.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/EnumTest.swift @@ -9,7 +9,7 @@ import Foundation -open class EnumTest: Codable { +public struct EnumTest: Codable { public enum EnumString: String, Codable { case upper = "UPPER" @@ -30,36 +30,13 @@ open class EnumTest: Codable { public var outerEnum: OuterEnum? - - public init(enumString: EnumString?, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { - self.enumString = enumString - self.enumInteger = enumInteger - self.enumNumber = enumNumber - self.outerEnum = outerEnum - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(enumString, forKey: "enum_string") - try container.encodeIfPresent(enumInteger, forKey: "enum_integer") - try container.encodeIfPresent(enumNumber, forKey: "enum_number") - try container.encodeIfPresent(outerEnum, forKey: "outerEnum") + public enum CodingKeys: String, CodingKey { + case enumString = "enum_string" + case enumInteger = "enum_integer" + case enumNumber = "enum_number" + case outerEnum } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - enumString = try container.decodeIfPresent(EnumString.self, forKey: "enum_string") - enumInteger = try container.decodeIfPresent(EnumInteger.self, forKey: "enum_integer") - enumNumber = try container.decodeIfPresent(EnumNumber.self, forKey: "enum_number") - outerEnum = try container.decodeIfPresent(OuterEnum.self, forKey: "outerEnum") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift index c3bfe8789c9..0ce1edc16b0 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/FormatTest.swift @@ -9,7 +9,7 @@ import Foundation -open class FormatTest: Codable { +public struct FormatTest: Codable { public var integer: Int? public var int32: Int? @@ -26,63 +26,6 @@ open class FormatTest: Codable { public var password: String - - public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: Data?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { - self.integer = integer - self.int32 = int32 - self.int64 = int64 - self.number = number - self.float = float - self.double = double - self.string = string - self.byte = byte - self.binary = binary - self.date = date - self.dateTime = dateTime - self.uuid = uuid - self.password = password - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(integer, forKey: "integer") - try container.encodeIfPresent(int32, forKey: "int32") - try container.encodeIfPresent(int64, forKey: "int64") - try container.encode(number, forKey: "number") - try container.encodeIfPresent(float, forKey: "float") - try container.encodeIfPresent(double, forKey: "double") - try container.encodeIfPresent(string, forKey: "string") - try container.encode(byte, forKey: "byte") - try container.encodeIfPresent(binary, forKey: "binary") - try container.encode(date, forKey: "date") - try container.encodeIfPresent(dateTime, forKey: "dateTime") - try container.encodeIfPresent(uuid, forKey: "uuid") - try container.encode(password, forKey: "password") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - integer = try container.decodeIfPresent(Int.self, forKey: "integer") - int32 = try container.decodeIfPresent(Int.self, forKey: "int32") - int64 = try container.decodeIfPresent(Int64.self, forKey: "int64") - number = try container.decode(Double.self, forKey: "number") - float = try container.decodeIfPresent(Float.self, forKey: "float") - double = try container.decodeIfPresent(Double.self, forKey: "double") - string = try container.decodeIfPresent(String.self, forKey: "string") - byte = try container.decode(Data.self, forKey: "byte") - binary = try container.decodeIfPresent(Data.self, forKey: "binary") - date = try container.decode(Date.self, forKey: "date") - dateTime = try container.decodeIfPresent(Date.self, forKey: "dateTime") - uuid = try container.decodeIfPresent(UUID.self, forKey: "uuid") - password = try container.decode(String.self, forKey: "password") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/HasOnlyReadOnly.swift index 14479e661e5..23f5e679faf 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/HasOnlyReadOnly.swift @@ -9,36 +9,12 @@ import Foundation -open class HasOnlyReadOnly: Codable { +public struct HasOnlyReadOnly: Codable { public var bar: String? public var foo: String? - - public init(bar: String?, foo: String?) { - self.bar = bar - self.foo = foo - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(bar, forKey: "bar") - try container.encodeIfPresent(foo, forKey: "foo") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - bar = try container.decodeIfPresent(String.self, forKey: "bar") - foo = try container.decodeIfPresent(String.self, forKey: "foo") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/List.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/List.swift index a011a841193..382702867a8 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/List.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/List.swift @@ -9,32 +9,15 @@ import Foundation -open class List: Codable { +public struct List: Codable { public var _123List: String? - - public init(_123List: String?) { - self._123List = _123List - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(_123List, forKey: "123-list") + public enum CodingKeys: String, CodingKey { + case _123List = "123-list" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - _123List = try container.decodeIfPresent(String.self, forKey: "123-list") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/MapTest.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/MapTest.swift index aa24030f512..e8f11504de5 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/MapTest.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/MapTest.swift @@ -9,7 +9,7 @@ import Foundation -open class MapTest: Codable { +public struct MapTest: Codable { public enum MapOfEnumString: String, Codable { case upper = "UPPER" @@ -19,30 +19,11 @@ open class MapTest: Codable { public var mapOfEnumString: [String:String]? - - public init(mapMapOfString: [String:[String:String]]?, mapOfEnumString: [String:String]?) { - self.mapMapOfString = mapMapOfString - self.mapOfEnumString = mapOfEnumString - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(mapMapOfString, forKey: "map_map_of_string") - try container.encodeIfPresent(mapOfEnumString, forKey: "map_of_enum_string") + public enum CodingKeys: String, CodingKey { + case mapMapOfString = "map_map_of_string" + case mapOfEnumString = "map_of_enum_string" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - mapMapOfString = try container.decodeIfPresent([String:[String:String]].self, forKey: "map_map_of_string") - mapOfEnumString = try container.decodeIfPresent([String:String].self, forKey: "map_of_enum_string") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index 7f9bba54883..554c81317eb 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -9,40 +9,13 @@ import Foundation -open class MixedPropertiesAndAdditionalPropertiesClass: Codable { +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { public var uuid: UUID? public var dateTime: Date? public var map: [String:Animal]? - - public init(uuid: UUID?, dateTime: Date?, map: [String:Animal]?) { - self.uuid = uuid - self.dateTime = dateTime - self.map = map - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(uuid, forKey: "uuid") - try container.encodeIfPresent(dateTime, forKey: "dateTime") - try container.encodeIfPresent(map, forKey: "map") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - uuid = try container.decodeIfPresent(UUID.self, forKey: "uuid") - dateTime = try container.decodeIfPresent(Date.self, forKey: "dateTime") - map = try container.decodeIfPresent([String:Animal].self, forKey: "map") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift index 5a052607e0b..573cb42acfd 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Model200Response.swift @@ -10,36 +10,17 @@ import Foundation /** Model for testing model name starting with number */ -open class Model200Response: Codable { +public struct Model200Response: Codable { public var name: Int? public var _class: String? - - public init(name: Int?, _class: String?) { - self.name = name - self._class = _class - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(name, forKey: "name") - try container.encodeIfPresent(_class, forKey: "class") + public enum CodingKeys: String, CodingKey { + case name + case _class = "class" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - name = try container.decodeIfPresent(Int.self, forKey: "name") - _class = try container.decodeIfPresent(String.self, forKey: "class") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Name.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Name.swift index 0d4df5428e4..b4686c2c8a4 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Name.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Name.swift @@ -10,7 +10,7 @@ import Foundation /** Model for testing model name same as property name */ -open class Name: Codable { +public struct Name: Codable { public var name: Int public var snakeCase: Int? @@ -18,36 +18,13 @@ open class Name: Codable { public var _123Number: Int? - - public init(name: Int, snakeCase: Int?, property: String?, _123Number: Int?) { - self.name = name - self.snakeCase = snakeCase - self.property = property - self._123Number = _123Number - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encode(name, forKey: "name") - try container.encodeIfPresent(snakeCase, forKey: "snake_case") - try container.encodeIfPresent(property, forKey: "property") - try container.encodeIfPresent(_123Number, forKey: "123Number") + public enum CodingKeys: String, CodingKey { + case name + case snakeCase = "snake_case" + case property + case _123Number = "123Number" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - name = try container.decode(Int.self, forKey: "name") - snakeCase = try container.decodeIfPresent(Int.self, forKey: "snake_case") - property = try container.decodeIfPresent(String.self, forKey: "property") - _123Number = try container.decodeIfPresent(Int.self, forKey: "123Number") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/NumberOnly.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/NumberOnly.swift index d6ec86b4d08..78bb76f9bfd 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/NumberOnly.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/NumberOnly.swift @@ -9,32 +9,15 @@ import Foundation -open class NumberOnly: Codable { +public struct NumberOnly: Codable { public var justNumber: Double? - - public init(justNumber: Double?) { - self.justNumber = justNumber - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(justNumber, forKey: "JustNumber") + public enum CodingKeys: String, CodingKey { + case justNumber = "JustNumber" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - justNumber = try container.decodeIfPresent(Double.self, forKey: "JustNumber") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Order.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Order.swift index 480de1c3ae8..26de6d8313d 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Order.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Order.swift @@ -9,14 +9,14 @@ import Foundation -open class Order: Codable { +public struct Order: Codable { public enum Status: String, Codable { case placed = "placed" case approved = "approved" case delivered = "delivered" } - public var id: Int64? + public var _id: Int64? public var petId: Int64? public var quantity: Int? public var shipDate: Date? @@ -25,42 +25,15 @@ open class Order: Codable { public var complete: Bool? - - public init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { - self.id = id - self.petId = petId - self.quantity = quantity - self.shipDate = shipDate - self.status = status - self.complete = complete - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(id, forKey: "id") - try container.encodeIfPresent(petId, forKey: "petId") - try container.encodeIfPresent(quantity, forKey: "quantity") - try container.encodeIfPresent(shipDate, forKey: "shipDate") - try container.encodeIfPresent(status, forKey: "status") - try container.encodeIfPresent(complete, forKey: "complete") + public enum CodingKeys: String, CodingKey { + case _id = "id" + case petId + case quantity + case shipDate + case status + case complete } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - id = try container.decodeIfPresent(Int64.self, forKey: "id") - petId = try container.decodeIfPresent(Int64.self, forKey: "petId") - quantity = try container.decodeIfPresent(Int.self, forKey: "quantity") - shipDate = try container.decodeIfPresent(Date.self, forKey: "shipDate") - status = try container.decodeIfPresent(Status.self, forKey: "status") - complete = try container.decodeIfPresent(Bool.self, forKey: "complete") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/OuterBoolean.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/OuterBoolean.swift index ba832854f18..204acfe70c3 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/OuterBoolean.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/OuterBoolean.swift @@ -9,25 +9,10 @@ import Foundation -open class OuterBoolean: Codable { +public struct OuterBoolean: Codable { - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/OuterComposite.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/OuterComposite.swift index 63cedf4e5fb..0c77ca23f50 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/OuterComposite.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/OuterComposite.swift @@ -9,40 +9,19 @@ import Foundation -open class OuterComposite: Codable { +public struct OuterComposite: Codable { public var myNumber: OuterNumber? public var myString: OuterString? public var myBoolean: OuterBoolean? - - public init(myNumber: OuterNumber?, myString: OuterString?, myBoolean: OuterBoolean?) { - self.myNumber = myNumber - self.myString = myString - self.myBoolean = myBoolean - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(myNumber, forKey: "my_number") - try container.encodeIfPresent(myString, forKey: "my_string") - try container.encodeIfPresent(myBoolean, forKey: "my_boolean") + public enum CodingKeys: String, CodingKey { + case myNumber = "my_number" + case myString = "my_string" + case myBoolean = "my_boolean" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - myNumber = try container.decodeIfPresent(OuterNumber.self, forKey: "my_number") - myString = try container.decodeIfPresent(OuterString.self, forKey: "my_string") - myBoolean = try container.decodeIfPresent(OuterBoolean.self, forKey: "my_boolean") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/OuterNumber.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/OuterNumber.swift index 12d8b5fabcd..3e3a6775a6c 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/OuterNumber.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/OuterNumber.swift @@ -9,25 +9,10 @@ import Foundation -open class OuterNumber: Codable { +public struct OuterNumber: Codable { - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/OuterString.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/OuterString.swift index a432707815f..06ff5ccef4b 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/OuterString.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/OuterString.swift @@ -9,25 +9,10 @@ import Foundation -open class OuterString: Codable { +public struct OuterString: Codable { - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Pet.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Pet.swift index 672a174b557..dcb32870f70 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Pet.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Pet.swift @@ -9,14 +9,14 @@ import Foundation -open class Pet: Codable { +public struct Pet: Codable { public enum Status: String, Codable { case available = "available" case pending = "pending" case sold = "sold" } - public var id: Int64? + public var _id: Int64? public var category: Category? public var name: String public var photoUrls: [String] @@ -25,42 +25,15 @@ open class Pet: Codable { public var status: Status? - - public init(id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { - self.id = id - self.category = category - self.name = name - self.photoUrls = photoUrls - self.tags = tags - self.status = status - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(id, forKey: "id") - try container.encodeIfPresent(category, forKey: "category") - try container.encode(name, forKey: "name") - try container.encode(photoUrls, forKey: "photoUrls") - try container.encodeIfPresent(tags, forKey: "tags") - try container.encodeIfPresent(status, forKey: "status") + public enum CodingKeys: String, CodingKey { + case _id = "id" + case category + case name + case photoUrls + case tags + case status } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - id = try container.decodeIfPresent(Int64.self, forKey: "id") - category = try container.decodeIfPresent(Category.self, forKey: "category") - name = try container.decode(String.self, forKey: "name") - photoUrls = try container.decode([String].self, forKey: "photoUrls") - tags = try container.decodeIfPresent([Tag].self, forKey: "tags") - status = try container.decodeIfPresent(Status.self, forKey: "status") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ReadOnlyFirst.swift index 1303add0531..7cec5cb2f92 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/ReadOnlyFirst.swift @@ -9,36 +9,12 @@ import Foundation -open class ReadOnlyFirst: Codable { +public struct ReadOnlyFirst: Codable { public var bar: String? public var baz: String? - - public init(bar: String?, baz: String?) { - self.bar = bar - self.baz = baz - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(bar, forKey: "bar") - try container.encodeIfPresent(baz, forKey: "baz") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - bar = try container.decodeIfPresent(String.self, forKey: "bar") - baz = try container.decodeIfPresent(String.self, forKey: "baz") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Return.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Return.swift index b9fc1607d82..86c3f0d8097 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Return.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Return.swift @@ -10,32 +10,15 @@ import Foundation /** Model for testing reserved words */ -open class Return: Codable { +public struct Return: Codable { public var _return: Int? - - public init(_return: Int?) { - self._return = _return - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(_return, forKey: "return") + public enum CodingKeys: String, CodingKey { + case _return = "return" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - _return = try container.decodeIfPresent(Int.self, forKey: "return") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift index 63bb3881256..f0c0aec5394 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/SpecialModelName.swift @@ -9,32 +9,15 @@ import Foundation -open class SpecialModelName: Codable { +public struct SpecialModelName: Codable { public var specialPropertyName: Int64? - - public init(specialPropertyName: Int64?) { - self.specialPropertyName = specialPropertyName - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(specialPropertyName, forKey: "$special[property.name]") + public enum CodingKeys: String, CodingKey { + case specialPropertyName = "$special[property.name]" } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - specialPropertyName = try container.decodeIfPresent(Int64.self, forKey: "$special[property.name]") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Tag.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Tag.swift index 506c83a1f07..86c19a254d1 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Tag.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/Tag.swift @@ -9,36 +9,17 @@ import Foundation -open class Tag: Codable { +public struct Tag: Codable { - public var id: Int64? + public var _id: Int64? public var name: String? - - public init(id: Int64?, name: String?) { - self.id = id - self.name = name - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(id, forKey: "id") - try container.encodeIfPresent(name, forKey: "name") + public enum CodingKeys: String, CodingKey { + case _id = "id" + case name } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - id = try container.decodeIfPresent(Int64.self, forKey: "id") - name = try container.decodeIfPresent(String.self, forKey: "name") - } } diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/User.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/User.swift index 8d2f64a57db..ab73f62883e 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/User.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/Models/User.swift @@ -9,9 +9,9 @@ import Foundation -open class User: Codable { +public struct User: Codable { - public var id: Int64? + public var _id: Int64? public var username: String? public var firstName: String? public var lastName: String? @@ -22,48 +22,17 @@ open class User: Codable { public var userStatus: Int? - - public init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { - self.id = id - self.username = username - self.firstName = firstName - self.lastName = lastName - self.email = email - self.password = password - self.phone = phone - self.userStatus = userStatus - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(id, forKey: "id") - try container.encodeIfPresent(username, forKey: "username") - try container.encodeIfPresent(firstName, forKey: "firstName") - try container.encodeIfPresent(lastName, forKey: "lastName") - try container.encodeIfPresent(email, forKey: "email") - try container.encodeIfPresent(password, forKey: "password") - try container.encodeIfPresent(phone, forKey: "phone") - try container.encodeIfPresent(userStatus, forKey: "userStatus") + public enum CodingKeys: String, CodingKey { + case _id = "id" + case username + case firstName + case lastName + case email + case password + case phone + case userStatus } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - id = try container.decodeIfPresent(Int64.self, forKey: "id") - username = try container.decodeIfPresent(String.self, forKey: "username") - firstName = try container.decodeIfPresent(String.self, forKey: "firstName") - lastName = try container.decodeIfPresent(String.self, forKey: "lastName") - email = try container.decodeIfPresent(String.self, forKey: "email") - password = try container.decodeIfPresent(String.self, forKey: "password") - phone = try container.decodeIfPresent(String.self, forKey: "phone") - userStatus = try container.decodeIfPresent(Int.self, forKey: "userStatus") - } } diff --git a/samples/client/test/swift4/default/.swagger-codegen/VERSION b/samples/client/test/swift4/default/.swagger-codegen/VERSION index f9f7450d135..855ff9501eb 100644 --- a/samples/client/test/swift4/default/.swagger-codegen/VERSION +++ b/samples/client/test/swift4/default/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/test/swift4/default/TestClient/Classes/Swaggers/APIs/Swift4TestAPI.swift b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/APIs/Swift4TestAPI.swift index 5e657469a25..e52fbe8260d 100644 --- a/samples/client/test/swift4/default/TestClient/Classes/Swaggers/APIs/Swift4TestAPI.swift +++ b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/APIs/Swift4TestAPI.swift @@ -57,6 +57,7 @@ open class Swift4TestAPI { "myUUIDArray" : [ "046b6c7f-0b8a-43b9-b35d-6489e6daee91", "046b6c7f-0b8a-43b9-b35d-6489e6daee91" ] }, "myVariableNameTest" : { + "normalName" : "normalName", "for" : "for", "example_name" : "example_name" }, diff --git a/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/AllPrimitives.swift b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/AllPrimitives.swift index f368762890c..769b5a7f475 100644 --- a/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/AllPrimitives.swift +++ b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/AllPrimitives.swift @@ -10,7 +10,7 @@ import Foundation /** Object which contains lots of different primitive Swagger types */ -open class AllPrimitives: Codable { +public struct AllPrimitives: Codable { public enum MyInlineStringEnum: String, Codable { case inlinestringenumvalue1 = "inlineStringEnumValue1" @@ -44,99 +44,6 @@ open class AllPrimitives: Codable { public var myInlineStringEnum: MyInlineStringEnum? - - public init(myInteger: Int?, myIntegerArray: [Int]?, myLong: Int64?, myLongArray: [Int64]?, myFloat: Float?, myFloatArray: [Float]?, myDouble: Double?, myDoubleArray: [Double]?, myString: String?, myStringArray: [String]?, myBytes: Data?, myBytesArray: [Data]?, myBoolean: Bool?, myBooleanArray: [Bool]?, myDate: Date?, myDateArray: [Date]?, myDateTime: Date?, myDateTimeArray: [Date]?, myFile: URL?, myFileArray: [URL]?, myUUID: UUID?, myUUIDArray: [UUID]?, myStringEnum: StringEnum?, myStringEnumArray: [StringEnum]?, myInlineStringEnum: MyInlineStringEnum?) { - self.myInteger = myInteger - self.myIntegerArray = myIntegerArray - self.myLong = myLong - self.myLongArray = myLongArray - self.myFloat = myFloat - self.myFloatArray = myFloatArray - self.myDouble = myDouble - self.myDoubleArray = myDoubleArray - self.myString = myString - self.myStringArray = myStringArray - self.myBytes = myBytes - self.myBytesArray = myBytesArray - self.myBoolean = myBoolean - self.myBooleanArray = myBooleanArray - self.myDate = myDate - self.myDateArray = myDateArray - self.myDateTime = myDateTime - self.myDateTimeArray = myDateTimeArray - self.myFile = myFile - self.myFileArray = myFileArray - self.myUUID = myUUID - self.myUUIDArray = myUUIDArray - self.myStringEnum = myStringEnum - self.myStringEnumArray = myStringEnumArray - self.myInlineStringEnum = myInlineStringEnum - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(myInteger, forKey: "myInteger") - try container.encodeIfPresent(myIntegerArray, forKey: "myIntegerArray") - try container.encodeIfPresent(myLong, forKey: "myLong") - try container.encodeIfPresent(myLongArray, forKey: "myLongArray") - try container.encodeIfPresent(myFloat, forKey: "myFloat") - try container.encodeIfPresent(myFloatArray, forKey: "myFloatArray") - try container.encodeIfPresent(myDouble, forKey: "myDouble") - try container.encodeIfPresent(myDoubleArray, forKey: "myDoubleArray") - try container.encodeIfPresent(myString, forKey: "myString") - try container.encodeIfPresent(myStringArray, forKey: "myStringArray") - try container.encodeIfPresent(myBytes, forKey: "myBytes") - try container.encodeIfPresent(myBytesArray, forKey: "myBytesArray") - try container.encodeIfPresent(myBoolean, forKey: "myBoolean") - try container.encodeIfPresent(myBooleanArray, forKey: "myBooleanArray") - try container.encodeIfPresent(myDate, forKey: "myDate") - try container.encodeIfPresent(myDateArray, forKey: "myDateArray") - try container.encodeIfPresent(myDateTime, forKey: "myDateTime") - try container.encodeIfPresent(myDateTimeArray, forKey: "myDateTimeArray") - try container.encodeIfPresent(myFile, forKey: "myFile") - try container.encodeIfPresent(myFileArray, forKey: "myFileArray") - try container.encodeIfPresent(myUUID, forKey: "myUUID") - try container.encodeIfPresent(myUUIDArray, forKey: "myUUIDArray") - try container.encodeIfPresent(myStringEnum, forKey: "myStringEnum") - try container.encodeIfPresent(myStringEnumArray, forKey: "myStringEnumArray") - try container.encodeIfPresent(myInlineStringEnum, forKey: "myInlineStringEnum") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - myInteger = try container.decodeIfPresent(Int.self, forKey: "myInteger") - myIntegerArray = try container.decodeIfPresent([Int].self, forKey: "myIntegerArray") - myLong = try container.decodeIfPresent(Int64.self, forKey: "myLong") - myLongArray = try container.decodeIfPresent([Int64].self, forKey: "myLongArray") - myFloat = try container.decodeIfPresent(Float.self, forKey: "myFloat") - myFloatArray = try container.decodeIfPresent([Float].self, forKey: "myFloatArray") - myDouble = try container.decodeIfPresent(Double.self, forKey: "myDouble") - myDoubleArray = try container.decodeIfPresent([Double].self, forKey: "myDoubleArray") - myString = try container.decodeIfPresent(String.self, forKey: "myString") - myStringArray = try container.decodeIfPresent([String].self, forKey: "myStringArray") - myBytes = try container.decodeIfPresent(Data.self, forKey: "myBytes") - myBytesArray = try container.decodeIfPresent([Data].self, forKey: "myBytesArray") - myBoolean = try container.decodeIfPresent(Bool.self, forKey: "myBoolean") - myBooleanArray = try container.decodeIfPresent([Bool].self, forKey: "myBooleanArray") - myDate = try container.decodeIfPresent(Date.self, forKey: "myDate") - myDateArray = try container.decodeIfPresent([Date].self, forKey: "myDateArray") - myDateTime = try container.decodeIfPresent(Date.self, forKey: "myDateTime") - myDateTimeArray = try container.decodeIfPresent([Date].self, forKey: "myDateTimeArray") - myFile = try container.decodeIfPresent(URL.self, forKey: "myFile") - myFileArray = try container.decodeIfPresent([URL].self, forKey: "myFileArray") - myUUID = try container.decodeIfPresent(UUID.self, forKey: "myUUID") - myUUIDArray = try container.decodeIfPresent([UUID].self, forKey: "myUUIDArray") - myStringEnum = try container.decodeIfPresent(StringEnum.self, forKey: "myStringEnum") - myStringEnumArray = try container.decodeIfPresent([StringEnum].self, forKey: "myStringEnumArray") - myInlineStringEnum = try container.decodeIfPresent(MyInlineStringEnum.self, forKey: "myInlineStringEnum") - } } diff --git a/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/BaseCard.swift b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/BaseCard.swift new file mode 100644 index 00000000000..457b470ad34 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/BaseCard.swift @@ -0,0 +1,20 @@ +// +// BaseCard.swift +// +// Generated by swagger-codegen +// https://github.com/swagger-api/swagger-codegen +// + +import Foundation + + +/** This is a base card object which uses a 'cardType' discriminator. */ + +public struct BaseCard: Codable { + + public var cardType: String + + + +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/ErrorInfo.swift b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/ErrorInfo.swift index 99c75be6338..d0a816c0e95 100644 --- a/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/ErrorInfo.swift +++ b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/ErrorInfo.swift @@ -10,40 +10,13 @@ import Foundation /** Example Error object */ -open class ErrorInfo: Codable { +public struct ErrorInfo: Codable { public var code: Int? public var message: String? public var details: [String]? - - public init(code: Int?, message: String?, details: [String]?) { - self.code = code - self.message = message - self.details = details - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(code, forKey: "code") - try container.encodeIfPresent(message, forKey: "message") - try container.encodeIfPresent(details, forKey: "details") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - code = try container.decodeIfPresent(Int.self, forKey: "code") - message = try container.decodeIfPresent(String.self, forKey: "message") - details = try container.decodeIfPresent([String].self, forKey: "details") - } } diff --git a/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/GetAllModelsResult.swift b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/GetAllModelsResult.swift index 3e1318955dd..cf69e76ab8c 100644 --- a/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/GetAllModelsResult.swift +++ b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/GetAllModelsResult.swift @@ -10,40 +10,13 @@ import Foundation /** Response object containing AllPrimitives object */ -open class GetAllModelsResult: Codable { +public struct GetAllModelsResult: Codable { public var myPrimitiveArray: [AllPrimitives]? public var myPrimitive: AllPrimitives? public var myVariableNameTest: VariableNameTest? - - public init(myPrimitiveArray: [AllPrimitives]?, myPrimitive: AllPrimitives?, myVariableNameTest: VariableNameTest?) { - self.myPrimitiveArray = myPrimitiveArray - self.myPrimitive = myPrimitive - self.myVariableNameTest = myVariableNameTest - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(myPrimitiveArray, forKey: "myPrimitiveArray") - try container.encodeIfPresent(myPrimitive, forKey: "myPrimitive") - try container.encodeIfPresent(myVariableNameTest, forKey: "myVariableNameTest") - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - myPrimitiveArray = try container.decodeIfPresent([AllPrimitives].self, forKey: "myPrimitiveArray") - myPrimitive = try container.decodeIfPresent(AllPrimitives.self, forKey: "myPrimitive") - myVariableNameTest = try container.decodeIfPresent(VariableNameTest.self, forKey: "myVariableNameTest") - } } diff --git a/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/ModelWithIntAdditionalPropertiesOnly.swift b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/ModelWithIntAdditionalPropertiesOnly.swift index f39e01ea787..bad857a6cfe 100644 --- a/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/ModelWithIntAdditionalPropertiesOnly.swift +++ b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/ModelWithIntAdditionalPropertiesOnly.swift @@ -10,7 +10,7 @@ import Foundation /** This is an empty model with no properties and only additionalProperties of type int32 */ -open class ModelWithIntAdditionalPropertiesOnly: Codable { +public struct ModelWithIntAdditionalPropertiesOnly: Codable { public var additionalProperties: [String:Int] = [:] @@ -28,8 +28,6 @@ open class ModelWithIntAdditionalPropertiesOnly: Codable { } } - - // Encodable protocol methods public func encode(to encoder: Encoder) throws { @@ -41,11 +39,14 @@ open class ModelWithIntAdditionalPropertiesOnly: Codable { // Decodable protocol methods - public required init(from decoder: Decoder) throws { + public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: String.self) var nonAdditionalPropertyKeys = Set() additionalProperties = try container.decodeMap(Int.self, excludedKeys: nonAdditionalPropertyKeys) } + + + } diff --git a/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/ModelWithPropertiesAndAdditionalProperties.swift b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/ModelWithPropertiesAndAdditionalProperties.swift index 81912a9a1ad..b1768d12966 100644 --- a/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/ModelWithPropertiesAndAdditionalProperties.swift +++ b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/ModelWithPropertiesAndAdditionalProperties.swift @@ -10,7 +10,7 @@ import Foundation /** This is an empty model with no properties and only additionalProperties of type int32 */ -open class ModelWithPropertiesAndAdditionalProperties: Codable { +public struct ModelWithPropertiesAndAdditionalProperties: Codable { public var myIntegerReq: Int public var myIntegerOpt: Int? @@ -36,19 +36,6 @@ open class ModelWithPropertiesAndAdditionalProperties: Codable { } } - - public init(myIntegerReq: Int, myIntegerOpt: Int?, myPrimitiveReq: AllPrimitives, myPrimitiveOpt: AllPrimitives?, myStringArrayReq: [String], myStringArrayOpt: [String]?, myPrimitiveArrayReq: [AllPrimitives], myPrimitiveArrayOpt: [AllPrimitives]?) { - self.myIntegerReq = myIntegerReq - self.myIntegerOpt = myIntegerOpt - self.myPrimitiveReq = myPrimitiveReq - self.myPrimitiveOpt = myPrimitiveOpt - self.myStringArrayReq = myStringArrayReq - self.myStringArrayOpt = myStringArrayOpt - self.myPrimitiveArrayReq = myPrimitiveArrayReq - self.myPrimitiveArrayOpt = myPrimitiveArrayOpt - } - - // Encodable protocol methods public func encode(to encoder: Encoder) throws { @@ -68,7 +55,7 @@ open class ModelWithPropertiesAndAdditionalProperties: Codable { // Decodable protocol methods - public required init(from decoder: Decoder) throws { + public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: String.self) myIntegerReq = try container.decode(Int.self, forKey: "myIntegerReq") @@ -90,5 +77,8 @@ open class ModelWithPropertiesAndAdditionalProperties: Codable { nonAdditionalPropertyKeys.insert("myPrimitiveArrayOpt") additionalProperties = try container.decodeMap(String.self, excludedKeys: nonAdditionalPropertyKeys) } + + + } diff --git a/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/ModelWithStringAdditionalPropertiesOnly.swift b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/ModelWithStringAdditionalPropertiesOnly.swift index 98c179e89e5..ebc3c48d856 100644 --- a/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/ModelWithStringAdditionalPropertiesOnly.swift +++ b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/ModelWithStringAdditionalPropertiesOnly.swift @@ -10,7 +10,7 @@ import Foundation /** This is an empty model with no properties and only additionalProperties of type string */ -open class ModelWithStringAdditionalPropertiesOnly: Codable { +public struct ModelWithStringAdditionalPropertiesOnly: Codable { public var additionalProperties: [String:String] = [:] @@ -28,8 +28,6 @@ open class ModelWithStringAdditionalPropertiesOnly: Codable { } } - - // Encodable protocol methods public func encode(to encoder: Encoder) throws { @@ -41,11 +39,14 @@ open class ModelWithStringAdditionalPropertiesOnly: Codable { // Decodable protocol methods - public required init(from decoder: Decoder) throws { + public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: String.self) var nonAdditionalPropertyKeys = Set() additionalProperties = try container.decodeMap(String.self, excludedKeys: nonAdditionalPropertyKeys) } + + + } diff --git a/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/PersonCard.swift b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/PersonCard.swift new file mode 100644 index 00000000000..9c5e70d56a1 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/PersonCard.swift @@ -0,0 +1,22 @@ +// +// PersonCard.swift +// +// Generated by swagger-codegen +// https://github.com/swagger-api/swagger-codegen +// + +import Foundation + + +/** This is an card object for a Person derived from BaseCard. */ + +public struct PersonCard: Codable { + + public var cardType: String + public var firstName: String? + public var lastName: String? + + + +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/PlaceCard.swift b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/PlaceCard.swift new file mode 100644 index 00000000000..3db208c0316 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/PlaceCard.swift @@ -0,0 +1,22 @@ +// +// PlaceCard.swift +// +// Generated by swagger-codegen +// https://github.com/swagger-api/swagger-codegen +// + +import Foundation + + +/** This is an card object for a Person derived from BaseCard. */ + +public struct PlaceCard: Codable { + + public var cardType: String + public var placeName: String? + public var placeAddress: String? + + + +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/SampleBase.swift b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/SampleBase.swift new file mode 100644 index 00000000000..98af4ebd04c --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/SampleBase.swift @@ -0,0 +1,21 @@ +// +// SampleBase.swift +// +// Generated by swagger-codegen +// https://github.com/swagger-api/swagger-codegen +// + +import Foundation + + +/** This is an base class object from which other classes will derive. */ + +public struct SampleBase: Codable { + + public var baseClassStringProp: String? + public var baseClassIntegerProp: Int? + + + +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/SampleSubClass.swift b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/SampleSubClass.swift new file mode 100644 index 00000000000..2556f6add6e --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/SampleSubClass.swift @@ -0,0 +1,23 @@ +// +// SampleSubClass.swift +// +// Generated by swagger-codegen +// https://github.com/swagger-api/swagger-codegen +// + +import Foundation + + +/** This is an subclass defived from the SampleBase class. */ + +public struct SampleSubClass: Codable { + + public var baseClassStringProp: String? + public var baseClassIntegerProp: Int? + public var subClassStringProp: String? + public var subClassIntegerProp: Int? + + + +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/VariableNameTest.swift b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/VariableNameTest.swift index 6c32579a863..975c92b306c 100644 --- a/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/VariableNameTest.swift +++ b/samples/client/test/swift4/default/TestClient/Classes/Swaggers/Models/VariableNameTest.swift @@ -10,38 +10,22 @@ import Foundation /** This object contains property names which we know will be different from their variable name. Examples of this include snake case property names and property names which are Swift 4 reserved words. */ -open class VariableNameTest: Codable { +public struct VariableNameTest: Codable { /** This snake-case examle_name property name should be converted to a camelCase variable name like exampleName */ public var exampleName: String? /** This property name is a reserved word in most languages, including Swift 4. */ public var _for: String? + /** This model object property name should be unchanged from the JSON property name. */ + public var normalName: String? - - public init(exampleName: String?, _for: String?) { - self.exampleName = exampleName - self._for = _for - } - - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeIfPresent(exampleName, forKey: "example_name") - try container.encodeIfPresent(_for, forKey: "for") + public enum CodingKeys: String, CodingKey { + case exampleName = "example_name" + case _for = "for" + case normalName } - // Decodable protocol methods - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - exampleName = try container.decodeIfPresent(String.self, forKey: "example_name") - _for = try container.decodeIfPresent(String.self, forKey: "for") - } } diff --git a/samples/client/test/swift4/default/TestClientApp/Podfile.lock b/samples/client/test/swift4/default/TestClientApp/Podfile.lock index c1f4274187d..4e6ae435e3a 100644 --- a/samples/client/test/swift4/default/TestClientApp/Podfile.lock +++ b/samples/client/test/swift4/default/TestClientApp/Podfile.lock @@ -13,8 +13,8 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Alamofire: 2d95912bf4c34f164fdfc335872e8c312acaea4a - TestClient: c12a94972a1128167637d39ea0b072f46c0790de + TestClient: 410e69b600d7aa37590bc4077dc148d7f314ac84 PODFILE CHECKSUM: a4351ac5e001fd96f35ed7e647981803864100b5 -COCOAPODS: 1.1.1 +COCOAPODS: 1.4.0.beta.2 diff --git a/samples/client/test/swift4/default/TestClientApp/Pods/Local Podspecs/TestClient.podspec.json b/samples/client/test/swift4/default/TestClientApp/Pods/Local Podspecs/TestClient.podspec.json index 72b5090a592..8a76be9b31a 100644 --- a/samples/client/test/swift4/default/TestClientApp/Pods/Local Podspecs/TestClient.podspec.json +++ b/samples/client/test/swift4/default/TestClientApp/Pods/Local Podspecs/TestClient.podspec.json @@ -2,7 +2,8 @@ "name": "TestClient", "platforms": { "ios": "9.0", - "osx": "10.11" + "osx": "10.11", + "tvos": "9.0" }, "version": "0.0.1", "source": { diff --git a/samples/client/test/swift4/default/TestClientApp/Pods/Manifest.lock b/samples/client/test/swift4/default/TestClientApp/Pods/Manifest.lock index c1f4274187d..4e6ae435e3a 100644 --- a/samples/client/test/swift4/default/TestClientApp/Pods/Manifest.lock +++ b/samples/client/test/swift4/default/TestClientApp/Pods/Manifest.lock @@ -13,8 +13,8 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Alamofire: 2d95912bf4c34f164fdfc335872e8c312acaea4a - TestClient: c12a94972a1128167637d39ea0b072f46c0790de + TestClient: 410e69b600d7aa37590bc4077dc148d7f314ac84 PODFILE CHECKSUM: a4351ac5e001fd96f35ed7e647981803864100b5 -COCOAPODS: 1.1.1 +COCOAPODS: 1.4.0.beta.2 diff --git a/samples/client/test/swift4/default/TestClientApp/Pods/Pods.xcodeproj/project.pbxproj b/samples/client/test/swift4/default/TestClientApp/Pods/Pods.xcodeproj/project.pbxproj index f08334e9b0a..792e7244a6f 100644 --- a/samples/client/test/swift4/default/TestClientApp/Pods/Pods.xcodeproj/project.pbxproj +++ b/samples/client/test/swift4/default/TestClientApp/Pods/Pods.xcodeproj/project.pbxproj @@ -7,54 +7,62 @@ objects = { /* Begin PBXBuildFile section */ - 06966509EB896061665956B254677EF3 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1ADB9F167DA8EB39D3FA64AADB55D752 /* JSONEncodableEncoding.swift */; }; - 0A36E75434583424493479B3F81056C2 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8147CAF0602FB410B68FCBBDDE1244A /* JSONEncodingHelper.swift */; }; 10EB23E9ECC4B33E16933BB1EA560B6A /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87882A1F5A92C8138D54545E51D51E6F /* Timeline.swift */; }; - 1696BCB0ABCE1B4699943CBDD68BA0E7 /* VariableNameTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDBDC5987A4E733064132DD2651D8D4A /* VariableNameTest.swift */; }; - 16A8385493CF5CAE16F4A6EDC122554B /* TestClient-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = EC215D27FD61465426D20DB47BDF0A13 /* TestClient-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 16F9658ACE3C8E51723FD4D2808BD5B7 /* Swift4TestAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9A91F27AE4FAB04A7B18D186684BC24 /* Swift4TestAPI.swift */; }; + 16A8385493CF5CAE16F4A6EDC122554B /* TestClient-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 72FD66EE89F23CC3899E161FB777DE2C /* TestClient-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 18A7F51932559B112C34528A03D558AB /* ModelWithIntAdditionalPropertiesOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44544618A173B3CA5E05FB9E1662CC41 /* ModelWithIntAdditionalPropertiesOnly.swift */; }; 1B9EDEDC964E6B08F78920B4F4B9DB84 /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B44A27EFBB0DA84D738057B77F3413B1 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 27D62EDC72AD3271FB754F0F2E551385 /* AllPrimitives.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E284DDFCADEC894C28F985F6AE6FF9F /* AllPrimitives.swift */; }; + 2A3CFA4A01BE7792F667553A336F1979 /* ModelWithStringAdditionalPropertiesOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B4904C2082C79AF9955761AB4B828CC /* ModelWithStringAdditionalPropertiesOnly.swift */; }; 3626B94094672CB1C9DEA32B9F9502E1 /* TaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A01C037B4034EDA3D7955BC5E4E9D9D6 /* TaskDelegate.swift */; }; - 3684126CB8E9043D3CB679BD9F55DE3A /* StringEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D48A7304C97E00597AD2C0888F305D4 /* StringEnum.swift */; }; + 36F5534484B310D39E6633A790AF36D8 /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66282A01403E18F66D781622241044AE /* APIs.swift */; }; + 38414678D0FBFD3A7D4A75BF203A0748 /* ModelWithPropertiesAndAdditionalProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65C3F3D01C0A3A040E24751418C7F4B0 /* ModelWithPropertiesAndAdditionalProperties.swift */; }; + 3AC6E70CC65B567EDC3BBB6151663461 /* BaseCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F263A2E283C61AF82B1654290E4B7F7 /* BaseCard.swift */; }; 491D85AF9A26E8E550FF18A085A7F93A /* Pods-TestClientAppTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D34026BC454C1DD59A8FEF08E0624FA /* Pods-TestClientAppTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4A19B588188141F7C2627331D135BA39 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0D0533E4EC2277AAAC8888328EC5A64B /* Foundation.framework */; }; - 4CD53F2C3F07F184A4E9AFF987D853AE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B694C6A7D3FC9AB7995C5B62E1A4C81 /* Configuration.swift */; }; - 4D3D267D5EC61A81B3E97776C1F90BC2 /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F6AE3BA0A5C5B83DF94B256CAB25B0C /* APIs.swift */; }; - 4EA043B27010D319B9D31A9ADCCF45EF /* ModelWithStringAdditionalPropertiesOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C82967D176BC23B0E60DCC01C09B338 /* ModelWithStringAdditionalPropertiesOnly.swift */; }; 508F62094F4462562BA9D74DD32A1C69 /* Pods-TestClientApp-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A1A5FBE06254E8CD22605817BFC7C2A /* Pods-TestClientApp-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5387216E723A3C68E851CA15573CDD71 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E230A0448B394DE26E688DAC8E6201E /* Request.swift */; }; - 54D7AEAF9281279158C7CDCC1519B34B /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 473EC0807F341A64DC33774F03A638B3 /* Extensions.swift */; }; 56810CDE959C88C7EEE42689888E150B /* Pods-TestClientApp-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = EC60D563053BA3E937E249D19CBE5AB2 /* Pods-TestClientApp-dummy.m */; }; + 590BEC547D2F000D1446ABBFED2D2083 /* StringEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3493805B16B4F3E4FBE9C6995BF347DC /* StringEnum.swift */; }; + 59B39B03057D13DB036DC4C75550ABBE /* ModelStringArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F234CB68BE10CD3934D50380CFA4669 /* ModelStringArray.swift */; }; + 5AE72A391043105065B4EED27CA04CE7 /* SampleSubClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF56D5578808ACA8CE1E8B1F73E252CC /* SampleSubClass.swift */; }; + 5C6C00BF990840F2755C09F7756A3C3B /* PersonCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5867C3CAED189BA305CED88DA03E9F0 /* PersonCard.swift */; }; 61200D01A1855D7920CEF835C8BE00B0 /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FCBF1EED873F61C6D46CE37FA5C39D3 /* DispatchQueue+Alamofire.swift */; }; 62F65AD8DC4F0F9610F4B8B4738EC094 /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32B030D27CAC730C5EB0F22390645310 /* ServerTrustPolicy.swift */; }; - 7369905557251785485EE36C9E02F950 /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BA405DCCE7A65CA4DA2B0E18A558185 /* CodableHelper.swift */; }; + 67FB5BD4148924C2F024AC550808948B /* ErrorInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48D991108BF1EEAC5ACBF5CDF7E89802 /* ErrorInfo.swift */; }; + 6C988E7440FEF424D285274889283405 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 168F8BE44D7389E1BDEE63A9DE3DD683 /* JSONEncodableEncoding.swift */; }; + 700B97DCA491FB4A6B984231867398A8 /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0E8862FFFFB6FBC43A586439F8574DE /* CodableHelper.swift */; }; 73B9C996AED49ED7CF8EC2A6F1738059 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0D0533E4EC2277AAAC8888328EC5A64B /* Foundation.framework */; }; 77801A4DCB8139D6B9FC60B06986AD59 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0D0533E4EC2277AAAC8888328EC5A64B /* Foundation.framework */; }; 7B5FE28C7EA4122B0598738E54DBEBD8 /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 195D73DD9EF275A3C56569E2B1CA8026 /* SessionDelegate.swift */; }; 7D8CC01E8C9EFFF9F4D65406CDE0AB66 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D60BC9955B4F7FFA62D7440CB385C11 /* Result.swift */; }; - 98827C3F0CFA7E3E35F58BCEE6377E4A /* AllPrimitives.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A4FC498355B3CB3435063F534C912B2 /* AllPrimitives.swift */; }; - 9AFDBFF4428F1DAD2456F1961301F0DF /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 403C559935235105D1940F7DA5169380 /* Models.swift */; }; 9ED2BB2981896E0A39EFA365503F58CE /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AF006B0AD5765D1BFA8253C2DCBB126 /* AFError.swift */; }; + A0666FEC2669E04EFFABBBBB8929BDAC /* SampleBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54B7861F48E23BC4F78337289020FAC6 /* SampleBase.swift */; }; + A15DD74B720640B6FEAB8300D5ABD72B /* GetAllModelsResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4E9080F6B98349BE44C9D79A54F4A3F /* GetAllModelsResult.swift */; }; A2A6F71B727312BD45CC7A4AAD7B0AB7 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5A8AA5F9EDED0A0BDDE7E830BF4AEE0 /* NetworkReachabilityManager.swift */; }; + A7A5DB8EE6E51045A08CED4E24370EC2 /* Swift4TestAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BFEC3DC1EC0C4C57A6021A6D527DB70 /* Swift4TestAPI.swift */; }; + A9E42CBB4C6625A0BFFDBC0979564346 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = B29A72CC98FEA16BD6A51B414075A838 /* JSONEncodingHelper.swift */; }; A9EEEA7477981DEEBC72432DE9990A4B /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 22C1C119BCE81C53F76CAC2BE27C38E0 /* Alamofire-dummy.m */; }; - AB24B68901CDB824AFB369B1014C33B8 /* TestClient-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 56FC4FE79F27E53676B9780C2E0408FC /* TestClient-dummy.m */; }; AC651427062D320B701382DCE4EBB3E7 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 706C7AFFE37BA158C3553250F4B5FAED /* Alamofire.framework */; }; AE1EF48399533730D0066E04B22CA2D6 /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46CDAC6C1187C5467E576980E1062C8B /* SessionManager.swift */; }; B65FCF589DA398C3EFE0128064E510EC /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 155538D91ACEEEDF82069ACF6C1A02E7 /* MultipartFormData.swift */; }; - BBC8F5CBC843A3C3120323E14780D319 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42773192875A3DCB787D7318929AA7F6 /* AlamofireImplementations.swift */; }; - BBD1B0CD723F41BDB0D156F6918139DD /* ErrorInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BE43F1B5A892E876D859A4377375182 /* ErrorInfo.swift */; }; BBEFE2F9CEB73DC7BD97FFA66A0D9D4F /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = B029DBC43E49A740F12B5E4D2E6DD452 /* Validation.swift */; }; + BCB75EC7CB76ED91BB90D1B65973A409 /* VariableNameTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49A6DEF9657C9ABF540BB609B7672A39 /* VariableNameTest.swift */; }; + BCD245E0153A4BA309948EA77C205EB9 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3467F8865FF78953F8FABD639C7D40E2 /* APIHelper.swift */; }; BE5C67A07E289FE1F9BE27335B159997 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6639346628280A0D0FAD35196BF56108 /* ParameterEncoding.swift */; }; BE5EFF2B7869777404F6D9A4301C89F0 /* Pods-TestClientAppTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0708401DDCEA2C9766573FC25995B724 /* Pods-TestClientAppTests-dummy.m */; }; + C2E4EDCCDBD5785EC4B1676102E5F512 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3338F5F9C1B07D8DA01464CD15628FFF /* Models.swift */; }; + C5835945F7BD72C97457E271F9585F8F /* PlaceCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB522B0F661C04BA67EA9A1E8AF17102 /* PlaceCard.swift */; }; CB6D60925223897FFA2662667DF83E8A /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F47F5C9CDB035C5AFADEBA5BF44F1C /* Response.swift */; }; - DF576922335DC3DF1E0A2BB3F08E268C /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54BCC73C11DABEDD1168511015B45B0E /* APIHelper.swift */; }; - E299DDE12086E1950BFE65FAE5B4BF6D /* ModelWithPropertiesAndAdditionalProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0A80B74145656740388A2F2A8A6DEF7 /* ModelWithPropertiesAndAdditionalProperties.swift */; }; - E5A66AEEE7A4C9B38E9CD98DEA09FB71 /* GetAllModelsResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4968CA07A325BD0A1E7D4461BE26DC08 /* GetAllModelsResult.swift */; }; - E8CC5F359BBC4B8CDD6D3F79A5C6921F /* ModelWithIntAdditionalPropertiesOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6ABA4A6D64C66093979DF0370F028D48 /* ModelWithIntAdditionalPropertiesOnly.swift */; }; + CEDBCBDC9CAC4302CA01A8C83D40E043 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E6ED4EE8415F9EBA746150CE1E0F14E /* AlamofireImplementations.swift */; }; + DE4A06295477378DFA4D9A655B0C5942 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 340284A1879BA2C94571A4F3383AC6DD /* Configuration.swift */; }; + E0A50F55BB6174A016601FC8AFD8A048 /* ModelErrorInfoArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9831F84AD64A4E466B32CBE573F8504 /* ModelErrorInfoArray.swift */; }; + EB3573E90DA9C816696567D6B366B1C9 /* TestClient-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = FF1474B0BBEEF6902CD9B5309DCD1FBE /* TestClient-dummy.m */; }; EFD264FC408EBF3BA2528E70B08DDD94 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66A46F517F0AF7E85A16D723F6406896 /* Notifications.swift */; }; F6BECD98B97CBFEBE2C96F0E9E72A6C0 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2F9510473F6FFD7AA66524DB16C2263 /* ResponseSerialization.swift */; }; F8B3D3092ED0417E8CDF32033F6122F5 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFCB8C44DE758E906C0BCDA455937B85 /* Alamofire.swift */; }; F9F9D4F89331668EBF47EBF7F73E05B7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0D0533E4EC2277AAAC8888328EC5A64B /* Foundation.framework */; }; + FBFFC34290847BC5932CA2E7347AB87F /* ModelDoubleArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 194D612E344C3AB1BCB8A4E26A6D2F7D /* ModelDoubleArray.swift */; }; + FC484A73605196D90956CC193BBDB90E /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDF45928C3E2CBCE2A0211AB9BB33BD9 /* Extensions.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -82,80 +90,88 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 00F2B96AF439542BA8CB08C60AEDA11C /* TestClient-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "TestClient-prefix.pch"; sourceTree = ""; }; 04F47F5C9CDB035C5AFADEBA5BF44F1C /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; 051F389CC74A5EEB0D289CBF0ACD7FF2 /* Pods_TestClientApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_TestClientApp.framework; path = "Pods-TestClientApp.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 0708401DDCEA2C9766573FC25995B724 /* Pods-TestClientAppTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-TestClientAppTests-dummy.m"; sourceTree = ""; }; 07B75A0B6C507BAECEA8916067F04CC1 /* Pods-TestClientAppTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-TestClientAppTests-acknowledgements.markdown"; sourceTree = ""; }; 0D0533E4EC2277AAAC8888328EC5A64B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 0D48A7304C97E00597AD2C0888F305D4 /* StringEnum.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StringEnum.swift; sourceTree = ""; }; 0FCBF1EED873F61C6D46CE37FA5C39D3 /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; + 0FE7DC27516913BE2CF872685EABB3A1 /* TestClient-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "TestClient-prefix.pch"; sourceTree = ""; }; 10D49DDF5275F7220CE632073C28829D /* Pods_TestClientAppTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_TestClientAppTests.framework; path = "Pods-TestClientAppTests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 13A0A663B36A229C69D5274A83E93F88 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 155538D91ACEEEDF82069ACF6C1A02E7 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; + 168F8BE44D7389E1BDEE63A9DE3DD683 /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONEncodableEncoding.swift; path = TestClient/Classes/Swaggers/JSONEncodableEncoding.swift; sourceTree = ""; }; + 194D612E344C3AB1BCB8A4E26A6D2F7D /* ModelDoubleArray.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ModelDoubleArray.swift; sourceTree = ""; }; 195D73DD9EF275A3C56569E2B1CA8026 /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; - 1A4FC498355B3CB3435063F534C912B2 /* AllPrimitives.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AllPrimitives.swift; sourceTree = ""; }; - 1ADB9F167DA8EB39D3FA64AADB55D752 /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; 1AE1C790A3C1BAEC17CB4508DA52569D /* Pods-TestClientApp.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-TestClientApp.modulemap"; sourceTree = ""; }; 1E230A0448B394DE26E688DAC8E6201E /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; + 1E6ED4EE8415F9EBA746150CE1E0F14E /* AlamofireImplementations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AlamofireImplementations.swift; path = TestClient/Classes/Swaggers/AlamofireImplementations.swift; sourceTree = ""; }; 1E7748C6BC5C4971F0CE95DAC1C5C9AB /* Pods-TestClientAppTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-TestClientAppTests-frameworks.sh"; sourceTree = ""; }; 20BAA66C9CB47A7685E432795BD57F74 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 22BD9A116DB40454A963E70F6AF6EF9F /* Pods-TestClientApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-TestClientApp.release.xcconfig"; sourceTree = ""; }; 22C1C119BCE81C53F76CAC2BE27C38E0 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; 2A1A5FBE06254E8CD22605817BFC7C2A /* Pods-TestClientApp-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-TestClientApp-umbrella.h"; sourceTree = ""; }; 2E0292F5FFC33B8E8740CEE1C2FD591B /* Pods-TestClientApp-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-TestClientApp-acknowledgements.markdown"; sourceTree = ""; }; - 31D7F9C80C3FD2025331A919AA7DB283 /* TestClient.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = TestClient.xcconfig; sourceTree = ""; }; 32B030D27CAC730C5EB0F22390645310 /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; - 3BA405DCCE7A65CA4DA2B0E18A558185 /* CodableHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; - 3C82967D176BC23B0E60DCC01C09B338 /* ModelWithStringAdditionalPropertiesOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ModelWithStringAdditionalPropertiesOnly.swift; sourceTree = ""; }; + 3338F5F9C1B07D8DA01464CD15628FFF /* Models.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Models.swift; path = TestClient/Classes/Swaggers/Models.swift; sourceTree = ""; }; + 340284A1879BA2C94571A4F3383AC6DD /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = TestClient/Classes/Swaggers/Configuration.swift; sourceTree = ""; }; + 3467F8865FF78953F8FABD639C7D40E2 /* APIHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = APIHelper.swift; path = TestClient/Classes/Swaggers/APIHelper.swift; sourceTree = ""; }; + 3493805B16B4F3E4FBE9C6995BF347DC /* StringEnum.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StringEnum.swift; sourceTree = ""; }; + 3B4904C2082C79AF9955761AB4B828CC /* ModelWithStringAdditionalPropertiesOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ModelWithStringAdditionalPropertiesOnly.swift; sourceTree = ""; }; + 3BFEC3DC1EC0C4C57A6021A6D527DB70 /* Swift4TestAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Swift4TestAPI.swift; sourceTree = ""; }; 3D60BC9955B4F7FFA62D7440CB385C11 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; - 403C559935235105D1940F7DA5169380 /* Models.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; - 42773192875A3DCB787D7318929AA7F6 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; + 40151E0EE7FA417AC4F62238953E27EF /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 44544618A173B3CA5E05FB9E1662CC41 /* ModelWithIntAdditionalPropertiesOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ModelWithIntAdditionalPropertiesOnly.swift; sourceTree = ""; }; 46CDAC6C1187C5467E576980E1062C8B /* SessionManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionManager.swift; path = Source/SessionManager.swift; sourceTree = ""; }; - 473EC0807F341A64DC33774F03A638B3 /* Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; - 4968CA07A325BD0A1E7D4461BE26DC08 /* GetAllModelsResult.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = GetAllModelsResult.swift; sourceTree = ""; }; + 48D991108BF1EEAC5ACBF5CDF7E89802 /* ErrorInfo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ErrorInfo.swift; sourceTree = ""; }; + 49A6DEF9657C9ABF540BB609B7672A39 /* VariableNameTest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = VariableNameTest.swift; sourceTree = ""; }; 4AF006B0AD5765D1BFA8253C2DCBB126 /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; + 4E284DDFCADEC894C28F985F6AE6FF9F /* AllPrimitives.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AllPrimitives.swift; sourceTree = ""; }; 505DF24A1D5BCB011EAED5834CF5E166 /* TestClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = TestClient.framework; path = TestClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 54BCC73C11DABEDD1168511015B45B0E /* APIHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; - 56FC4FE79F27E53676B9780C2E0408FC /* TestClient-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "TestClient-dummy.m"; sourceTree = ""; }; + 54B7861F48E23BC4F78337289020FAC6 /* SampleBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SampleBase.swift; sourceTree = ""; }; + 5F234CB68BE10CD3934D50380CFA4669 /* ModelStringArray.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ModelStringArray.swift; sourceTree = ""; }; + 65C3F3D01C0A3A040E24751418C7F4B0 /* ModelWithPropertiesAndAdditionalProperties.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ModelWithPropertiesAndAdditionalProperties.swift; sourceTree = ""; }; + 66282A01403E18F66D781622241044AE /* APIs.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = APIs.swift; path = TestClient/Classes/Swaggers/APIs.swift; sourceTree = ""; }; 6639346628280A0D0FAD35196BF56108 /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; 66A46F517F0AF7E85A16D723F6406896 /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; - 6ABA4A6D64C66093979DF0370F028D48 /* ModelWithIntAdditionalPropertiesOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ModelWithIntAdditionalPropertiesOnly.swift; sourceTree = ""; }; - 6F6AE3BA0A5C5B83DF94B256CAB25B0C /* APIs.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; 706C7AFFE37BA158C3553250F4B5FAED /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 72FD66EE89F23CC3899E161FB777DE2C /* TestClient-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "TestClient-umbrella.h"; sourceTree = ""; }; 7B4EA8191BDD7C6FBCDA7BFABEAABD65 /* Pods-TestClientAppTests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-TestClientAppTests-resources.sh"; sourceTree = ""; }; 7D141D1953E5C6E67E362CE73090E48A /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Alamofire.modulemap; sourceTree = ""; }; 859F2A4BF103D649ABB3C578D06E5644 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 87882A1F5A92C8138D54545E51D51E6F /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; - 8B694C6A7D3FC9AB7995C5B62E1A4C81 /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + 8F263A2E283C61AF82B1654290E4B7F7 /* BaseCard.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BaseCard.swift; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 9A41065D7EDA73C5461089CE09642EF4 /* Pods-TestClientAppTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-TestClientAppTests.modulemap"; sourceTree = ""; }; - 9BE43F1B5A892E876D859A4377375182 /* ErrorInfo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ErrorInfo.swift; sourceTree = ""; }; 9D34026BC454C1DD59A8FEF08E0624FA /* Pods-TestClientAppTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-TestClientAppTests-umbrella.h"; sourceTree = ""; }; A01C037B4034EDA3D7955BC5E4E9D9D6 /* TaskDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TaskDelegate.swift; path = Source/TaskDelegate.swift; sourceTree = ""; }; A234B48049014361A63FD492CFA12C33 /* Pods-TestClientApp-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-TestClientApp-resources.sh"; sourceTree = ""; }; + A9831F84AD64A4E466B32CBE573F8504 /* ModelErrorInfoArray.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ModelErrorInfoArray.swift; sourceTree = ""; }; + AB522B0F661C04BA67EA9A1E8AF17102 /* PlaceCard.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PlaceCard.swift; sourceTree = ""; }; AB612F43F18D7C5AE7B35AF8AFE59764 /* Pods-TestClientApp-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-TestClientApp-acknowledgements.plist"; sourceTree = ""; }; AD7CCEFF0491973C176C68B2094165CE /* Pods-TestClientAppTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-TestClientAppTests.debug.xcconfig"; sourceTree = ""; }; B029DBC43E49A740F12B5E4D2E6DD452 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; + B29A72CC98FEA16BD6A51B414075A838 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONEncodingHelper.swift; path = TestClient/Classes/Swaggers/JSONEncodingHelper.swift; sourceTree = ""; }; B44A27EFBB0DA84D738057B77F3413B1 /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; B797C23587435A3F339881CAAC898D14 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - B8147CAF0602FB410B68FCBBDDE1244A /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + BCA642DE4619362882CB032838BCFAB2 /* TestClient.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = TestClient.modulemap; sourceTree = ""; }; BCCA9CA7D9C1A2047BB93336C5708DFD /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; - CDBDC5987A4E733064132DD2651D8D4A /* VariableNameTest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = VariableNameTest.swift; sourceTree = ""; }; - D380217817360C1C3B246D7430A57536 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + BDF45928C3E2CBCE2A0211AB9BB33BD9 /* Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Extensions.swift; path = TestClient/Classes/Swaggers/Extensions.swift; sourceTree = ""; }; D9B3CA0144002E01B7C258E2AFFC5ECC /* Pods-TestClientApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-TestClientApp.debug.xcconfig"; sourceTree = ""; }; DFCB8C44DE758E906C0BCDA455937B85 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; - E0A80B74145656740388A2F2A8A6DEF7 /* ModelWithPropertiesAndAdditionalProperties.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ModelWithPropertiesAndAdditionalProperties.swift; sourceTree = ""; }; + E0497D2F853C3C5B2D1E9A76C712024A /* TestClient.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = TestClient.xcconfig; sourceTree = ""; }; E2F9510473F6FFD7AA66524DB16C2263 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; + E4E9080F6B98349BE44C9D79A54F4A3F /* GetAllModelsResult.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = GetAllModelsResult.swift; sourceTree = ""; }; E5A8AA5F9EDED0A0BDDE7E830BF4AEE0 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; E6F34CCF86067ED508C12C676E298C69 /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; - E80AE90233A5A495A962073C089D20F5 /* TestClient.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = TestClient.modulemap; sourceTree = ""; }; EB09BADC596A8F1BDC2465074CEC2908 /* Pods-TestClientAppTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-TestClientAppTests.release.xcconfig"; sourceTree = ""; }; - EC215D27FD61465426D20DB47BDF0A13 /* TestClient-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "TestClient-umbrella.h"; sourceTree = ""; }; EC60D563053BA3E937E249D19CBE5AB2 /* Pods-TestClientApp-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-TestClientApp-dummy.m"; sourceTree = ""; }; + EF56D5578808ACA8CE1E8B1F73E252CC /* SampleSubClass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SampleSubClass.swift; sourceTree = ""; }; + F0E8862FFFFB6FBC43A586439F8574DE /* CodableHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CodableHelper.swift; path = TestClient/Classes/Swaggers/CodableHelper.swift; sourceTree = ""; }; F41BAD9018CDC154B7E15EBFFF0E69CB /* Pods-TestClientApp-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-TestClientApp-frameworks.sh"; sourceTree = ""; }; - F9A91F27AE4FAB04A7B18D186684BC24 /* Swift4TestAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Swift4TestAPI.swift; sourceTree = ""; }; + F5867C3CAED189BA305CED88DA03E9F0 /* PersonCard.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PersonCard.swift; sourceTree = ""; }; FA871D862680FF2E4D3660EEAFD05023 /* Pods-TestClientAppTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-TestClientAppTests-acknowledgements.plist"; sourceTree = ""; }; + FF1474B0BBEEF6902CD9B5309DCD1FBE /* TestClient-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "TestClient-dummy.m"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -195,24 +211,6 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 05DCFF2CB9EA57DD74BF27799A1B7F2B /* Development Pods */ = { - isa = PBXGroup; - children = ( - 0B89666E6130F796AB82C98542E293EC /* TestClient */, - ); - name = "Development Pods"; - sourceTree = ""; - }; - 0B89666E6130F796AB82C98542E293EC /* TestClient */ = { - isa = PBXGroup; - children = ( - 4EBE43105AEEA3414BD86E7CB89D3478 /* Support Files */, - 55150D9BCBE0156582CD9BCAB75BEA88 /* TestClient */, - ); - name = TestClient; - path = ../..; - sourceTree = ""; - }; 200D10EB20F0397D47F022B50CF0433F /* Alamofire */ = { isa = PBXGroup; children = ( @@ -274,20 +272,6 @@ name = "Targets Support Files"; sourceTree = ""; }; - 4EBE43105AEEA3414BD86E7CB89D3478 /* Support Files */ = { - isa = PBXGroup; - children = ( - D380217817360C1C3B246D7430A57536 /* Info.plist */, - E80AE90233A5A495A962073C089D20F5 /* TestClient.modulemap */, - 31D7F9C80C3FD2025331A919AA7DB283 /* TestClient.xcconfig */, - 56FC4FE79F27E53676B9780C2E0408FC /* TestClient-dummy.m */, - 00F2B96AF439542BA8CB08C60AEDA11C /* TestClient-prefix.pch */, - EC215D27FD61465426D20DB47BDF0A13 /* TestClient-umbrella.h */, - ); - name = "Support Files"; - path = "TestClientApp/Pods/Target Support Files/TestClient"; - sourceTree = ""; - }; 51A9B78D6A7E7FB5A465754528750815 /* iOS */ = { isa = PBXGroup; children = ( @@ -296,15 +280,6 @@ name = iOS; sourceTree = ""; }; - 55150D9BCBE0156582CD9BCAB75BEA88 /* TestClient */ = { - isa = PBXGroup; - children = ( - 6EB25EF4908044FE989DE53EF76DC47D /* Classes */, - ); - name = TestClient; - path = TestClient; - sourceTree = ""; - }; 55F14F994FE7AB51F028BFE66CEF3106 /* Support Files */ = { isa = PBXGroup; children = ( @@ -328,20 +303,55 @@ name = Frameworks; sourceTree = ""; }; - 6EB25EF4908044FE989DE53EF76DC47D /* Classes */ = { + 629F8A4D56B037C676CFAFFD1F2CD36D /* TestClient */ = { isa = PBXGroup; children = ( - F8E5F93111B4632BF4CEAA6615E4F8E6 /* Swaggers */, + 1E6ED4EE8415F9EBA746150CE1E0F14E /* AlamofireImplementations.swift */, + 3467F8865FF78953F8FABD639C7D40E2 /* APIHelper.swift */, + 66282A01403E18F66D781622241044AE /* APIs.swift */, + F0E8862FFFFB6FBC43A586439F8574DE /* CodableHelper.swift */, + 340284A1879BA2C94571A4F3383AC6DD /* Configuration.swift */, + BDF45928C3E2CBCE2A0211AB9BB33BD9 /* Extensions.swift */, + 168F8BE44D7389E1BDEE63A9DE3DD683 /* JSONEncodableEncoding.swift */, + B29A72CC98FEA16BD6A51B414075A838 /* JSONEncodingHelper.swift */, + 3338F5F9C1B07D8DA01464CD15628FFF /* Models.swift */, + A7FB2E126AE5ED476FE2B871EEAF8F6E /* APIs */, + 6790354D13D99AEE45B797CE648CB7D2 /* Models */, + AF37C3DA27E43A522BA4DF637A22B81D /* Support Files */, ); - name = Classes; - path = Classes; + name = TestClient; + path = ../..; + sourceTree = ""; + }; + 6790354D13D99AEE45B797CE648CB7D2 /* Models */ = { + isa = PBXGroup; + children = ( + 4E284DDFCADEC894C28F985F6AE6FF9F /* AllPrimitives.swift */, + 8F263A2E283C61AF82B1654290E4B7F7 /* BaseCard.swift */, + 48D991108BF1EEAC5ACBF5CDF7E89802 /* ErrorInfo.swift */, + E4E9080F6B98349BE44C9D79A54F4A3F /* GetAllModelsResult.swift */, + 194D612E344C3AB1BCB8A4E26A6D2F7D /* ModelDoubleArray.swift */, + A9831F84AD64A4E466B32CBE573F8504 /* ModelErrorInfoArray.swift */, + 5F234CB68BE10CD3934D50380CFA4669 /* ModelStringArray.swift */, + 44544618A173B3CA5E05FB9E1662CC41 /* ModelWithIntAdditionalPropertiesOnly.swift */, + 65C3F3D01C0A3A040E24751418C7F4B0 /* ModelWithPropertiesAndAdditionalProperties.swift */, + 3B4904C2082C79AF9955761AB4B828CC /* ModelWithStringAdditionalPropertiesOnly.swift */, + F5867C3CAED189BA305CED88DA03E9F0 /* PersonCard.swift */, + AB522B0F661C04BA67EA9A1E8AF17102 /* PlaceCard.swift */, + 54B7861F48E23BC4F78337289020FAC6 /* SampleBase.swift */, + EF56D5578808ACA8CE1E8B1F73E252CC /* SampleSubClass.swift */, + 3493805B16B4F3E4FBE9C6995BF347DC /* StringEnum.swift */, + 49A6DEF9657C9ABF540BB609B7672A39 /* VariableNameTest.swift */, + ); + name = Models; + path = TestClient/Classes/Swaggers/Models; sourceTree = ""; }; 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, - 05DCFF2CB9EA57DD74BF27799A1B7F2B /* Development Pods */, + 855DCA8F3637646904EAC84BDFA4E973 /* Development Pods */, 59B91F212518421F271EBA85D5530651 /* Frameworks */, 35F128EB69B6F7FB7DA93BBF6C130FAE /* Pods */, D241D358AF2A3AD51333DD16741209F5 /* Products */, @@ -349,29 +359,35 @@ ); sourceTree = ""; }; - 8D2C9AD02753DA5142931DEB9E397331 /* APIs */ = { + 855DCA8F3637646904EAC84BDFA4E973 /* Development Pods */ = { isa = PBXGroup; children = ( - F9A91F27AE4FAB04A7B18D186684BC24 /* Swift4TestAPI.swift */, + 629F8A4D56B037C676CFAFFD1F2CD36D /* TestClient */, ); - name = APIs; - path = APIs; + name = "Development Pods"; sourceTree = ""; }; - AC474B980F22BBF449598D00D657BB46 /* Models */ = { + A7FB2E126AE5ED476FE2B871EEAF8F6E /* APIs */ = { isa = PBXGroup; children = ( - 1A4FC498355B3CB3435063F534C912B2 /* AllPrimitives.swift */, - 9BE43F1B5A892E876D859A4377375182 /* ErrorInfo.swift */, - 4968CA07A325BD0A1E7D4461BE26DC08 /* GetAllModelsResult.swift */, - 6ABA4A6D64C66093979DF0370F028D48 /* ModelWithIntAdditionalPropertiesOnly.swift */, - E0A80B74145656740388A2F2A8A6DEF7 /* ModelWithPropertiesAndAdditionalProperties.swift */, - 3C82967D176BC23B0E60DCC01C09B338 /* ModelWithStringAdditionalPropertiesOnly.swift */, - 0D48A7304C97E00597AD2C0888F305D4 /* StringEnum.swift */, - CDBDC5987A4E733064132DD2651D8D4A /* VariableNameTest.swift */, + 3BFEC3DC1EC0C4C57A6021A6D527DB70 /* Swift4TestAPI.swift */, ); - name = Models; - path = Models; + name = APIs; + path = TestClient/Classes/Swaggers/APIs; + sourceTree = ""; + }; + AF37C3DA27E43A522BA4DF637A22B81D /* Support Files */ = { + isa = PBXGroup; + children = ( + 40151E0EE7FA417AC4F62238953E27EF /* Info.plist */, + BCA642DE4619362882CB032838BCFAB2 /* TestClient.modulemap */, + E0497D2F853C3C5B2D1E9A76C712024A /* TestClient.xcconfig */, + FF1474B0BBEEF6902CD9B5309DCD1FBE /* TestClient-dummy.m */, + 0FE7DC27516913BE2CF872685EABB3A1 /* TestClient-prefix.pch */, + 72FD66EE89F23CC3899E161FB777DE2C /* TestClient-umbrella.h */, + ); + name = "Support Files"; + path = "TestClientApp/Pods/Target Support Files/TestClient"; sourceTree = ""; }; D241D358AF2A3AD51333DD16741209F5 /* Products */ = { @@ -403,25 +419,6 @@ path = "Target Support Files/Pods-TestClientApp"; sourceTree = ""; }; - F8E5F93111B4632BF4CEAA6615E4F8E6 /* Swaggers */ = { - isa = PBXGroup; - children = ( - 42773192875A3DCB787D7318929AA7F6 /* AlamofireImplementations.swift */, - 54BCC73C11DABEDD1168511015B45B0E /* APIHelper.swift */, - 6F6AE3BA0A5C5B83DF94B256CAB25B0C /* APIs.swift */, - 3BA405DCCE7A65CA4DA2B0E18A558185 /* CodableHelper.swift */, - 8B694C6A7D3FC9AB7995C5B62E1A4C81 /* Configuration.swift */, - 473EC0807F341A64DC33774F03A638B3 /* Extensions.swift */, - 1ADB9F167DA8EB39D3FA64AADB55D752 /* JSONEncodableEncoding.swift */, - B8147CAF0602FB410B68FCBBDDE1244A /* JSONEncodingHelper.swift */, - 403C559935235105D1940F7DA5169380 /* Models.swift */, - 8D2C9AD02753DA5142931DEB9E397331 /* APIs */, - AC474B980F22BBF449598D00D657BB46 /* Models */, - ); - name = Swaggers; - path = Swaggers; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -500,7 +497,7 @@ isa = PBXNativeTarget; buildConfigurationList = A3C6C15D000D0C0BF929BB22D7E47460 /* Build configuration list for PBXNativeTarget "TestClient" */; buildPhases = ( - 66D8A345E619AC0BC716043483937293 /* Sources */, + 1DF6FF0ABB7B2F16F4F4C32814CE46DD /* Sources */, AC284B2E37927E3BD90A51DE555787BE /* Frameworks */, BCCD67B6417E44806203C28B41FEC4EA /* Headers */, ); @@ -561,6 +558,40 @@ /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ + 1DF6FF0ABB7B2F16F4F4C32814CE46DD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + CEDBCBDC9CAC4302CA01A8C83D40E043 /* AlamofireImplementations.swift in Sources */, + 27D62EDC72AD3271FB754F0F2E551385 /* AllPrimitives.swift in Sources */, + BCD245E0153A4BA309948EA77C205EB9 /* APIHelper.swift in Sources */, + 36F5534484B310D39E6633A790AF36D8 /* APIs.swift in Sources */, + 3AC6E70CC65B567EDC3BBB6151663461 /* BaseCard.swift in Sources */, + 700B97DCA491FB4A6B984231867398A8 /* CodableHelper.swift in Sources */, + DE4A06295477378DFA4D9A655B0C5942 /* Configuration.swift in Sources */, + 67FB5BD4148924C2F024AC550808948B /* ErrorInfo.swift in Sources */, + FC484A73605196D90956CC193BBDB90E /* Extensions.swift in Sources */, + A15DD74B720640B6FEAB8300D5ABD72B /* GetAllModelsResult.swift in Sources */, + 6C988E7440FEF424D285274889283405 /* JSONEncodableEncoding.swift in Sources */, + A9E42CBB4C6625A0BFFDBC0979564346 /* JSONEncodingHelper.swift in Sources */, + FBFFC34290847BC5932CA2E7347AB87F /* ModelDoubleArray.swift in Sources */, + E0A50F55BB6174A016601FC8AFD8A048 /* ModelErrorInfoArray.swift in Sources */, + C2E4EDCCDBD5785EC4B1676102E5F512 /* Models.swift in Sources */, + 59B39B03057D13DB036DC4C75550ABBE /* ModelStringArray.swift in Sources */, + 18A7F51932559B112C34528A03D558AB /* ModelWithIntAdditionalPropertiesOnly.swift in Sources */, + 38414678D0FBFD3A7D4A75BF203A0748 /* ModelWithPropertiesAndAdditionalProperties.swift in Sources */, + 2A3CFA4A01BE7792F667553A336F1979 /* ModelWithStringAdditionalPropertiesOnly.swift in Sources */, + 5C6C00BF990840F2755C09F7756A3C3B /* PersonCard.swift in Sources */, + C5835945F7BD72C97457E271F9585F8F /* PlaceCard.swift in Sources */, + A0666FEC2669E04EFFABBBBB8929BDAC /* SampleBase.swift in Sources */, + 5AE72A391043105065B4EED27CA04CE7 /* SampleSubClass.swift in Sources */, + 590BEC547D2F000D1446ABBFED2D2083 /* StringEnum.swift in Sources */, + A7A5DB8EE6E51045A08CED4E24370EC2 /* Swift4TestAPI.swift in Sources */, + EB3573E90DA9C816696567D6B366B1C9 /* TestClient-dummy.m in Sources */, + BCB75EC7CB76ED91BB90D1B65973A409 /* VariableNameTest.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 31936243A36C2355A00B0881E84B8114 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -594,32 +625,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 66D8A345E619AC0BC716043483937293 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BBC8F5CBC843A3C3120323E14780D319 /* AlamofireImplementations.swift in Sources */, - 98827C3F0CFA7E3E35F58BCEE6377E4A /* AllPrimitives.swift in Sources */, - DF576922335DC3DF1E0A2BB3F08E268C /* APIHelper.swift in Sources */, - 4D3D267D5EC61A81B3E97776C1F90BC2 /* APIs.swift in Sources */, - 7369905557251785485EE36C9E02F950 /* CodableHelper.swift in Sources */, - 4CD53F2C3F07F184A4E9AFF987D853AE /* Configuration.swift in Sources */, - BBD1B0CD723F41BDB0D156F6918139DD /* ErrorInfo.swift in Sources */, - 54D7AEAF9281279158C7CDCC1519B34B /* Extensions.swift in Sources */, - E5A66AEEE7A4C9B38E9CD98DEA09FB71 /* GetAllModelsResult.swift in Sources */, - 06966509EB896061665956B254677EF3 /* JSONEncodableEncoding.swift in Sources */, - 0A36E75434583424493479B3F81056C2 /* JSONEncodingHelper.swift in Sources */, - 9AFDBFF4428F1DAD2456F1961301F0DF /* Models.swift in Sources */, - E8CC5F359BBC4B8CDD6D3F79A5C6921F /* ModelWithIntAdditionalPropertiesOnly.swift in Sources */, - E299DDE12086E1950BFE65FAE5B4BF6D /* ModelWithPropertiesAndAdditionalProperties.swift in Sources */, - 4EA043B27010D319B9D31A9ADCCF45EF /* ModelWithStringAdditionalPropertiesOnly.swift in Sources */, - 3684126CB8E9043D3CB679BD9F55DE3A /* StringEnum.swift in Sources */, - 16F9658ACE3C8E51723FD4D2808BD5B7 /* Swift4TestAPI.swift in Sources */, - AB24B68901CDB824AFB369B1014C33B8 /* TestClient-dummy.m in Sources */, - 1696BCB0ABCE1B4699943CBDD68BA0E7 /* VariableNameTest.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; FE4A92027DF87E05A938D6FF19226833 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -652,146 +657,84 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 0FDC2040BFB324AEB73B65048EBE33A3 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 31D7F9C80C3FD2025331A919AA7DB283 /* TestClient.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/TestClient/TestClient-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/TestClient/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/TestClient/TestClient.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = TestClient; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 1A41B15D3AA834993ADDD808FA9D8764 /* Release */ = { + 12C4B864767C59600DBFA238F1E2F8BC /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + 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_DIRECT_OBJC_ISA_USAGE = 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_OBJC_ROOT_CLASS = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = 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; CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_RELEASE=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; SYMROOT = "${SRCROOT}/../build"; - VALIDATE_PRODUCT = YES; }; name = Release; }; - 55BABA13E956D3055B766CB9E802D83C /* Release */ = { + 13D89D3A64BA0CE5AAFA545FC615A47E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 31D7F9C80C3FD2025331A919AA7DB283 /* TestClient.xcconfig */; + baseConfigurationReference = E0497D2F853C3C5B2D1E9A76C712024A /* TestClient.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; GCC_PREFIX_HEADER = "Target Support Files/TestClient/TestClient-prefix.pch"; INFOPLIST_FILE = "Target Support Files/TestClient/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/TestClient/TestClient.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = TestClient; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 5A920F1FCF095A15DBC53389015546B3 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E6F34CCF86067ED508C12C676E298C69 /* Alamofire.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Alamofire; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -800,130 +743,7 @@ }; name = Debug; }; - 69DDB6403E85EB592775771006821BB5 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 22BD9A116DB40454A963E70F6AF6EF9F /* Pods-TestClientApp.release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-TestClientApp/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-TestClientApp/Pods-TestClientApp.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_TestClientApp; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 7B07A0BDD831DA1C4C48E25C517BA4A8 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = EB09BADC596A8F1BDC2465074CEC2908 /* Pods-TestClientAppTests.release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-TestClientAppTests/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_TestClientAppTests; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 7D144F724433A09597E3476A57631255 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; - 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_OBJC_ROOT_CLASS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = NO; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - ONLY_ACTIVE_ARCH = YES; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; - }; - C628090453A79BB35F1D788884A26860 /* Debug */ = { + 1496497582130B1CEE77BB029E4361F5 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = AD7CCEFF0491973C176C68B2094165CE /* Pods-TestClientAppTests.debug.xcconfig */; buildSettings = { @@ -932,20 +752,16 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "Target Support Files/Pods-TestClientAppTests/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; @@ -960,7 +776,134 @@ }; name = Debug; }; - CD9AB1D906A0864035359DE551D0E8D0 /* Debug */ = { + 45FF0488AD36AF543816316790488466 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E0497D2F853C3C5B2D1E9A76C712024A /* TestClient.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/TestClient/TestClient-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/TestClient/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/TestClient/TestClient.modulemap"; + PRODUCT_NAME = TestClient; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 59F0302F2371FCC6B73EF0A418D40734 /* 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_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_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; + CODE_SIGNING_REQUIRED = NO; + 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 = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + 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; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + 7478AF8D78CF7780089F2283E457071D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 22BD9A116DB40454A963E70F6AF6EF9F /* Pods-TestClientApp.release.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-TestClientApp/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-TestClientApp/Pods-TestClientApp.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_TestClientApp; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 9F3E040EF25F31642464B49704EE1EEF /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = D9B3CA0144002E01B7C258E2AFFC5ECC /* Pods-TestClientApp.debug.xcconfig */; buildSettings = { @@ -969,20 +912,16 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "Target Support Files/Pods-TestClientApp/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-TestClientApp/Pods-TestClientApp.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; @@ -999,7 +938,7 @@ }; name = Debug; }; - E0407B57523C522425418F440403048D /* Release */ = { + B0F5F1530D3F4E518BE2B1A52F98487A /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = E6F34CCF86067ED508C12C676E298C69 /* Alamofire.xcconfig */; buildSettings = { @@ -1008,26 +947,89 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; INFOPLIST_FILE = "Target Support Files/Alamofire/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = Alamofire; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + B8CA02655A4B738D82484691EE8CA58F /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E6F34CCF86067ED508C12C676E298C69 /* Alamofire.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Alamofire/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; + PRODUCT_NAME = Alamofire; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + DE54473B4654C7A3E67A97EC6AC357FD /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = EB09BADC596A8F1BDC2465074CEC2908 /* Pods-TestClientAppTests.release.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-TestClientAppTests/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_TestClientAppTests; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -1039,8 +1041,8 @@ 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 7D144F724433A09597E3476A57631255 /* Debug */, - 1A41B15D3AA834993ADDD808FA9D8764 /* Release */, + 59F0302F2371FCC6B73EF0A418D40734 /* Debug */, + 12C4B864767C59600DBFA238F1E2F8BC /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1048,8 +1050,8 @@ 419E5D95491847CD79841B971A8A3277 /* Build configuration list for PBXNativeTarget "Alamofire" */ = { isa = XCConfigurationList; buildConfigurations = ( - 5A920F1FCF095A15DBC53389015546B3 /* Debug */, - E0407B57523C522425418F440403048D /* Release */, + B0F5F1530D3F4E518BE2B1A52F98487A /* Debug */, + B8CA02655A4B738D82484691EE8CA58F /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1057,8 +1059,8 @@ 7406BE9FE3173135FCCEDAA53E43CC15 /* Build configuration list for PBXNativeTarget "Pods-TestClientAppTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - C628090453A79BB35F1D788884A26860 /* Debug */, - 7B07A0BDD831DA1C4C48E25C517BA4A8 /* Release */, + 1496497582130B1CEE77BB029E4361F5 /* Debug */, + DE54473B4654C7A3E67A97EC6AC357FD /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1066,8 +1068,8 @@ A3C6C15D000D0C0BF929BB22D7E47460 /* Build configuration list for PBXNativeTarget "TestClient" */ = { isa = XCConfigurationList; buildConfigurations = ( - 0FDC2040BFB324AEB73B65048EBE33A3 /* Debug */, - 55BABA13E956D3055B766CB9E802D83C /* Release */, + 13D89D3A64BA0CE5AAFA545FC615A47E /* Debug */, + 45FF0488AD36AF543816316790488466 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1075,8 +1077,8 @@ D9E598D38DB1D9D64010CC46A23CB3CE /* Build configuration list for PBXNativeTarget "Pods-TestClientApp" */ = { isa = XCConfigurationList; buildConfigurations = ( - CD9AB1D906A0864035359DE551D0E8D0 /* Debug */, - 69DDB6403E85EB592775771006821BB5 /* Release */, + 9F3E040EF25F31642464B49704EE1EEF /* Debug */, + 7478AF8D78CF7780089F2283E457071D /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch index aa992a4adb2..beb2a244183 100644 --- a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch +++ b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch @@ -1,4 +1,12 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h index 02327b85e88..00014e3cd82 100644 --- a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h +++ b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h @@ -1,5 +1,13 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Alamofire/Alamofire.xcconfig b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Alamofire/Alamofire.xcconfig index 772ef0b2bca..881c8cade67 100644 --- a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Alamofire/Alamofire.xcconfig +++ b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Alamofire/Alamofire.xcconfig @@ -1,9 +1,10 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Alamofire +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Alamofire GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/Alamofire PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES diff --git a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-frameworks.sh b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-frameworks.sh index 8ab66f402e5..86721db25c0 100755 --- a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-frameworks.sh +++ b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-frameworks.sh @@ -6,6 +6,10 @@ mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then @@ -23,9 +27,9 @@ install_framework() source="$(readlink "${source}")" fi - # use filter instead of exclude so missing patterns dont' throw errors - echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" local basename basename="$(basename -s .framework "$1")" @@ -54,13 +58,36 @@ install_framework() fi } +# Copies the dSYM of a vendored framework +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}" + fi + + local basename + basename="$(basename -s .framework.dSYM "$source")" + binary="${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then + strip_invalid_archs "$binary" + fi +} + # Signs a framework with the provided identity code_sign_if_enabled() { if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then # Use the current code_sign_identitiy echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" - /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" fi } @@ -71,7 +98,7 @@ strip_invalid_archs() { archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" stripped="" for arch in $archs; do - if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place lipo -remove "$arch" -output "$binary" "$binary" || exit 1 stripped="$stripped $arch" @@ -84,10 +111,13 @@ strip_invalid_archs() { if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Alamofire/Alamofire.framework" - install_framework "$BUILT_PRODUCTS_DIR/TestClient/TestClient.framework" + install_framework "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework" + install_framework "${BUILT_PRODUCTS_DIR}/TestClient/TestClient.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Alamofire/Alamofire.framework" - install_framework "$BUILT_PRODUCTS_DIR/TestClient/TestClient.framework" + install_framework "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework" + install_framework "${BUILT_PRODUCTS_DIR}/TestClient/TestClient.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait fi diff --git a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-resources.sh b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-resources.sh index 25e9d37757f..a7df4405b65 100755 --- a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-resources.sh +++ b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-resources.sh @@ -8,6 +8,10 @@ RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt XCASSET_FILES=() +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + case "${TARGETED_DEVICE_FAMILY}" in 1,2) TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" @@ -18,6 +22,12 @@ case "${TARGETED_DEVICE_FAMILY}" in 2) TARGET_DEVICE_ARGS="--target-device ipad" ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; *) TARGET_DEVICE_ARGS="--target-device mac" ;; @@ -38,29 +48,29 @@ EOM fi case $RESOURCE_PATH in *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" ;; *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" ;; *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" ;; *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" ;; *.xcassets) @@ -68,7 +78,7 @@ EOM XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") ;; *) - echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" || true echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" ;; esac diff --git a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-umbrella.h b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-umbrella.h index 30019b809e6..1004f0f7041 100644 --- a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-umbrella.h +++ b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-umbrella.h @@ -1,5 +1,13 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp.debug.xcconfig b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp.debug.xcconfig index 50091bee159..9be06c9a7cc 100644 --- a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp.debug.xcconfig +++ b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp.debug.xcconfig @@ -1,10 +1,11 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/TestClient" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/TestClient" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/TestClient/TestClient.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/TestClient/TestClient.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "TestClient" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods diff --git a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp.release.xcconfig b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp.release.xcconfig index 50091bee159..9be06c9a7cc 100644 --- a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp.release.xcconfig +++ b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp.release.xcconfig @@ -1,10 +1,11 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/TestClient" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/TestClient" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/TestClient/TestClient.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/TestClient/TestClient.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "TestClient" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods diff --git a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-frameworks.sh b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-frameworks.sh index 893c16a6313..2e0a8a50e91 100755 --- a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-frameworks.sh +++ b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-frameworks.sh @@ -6,6 +6,10 @@ mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then @@ -23,9 +27,9 @@ install_framework() source="$(readlink "${source}")" fi - # use filter instead of exclude so missing patterns dont' throw errors - echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" local basename basename="$(basename -s .framework "$1")" @@ -54,13 +58,36 @@ install_framework() fi } +# Copies the dSYM of a vendored framework +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}" + fi + + local basename + basename="$(basename -s .framework.dSYM "$source")" + binary="${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then + strip_invalid_archs "$binary" + fi +} + # Signs a framework with the provided identity code_sign_if_enabled() { if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then # Use the current code_sign_identitiy echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" - /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" fi } @@ -71,7 +98,7 @@ strip_invalid_archs() { archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" stripped="" for arch in $archs; do - if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place lipo -remove "$arch" -output "$binary" "$binary" || exit 1 stripped="$stripped $arch" @@ -82,3 +109,6 @@ strip_invalid_archs() { fi } +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-resources.sh b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-resources.sh index 25e9d37757f..a7df4405b65 100755 --- a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-resources.sh +++ b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-resources.sh @@ -8,6 +8,10 @@ RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt XCASSET_FILES=() +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + case "${TARGETED_DEVICE_FAMILY}" in 1,2) TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" @@ -18,6 +22,12 @@ case "${TARGETED_DEVICE_FAMILY}" in 2) TARGET_DEVICE_ARGS="--target-device ipad" ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; *) TARGET_DEVICE_ARGS="--target-device mac" ;; @@ -38,29 +48,29 @@ EOM fi case $RESOURCE_PATH in *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" ;; *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" ;; *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" ;; *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" ;; *.xcassets) @@ -68,7 +78,7 @@ EOM XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") ;; *) - echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" || true echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" ;; esac diff --git a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-umbrella.h b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-umbrella.h index c4791c8d99f..f3c84c4c89d 100644 --- a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-umbrella.h +++ b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-umbrella.h @@ -1,5 +1,13 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.debug.xcconfig b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.debug.xcconfig index 5c5ceada2fa..94c3a2d2ecb 100644 --- a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.debug.xcconfig +++ b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.debug.xcconfig @@ -1,8 +1,8 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/TestClient" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/TestClient" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/TestClient/TestClient.framework/Headers" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/TestClient/TestClient.framework/Headers" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods diff --git a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.release.xcconfig b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.release.xcconfig index 5c5ceada2fa..94c3a2d2ecb 100644 --- a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.release.xcconfig +++ b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.release.xcconfig @@ -1,8 +1,8 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/TestClient" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/TestClient" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/TestClient/TestClient.framework/Headers" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/TestClient/TestClient.framework/Headers" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods diff --git a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-prefix.pch b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-prefix.pch index aa992a4adb2..beb2a244183 100644 --- a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-prefix.pch +++ b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-prefix.pch @@ -1,4 +1,12 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-umbrella.h b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-umbrella.h index 35cef55ed70..57d4c595bc8 100644 --- a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-umbrella.h +++ b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-umbrella.h @@ -1,5 +1,13 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient.xcconfig b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient.xcconfig index a586ad38851..62d33aa68fd 100644 --- a/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient.xcconfig +++ b/samples/client/test/swift4/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient.xcconfig @@ -1,10 +1,11 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/TestClient -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/TestClient +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES diff --git a/samples/client/test/swift4/default/TestClientApp/TestClientApp.xcodeproj/project.pbxproj b/samples/client/test/swift4/default/TestClientApp/TestClientApp.xcodeproj/project.pbxproj index 8c78ba2050f..fd486ac66c2 100644 --- a/samples/client/test/swift4/default/TestClientApp/TestClientApp.xcodeproj/project.pbxproj +++ b/samples/client/test/swift4/default/TestClientApp/TestClientApp.xcodeproj/project.pbxproj @@ -237,13 +237,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-TestClientAppTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; 62BEBAA42E4C522B11A8A9DA /* [CP] Copy Pods Resources */ = { @@ -297,9 +300,14 @@ files = ( ); inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/TestClient/TestClient.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TestClient.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -312,13 +320,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-TestClientApp-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ diff --git a/samples/client/test/swift4/default/TestClientApp/TestClientAppTests/TestClientAppTests.swift b/samples/client/test/swift4/default/TestClientApp/TestClientAppTests/TestClientAppTests.swift index 18dab6a8da7..7e5522ed7a5 100644 --- a/samples/client/test/swift4/default/TestClientApp/TestClientAppTests/TestClientAppTests.swift +++ b/samples/client/test/swift4/default/TestClientApp/TestClientAppTests/TestClientAppTests.swift @@ -21,7 +21,8 @@ class TestClientAppTests: XCTestCase { let jsonData = """ { "example_name": "Test example name", - "for": "Some reason" + "for": "Some reason", + "normalName": "Some normal name value" } """.data(using: .utf8)!