diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java index 108537c15f7..2bdd7922c70 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java @@ -217,7 +217,7 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig typeMapping.put("ByteArray", "Data"); typeMapping.put("UUID", "UUID"); typeMapping.put("URI", "String"); - typeMapping.put("BigDecimal", "Decimal"); + typeMapping.put("decimal", "Decimal"); typeMapping.put("object", "Any"); typeMapping.put("AnyType", "Any"); diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md index d0ab705d4e4..ed46bf129f2 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md @@ -228,7 +228,7 @@ For this test, the body for this request much reference a schema named `File`. // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | +let body = FileSchemaTestClass(file: {...}, files: [{...}]) // FileSchemaTestClass | FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in guard error == nil else { diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/alamofireLibrary/docs/PetAPI.md index 27efe083347..2dd5a7450ac 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/docs/PetAPI.md +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/PetAPI.md @@ -27,7 +27,7 @@ Add a new pet to the store // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let body = Pet(id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // Add a new pet to the store PetAPI.addPet(body: body) { (response, error) in @@ -275,7 +275,7 @@ Update an existing pet // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let body = Pet(id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // Update an existing pet PetAPI.updatePet(body: body) { (response, error) in diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index aa169c152cd..8bbaba9b4d9 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -244,12 +244,12 @@ open class URLSessionRequestBuilder: RequestBuilder { } open func buildHeaders() -> [String: String] { - var httpHeaders: [String : String] = [:] + var httpHeaders: [String: String] = [:] for (key, value) in self.headers { httpHeaders[key] = value } for (key, value) in PetstoreClientAPI.customHeaders { - httpHeaders[key] = value + httpHeaders[key] = value } return httpHeaders } diff --git a/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md index d0ab705d4e4..ed46bf129f2 100644 --- a/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md @@ -228,7 +228,7 @@ For this test, the body for this request much reference a schema named `File`. // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | +let body = FileSchemaTestClass(file: {...}, files: [{...}]) // FileSchemaTestClass | FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in guard error == nil else { diff --git a/samples/client/petstore/swift5/combineLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/combineLibrary/docs/PetAPI.md index 27efe083347..2dd5a7450ac 100644 --- a/samples/client/petstore/swift5/combineLibrary/docs/PetAPI.md +++ b/samples/client/petstore/swift5/combineLibrary/docs/PetAPI.md @@ -27,7 +27,7 @@ Add a new pet to the store // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let body = Pet(id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // Add a new pet to the store PetAPI.addPet(body: body) { (response, error) in @@ -275,7 +275,7 @@ Update an existing pet // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let body = Pet(id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // Update an existing pet PetAPI.updatePet(body: body) { (response, error) in diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index aa169c152cd..8bbaba9b4d9 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -244,12 +244,12 @@ open class URLSessionRequestBuilder: RequestBuilder { } open func buildHeaders() -> [String: String] { - var httpHeaders: [String : String] = [:] + var httpHeaders: [String: String] = [:] for (key, value) in self.headers { httpHeaders[key] = value } for (key, value) in PetstoreClientAPI.customHeaders { - httpHeaders[key] = value + httpHeaders[key] = value } return httpHeaders } diff --git a/samples/client/petstore/swift5/default/docs/FakeAPI.md b/samples/client/petstore/swift5/default/docs/FakeAPI.md index d0ab705d4e4..ed46bf129f2 100644 --- a/samples/client/petstore/swift5/default/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/default/docs/FakeAPI.md @@ -228,7 +228,7 @@ For this test, the body for this request much reference a schema named `File`. // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | +let body = FileSchemaTestClass(file: {...}, files: [{...}]) // FileSchemaTestClass | FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in guard error == nil else { diff --git a/samples/client/petstore/swift5/default/docs/PetAPI.md b/samples/client/petstore/swift5/default/docs/PetAPI.md index 27efe083347..2dd5a7450ac 100644 --- a/samples/client/petstore/swift5/default/docs/PetAPI.md +++ b/samples/client/petstore/swift5/default/docs/PetAPI.md @@ -27,7 +27,7 @@ Add a new pet to the store // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let body = Pet(id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // Add a new pet to the store PetAPI.addPet(body: body) { (response, error) in @@ -275,7 +275,7 @@ Update an existing pet // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let body = Pet(id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // Update an existing pet PetAPI.updatePet(body: body) { (response, error) in diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index aa169c152cd..8bbaba9b4d9 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -244,12 +244,12 @@ open class URLSessionRequestBuilder: RequestBuilder { } open func buildHeaders() -> [String: String] { - var httpHeaders: [String : String] = [:] + var httpHeaders: [String: String] = [:] for (key, value) in self.headers { httpHeaders[key] = value } for (key, value) in PetstoreClientAPI.customHeaders { - httpHeaders[key] = value + httpHeaders[key] = value } return httpHeaders } diff --git a/samples/client/petstore/swift5/deprecated/docs/PetAPI.md b/samples/client/petstore/swift5/deprecated/docs/PetAPI.md index 3dd17482479..275f52381d1 100644 --- a/samples/client/petstore/swift5/deprecated/docs/PetAPI.md +++ b/samples/client/petstore/swift5/deprecated/docs/PetAPI.md @@ -26,7 +26,7 @@ Add a new pet to the store // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let pet = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let pet = Pet(id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // Add a new pet to the store PetAPI.addPet(pet: pet) { (response, error) in @@ -274,7 +274,7 @@ Update an existing pet // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let pet = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let pet = Pet(id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // Update an existing pet PetAPI.updatePet(pet: pet) { (response, error) in diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 60780b0baa8..a165d52ff06 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -244,12 +244,12 @@ internal class URLSessionRequestBuilder: RequestBuilder { } internal func buildHeaders() -> [String: String] { - var httpHeaders: [String : String] = [:] + var httpHeaders: [String: String] = [:] for (key, value) in self.headers { httpHeaders[key] = value } for (key, value) in PetstoreClientAPI.customHeaders { - httpHeaders[key] = value + httpHeaders[key] = value } return httpHeaders } diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md b/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md index dd2d871bca8..7e8f60150ed 100644 --- a/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md @@ -228,7 +228,7 @@ For this test, the body for this request much reference a schema named `File`. // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | +let body = FileSchemaTestClass(file: {...}, files: [{...}]) // FileSchemaTestClass | FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in guard error == nil else { diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/PetAPI.md b/samples/client/petstore/swift5/nonPublicApi/docs/PetAPI.md index 8fd9872c0e9..2082183fe88 100644 --- a/samples/client/petstore/swift5/nonPublicApi/docs/PetAPI.md +++ b/samples/client/petstore/swift5/nonPublicApi/docs/PetAPI.md @@ -27,7 +27,7 @@ Add a new pet to the store // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let body = Pet(id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // Add a new pet to the store PetAPI.addPet(body: body) { (response, error) in @@ -275,7 +275,7 @@ Update an existing pet // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let body = Pet(id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // Update an existing pet PetAPI.updatePet(body: body) { (response, error) in diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index aa169c152cd..8bbaba9b4d9 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -244,12 +244,12 @@ open class URLSessionRequestBuilder: RequestBuilder { } open func buildHeaders() -> [String: String] { - var httpHeaders: [String : String] = [:] + var httpHeaders: [String: String] = [:] for (key, value) in self.headers { httpHeaders[key] = value } for (key, value) in PetstoreClientAPI.customHeaders { - httpHeaders[key] = value + httpHeaders[key] = value } return httpHeaders } diff --git a/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md b/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md index f7faf3aa2aa..21f69e55675 100644 --- a/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md @@ -228,7 +228,7 @@ For this test, the body for this request much reference a schema named `File`. // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | +let body = FileSchemaTestClass(file: {...}, files: [{...}]) // FileSchemaTestClass | FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in guard error == nil else { diff --git a/samples/client/petstore/swift5/objcCompatible/docs/PetAPI.md b/samples/client/petstore/swift5/objcCompatible/docs/PetAPI.md index c03e60bc084..42dba2ade78 100644 --- a/samples/client/petstore/swift5/objcCompatible/docs/PetAPI.md +++ b/samples/client/petstore/swift5/objcCompatible/docs/PetAPI.md @@ -27,7 +27,7 @@ Add a new pet to the store // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = Pet(_id: 123, category: Category(_id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(_id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let body = Pet(_id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // Add a new pet to the store PetAPI.addPet(body: body) { (response, error) in @@ -275,7 +275,7 @@ Update an existing pet // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = Pet(_id: 123, category: Category(_id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(_id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let body = Pet(_id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // Update an existing pet PetAPI.updatePet(body: body) { (response, error) in diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index aa169c152cd..8bbaba9b4d9 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -244,12 +244,12 @@ open class URLSessionRequestBuilder: RequestBuilder { } open func buildHeaders() -> [String: String] { - var httpHeaders: [String : String] = [:] + var httpHeaders: [String: String] = [:] for (key, value) in self.headers { httpHeaders[key] = value } for (key, value) in PetstoreClientAPI.customHeaders { - httpHeaders[key] = value + httpHeaders[key] = value } return httpHeaders } diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md index 5519037c52c..14814dba782 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md @@ -216,7 +216,7 @@ For this test, the body for this request much reference a schema named `File`. // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | +let body = FileSchemaTestClass(file: {...}, files: [{...}]) // FileSchemaTestClass | FakeAPI.testBodyWithFileSchema(body: body).then { // when the promise is fulfilled diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/promisekitLibrary/docs/PetAPI.md index e767ea772f8..6f7c03c5a0d 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/docs/PetAPI.md +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/PetAPI.md @@ -27,7 +27,7 @@ Add a new pet to the store // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let body = Pet(id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // Add a new pet to the store PetAPI.addPet(body: body).then { @@ -260,7 +260,7 @@ Update an existing pet // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let body = Pet(id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // Update an existing pet PetAPI.updatePet(body: body).then { diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index aa169c152cd..8bbaba9b4d9 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -244,12 +244,12 @@ open class URLSessionRequestBuilder: RequestBuilder { } open func buildHeaders() -> [String: String] { - var httpHeaders: [String : String] = [:] + var httpHeaders: [String: String] = [:] for (key, value) in self.headers { httpHeaders[key] = value } for (key, value) in PetstoreClientAPI.customHeaders { - httpHeaders[key] = value + httpHeaders[key] = value } return httpHeaders } diff --git a/samples/client/petstore/swift5/readonlyProperties/docs/FakeAPI.md b/samples/client/petstore/swift5/readonlyProperties/docs/FakeAPI.md index d0ab705d4e4..ed46bf129f2 100644 --- a/samples/client/petstore/swift5/readonlyProperties/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/readonlyProperties/docs/FakeAPI.md @@ -228,7 +228,7 @@ For this test, the body for this request much reference a schema named `File`. // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | +let body = FileSchemaTestClass(file: {...}, files: [{...}]) // FileSchemaTestClass | FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in guard error == nil else { diff --git a/samples/client/petstore/swift5/readonlyProperties/docs/PetAPI.md b/samples/client/petstore/swift5/readonlyProperties/docs/PetAPI.md index 27efe083347..2dd5a7450ac 100644 --- a/samples/client/petstore/swift5/readonlyProperties/docs/PetAPI.md +++ b/samples/client/petstore/swift5/readonlyProperties/docs/PetAPI.md @@ -27,7 +27,7 @@ Add a new pet to the store // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let body = Pet(id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // Add a new pet to the store PetAPI.addPet(body: body) { (response, error) in @@ -275,7 +275,7 @@ Update an existing pet // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let body = Pet(id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // Update an existing pet PetAPI.updatePet(body: body) { (response, error) in diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index aa169c152cd..8bbaba9b4d9 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -244,12 +244,12 @@ open class URLSessionRequestBuilder: RequestBuilder { } open func buildHeaders() -> [String: String] { - var httpHeaders: [String : String] = [:] + var httpHeaders: [String: String] = [:] for (key, value) in self.headers { httpHeaders[key] = value } for (key, value) in PetstoreClientAPI.customHeaders { - httpHeaders[key] = value + httpHeaders[key] = value } return httpHeaders } diff --git a/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md index d0ab705d4e4..ed46bf129f2 100644 --- a/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md @@ -228,7 +228,7 @@ For this test, the body for this request much reference a schema named `File`. // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | +let body = FileSchemaTestClass(file: {...}, files: [{...}]) // FileSchemaTestClass | FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in guard error == nil else { diff --git a/samples/client/petstore/swift5/resultLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/resultLibrary/docs/PetAPI.md index 27efe083347..2dd5a7450ac 100644 --- a/samples/client/petstore/swift5/resultLibrary/docs/PetAPI.md +++ b/samples/client/petstore/swift5/resultLibrary/docs/PetAPI.md @@ -27,7 +27,7 @@ Add a new pet to the store // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let body = Pet(id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // Add a new pet to the store PetAPI.addPet(body: body) { (response, error) in @@ -275,7 +275,7 @@ Update an existing pet // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let body = Pet(id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // Update an existing pet PetAPI.updatePet(body: body) { (response, error) in diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index aa169c152cd..8bbaba9b4d9 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -244,12 +244,12 @@ open class URLSessionRequestBuilder: RequestBuilder { } open func buildHeaders() -> [String: String] { - var httpHeaders: [String : String] = [:] + var httpHeaders: [String: String] = [:] for (key, value) in self.headers { httpHeaders[key] = value } for (key, value) in PetstoreClientAPI.customHeaders { - httpHeaders[key] = value + httpHeaders[key] = value } return httpHeaders } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md index aae8b34423b..fe2d42f266b 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md @@ -192,7 +192,7 @@ For this test, the body for this request much reference a schema named `File`. // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | +let body = FileSchemaTestClass(file: {...}, files: [{...}]) // FileSchemaTestClass | // TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new ``` diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/PetAPI.md index c0ec8a91fb4..298904ef20f 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/docs/PetAPI.md +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/PetAPI.md @@ -27,7 +27,7 @@ Add a new pet to the store // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let body = Pet(id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new ``` @@ -225,7 +225,7 @@ Update an existing pet // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let body = Pet(id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new ``` diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index aa169c152cd..8bbaba9b4d9 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -244,12 +244,12 @@ open class URLSessionRequestBuilder: RequestBuilder { } open func buildHeaders() -> [String: String] { - var httpHeaders: [String : String] = [:] + var httpHeaders: [String: String] = [:] for (key, value) in self.headers { httpHeaders[key] = value } for (key, value) in PetstoreClientAPI.customHeaders { - httpHeaders[key] = value + httpHeaders[key] = value } return httpHeaders } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md index d0ab705d4e4..ed46bf129f2 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md @@ -228,7 +228,7 @@ For this test, the body for this request much reference a schema named `File`. // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | +let body = FileSchemaTestClass(file: {...}, files: [{...}]) // FileSchemaTestClass | FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in guard error == nil else { diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/PetAPI.md index 27efe083347..2dd5a7450ac 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/docs/PetAPI.md +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/PetAPI.md @@ -27,7 +27,7 @@ Add a new pet to the store // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let body = Pet(id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // Add a new pet to the store PetAPI.addPet(body: body) { (response, error) in @@ -275,7 +275,7 @@ Update an existing pet // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store +let body = Pet(id: 123, category: {...}, name: "name_example", photoUrls: ["photoUrls_example"], tags: [{...}], status: "status_example") // Pet | Pet object that needs to be added to the store // Update an existing pet PetAPI.updatePet(body: body) { (response, error) in