mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-08 16:40:56 +00:00
update swift3 petstore samples
This commit is contained in:
parent
f110072ef1
commit
56d4382d75
@ -10,7 +10,7 @@ open class PetstoreClientAPI {
|
||||
open static var basePath = "http://petstore.swagger.io:80/v2"
|
||||
open static var credential: URLCredential?
|
||||
open static var customHeaders: [String:String] = [:]
|
||||
static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()
|
||||
open static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()
|
||||
}
|
||||
|
||||
open class APIBase {
|
||||
|
@ -27,9 +27,9 @@ open class FakeAPI: APIBase {
|
||||
To test \"client\" model
|
||||
- PATCH /fake
|
||||
- To test \"client\" model
|
||||
- examples: [{example={
|
||||
- examples: [{contentType=application/json, example={
|
||||
"client" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
}}]
|
||||
|
||||
- parameter body: (body) client model
|
||||
|
||||
|
@ -122,7 +122,7 @@ open class PetAPI: APIBase {
|
||||
- OAuth:
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{example=<Pet>
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -131,21 +131,21 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
- examples: [{example=<Pet>
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -154,20 +154,20 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
|
||||
- parameter status: (query) Status values that need to be considered for filter
|
||||
|
||||
@ -209,7 +209,7 @@ open class PetAPI: APIBase {
|
||||
- OAuth:
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{example=<Pet>
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -218,21 +218,21 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
- examples: [{example=<Pet>
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -241,20 +241,20 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
|
||||
- parameter tags: (query) Tags to filter by
|
||||
|
||||
@ -296,7 +296,7 @@ open class PetAPI: APIBase {
|
||||
- API Key:
|
||||
- type: apiKey api_key
|
||||
- name: api_key
|
||||
- examples: [{example=<Pet>
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -305,21 +305,21 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example={
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example={
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<Pet>
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -328,20 +328,20 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example={
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example={
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
}, contentType=application/json}]
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
}}]
|
||||
|
||||
- parameter petId: (path) ID of pet to return
|
||||
|
||||
@ -470,11 +470,11 @@ open class PetAPI: APIBase {
|
||||
- OAuth:
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{example={
|
||||
"message" : "aeiou",
|
||||
- examples: [{contentType=application/json, example={
|
||||
"code" : 0,
|
||||
"type" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
"type" : "aeiou",
|
||||
"message" : "aeiou"
|
||||
}}]
|
||||
|
||||
- parameter petId: (path) ID of pet to update
|
||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||
|
@ -65,9 +65,9 @@ open class StoreAPI: APIBase {
|
||||
- API Key:
|
||||
- type: apiKey api_key
|
||||
- name: api_key
|
||||
- examples: [{example={
|
||||
- examples: [{contentType=application/json, example={
|
||||
"key" : 0
|
||||
}, contentType=application/json}]
|
||||
}}]
|
||||
|
||||
- returns: RequestBuilder<[String:Int32]>
|
||||
*/
|
||||
@ -101,36 +101,36 @@ open class StoreAPI: APIBase {
|
||||
Find purchase order by ID
|
||||
- GET /store/order/{order_id}
|
||||
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
- examples: [{example=<Order>
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<Order>
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
|
||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||
|
||||
@ -167,36 +167,36 @@ open class StoreAPI: APIBase {
|
||||
Place an order for a pet
|
||||
- POST /store/order
|
||||
-
|
||||
- examples: [{example=<Order>
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<Order>
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
|
||||
- parameter body: (body) order placed for purchasing the pet
|
||||
|
||||
|
@ -168,7 +168,7 @@ open class UserAPI: APIBase {
|
||||
Get user by user name
|
||||
- GET /user/{username}
|
||||
-
|
||||
- examples: [{example=<User>
|
||||
- examples: [{contentType=application/xml, example=<User>
|
||||
<id>123456789</id>
|
||||
<username>aeiou</username>
|
||||
<firstName>aeiou</firstName>
|
||||
@ -177,17 +177,17 @@ open class UserAPI: APIBase {
|
||||
<password>aeiou</password>
|
||||
<phone>aeiou</phone>
|
||||
<userStatus>123</userStatus>
|
||||
</User>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
"lastName" : "aeiou",
|
||||
"phone" : "aeiou",
|
||||
"username" : "aeiou",
|
||||
"email" : "aeiou",
|
||||
"userStatus" : 6,
|
||||
</User>}, {contentType=application/json, example={
|
||||
"firstName" : "aeiou",
|
||||
"password" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<User>
|
||||
"lastName" : "aeiou",
|
||||
"password" : "aeiou",
|
||||
"userStatus" : 6,
|
||||
"phone" : "aeiou",
|
||||
"id" : 0,
|
||||
"email" : "aeiou",
|
||||
"username" : "aeiou"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<User>
|
||||
<id>123456789</id>
|
||||
<username>aeiou</username>
|
||||
<firstName>aeiou</firstName>
|
||||
@ -196,16 +196,16 @@ open class UserAPI: APIBase {
|
||||
<password>aeiou</password>
|
||||
<phone>aeiou</phone>
|
||||
<userStatus>123</userStatus>
|
||||
</User>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
"lastName" : "aeiou",
|
||||
"phone" : "aeiou",
|
||||
"username" : "aeiou",
|
||||
"email" : "aeiou",
|
||||
"userStatus" : 6,
|
||||
</User>}, {contentType=application/json, example={
|
||||
"firstName" : "aeiou",
|
||||
"password" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
"lastName" : "aeiou",
|
||||
"password" : "aeiou",
|
||||
"userStatus" : 6,
|
||||
"phone" : "aeiou",
|
||||
"id" : 0,
|
||||
"email" : "aeiou",
|
||||
"username" : "aeiou"
|
||||
}}]
|
||||
|
||||
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
@ -245,8 +245,8 @@ open class UserAPI: APIBase {
|
||||
-
|
||||
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
||||
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
||||
- examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}]
|
||||
- examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}]
|
||||
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||
|
||||
- parameter username: (query) The user name for login
|
||||
- parameter password: (query) The password for login in clear text
|
||||
|
@ -212,7 +212,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
}
|
||||
|
||||
private func buildHeaders() -> [String: String] {
|
||||
open func buildHeaders() -> [String: String] {
|
||||
var httpHeaders = SessionManager.defaultHTTPHeaders
|
||||
for (key, value) in self.headers {
|
||||
httpHeaders[key] = value
|
||||
|
@ -10,7 +10,7 @@ open class PetstoreClientAPI {
|
||||
open static var basePath = "http://petstore.swagger.io:80/v2"
|
||||
open static var credential: URLCredential?
|
||||
open static var customHeaders: [String:String] = [:]
|
||||
static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()
|
||||
open static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()
|
||||
}
|
||||
|
||||
open class APIBase {
|
||||
|
@ -45,9 +45,9 @@ open class FakeAPI: APIBase {
|
||||
To test \"client\" model
|
||||
- PATCH /fake
|
||||
- To test \"client\" model
|
||||
- examples: [{example={
|
||||
- examples: [{contentType=application/json, example={
|
||||
"client" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
}}]
|
||||
|
||||
- parameter body: (body) client model
|
||||
|
||||
|
@ -175,7 +175,7 @@ open class PetAPI: APIBase {
|
||||
- OAuth:
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{example=<Pet>
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -184,21 +184,21 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
- examples: [{example=<Pet>
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -207,20 +207,20 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
|
||||
- parameter status: (query) Status values that need to be considered for filter
|
||||
|
||||
@ -279,7 +279,7 @@ open class PetAPI: APIBase {
|
||||
- OAuth:
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{example=<Pet>
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -288,21 +288,21 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
- examples: [{example=<Pet>
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -311,20 +311,20 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
|
||||
- parameter tags: (query) Tags to filter by
|
||||
|
||||
@ -383,7 +383,7 @@ open class PetAPI: APIBase {
|
||||
- API Key:
|
||||
- type: apiKey api_key
|
||||
- name: api_key
|
||||
- examples: [{example=<Pet>
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -392,21 +392,21 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example={
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example={
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<Pet>
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -415,20 +415,20 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example={
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example={
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
}, contentType=application/json}]
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
}}]
|
||||
|
||||
- parameter petId: (path) ID of pet to return
|
||||
|
||||
@ -612,11 +612,11 @@ open class PetAPI: APIBase {
|
||||
- OAuth:
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{example={
|
||||
"message" : "aeiou",
|
||||
- examples: [{contentType=application/json, example={
|
||||
"code" : 0,
|
||||
"type" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
"type" : "aeiou",
|
||||
"message" : "aeiou"
|
||||
}}]
|
||||
|
||||
- parameter petId: (path) ID of pet to update
|
||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||
|
@ -99,9 +99,9 @@ open class StoreAPI: APIBase {
|
||||
- API Key:
|
||||
- type: apiKey api_key
|
||||
- name: api_key
|
||||
- examples: [{example={
|
||||
- examples: [{contentType=application/json, example={
|
||||
"key" : 0
|
||||
}, contentType=application/json}]
|
||||
}}]
|
||||
|
||||
- returns: RequestBuilder<[String:Int32]>
|
||||
*/
|
||||
@ -152,36 +152,36 @@ open class StoreAPI: APIBase {
|
||||
Find purchase order by ID
|
||||
- GET /store/order/{order_id}
|
||||
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
- examples: [{example=<Order>
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<Order>
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
|
||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||
|
||||
@ -235,36 +235,36 @@ open class StoreAPI: APIBase {
|
||||
Place an order for a pet
|
||||
- POST /store/order
|
||||
-
|
||||
- examples: [{example=<Order>
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<Order>
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
|
||||
- parameter body: (body) order placed for purchasing the pet
|
||||
|
||||
|
@ -254,7 +254,7 @@ open class UserAPI: APIBase {
|
||||
Get user by user name
|
||||
- GET /user/{username}
|
||||
-
|
||||
- examples: [{example=<User>
|
||||
- examples: [{contentType=application/xml, example=<User>
|
||||
<id>123456789</id>
|
||||
<username>aeiou</username>
|
||||
<firstName>aeiou</firstName>
|
||||
@ -263,17 +263,17 @@ open class UserAPI: APIBase {
|
||||
<password>aeiou</password>
|
||||
<phone>aeiou</phone>
|
||||
<userStatus>123</userStatus>
|
||||
</User>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
"lastName" : "aeiou",
|
||||
"phone" : "aeiou",
|
||||
"username" : "aeiou",
|
||||
"email" : "aeiou",
|
||||
"userStatus" : 6,
|
||||
</User>}, {contentType=application/json, example={
|
||||
"firstName" : "aeiou",
|
||||
"password" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<User>
|
||||
"lastName" : "aeiou",
|
||||
"password" : "aeiou",
|
||||
"userStatus" : 6,
|
||||
"phone" : "aeiou",
|
||||
"id" : 0,
|
||||
"email" : "aeiou",
|
||||
"username" : "aeiou"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<User>
|
||||
<id>123456789</id>
|
||||
<username>aeiou</username>
|
||||
<firstName>aeiou</firstName>
|
||||
@ -282,16 +282,16 @@ open class UserAPI: APIBase {
|
||||
<password>aeiou</password>
|
||||
<phone>aeiou</phone>
|
||||
<userStatus>123</userStatus>
|
||||
</User>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
"lastName" : "aeiou",
|
||||
"phone" : "aeiou",
|
||||
"username" : "aeiou",
|
||||
"email" : "aeiou",
|
||||
"userStatus" : 6,
|
||||
</User>}, {contentType=application/json, example={
|
||||
"firstName" : "aeiou",
|
||||
"password" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
"lastName" : "aeiou",
|
||||
"password" : "aeiou",
|
||||
"userStatus" : 6,
|
||||
"phone" : "aeiou",
|
||||
"id" : 0,
|
||||
"email" : "aeiou",
|
||||
"username" : "aeiou"
|
||||
}}]
|
||||
|
||||
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
@ -349,8 +349,8 @@ open class UserAPI: APIBase {
|
||||
-
|
||||
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
||||
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
||||
- examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}]
|
||||
- examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}]
|
||||
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||
|
||||
- parameter username: (query) The user name for login
|
||||
- parameter password: (query) The password for login in clear text
|
||||
|
@ -212,7 +212,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
}
|
||||
|
||||
private func buildHeaders() -> [String: String] {
|
||||
open func buildHeaders() -> [String: String] {
|
||||
var httpHeaders = SessionManager.defaultHTTPHeaders
|
||||
for (key, value) in self.headers {
|
||||
httpHeaders[key] = value
|
||||
|
@ -10,7 +10,7 @@ open class PetstoreClientAPI {
|
||||
open static var basePath = "http://petstore.swagger.io:80/v2"
|
||||
open static var credential: URLCredential?
|
||||
open static var customHeaders: [String:String] = [:]
|
||||
static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()
|
||||
open static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()
|
||||
}
|
||||
|
||||
open class APIBase {
|
||||
|
@ -47,9 +47,9 @@ open class FakeAPI: APIBase {
|
||||
To test \"client\" model
|
||||
- PATCH /fake
|
||||
- To test \"client\" model
|
||||
- examples: [{example={
|
||||
- examples: [{contentType=application/json, example={
|
||||
"client" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
}}]
|
||||
|
||||
- parameter body: (body) client model
|
||||
|
||||
|
@ -181,7 +181,7 @@ open class PetAPI: APIBase {
|
||||
- OAuth:
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{example=<Pet>
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -190,21 +190,21 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
- examples: [{example=<Pet>
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -213,20 +213,20 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
|
||||
- parameter status: (query) Status values that need to be considered for filter
|
||||
|
||||
@ -287,7 +287,7 @@ open class PetAPI: APIBase {
|
||||
- OAuth:
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{example=<Pet>
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -296,21 +296,21 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
- examples: [{example=<Pet>
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -319,20 +319,20 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example=[ {
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
} ], contentType=application/json}]
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
|
||||
- parameter tags: (query) Tags to filter by
|
||||
|
||||
@ -393,7 +393,7 @@ open class PetAPI: APIBase {
|
||||
- API Key:
|
||||
- type: apiKey api_key
|
||||
- name: api_key
|
||||
- examples: [{example=<Pet>
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -402,21 +402,21 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example={
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example={
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<Pet>
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
@ -425,20 +425,20 @@ open class PetAPI: APIBase {
|
||||
<tags>
|
||||
</tags>
|
||||
<status>aeiou</status>
|
||||
</Pet>, contentType=application/xml}, {example={
|
||||
"tags" : [ {
|
||||
"id" : 1,
|
||||
"name" : "aeiou"
|
||||
} ],
|
||||
</Pet>}, {contentType=application/json, example={
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"id" : 6,
|
||||
"name" : "aeiou"
|
||||
"name" : "aeiou",
|
||||
"id" : 6
|
||||
},
|
||||
"status" : "available",
|
||||
"name" : "doggie",
|
||||
"photoUrls" : [ "aeiou" ]
|
||||
}, contentType=application/json}]
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 1
|
||||
} ],
|
||||
"status" : "available"
|
||||
}}]
|
||||
|
||||
- parameter petId: (path) ID of pet to return
|
||||
|
||||
@ -628,11 +628,11 @@ open class PetAPI: APIBase {
|
||||
- OAuth:
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{example={
|
||||
"message" : "aeiou",
|
||||
- examples: [{contentType=application/json, example={
|
||||
"code" : 0,
|
||||
"type" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
"type" : "aeiou",
|
||||
"message" : "aeiou"
|
||||
}}]
|
||||
|
||||
- parameter petId: (path) ID of pet to update
|
||||
- parameter additionalMetadata: (form) Additional data to pass to server (optional)
|
||||
|
@ -103,9 +103,9 @@ open class StoreAPI: APIBase {
|
||||
- API Key:
|
||||
- type: apiKey api_key
|
||||
- name: api_key
|
||||
- examples: [{example={
|
||||
- examples: [{contentType=application/json, example={
|
||||
"key" : 0
|
||||
}, contentType=application/json}]
|
||||
}}]
|
||||
|
||||
- returns: RequestBuilder<[String:Int32]>
|
||||
*/
|
||||
@ -158,36 +158,36 @@ open class StoreAPI: APIBase {
|
||||
Find purchase order by ID
|
||||
- GET /store/order/{order_id}
|
||||
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
- examples: [{example=<Order>
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<Order>
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
|
||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||
|
||||
@ -243,36 +243,36 @@ open class StoreAPI: APIBase {
|
||||
Place an order for a pet
|
||||
- POST /store/order
|
||||
-
|
||||
- examples: [{example=<Order>
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<Order>
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 6,
|
||||
"complete" : false,
|
||||
"status" : "placed",
|
||||
"quantity" : 1,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||
}, contentType=application/json}]
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
|
||||
- parameter body: (body) order placed for purchasing the pet
|
||||
|
||||
|
@ -264,7 +264,7 @@ open class UserAPI: APIBase {
|
||||
Get user by user name
|
||||
- GET /user/{username}
|
||||
-
|
||||
- examples: [{example=<User>
|
||||
- examples: [{contentType=application/xml, example=<User>
|
||||
<id>123456789</id>
|
||||
<username>aeiou</username>
|
||||
<firstName>aeiou</firstName>
|
||||
@ -273,17 +273,17 @@ open class UserAPI: APIBase {
|
||||
<password>aeiou</password>
|
||||
<phone>aeiou</phone>
|
||||
<userStatus>123</userStatus>
|
||||
</User>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
"lastName" : "aeiou",
|
||||
"phone" : "aeiou",
|
||||
"username" : "aeiou",
|
||||
"email" : "aeiou",
|
||||
"userStatus" : 6,
|
||||
</User>}, {contentType=application/json, example={
|
||||
"firstName" : "aeiou",
|
||||
"password" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
- examples: [{example=<User>
|
||||
"lastName" : "aeiou",
|
||||
"password" : "aeiou",
|
||||
"userStatus" : 6,
|
||||
"phone" : "aeiou",
|
||||
"id" : 0,
|
||||
"email" : "aeiou",
|
||||
"username" : "aeiou"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<User>
|
||||
<id>123456789</id>
|
||||
<username>aeiou</username>
|
||||
<firstName>aeiou</firstName>
|
||||
@ -292,16 +292,16 @@ open class UserAPI: APIBase {
|
||||
<password>aeiou</password>
|
||||
<phone>aeiou</phone>
|
||||
<userStatus>123</userStatus>
|
||||
</User>, contentType=application/xml}, {example={
|
||||
"id" : 0,
|
||||
"lastName" : "aeiou",
|
||||
"phone" : "aeiou",
|
||||
"username" : "aeiou",
|
||||
"email" : "aeiou",
|
||||
"userStatus" : 6,
|
||||
</User>}, {contentType=application/json, example={
|
||||
"firstName" : "aeiou",
|
||||
"password" : "aeiou"
|
||||
}, contentType=application/json}]
|
||||
"lastName" : "aeiou",
|
||||
"password" : "aeiou",
|
||||
"userStatus" : 6,
|
||||
"phone" : "aeiou",
|
||||
"id" : 0,
|
||||
"email" : "aeiou",
|
||||
"username" : "aeiou"
|
||||
}}]
|
||||
|
||||
- parameter username: (path) The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
@ -361,8 +361,8 @@ open class UserAPI: APIBase {
|
||||
-
|
||||
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
||||
- responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)]
|
||||
- examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}]
|
||||
- examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}]
|
||||
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||
- examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
|
||||
|
||||
- parameter username: (query) The user name for login
|
||||
- parameter password: (query) The password for login in clear text
|
||||
|
@ -212,7 +212,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
}
|
||||
|
||||
private func buildHeaders() -> [String: String] {
|
||||
open func buildHeaders() -> [String: String] {
|
||||
var httpHeaders = SessionManager.defaultHTTPHeaders
|
||||
for (key, value) in self.headers {
|
||||
httpHeaders[key] = value
|
||||
|
Loading…
x
Reference in New Issue
Block a user