From eeb9149ed9cc501b42187ed84bc69bb219515aa7 Mon Sep 17 00:00:00 2001 From: Bruno Coelho <4brunu@gmail.com> Date: Wed, 2 Oct 2024 22:11:20 +0100 Subject: [PATCH] [swift6] general improvements --- .../swift6/JSONEncodingHelper.mustache | 2 +- .../src/main/resources/swift6/api.mustache | 4 +-- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 16 +++++----- .../APIs/FakeClassnameTags123API.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 4 +-- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 8 ++--- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 2 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 4 +-- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 18 +++++------ .../APIs/FakeClassnameTags123API.swift | 4 +-- .../Classes/OpenAPIs/APIs/PetAPI.swift | 6 ++-- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 4 +-- .../Classes/OpenAPIs/APIs/UserAPI.swift | 10 +++---- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 2 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 16 +++++----- .../APIs/FakeClassnameTags123API.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 4 +-- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 8 ++--- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 2 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 16 +++++----- .../APIs/FakeClassnameTags123API.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 4 +-- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 8 ++--- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 2 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 16 +++++----- .../APIs/FakeClassnameTags123API.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 4 +-- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 8 ++--- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 2 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 18 +++++------ .../APIs/FakeClassnameTags123API.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 4 +-- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 8 ++--- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 2 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 16 +++++----- .../APIs/FakeClassnameTags123API.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 4 +-- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 8 ++--- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 2 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 2 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 16 +++++----- .../APIs/FakeClassnameTags123API.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 4 +-- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 8 ++--- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 2 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 16 +++++----- .../APIs/FakeClassnameTags123API.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 4 +-- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 8 ++--- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 2 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 16 +++++----- .../APIs/FakeClassnameTags123API.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 4 +-- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 8 ++--- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 2 +- .../client/petstore/swift6/swift6_test_all.sh | 30 +++++++++---------- .../PetstoreClient/APIs/AnotherFakeAPI.swift | 2 +- .../Sources/PetstoreClient/APIs/FakeAPI.swift | 16 +++++----- .../APIs/FakeClassnameTags123API.swift | 2 +- .../Sources/PetstoreClient/APIs/PetAPI.swift | 4 +-- .../PetstoreClient/APIs/StoreAPI.swift | 2 +- .../Sources/PetstoreClient/APIs/UserAPI.swift | 8 ++--- .../PetstoreClient/JSONEncodingHelper.swift | 2 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 2 +- 82 files changed, 225 insertions(+), 225 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/swift6/JSONEncodingHelper.mustache b/modules/openapi-generator/src/main/resources/swift6/JSONEncodingHelper.mustache index 7aa0cf01a3f5..5a0cebbc7e4f 100644 --- a/modules/openapi-generator/src/main/resources/swift6/JSONEncodingHelper.mustache +++ b/modules/openapi-generator/src/main/resources/swift6/JSONEncodingHelper.mustache @@ -26,7 +26,7 @@ import Foundation return params } - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func encodingParameters(forEncodableObject encodableObj: Any?, codableHelper: CodableHelper) -> [String: Any]? { var params: [String: Any]? if let encodableObj = encodableObj { diff --git a/modules/openapi-generator/src/main/resources/swift6/api.mustache b/modules/openapi-generator/src/main/resources/swift6/api.mustache index fcc7a1901f9f..bbef6da2d8d6 100644 --- a/modules/openapi-generator/src/main/resources/swift6/api.mustache +++ b/modules/openapi-generator/src/main/resources/swift6/api.mustache @@ -24,7 +24,7 @@ extension {{projectName}}API { {{#objcCompatible}}@objcMembers {{/objcCompatible}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class {{classname}}{{#objcCompatible}} : NSObject{{/objcCompatible}} { {{^apiStaticMethod}} {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let openAPIClient: OpenAPIClient - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(openAPIClient: OpenAPIClient) { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(openAPIClient: OpenAPIClient = OpenAPIClient.shared) { self.openAPIClient = openAPIClient } {{/apiStaticMethod}} @@ -425,7 +425,7 @@ extension {{projectName}}API { let localVariableParameters = ["body": {{paramName}}] {{/isBinary}} {{^isBinary}} - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: {{paramName}}) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: {{paramName}}, codableHelper: openAPIClient.codableHelper) {{/isBinary}} {{/bodyParam}} {{^bodyParam}} diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index df26c45f809b..3383960de65f 100644 --- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -43,7 +43,7 @@ open class AnotherFakeAPI { open class func call123testSpecialTagsWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/another-fake/dummy" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index a4d26d77ffbf..989882d96b79 100644 --- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -41,7 +41,7 @@ open class FakeAPI { open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/boolean" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -85,7 +85,7 @@ open class FakeAPI { open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/composite" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -129,7 +129,7 @@ open class FakeAPI { open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/number" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -173,7 +173,7 @@ open class FakeAPI { open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/string" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -217,7 +217,7 @@ open class FakeAPI { open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/body-with-file-schema" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -262,7 +262,7 @@ open class FakeAPI { open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/body-with-query-params" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ @@ -311,7 +311,7 @@ open class FakeAPI { open class func testClientModelWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -653,7 +653,7 @@ open class FakeAPI { open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/inline-additionalProperties" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index e876206448c6..c6e49aeda8fa 100644 --- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -46,7 +46,7 @@ open class FakeClassnameTags123API { open class func testClassnameWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake_classname_test" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 0b21ae8a3039..8ad6b1970249 100644 --- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -48,7 +48,7 @@ open class PetAPI { open class func addPetWithRequestBuilder(body: Pet, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -316,7 +316,7 @@ open class PetAPI { open class func updatePetWithRequestBuilder(body: Pet, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index 7ff7396e1ab4..0e29832db781 100644 --- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -187,7 +187,7 @@ open class StoreAPI { open class func placeOrderWithRequestBuilder(body: Order, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/store/order" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index db36f2ef5f52..3e3eecc2745d 100644 --- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -43,7 +43,7 @@ open class UserAPI { open class func createUserWithRequestBuilder(body: User, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -88,7 +88,7 @@ open class UserAPI { open class func createUsersWithArrayInputWithRequestBuilder(body: [User], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user/createWithArray" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -133,7 +133,7 @@ open class UserAPI { open class func createUsersWithListInputWithRequestBuilder(body: [User], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user/createWithList" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -376,7 +376,7 @@ open class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" localVariablePath = localVariablePath.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 54426f609bcf..c64469f5f3a5 100644 --- a/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift6/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -26,7 +26,7 @@ open class JSONEncodingHelper { return params } - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + open class func encodingParameters(forEncodableObject encodableObj: Any?, codableHelper: CodableHelper) -> [String: Any]? { var params: [String: Any]? if let encodableObj = encodableObj { diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index fc3c304689e2..bf3aae3f1cec 100644 --- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -17,7 +17,7 @@ import AnyCodable open class AnotherFakeAPI { public let openAPIClient: OpenAPIClient - public init(openAPIClient: OpenAPIClient) { + public init(openAPIClient: OpenAPIClient = OpenAPIClient.shared) { self.openAPIClient = openAPIClient } @@ -135,7 +135,7 @@ open class AnotherFakeAPI { open func call123testSpecialTagsWithRequestBuilder(body: Client) -> RequestBuilder { let localVariablePath = "/another-fake/dummy" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 874113ca4ea4..8c579c245e80 100644 --- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -17,7 +17,7 @@ import AnyCodable open class FakeAPI { public let openAPIClient: OpenAPIClient - public init(openAPIClient: OpenAPIClient) { + public init(openAPIClient: OpenAPIClient = OpenAPIClient.shared) { self.openAPIClient = openAPIClient } @@ -129,7 +129,7 @@ open class FakeAPI { open func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil) -> RequestBuilder { let localVariablePath = "/fake/outer/boolean" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -252,7 +252,7 @@ open class FakeAPI { open func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder { let localVariablePath = "/fake/outer/composite" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -375,7 +375,7 @@ open class FakeAPI { open func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil) -> RequestBuilder { let localVariablePath = "/fake/outer/number" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -498,7 +498,7 @@ open class FakeAPI { open func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil) -> RequestBuilder { let localVariablePath = "/fake/outer/string" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -621,7 +621,7 @@ open class FakeAPI { open func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass) -> RequestBuilder { let localVariablePath = "/fake/body-with-file-schema" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -749,7 +749,7 @@ open class FakeAPI { open func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User) -> RequestBuilder { let localVariablePath = "/fake/body-with-query-params" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ @@ -881,7 +881,7 @@ open class FakeAPI { open func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder { let localVariablePath = "/fake" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -1655,7 +1655,7 @@ open class FakeAPI { open func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { let localVariablePath = "/fake/inline-additionalProperties" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index 5895c80c3eb8..ef974781d7b0 100644 --- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -17,7 +17,7 @@ import AnyCodable open class FakeClassnameTags123API { public let openAPIClient: OpenAPIClient - public init(openAPIClient: OpenAPIClient) { + public init(openAPIClient: OpenAPIClient = OpenAPIClient.shared) { self.openAPIClient = openAPIClient } @@ -138,7 +138,7 @@ open class FakeClassnameTags123API { open func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder { let localVariablePath = "/fake_classname_test" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 1f0d65b0cfda..cc37095a7e06 100644 --- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -17,7 +17,7 @@ import AnyCodable open class PetAPI { public let openAPIClient: OpenAPIClient - public init(openAPIClient: OpenAPIClient) { + public init(openAPIClient: OpenAPIClient = OpenAPIClient.shared) { self.openAPIClient = openAPIClient } @@ -140,7 +140,7 @@ open class PetAPI { open func addPetWithRequestBuilder(body: Pet) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -831,7 +831,7 @@ open class PetAPI { open func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index 0013ca3df68f..0cd5d40070b1 100644 --- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -17,7 +17,7 @@ import AnyCodable open class StoreAPI { public let openAPIClient: OpenAPIClient - public init(openAPIClient: OpenAPIClient) { + public init(openAPIClient: OpenAPIClient = OpenAPIClient.shared) { self.openAPIClient = openAPIClient } @@ -524,7 +524,7 @@ open class StoreAPI { open func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder { let localVariablePath = "/store/order" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index e6f98fd28519..728cb9cb90ab 100644 --- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -17,7 +17,7 @@ import AnyCodable open class UserAPI { public let openAPIClient: OpenAPIClient - public init(openAPIClient: OpenAPIClient) { + public init(openAPIClient: OpenAPIClient = OpenAPIClient.shared) { self.openAPIClient = openAPIClient } @@ -135,7 +135,7 @@ open class UserAPI { open func createUserWithRequestBuilder(body: User) -> RequestBuilder { let localVariablePath = "/user" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -263,7 +263,7 @@ open class UserAPI { open func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder { let localVariablePath = "/user/createWithArray" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -391,7 +391,7 @@ open class UserAPI { open func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder { let localVariablePath = "/user/createWithList" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -1053,7 +1053,7 @@ open class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" localVariablePath = localVariablePath.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 54426f609bcf..c64469f5f3a5 100644 --- a/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift6/apiNonStaticMethod/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -26,7 +26,7 @@ open class JSONEncodingHelper { return params } - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + open class func encodingParameters(forEncodableObject encodableObj: Any?, codableHelper: CodableHelper) -> [String: Any]? { var params: [String: Any]? if let encodableObj = encodableObj { diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 677f8102e744..f75934d2cf0f 100644 --- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -36,7 +36,7 @@ open class AnotherFakeAPI { open class func call123testSpecialTagsWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/another-fake/dummy" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 0080ba4aaa05..e2d73d47cff5 100644 --- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -34,7 +34,7 @@ open class FakeAPI { open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/boolean" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -71,7 +71,7 @@ open class FakeAPI { open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/composite" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -108,7 +108,7 @@ open class FakeAPI { open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/number" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -145,7 +145,7 @@ open class FakeAPI { open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/string" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -182,7 +182,7 @@ open class FakeAPI { open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/body-with-file-schema" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -220,7 +220,7 @@ open class FakeAPI { open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/body-with-query-params" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ @@ -262,7 +262,7 @@ open class FakeAPI { open class func testClientModelWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -576,7 +576,7 @@ open class FakeAPI { open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/inline-additionalProperties" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index dec6854d81ae..4f69142ed866 100644 --- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -39,7 +39,7 @@ open class FakeClassnameTags123API { open class func testClassnameWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake_classname_test" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 47795fb88959..16d2f32cf178 100644 --- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -41,7 +41,7 @@ open class PetAPI { open class func addPetWithRequestBuilder(body: Pet, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -274,7 +274,7 @@ open class PetAPI { open class func updatePetWithRequestBuilder(body: Pet, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index 19cb94e7f621..6098fb527011 100644 --- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -159,7 +159,7 @@ open class StoreAPI { open class func placeOrderWithRequestBuilder(body: Order, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/store/order" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index 192308ad53c7..14f1cfe43a1e 100644 --- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -36,7 +36,7 @@ open class UserAPI { open class func createUserWithRequestBuilder(body: User, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -74,7 +74,7 @@ open class UserAPI { open class func createUsersWithArrayInputWithRequestBuilder(body: [User], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user/createWithArray" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -112,7 +112,7 @@ open class UserAPI { open class func createUsersWithListInputWithRequestBuilder(body: [User], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user/createWithList" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -320,7 +320,7 @@ open class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" localVariablePath = localVariablePath.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 54426f609bcf..c64469f5f3a5 100644 --- a/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift6/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -26,7 +26,7 @@ open class JSONEncodingHelper { return params } - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + open class func encodingParameters(forEncodableObject encodableObj: Any?, codableHelper: CodableHelper) -> [String: Any]? { var params: [String: Any]? if let encodableObj = encodableObj { diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 1325863d25f1..39d2aa63610c 100644 --- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -59,7 +59,7 @@ open class AnotherFakeAPI { open class func call123testSpecialTagsWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/another-fake/dummy" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index b2a88dacd661..95d4d2a34b5c 100644 --- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -57,7 +57,7 @@ open class FakeAPI { open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/boolean" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -114,7 +114,7 @@ open class FakeAPI { open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/composite" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -171,7 +171,7 @@ open class FakeAPI { open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/number" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -228,7 +228,7 @@ open class FakeAPI { open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/string" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -285,7 +285,7 @@ open class FakeAPI { open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/body-with-file-schema" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -343,7 +343,7 @@ open class FakeAPI { open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/body-with-query-params" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ @@ -405,7 +405,7 @@ open class FakeAPI { open class func testClientModelWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -799,7 +799,7 @@ open class FakeAPI { open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/inline-additionalProperties" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index f7d8f238c394..60d9c6261795 100644 --- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -62,7 +62,7 @@ open class FakeClassnameTags123API { open class func testClassnameWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake_classname_test" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index d93b45fc6f5f..fb1339400d37 100644 --- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -64,7 +64,7 @@ open class PetAPI { open class func addPetWithRequestBuilder(body: Pet, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -397,7 +397,7 @@ open class PetAPI { open class func updatePetWithRequestBuilder(body: Pet, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index c417af6b13d5..e46f967176ff 100644 --- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -242,7 +242,7 @@ open class StoreAPI { open class func placeOrderWithRequestBuilder(body: Order, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/store/order" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index 1ee42046f958..2e56c1580a29 100644 --- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -59,7 +59,7 @@ open class UserAPI { open class func createUserWithRequestBuilder(body: User, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -117,7 +117,7 @@ open class UserAPI { open class func createUsersWithArrayInputWithRequestBuilder(body: [User], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user/createWithArray" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -175,7 +175,7 @@ open class UserAPI { open class func createUsersWithListInputWithRequestBuilder(body: [User], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user/createWithList" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -483,7 +483,7 @@ open class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" localVariablePath = localVariablePath.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 54426f609bcf..c64469f5f3a5 100644 --- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -26,7 +26,7 @@ open class JSONEncodingHelper { return params } - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + open class func encodingParameters(forEncodableObject encodableObj: Any?, codableHelper: CodableHelper) -> [String: Any]? { var params: [String: Any]? if let encodableObj = encodableObj { diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 99d954e064f6..b5e0ef44b64e 100644 --- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -57,7 +57,7 @@ open class AnotherFakeAPI { open class func call123testSpecialTagsWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/another-fake/dummy" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 92dfdd6a4bda..56478f2873ba 100644 --- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -55,7 +55,7 @@ open class FakeAPI { open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/boolean" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -110,7 +110,7 @@ open class FakeAPI { open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/composite" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -165,7 +165,7 @@ open class FakeAPI { open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/number" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -220,7 +220,7 @@ open class FakeAPI { open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/string" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -275,7 +275,7 @@ open class FakeAPI { open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/body-with-file-schema" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -331,7 +331,7 @@ open class FakeAPI { open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/body-with-query-params" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ @@ -391,7 +391,7 @@ open class FakeAPI { open class func testClientModelWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -777,7 +777,7 @@ open class FakeAPI { open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/inline-additionalProperties" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index ce125b95f05e..5686a291b001 100644 --- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -60,7 +60,7 @@ open class FakeClassnameTags123API { open class func testClassnameWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake_classname_test" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index de6c5cfb121d..030a14db32cc 100644 --- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -62,7 +62,7 @@ open class PetAPI { open class func addPetWithRequestBuilder(body: Pet, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -385,7 +385,7 @@ open class PetAPI { open class func updatePetWithRequestBuilder(body: Pet, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index c0d15623b192..d16fcf686e62 100644 --- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -234,7 +234,7 @@ open class StoreAPI { open class func placeOrderWithRequestBuilder(body: Order, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/store/order" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index bf4d2a46745a..2b86effbe175 100644 --- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -57,7 +57,7 @@ open class UserAPI { open class func createUserWithRequestBuilder(body: User, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -113,7 +113,7 @@ open class UserAPI { open class func createUsersWithArrayInputWithRequestBuilder(body: [User], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user/createWithArray" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -169,7 +169,7 @@ open class UserAPI { open class func createUsersWithListInputWithRequestBuilder(body: [User], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user/createWithList" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -467,7 +467,7 @@ open class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" localVariablePath = localVariablePath.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 54426f609bcf..c64469f5f3a5 100644 --- a/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift6/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -26,7 +26,7 @@ open class JSONEncodingHelper { return params } - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + open class func encodingParameters(forEncodableObject encodableObj: Any?, codableHelper: CodableHelper) -> [String: Any]? { var params: [String: Any]? if let encodableObj = encodableObj { diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index cbc03839d3bc..8695f2c9c28b 100644 --- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -45,7 +45,7 @@ open class AnotherFakeAPI { open class func call123testSpecialTagsWithRequestBuilder(uuidTest: UUID, body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/another-fake/dummy" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 7256079c3a94..4379225cd798 100644 --- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -43,7 +43,7 @@ open class FakeAPI { open class func createXmlItemWithRequestBuilder(xmlItem: XmlItem, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/create_xml_item" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: xmlItem) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: xmlItem, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -87,7 +87,7 @@ open class FakeAPI { open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/boolean" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -131,7 +131,7 @@ open class FakeAPI { open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/composite" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -175,7 +175,7 @@ open class FakeAPI { open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/number" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -219,7 +219,7 @@ open class FakeAPI { open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/string" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -263,7 +263,7 @@ open class FakeAPI { open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/body-with-file-schema" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -308,7 +308,7 @@ open class FakeAPI { open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/body-with-query-params" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ @@ -357,7 +357,7 @@ open class FakeAPI { open class func testClientModelWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -699,7 +699,7 @@ open class FakeAPI { open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/inline-additionalProperties" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index e876206448c6..c6e49aeda8fa 100644 --- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -46,7 +46,7 @@ open class FakeClassnameTags123API { open class func testClassnameWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake_classname_test" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index d393a8d9152a..9f6fe2424193 100644 --- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -45,7 +45,7 @@ open class PetAPI { open class func addPetWithRequestBuilder(body: Pet, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -313,7 +313,7 @@ open class PetAPI { open class func updatePetWithRequestBuilder(body: Pet, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index 7ff7396e1ab4..0e29832db781 100644 --- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -187,7 +187,7 @@ open class StoreAPI { open class func placeOrderWithRequestBuilder(body: Order, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/store/order" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index db36f2ef5f52..3e3eecc2745d 100644 --- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -43,7 +43,7 @@ open class UserAPI { open class func createUserWithRequestBuilder(body: User, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -88,7 +88,7 @@ open class UserAPI { open class func createUsersWithArrayInputWithRequestBuilder(body: [User], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user/createWithArray" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -133,7 +133,7 @@ open class UserAPI { open class func createUsersWithListInputWithRequestBuilder(body: [User], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user/createWithList" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -376,7 +376,7 @@ open class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" localVariablePath = localVariablePath.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 54426f609bcf..c64469f5f3a5 100644 --- a/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift6/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -26,7 +26,7 @@ open class JSONEncodingHelper { return params } - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + open class func encodingParameters(forEncodableObject encodableObj: Any?, codableHelper: CodableHelper) -> [String: Any]? { var params: [String: Any]? if let encodableObj = encodableObj { diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 11f2ed18ca5c..45268eb734dc 100644 --- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -43,7 +43,7 @@ import AnyCodable open class func call123testSpecialTagsWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/another-fake/dummy" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index a65c8808e538..da7e8c5d4474 100644 --- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -41,7 +41,7 @@ import AnyCodable open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/boolean" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -85,7 +85,7 @@ import AnyCodable open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/composite" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -129,7 +129,7 @@ import AnyCodable open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/number" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -173,7 +173,7 @@ import AnyCodable open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/string" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -217,7 +217,7 @@ import AnyCodable open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/body-with-file-schema" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -262,7 +262,7 @@ import AnyCodable open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/body-with-query-params" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ @@ -311,7 +311,7 @@ import AnyCodable open class func testClientModelWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -653,7 +653,7 @@ import AnyCodable open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/inline-additionalProperties" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index 5bda0a5ded75..7ac1aef18166 100644 --- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -46,7 +46,7 @@ import AnyCodable open class func testClassnameWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake_classname_test" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 19d55bd995db..9ffa65a9d7db 100644 --- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -48,7 +48,7 @@ import AnyCodable open class func addPetWithRequestBuilder(body: Pet, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -316,7 +316,7 @@ import AnyCodable open class func updatePetWithRequestBuilder(body: Pet, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index cd6d454e90f0..5ac762544ce4 100644 --- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -187,7 +187,7 @@ import AnyCodable open class func placeOrderWithRequestBuilder(body: Order, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/store/order" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index 377b6403f505..f524b73a35bf 100644 --- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -43,7 +43,7 @@ import AnyCodable open class func createUserWithRequestBuilder(body: User, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -88,7 +88,7 @@ import AnyCodable open class func createUsersWithArrayInputWithRequestBuilder(body: [User], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user/createWithArray" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -133,7 +133,7 @@ import AnyCodable open class func createUsersWithListInputWithRequestBuilder(body: [User], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user/createWithList" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -376,7 +376,7 @@ import AnyCodable let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" localVariablePath = localVariablePath.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 54426f609bcf..c64469f5f3a5 100644 --- a/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift6/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -26,7 +26,7 @@ open class JSONEncodingHelper { return params } - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + open class func encodingParameters(forEncodableObject encodableObj: Any?, codableHelper: CodableHelper) -> [String: Any]? { var params: [String: Any]? if let encodableObj = encodableObj { diff --git a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 54426f609bcf..c64469f5f3a5 100644 --- a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -26,7 +26,7 @@ open class JSONEncodingHelper { return params } - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + open class func encodingParameters(forEncodableObject encodableObj: Any?, codableHelper: CodableHelper) -> [String: Any]? { var params: [String: Any]? if let encodableObj = encodableObj { diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index ec590f15e240..73f70decde36 100644 --- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -45,7 +45,7 @@ open class AnotherFakeAPI { open class func call123testSpecialTagsWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/another-fake/dummy" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index aeff64c7b6a1..5b93b45d5302 100644 --- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -43,7 +43,7 @@ open class FakeAPI { open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/boolean" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -88,7 +88,7 @@ open class FakeAPI { open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/composite" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -133,7 +133,7 @@ open class FakeAPI { open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/number" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -178,7 +178,7 @@ open class FakeAPI { open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/string" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -223,7 +223,7 @@ open class FakeAPI { open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/body-with-file-schema" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -269,7 +269,7 @@ open class FakeAPI { open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/body-with-query-params" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ @@ -319,7 +319,7 @@ open class FakeAPI { open class func testClientModelWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -665,7 +665,7 @@ open class FakeAPI { open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/inline-additionalProperties" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index a96fa9bd78ac..036a48df1b29 100644 --- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -48,7 +48,7 @@ open class FakeClassnameTags123API { open class func testClassnameWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake_classname_test" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 3cfa5869537f..ecd79b343cf5 100644 --- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -50,7 +50,7 @@ open class PetAPI { open class func addPetWithRequestBuilder(body: Pet, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -323,7 +323,7 @@ open class PetAPI { open class func updatePetWithRequestBuilder(body: Pet, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index d0fb121aac32..f87f893e04d6 100644 --- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -192,7 +192,7 @@ open class StoreAPI { open class func placeOrderWithRequestBuilder(body: Order, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/store/order" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index a5c8094315ad..63fc8dfcae91 100644 --- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -45,7 +45,7 @@ open class UserAPI { open class func createUserWithRequestBuilder(body: User, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -91,7 +91,7 @@ open class UserAPI { open class func createUsersWithArrayInputWithRequestBuilder(body: [User], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user/createWithArray" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -137,7 +137,7 @@ open class UserAPI { open class func createUsersWithListInputWithRequestBuilder(body: [User], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user/createWithList" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -385,7 +385,7 @@ open class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" localVariablePath = localVariablePath.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 54426f609bcf..c64469f5f3a5 100644 --- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -26,7 +26,7 @@ open class JSONEncodingHelper { return params } - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + open class func encodingParameters(forEncodableObject encodableObj: Any?, codableHelper: CodableHelper) -> [String: Any]? { var params: [String: Any]? if let encodableObj = encodableObj { diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 3b08201cd794..a115c97f36ab 100644 --- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -43,7 +43,7 @@ internal class AnotherFakeAPI { internal class func call123testSpecialTagsWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/another-fake/dummy" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 425ebfaa8658..4b008f8ecd7e 100644 --- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -41,7 +41,7 @@ internal class FakeAPI { internal class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/boolean" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -85,7 +85,7 @@ internal class FakeAPI { internal class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/composite" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -129,7 +129,7 @@ internal class FakeAPI { internal class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/number" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -173,7 +173,7 @@ internal class FakeAPI { internal class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/string" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -217,7 +217,7 @@ internal class FakeAPI { internal class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/body-with-file-schema" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -262,7 +262,7 @@ internal class FakeAPI { internal class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/body-with-query-params" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ @@ -311,7 +311,7 @@ internal class FakeAPI { internal class func testClientModelWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -653,7 +653,7 @@ internal class FakeAPI { internal class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/inline-additionalProperties" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index bbe4c52efc1b..bcca984513a7 100644 --- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -46,7 +46,7 @@ internal class FakeClassnameTags123API { internal class func testClassnameWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake_classname_test" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 7e642ec4a41e..e365abf5a91a 100644 --- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -48,7 +48,7 @@ internal class PetAPI { internal class func addPetWithRequestBuilder(body: Pet, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -316,7 +316,7 @@ internal class PetAPI { internal class func updatePetWithRequestBuilder(body: Pet, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index 14aa03c91f2c..19586157e8a7 100644 --- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -187,7 +187,7 @@ internal class StoreAPI { internal class func placeOrderWithRequestBuilder(body: Order, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/store/order" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index 2e1a46b289ac..9ccea7a3c705 100644 --- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -43,7 +43,7 @@ internal class UserAPI { internal class func createUserWithRequestBuilder(body: User, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -88,7 +88,7 @@ internal class UserAPI { internal class func createUsersWithArrayInputWithRequestBuilder(body: [User], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user/createWithArray" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -133,7 +133,7 @@ internal class UserAPI { internal class func createUsersWithListInputWithRequestBuilder(body: [User], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user/createWithList" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -376,7 +376,7 @@ internal class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" localVariablePath = localVariablePath.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index ebe19db28c05..34e6d115035e 100644 --- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -26,7 +26,7 @@ internal class JSONEncodingHelper { return params } - internal class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + internal class func encodingParameters(forEncodableObject encodableObj: Any?, codableHelper: CodableHelper) -> [String: Any]? { var params: [String: Any]? if let encodableObj = encodableObj { diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 2f0efd1ed6e7..783c92710796 100644 --- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -50,7 +50,7 @@ open class AnotherFakeAPI { open class func call123testSpecialTagsWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/another-fake/dummy" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index def8b4bac163..8df021eb2712 100644 --- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -48,7 +48,7 @@ open class FakeAPI { open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/boolean" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -98,7 +98,7 @@ open class FakeAPI { open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/composite" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -148,7 +148,7 @@ open class FakeAPI { open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/number" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -198,7 +198,7 @@ open class FakeAPI { open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/string" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -248,7 +248,7 @@ open class FakeAPI { open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/body-with-file-schema" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -299,7 +299,7 @@ open class FakeAPI { open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/body-with-query-params" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ @@ -354,7 +354,7 @@ open class FakeAPI { open class func testClientModelWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -720,7 +720,7 @@ open class FakeAPI { open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/inline-additionalProperties" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index 137cf79e8ff0..a770c9995deb 100644 --- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -53,7 +53,7 @@ open class FakeClassnameTags123API { open class func testClassnameWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake_classname_test" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index a1f1212f5250..80c71e0f5f40 100644 --- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -55,7 +55,7 @@ open class PetAPI { open class func addPetWithRequestBuilder(body: Pet, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -353,7 +353,7 @@ open class PetAPI { open class func updatePetWithRequestBuilder(body: Pet, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index 095aa7f72cdf..607723b73974 100644 --- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -212,7 +212,7 @@ open class StoreAPI { open class func placeOrderWithRequestBuilder(body: Order, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/store/order" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index 50d745ea906c..87c897d330ad 100644 --- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -50,7 +50,7 @@ open class UserAPI { open class func createUserWithRequestBuilder(body: User, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -101,7 +101,7 @@ open class UserAPI { open class func createUsersWithArrayInputWithRequestBuilder(body: [User], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user/createWithArray" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -152,7 +152,7 @@ open class UserAPI { open class func createUsersWithListInputWithRequestBuilder(body: [User], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user/createWithList" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -425,7 +425,7 @@ open class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" localVariablePath = localVariablePath.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 54426f609bcf..c64469f5f3a5 100644 --- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -26,7 +26,7 @@ open class JSONEncodingHelper { return params } - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + open class func encodingParameters(forEncodableObject encodableObj: Any?, codableHelper: CodableHelper) -> [String: Any]? { var params: [String: Any]? if let encodableObj = encodableObj { diff --git a/samples/client/petstore/swift6/swift6_test_all.sh b/samples/client/petstore/swift6/swift6_test_all.sh index 153de8f9964b..71fb4462253a 100755 --- a/samples/client/petstore/swift6/swift6_test_all.sh +++ b/samples/client/petstore/swift6/swift6_test_all.sh @@ -4,10 +4,10 @@ set -e DIRECTORY=`dirname $0` # example project with unit tests -# (cd $DIRECTORY/alamofireLibrary/SwaggerClientTests/ && ./run_xcodebuild.sh) -# (cd $DIRECTORY/apiNonStaticMethod/SwaggerClientTests/ && ./run_xcodebuild.sh) +(cd $DIRECTORY/alamofireLibrary/SwaggerClientTests/ && ./run_xcodebuild.sh) +(cd $DIRECTORY/apiNonStaticMethod/SwaggerClientTests/ && ./run_xcodebuild.sh) (cd $DIRECTORY/asyncAwaitLibrary/SwaggerClientTests/ && ./run_xcodebuild.sh) -# (cd $DIRECTORY/combineLibrary/SwaggerClientTests/ && ./run_xcodebuild.sh) +(cd $DIRECTORY/combineLibrary/SwaggerClientTests/ && ./run_xcodebuild.sh) (cd $DIRECTORY/combineDeferredLibrary/SwaggerClientTests/ && ./run_xcodebuild.sh) (cd $DIRECTORY/default/SwaggerClientTests/ && ./run_xcodebuild.sh) (cd $DIRECTORY/promisekitLibrary/SwaggerClientTests/ && ./run_xcodebuild.sh) @@ -15,17 +15,17 @@ DIRECTORY=`dirname $0` (cd $DIRECTORY/urlsessionLibrary/SwaggerClientTests/ && ./run_xcodebuild.sh) # spm build -# (cd $DIRECTORY/alamofireLibrary/ && ./run_spmbuild.sh) -# (cd $DIRECTORY/apiNonStaticMethod/ && ./run_spmbuild.sh) -# (cd $DIRECTORY/asyncAwaitLibrary/ && ./run_spmbuild.sh) -# (cd $DIRECTORY/combineLibrary/ && ./run_spmbuild.sh) -# (cd $DIRECTORY/combineDeferredLibrary/ && ./run_spmbuild.sh) -# (cd $DIRECTORY/default/ && ./run_spmbuild.sh) -# (cd $DIRECTORY/objcCompatible/ && ./run_spmbuild.sh) -# (cd $DIRECTORY/oneOf/ && ./run_spmbuild.sh) -# (cd $DIRECTORY/promisekitLibrary/ && ./run_spmbuild.sh) -# (cd $DIRECTORY/resultLibrary/ && ./run_spmbuild.sh) -# (cd $DIRECTORY/rxswiftLibrary/ && ./run_spmbuild.sh) -# (cd $DIRECTORY/urlsessionLibrary/ && ./run_spmbuild.sh) +(cd $DIRECTORY/alamofireLibrary/ && ./run_spmbuild.sh) +(cd $DIRECTORY/apiNonStaticMethod/ && ./run_spmbuild.sh) +(cd $DIRECTORY/asyncAwaitLibrary/ && ./run_spmbuild.sh) +(cd $DIRECTORY/combineLibrary/ && ./run_spmbuild.sh) +(cd $DIRECTORY/combineDeferredLibrary/ && ./run_spmbuild.sh) +(cd $DIRECTORY/default/ && ./run_spmbuild.sh) +(cd $DIRECTORY/objcCompatible/ && ./run_spmbuild.sh) +(cd $DIRECTORY/oneOf/ && ./run_spmbuild.sh) +(cd $DIRECTORY/promisekitLibrary/ && ./run_spmbuild.sh) +(cd $DIRECTORY/resultLibrary/ && ./run_spmbuild.sh) +(cd $DIRECTORY/rxswiftLibrary/ && ./run_spmbuild.sh) +(cd $DIRECTORY/urlsessionLibrary/ && ./run_spmbuild.sh) # #(cd $DIRECTORY/vaporLibrary/ && ./run_spmbuild.sh) diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift index 16cde0a70611..cf6b31f47c9a 100644 --- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift @@ -46,7 +46,7 @@ open class AnotherFakeAPI { open class func call123testSpecialTagsWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/another-fake/dummy" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift index 10053e8b308a..65b100a7ce03 100644 --- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift @@ -44,7 +44,7 @@ open class FakeAPI { open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/boolean" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -88,7 +88,7 @@ open class FakeAPI { open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/composite" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -132,7 +132,7 @@ open class FakeAPI { open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/number" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -176,7 +176,7 @@ open class FakeAPI { open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/outer/string" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -220,7 +220,7 @@ open class FakeAPI { open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/body-with-file-schema" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -265,7 +265,7 @@ open class FakeAPI { open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/body-with-query-params" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) var localVariableUrlComponents = URLComponents(string: localVariableURLString) localVariableUrlComponents?.queryItems = APIHelper.mapValuesToQueryItems([ @@ -314,7 +314,7 @@ open class FakeAPI { open class func testClientModelWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -656,7 +656,7 @@ open class FakeAPI { open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake/inline-additionalProperties" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeClassnameTags123API.swift index 76fd5709fcd8..09182e3342a9 100644 --- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeClassnameTags123API.swift @@ -49,7 +49,7 @@ open class FakeClassnameTags123API { open class func testClassnameWithRequestBuilder(body: Client, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/fake_classname_test" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/PetAPI.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/PetAPI.swift index 4851756643a4..938ecc0c8d36 100644 --- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/PetAPI.swift +++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/PetAPI.swift @@ -51,7 +51,7 @@ open class PetAPI { open class func addPetWithRequestBuilder(body: Pet, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -319,7 +319,7 @@ open class PetAPI { open class func updatePetWithRequestBuilder(body: Pet, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/pet" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift index 224c9f323fe4..fc4de9515ac2 100644 --- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift @@ -190,7 +190,7 @@ open class StoreAPI { open class func placeOrderWithRequestBuilder(body: Order, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/store/order" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/UserAPI.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/UserAPI.swift index a8bf1563e528..67a07957c6aa 100644 --- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/UserAPI.swift +++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/APIs/UserAPI.swift @@ -46,7 +46,7 @@ open class UserAPI { open class func createUserWithRequestBuilder(body: User, openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -91,7 +91,7 @@ open class UserAPI { open class func createUsersWithArrayInputWithRequestBuilder(body: [User], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user/createWithArray" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -136,7 +136,7 @@ open class UserAPI { open class func createUsersWithListInputWithRequestBuilder(body: [User], openAPIClient: OpenAPIClient = OpenAPIClient.shared) -> RequestBuilder { let localVariablePath = "/user/createWithList" let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) @@ -379,7 +379,7 @@ open class UserAPI { let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" localVariablePath = localVariablePath.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) let localVariableURLString = openAPIClient.basePath + localVariablePath - let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body, codableHelper: openAPIClient.codableHelper) let localVariableUrlComponents = URLComponents(string: localVariableURLString) diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/JSONEncodingHelper.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/JSONEncodingHelper.swift index 54426f609bcf..c64469f5f3a5 100644 --- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/JSONEncodingHelper.swift @@ -26,7 +26,7 @@ open class JSONEncodingHelper { return params } - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + open class func encodingParameters(forEncodableObject encodableObj: Any?, codableHelper: CodableHelper) -> [String: Any]? { var params: [String: Any]? if let encodableObj = encodableObj { diff --git a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 54426f609bcf..c64469f5f3a5 100644 --- a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -26,7 +26,7 @@ open class JSONEncodingHelper { return params } - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + open class func encodingParameters(forEncodableObject encodableObj: Any?, codableHelper: CodableHelper) -> [String: Any]? { var params: [String: Any]? if let encodableObj = encodableObj {