forked from loafle/openapi-generator-original
fix decimal mapping (#7875)
This commit is contained in:
parent
08fb59009a
commit
eacf61de7e
@ -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");
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -244,12 +244,12 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -244,12 +244,12 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -244,12 +244,12 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -244,12 +244,12 @@ internal class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -244,12 +244,12 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -244,12 +244,12 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -244,12 +244,12 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -244,12 +244,12 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -244,12 +244,12 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
@ -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
|
||||
```
|
||||
|
@ -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
|
||||
```
|
||||
|
@ -244,12 +244,12 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user