update swift3 petstore samples

This commit is contained in:
wing328 2017-04-23 23:06:16 +08:00
parent f110072ef1
commit 56d4382d75
18 changed files with 396 additions and 396 deletions

View File

@ -10,7 +10,7 @@ open class PetstoreClientAPI {
open static var basePath = "http://petstore.swagger.io:80/v2" open static var basePath = "http://petstore.swagger.io:80/v2"
open static var credential: URLCredential? open static var credential: URLCredential?
open static var customHeaders: [String:String] = [:] open static var customHeaders: [String:String] = [:]
static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() open static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()
} }
open class APIBase { open class APIBase {

View File

@ -27,9 +27,9 @@ open class FakeAPI: APIBase {
To test \"client\" model To test \"client\" model
- PATCH /fake - PATCH /fake
- To test \"client\" model - To test \"client\" model
- examples: [{example={ - examples: [{contentType=application/json, example={
"client" : "aeiou" "client" : "aeiou"
}, contentType=application/json}] }}]
- parameter body: (body) client model - parameter body: (body) client model

View File

@ -122,7 +122,7 @@ open class PetAPI: APIBase {
- OAuth: - OAuth:
- type: oauth2 - type: oauth2
- name: petstore_auth - name: petstore_auth
- examples: [{example=<Pet> - examples: [{contentType=application/xml, example=<Pet>
<id>123456789</id> <id>123456789</id>
<name>doggie</name> <name>doggie</name>
<photoUrls> <photoUrls>
@ -131,21 +131,21 @@ open class PetAPI: APIBase {
<tags> <tags>
</tags> </tags>
<status>aeiou</status> <status>aeiou</status>
</Pet>, contentType=application/xml}, {example=[ { </Pet>}, {contentType=application/json, example=[ {
"tags" : [ { "photoUrls" : [ "aeiou" ],
"id" : 1, "name" : "doggie",
"name" : "aeiou"
} ],
"id" : 0, "id" : 0,
"category" : { "category" : {
"id" : 6, "name" : "aeiou",
"name" : "aeiou" "id" : 6
}, },
"status" : "available", "tags" : [ {
"name" : "doggie", "name" : "aeiou",
"photoUrls" : [ "aeiou" ] "id" : 1
} ], contentType=application/json}] } ],
- examples: [{example=<Pet> "status" : "available"
} ]}]
- examples: [{contentType=application/xml, example=<Pet>
<id>123456789</id> <id>123456789</id>
<name>doggie</name> <name>doggie</name>
<photoUrls> <photoUrls>
@ -154,20 +154,20 @@ open class PetAPI: APIBase {
<tags> <tags>
</tags> </tags>
<status>aeiou</status> <status>aeiou</status>
</Pet>, contentType=application/xml}, {example=[ { </Pet>}, {contentType=application/json, example=[ {
"tags" : [ { "photoUrls" : [ "aeiou" ],
"id" : 1, "name" : "doggie",
"name" : "aeiou"
} ],
"id" : 0, "id" : 0,
"category" : { "category" : {
"id" : 6, "name" : "aeiou",
"name" : "aeiou" "id" : 6
}, },
"status" : "available", "tags" : [ {
"name" : "doggie", "name" : "aeiou",
"photoUrls" : [ "aeiou" ] "id" : 1
} ], contentType=application/json}] } ],
"status" : "available"
} ]}]
- parameter status: (query) Status values that need to be considered for filter - parameter status: (query) Status values that need to be considered for filter
@ -209,7 +209,7 @@ open class PetAPI: APIBase {
- OAuth: - OAuth:
- type: oauth2 - type: oauth2
- name: petstore_auth - name: petstore_auth
- examples: [{example=<Pet> - examples: [{contentType=application/xml, example=<Pet>
<id>123456789</id> <id>123456789</id>
<name>doggie</name> <name>doggie</name>
<photoUrls> <photoUrls>
@ -218,21 +218,21 @@ open class PetAPI: APIBase {
<tags> <tags>
</tags> </tags>
<status>aeiou</status> <status>aeiou</status>
</Pet>, contentType=application/xml}, {example=[ { </Pet>}, {contentType=application/json, example=[ {
"tags" : [ { "photoUrls" : [ "aeiou" ],
"id" : 1, "name" : "doggie",
"name" : "aeiou"
} ],
"id" : 0, "id" : 0,
"category" : { "category" : {
"id" : 6, "name" : "aeiou",
"name" : "aeiou" "id" : 6
}, },
"status" : "available", "tags" : [ {
"name" : "doggie", "name" : "aeiou",
"photoUrls" : [ "aeiou" ] "id" : 1
} ], contentType=application/json}] } ],
- examples: [{example=<Pet> "status" : "available"
} ]}]
- examples: [{contentType=application/xml, example=<Pet>
<id>123456789</id> <id>123456789</id>
<name>doggie</name> <name>doggie</name>
<photoUrls> <photoUrls>
@ -241,20 +241,20 @@ open class PetAPI: APIBase {
<tags> <tags>
</tags> </tags>
<status>aeiou</status> <status>aeiou</status>
</Pet>, contentType=application/xml}, {example=[ { </Pet>}, {contentType=application/json, example=[ {
"tags" : [ { "photoUrls" : [ "aeiou" ],
"id" : 1, "name" : "doggie",
"name" : "aeiou"
} ],
"id" : 0, "id" : 0,
"category" : { "category" : {
"id" : 6, "name" : "aeiou",
"name" : "aeiou" "id" : 6
}, },
"status" : "available", "tags" : [ {
"name" : "doggie", "name" : "aeiou",
"photoUrls" : [ "aeiou" ] "id" : 1
} ], contentType=application/json}] } ],
"status" : "available"
} ]}]
- parameter tags: (query) Tags to filter by - parameter tags: (query) Tags to filter by
@ -296,7 +296,7 @@ open class PetAPI: APIBase {
- API Key: - API Key:
- type: apiKey api_key - type: apiKey api_key
- name: api_key - name: api_key
- examples: [{example=<Pet> - examples: [{contentType=application/xml, example=<Pet>
<id>123456789</id> <id>123456789</id>
<name>doggie</name> <name>doggie</name>
<photoUrls> <photoUrls>
@ -305,21 +305,21 @@ open class PetAPI: APIBase {
<tags> <tags>
</tags> </tags>
<status>aeiou</status> <status>aeiou</status>
</Pet>, contentType=application/xml}, {example={ </Pet>}, {contentType=application/json, example={
"tags" : [ { "photoUrls" : [ "aeiou" ],
"id" : 1, "name" : "doggie",
"name" : "aeiou"
} ],
"id" : 0, "id" : 0,
"category" : { "category" : {
"id" : 6, "name" : "aeiou",
"name" : "aeiou" "id" : 6
}, },
"status" : "available", "tags" : [ {
"name" : "doggie", "name" : "aeiou",
"photoUrls" : [ "aeiou" ] "id" : 1
}, contentType=application/json}] } ],
- examples: [{example=<Pet> "status" : "available"
}}]
- examples: [{contentType=application/xml, example=<Pet>
<id>123456789</id> <id>123456789</id>
<name>doggie</name> <name>doggie</name>
<photoUrls> <photoUrls>
@ -328,20 +328,20 @@ open class PetAPI: APIBase {
<tags> <tags>
</tags> </tags>
<status>aeiou</status> <status>aeiou</status>
</Pet>, contentType=application/xml}, {example={ </Pet>}, {contentType=application/json, example={
"tags" : [ { "photoUrls" : [ "aeiou" ],
"id" : 1, "name" : "doggie",
"name" : "aeiou"
} ],
"id" : 0, "id" : 0,
"category" : { "category" : {
"id" : 6, "name" : "aeiou",
"name" : "aeiou" "id" : 6
}, },
"status" : "available", "tags" : [ {
"name" : "doggie", "name" : "aeiou",
"photoUrls" : [ "aeiou" ] "id" : 1
}, contentType=application/json}] } ],
"status" : "available"
}}]
- parameter petId: (path) ID of pet to return - parameter petId: (path) ID of pet to return
@ -470,11 +470,11 @@ open class PetAPI: APIBase {
- OAuth: - OAuth:
- type: oauth2 - type: oauth2
- name: petstore_auth - name: petstore_auth
- examples: [{example={ - examples: [{contentType=application/json, example={
"message" : "aeiou",
"code" : 0, "code" : 0,
"type" : "aeiou" "type" : "aeiou",
}, contentType=application/json}] "message" : "aeiou"
}}]
- parameter petId: (path) ID of pet to update - parameter petId: (path) ID of pet to update
- parameter additionalMetadata: (form) Additional data to pass to server (optional) - parameter additionalMetadata: (form) Additional data to pass to server (optional)

View File

@ -65,9 +65,9 @@ open class StoreAPI: APIBase {
- API Key: - API Key:
- type: apiKey api_key - type: apiKey api_key
- name: api_key - name: api_key
- examples: [{example={ - examples: [{contentType=application/json, example={
"key" : 0 "key" : 0
}, contentType=application/json}] }}]
- returns: RequestBuilder<[String:Int32]> - returns: RequestBuilder<[String:Int32]>
*/ */
@ -101,36 +101,36 @@ open class StoreAPI: APIBase {
Find purchase order by ID Find purchase order by ID
- GET /store/order/{order_id} - GET /store/order/{order_id}
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - 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> <id>123456789</id>
<petId>123456789</petId> <petId>123456789</petId>
<quantity>123</quantity> <quantity>123</quantity>
<shipDate>2000-01-23T04:56:07.000Z</shipDate> <shipDate>2000-01-23T04:56:07.000Z</shipDate>
<status>aeiou</status> <status>aeiou</status>
<complete>true</complete> <complete>true</complete>
</Order>, contentType=application/xml}, {example={ </Order>}, {contentType=application/json, example={
"id" : 0,
"petId" : 6, "petId" : 6,
"complete" : false,
"status" : "placed",
"quantity" : 1, "quantity" : 1,
"shipDate" : "2000-01-23T04:56:07.000+00:00" "id" : 0,
}, contentType=application/json}] "shipDate" : "2000-01-23T04:56:07.000+00:00",
- examples: [{example=<Order> "complete" : false,
"status" : "placed"
}}]
- examples: [{contentType=application/xml, example=<Order>
<id>123456789</id> <id>123456789</id>
<petId>123456789</petId> <petId>123456789</petId>
<quantity>123</quantity> <quantity>123</quantity>
<shipDate>2000-01-23T04:56:07.000Z</shipDate> <shipDate>2000-01-23T04:56:07.000Z</shipDate>
<status>aeiou</status> <status>aeiou</status>
<complete>true</complete> <complete>true</complete>
</Order>, contentType=application/xml}, {example={ </Order>}, {contentType=application/json, example={
"id" : 0,
"petId" : 6, "petId" : 6,
"complete" : false,
"status" : "placed",
"quantity" : 1, "quantity" : 1,
"shipDate" : "2000-01-23T04:56:07.000+00:00" "id" : 0,
}, contentType=application/json}] "shipDate" : "2000-01-23T04:56:07.000+00:00",
"complete" : false,
"status" : "placed"
}}]
- parameter orderId: (path) ID of pet that needs to be fetched - 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 Place an order for a pet
- POST /store/order - POST /store/order
- -
- examples: [{example=<Order> - examples: [{contentType=application/xml, example=<Order>
<id>123456789</id> <id>123456789</id>
<petId>123456789</petId> <petId>123456789</petId>
<quantity>123</quantity> <quantity>123</quantity>
<shipDate>2000-01-23T04:56:07.000Z</shipDate> <shipDate>2000-01-23T04:56:07.000Z</shipDate>
<status>aeiou</status> <status>aeiou</status>
<complete>true</complete> <complete>true</complete>
</Order>, contentType=application/xml}, {example={ </Order>}, {contentType=application/json, example={
"id" : 0,
"petId" : 6, "petId" : 6,
"complete" : false,
"status" : "placed",
"quantity" : 1, "quantity" : 1,
"shipDate" : "2000-01-23T04:56:07.000+00:00" "id" : 0,
}, contentType=application/json}] "shipDate" : "2000-01-23T04:56:07.000+00:00",
- examples: [{example=<Order> "complete" : false,
"status" : "placed"
}}]
- examples: [{contentType=application/xml, example=<Order>
<id>123456789</id> <id>123456789</id>
<petId>123456789</petId> <petId>123456789</petId>
<quantity>123</quantity> <quantity>123</quantity>
<shipDate>2000-01-23T04:56:07.000Z</shipDate> <shipDate>2000-01-23T04:56:07.000Z</shipDate>
<status>aeiou</status> <status>aeiou</status>
<complete>true</complete> <complete>true</complete>
</Order>, contentType=application/xml}, {example={ </Order>}, {contentType=application/json, example={
"id" : 0,
"petId" : 6, "petId" : 6,
"complete" : false,
"status" : "placed",
"quantity" : 1, "quantity" : 1,
"shipDate" : "2000-01-23T04:56:07.000+00:00" "id" : 0,
}, contentType=application/json}] "shipDate" : "2000-01-23T04:56:07.000+00:00",
"complete" : false,
"status" : "placed"
}}]
- parameter body: (body) order placed for purchasing the pet - parameter body: (body) order placed for purchasing the pet

View File

@ -168,7 +168,7 @@ open class UserAPI: APIBase {
Get user by user name Get user by user name
- GET /user/{username} - GET /user/{username}
- -
- examples: [{example=<User> - examples: [{contentType=application/xml, example=<User>
<id>123456789</id> <id>123456789</id>
<username>aeiou</username> <username>aeiou</username>
<firstName>aeiou</firstName> <firstName>aeiou</firstName>
@ -177,17 +177,17 @@ open class UserAPI: APIBase {
<password>aeiou</password> <password>aeiou</password>
<phone>aeiou</phone> <phone>aeiou</phone>
<userStatus>123</userStatus> <userStatus>123</userStatus>
</User>, contentType=application/xml}, {example={ </User>}, {contentType=application/json, example={
"id" : 0,
"lastName" : "aeiou",
"phone" : "aeiou",
"username" : "aeiou",
"email" : "aeiou",
"userStatus" : 6,
"firstName" : "aeiou", "firstName" : "aeiou",
"password" : "aeiou" "lastName" : "aeiou",
}, contentType=application/json}] "password" : "aeiou",
- examples: [{example=<User> "userStatus" : 6,
"phone" : "aeiou",
"id" : 0,
"email" : "aeiou",
"username" : "aeiou"
}}]
- examples: [{contentType=application/xml, example=<User>
<id>123456789</id> <id>123456789</id>
<username>aeiou</username> <username>aeiou</username>
<firstName>aeiou</firstName> <firstName>aeiou</firstName>
@ -196,16 +196,16 @@ open class UserAPI: APIBase {
<password>aeiou</password> <password>aeiou</password>
<phone>aeiou</phone> <phone>aeiou</phone>
<userStatus>123</userStatus> <userStatus>123</userStatus>
</User>, contentType=application/xml}, {example={ </User>}, {contentType=application/json, example={
"id" : 0,
"lastName" : "aeiou",
"phone" : "aeiou",
"username" : "aeiou",
"email" : "aeiou",
"userStatus" : 6,
"firstName" : "aeiou", "firstName" : "aeiou",
"password" : "aeiou" "lastName" : "aeiou",
}, contentType=application/json}] "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. - 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)]
- 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: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
- examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}] - examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
- parameter username: (query) The user name for login - parameter username: (query) The user name for login
- parameter password: (query) The password for login in clear text - parameter password: (query) The password for login in clear text

View File

@ -212,7 +212,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
} }
} }
private func buildHeaders() -> [String: String] { open func buildHeaders() -> [String: String] {
var httpHeaders = SessionManager.defaultHTTPHeaders var httpHeaders = SessionManager.defaultHTTPHeaders
for (key, value) in self.headers { for (key, value) in self.headers {
httpHeaders[key] = value httpHeaders[key] = value

View File

@ -10,7 +10,7 @@ open class PetstoreClientAPI {
open static var basePath = "http://petstore.swagger.io:80/v2" open static var basePath = "http://petstore.swagger.io:80/v2"
open static var credential: URLCredential? open static var credential: URLCredential?
open static var customHeaders: [String:String] = [:] open static var customHeaders: [String:String] = [:]
static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() open static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()
} }
open class APIBase { open class APIBase {

View File

@ -45,9 +45,9 @@ open class FakeAPI: APIBase {
To test \"client\" model To test \"client\" model
- PATCH /fake - PATCH /fake
- To test \"client\" model - To test \"client\" model
- examples: [{example={ - examples: [{contentType=application/json, example={
"client" : "aeiou" "client" : "aeiou"
}, contentType=application/json}] }}]
- parameter body: (body) client model - parameter body: (body) client model

View File

@ -175,7 +175,7 @@ open class PetAPI: APIBase {
- OAuth: - OAuth:
- type: oauth2 - type: oauth2
- name: petstore_auth - name: petstore_auth
- examples: [{example=<Pet> - examples: [{contentType=application/xml, example=<Pet>
<id>123456789</id> <id>123456789</id>
<name>doggie</name> <name>doggie</name>
<photoUrls> <photoUrls>
@ -184,21 +184,21 @@ open class PetAPI: APIBase {
<tags> <tags>
</tags> </tags>
<status>aeiou</status> <status>aeiou</status>
</Pet>, contentType=application/xml}, {example=[ { </Pet>}, {contentType=application/json, example=[ {
"tags" : [ { "photoUrls" : [ "aeiou" ],
"id" : 1, "name" : "doggie",
"name" : "aeiou"
} ],
"id" : 0, "id" : 0,
"category" : { "category" : {
"id" : 6, "name" : "aeiou",
"name" : "aeiou" "id" : 6
}, },
"status" : "available", "tags" : [ {
"name" : "doggie", "name" : "aeiou",
"photoUrls" : [ "aeiou" ] "id" : 1
} ], contentType=application/json}] } ],
- examples: [{example=<Pet> "status" : "available"
} ]}]
- examples: [{contentType=application/xml, example=<Pet>
<id>123456789</id> <id>123456789</id>
<name>doggie</name> <name>doggie</name>
<photoUrls> <photoUrls>
@ -207,20 +207,20 @@ open class PetAPI: APIBase {
<tags> <tags>
</tags> </tags>
<status>aeiou</status> <status>aeiou</status>
</Pet>, contentType=application/xml}, {example=[ { </Pet>}, {contentType=application/json, example=[ {
"tags" : [ { "photoUrls" : [ "aeiou" ],
"id" : 1, "name" : "doggie",
"name" : "aeiou"
} ],
"id" : 0, "id" : 0,
"category" : { "category" : {
"id" : 6, "name" : "aeiou",
"name" : "aeiou" "id" : 6
}, },
"status" : "available", "tags" : [ {
"name" : "doggie", "name" : "aeiou",
"photoUrls" : [ "aeiou" ] "id" : 1
} ], contentType=application/json}] } ],
"status" : "available"
} ]}]
- parameter status: (query) Status values that need to be considered for filter - parameter status: (query) Status values that need to be considered for filter
@ -279,7 +279,7 @@ open class PetAPI: APIBase {
- OAuth: - OAuth:
- type: oauth2 - type: oauth2
- name: petstore_auth - name: petstore_auth
- examples: [{example=<Pet> - examples: [{contentType=application/xml, example=<Pet>
<id>123456789</id> <id>123456789</id>
<name>doggie</name> <name>doggie</name>
<photoUrls> <photoUrls>
@ -288,21 +288,21 @@ open class PetAPI: APIBase {
<tags> <tags>
</tags> </tags>
<status>aeiou</status> <status>aeiou</status>
</Pet>, contentType=application/xml}, {example=[ { </Pet>}, {contentType=application/json, example=[ {
"tags" : [ { "photoUrls" : [ "aeiou" ],
"id" : 1, "name" : "doggie",
"name" : "aeiou"
} ],
"id" : 0, "id" : 0,
"category" : { "category" : {
"id" : 6, "name" : "aeiou",
"name" : "aeiou" "id" : 6
}, },
"status" : "available", "tags" : [ {
"name" : "doggie", "name" : "aeiou",
"photoUrls" : [ "aeiou" ] "id" : 1
} ], contentType=application/json}] } ],
- examples: [{example=<Pet> "status" : "available"
} ]}]
- examples: [{contentType=application/xml, example=<Pet>
<id>123456789</id> <id>123456789</id>
<name>doggie</name> <name>doggie</name>
<photoUrls> <photoUrls>
@ -311,20 +311,20 @@ open class PetAPI: APIBase {
<tags> <tags>
</tags> </tags>
<status>aeiou</status> <status>aeiou</status>
</Pet>, contentType=application/xml}, {example=[ { </Pet>}, {contentType=application/json, example=[ {
"tags" : [ { "photoUrls" : [ "aeiou" ],
"id" : 1, "name" : "doggie",
"name" : "aeiou"
} ],
"id" : 0, "id" : 0,
"category" : { "category" : {
"id" : 6, "name" : "aeiou",
"name" : "aeiou" "id" : 6
}, },
"status" : "available", "tags" : [ {
"name" : "doggie", "name" : "aeiou",
"photoUrls" : [ "aeiou" ] "id" : 1
} ], contentType=application/json}] } ],
"status" : "available"
} ]}]
- parameter tags: (query) Tags to filter by - parameter tags: (query) Tags to filter by
@ -383,7 +383,7 @@ open class PetAPI: APIBase {
- API Key: - API Key:
- type: apiKey api_key - type: apiKey api_key
- name: api_key - name: api_key
- examples: [{example=<Pet> - examples: [{contentType=application/xml, example=<Pet>
<id>123456789</id> <id>123456789</id>
<name>doggie</name> <name>doggie</name>
<photoUrls> <photoUrls>
@ -392,21 +392,21 @@ open class PetAPI: APIBase {
<tags> <tags>
</tags> </tags>
<status>aeiou</status> <status>aeiou</status>
</Pet>, contentType=application/xml}, {example={ </Pet>}, {contentType=application/json, example={
"tags" : [ { "photoUrls" : [ "aeiou" ],
"id" : 1, "name" : "doggie",
"name" : "aeiou"
} ],
"id" : 0, "id" : 0,
"category" : { "category" : {
"id" : 6, "name" : "aeiou",
"name" : "aeiou" "id" : 6
}, },
"status" : "available", "tags" : [ {
"name" : "doggie", "name" : "aeiou",
"photoUrls" : [ "aeiou" ] "id" : 1
}, contentType=application/json}] } ],
- examples: [{example=<Pet> "status" : "available"
}}]
- examples: [{contentType=application/xml, example=<Pet>
<id>123456789</id> <id>123456789</id>
<name>doggie</name> <name>doggie</name>
<photoUrls> <photoUrls>
@ -415,20 +415,20 @@ open class PetAPI: APIBase {
<tags> <tags>
</tags> </tags>
<status>aeiou</status> <status>aeiou</status>
</Pet>, contentType=application/xml}, {example={ </Pet>}, {contentType=application/json, example={
"tags" : [ { "photoUrls" : [ "aeiou" ],
"id" : 1, "name" : "doggie",
"name" : "aeiou"
} ],
"id" : 0, "id" : 0,
"category" : { "category" : {
"id" : 6, "name" : "aeiou",
"name" : "aeiou" "id" : 6
}, },
"status" : "available", "tags" : [ {
"name" : "doggie", "name" : "aeiou",
"photoUrls" : [ "aeiou" ] "id" : 1
}, contentType=application/json}] } ],
"status" : "available"
}}]
- parameter petId: (path) ID of pet to return - parameter petId: (path) ID of pet to return
@ -612,11 +612,11 @@ open class PetAPI: APIBase {
- OAuth: - OAuth:
- type: oauth2 - type: oauth2
- name: petstore_auth - name: petstore_auth
- examples: [{example={ - examples: [{contentType=application/json, example={
"message" : "aeiou",
"code" : 0, "code" : 0,
"type" : "aeiou" "type" : "aeiou",
}, contentType=application/json}] "message" : "aeiou"
}}]
- parameter petId: (path) ID of pet to update - parameter petId: (path) ID of pet to update
- parameter additionalMetadata: (form) Additional data to pass to server (optional) - parameter additionalMetadata: (form) Additional data to pass to server (optional)

View File

@ -99,9 +99,9 @@ open class StoreAPI: APIBase {
- API Key: - API Key:
- type: apiKey api_key - type: apiKey api_key
- name: api_key - name: api_key
- examples: [{example={ - examples: [{contentType=application/json, example={
"key" : 0 "key" : 0
}, contentType=application/json}] }}]
- returns: RequestBuilder<[String:Int32]> - returns: RequestBuilder<[String:Int32]>
*/ */
@ -152,36 +152,36 @@ open class StoreAPI: APIBase {
Find purchase order by ID Find purchase order by ID
- GET /store/order/{order_id} - GET /store/order/{order_id}
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - 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> <id>123456789</id>
<petId>123456789</petId> <petId>123456789</petId>
<quantity>123</quantity> <quantity>123</quantity>
<shipDate>2000-01-23T04:56:07.000Z</shipDate> <shipDate>2000-01-23T04:56:07.000Z</shipDate>
<status>aeiou</status> <status>aeiou</status>
<complete>true</complete> <complete>true</complete>
</Order>, contentType=application/xml}, {example={ </Order>}, {contentType=application/json, example={
"id" : 0,
"petId" : 6, "petId" : 6,
"complete" : false,
"status" : "placed",
"quantity" : 1, "quantity" : 1,
"shipDate" : "2000-01-23T04:56:07.000+00:00" "id" : 0,
}, contentType=application/json}] "shipDate" : "2000-01-23T04:56:07.000+00:00",
- examples: [{example=<Order> "complete" : false,
"status" : "placed"
}}]
- examples: [{contentType=application/xml, example=<Order>
<id>123456789</id> <id>123456789</id>
<petId>123456789</petId> <petId>123456789</petId>
<quantity>123</quantity> <quantity>123</quantity>
<shipDate>2000-01-23T04:56:07.000Z</shipDate> <shipDate>2000-01-23T04:56:07.000Z</shipDate>
<status>aeiou</status> <status>aeiou</status>
<complete>true</complete> <complete>true</complete>
</Order>, contentType=application/xml}, {example={ </Order>}, {contentType=application/json, example={
"id" : 0,
"petId" : 6, "petId" : 6,
"complete" : false,
"status" : "placed",
"quantity" : 1, "quantity" : 1,
"shipDate" : "2000-01-23T04:56:07.000+00:00" "id" : 0,
}, contentType=application/json}] "shipDate" : "2000-01-23T04:56:07.000+00:00",
"complete" : false,
"status" : "placed"
}}]
- parameter orderId: (path) ID of pet that needs to be fetched - 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 Place an order for a pet
- POST /store/order - POST /store/order
- -
- examples: [{example=<Order> - examples: [{contentType=application/xml, example=<Order>
<id>123456789</id> <id>123456789</id>
<petId>123456789</petId> <petId>123456789</petId>
<quantity>123</quantity> <quantity>123</quantity>
<shipDate>2000-01-23T04:56:07.000Z</shipDate> <shipDate>2000-01-23T04:56:07.000Z</shipDate>
<status>aeiou</status> <status>aeiou</status>
<complete>true</complete> <complete>true</complete>
</Order>, contentType=application/xml}, {example={ </Order>}, {contentType=application/json, example={
"id" : 0,
"petId" : 6, "petId" : 6,
"complete" : false,
"status" : "placed",
"quantity" : 1, "quantity" : 1,
"shipDate" : "2000-01-23T04:56:07.000+00:00" "id" : 0,
}, contentType=application/json}] "shipDate" : "2000-01-23T04:56:07.000+00:00",
- examples: [{example=<Order> "complete" : false,
"status" : "placed"
}}]
- examples: [{contentType=application/xml, example=<Order>
<id>123456789</id> <id>123456789</id>
<petId>123456789</petId> <petId>123456789</petId>
<quantity>123</quantity> <quantity>123</quantity>
<shipDate>2000-01-23T04:56:07.000Z</shipDate> <shipDate>2000-01-23T04:56:07.000Z</shipDate>
<status>aeiou</status> <status>aeiou</status>
<complete>true</complete> <complete>true</complete>
</Order>, contentType=application/xml}, {example={ </Order>}, {contentType=application/json, example={
"id" : 0,
"petId" : 6, "petId" : 6,
"complete" : false,
"status" : "placed",
"quantity" : 1, "quantity" : 1,
"shipDate" : "2000-01-23T04:56:07.000+00:00" "id" : 0,
}, contentType=application/json}] "shipDate" : "2000-01-23T04:56:07.000+00:00",
"complete" : false,
"status" : "placed"
}}]
- parameter body: (body) order placed for purchasing the pet - parameter body: (body) order placed for purchasing the pet

View File

@ -254,7 +254,7 @@ open class UserAPI: APIBase {
Get user by user name Get user by user name
- GET /user/{username} - GET /user/{username}
- -
- examples: [{example=<User> - examples: [{contentType=application/xml, example=<User>
<id>123456789</id> <id>123456789</id>
<username>aeiou</username> <username>aeiou</username>
<firstName>aeiou</firstName> <firstName>aeiou</firstName>
@ -263,17 +263,17 @@ open class UserAPI: APIBase {
<password>aeiou</password> <password>aeiou</password>
<phone>aeiou</phone> <phone>aeiou</phone>
<userStatus>123</userStatus> <userStatus>123</userStatus>
</User>, contentType=application/xml}, {example={ </User>}, {contentType=application/json, example={
"id" : 0,
"lastName" : "aeiou",
"phone" : "aeiou",
"username" : "aeiou",
"email" : "aeiou",
"userStatus" : 6,
"firstName" : "aeiou", "firstName" : "aeiou",
"password" : "aeiou" "lastName" : "aeiou",
}, contentType=application/json}] "password" : "aeiou",
- examples: [{example=<User> "userStatus" : 6,
"phone" : "aeiou",
"id" : 0,
"email" : "aeiou",
"username" : "aeiou"
}}]
- examples: [{contentType=application/xml, example=<User>
<id>123456789</id> <id>123456789</id>
<username>aeiou</username> <username>aeiou</username>
<firstName>aeiou</firstName> <firstName>aeiou</firstName>
@ -282,16 +282,16 @@ open class UserAPI: APIBase {
<password>aeiou</password> <password>aeiou</password>
<phone>aeiou</phone> <phone>aeiou</phone>
<userStatus>123</userStatus> <userStatus>123</userStatus>
</User>, contentType=application/xml}, {example={ </User>}, {contentType=application/json, example={
"id" : 0,
"lastName" : "aeiou",
"phone" : "aeiou",
"username" : "aeiou",
"email" : "aeiou",
"userStatus" : 6,
"firstName" : "aeiou", "firstName" : "aeiou",
"password" : "aeiou" "lastName" : "aeiou",
}, contentType=application/json}] "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. - 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)]
- 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: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
- examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}] - examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
- parameter username: (query) The user name for login - parameter username: (query) The user name for login
- parameter password: (query) The password for login in clear text - parameter password: (query) The password for login in clear text

View File

@ -212,7 +212,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
} }
} }
private func buildHeaders() -> [String: String] { open func buildHeaders() -> [String: String] {
var httpHeaders = SessionManager.defaultHTTPHeaders var httpHeaders = SessionManager.defaultHTTPHeaders
for (key, value) in self.headers { for (key, value) in self.headers {
httpHeaders[key] = value httpHeaders[key] = value

View File

@ -10,7 +10,7 @@ open class PetstoreClientAPI {
open static var basePath = "http://petstore.swagger.io:80/v2" open static var basePath = "http://petstore.swagger.io:80/v2"
open static var credential: URLCredential? open static var credential: URLCredential?
open static var customHeaders: [String:String] = [:] open static var customHeaders: [String:String] = [:]
static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() open static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()
} }
open class APIBase { open class APIBase {

View File

@ -47,9 +47,9 @@ open class FakeAPI: APIBase {
To test \"client\" model To test \"client\" model
- PATCH /fake - PATCH /fake
- To test \"client\" model - To test \"client\" model
- examples: [{example={ - examples: [{contentType=application/json, example={
"client" : "aeiou" "client" : "aeiou"
}, contentType=application/json}] }}]
- parameter body: (body) client model - parameter body: (body) client model

View File

@ -181,7 +181,7 @@ open class PetAPI: APIBase {
- OAuth: - OAuth:
- type: oauth2 - type: oauth2
- name: petstore_auth - name: petstore_auth
- examples: [{example=<Pet> - examples: [{contentType=application/xml, example=<Pet>
<id>123456789</id> <id>123456789</id>
<name>doggie</name> <name>doggie</name>
<photoUrls> <photoUrls>
@ -190,21 +190,21 @@ open class PetAPI: APIBase {
<tags> <tags>
</tags> </tags>
<status>aeiou</status> <status>aeiou</status>
</Pet>, contentType=application/xml}, {example=[ { </Pet>}, {contentType=application/json, example=[ {
"tags" : [ { "photoUrls" : [ "aeiou" ],
"id" : 1, "name" : "doggie",
"name" : "aeiou"
} ],
"id" : 0, "id" : 0,
"category" : { "category" : {
"id" : 6, "name" : "aeiou",
"name" : "aeiou" "id" : 6
}, },
"status" : "available", "tags" : [ {
"name" : "doggie", "name" : "aeiou",
"photoUrls" : [ "aeiou" ] "id" : 1
} ], contentType=application/json}] } ],
- examples: [{example=<Pet> "status" : "available"
} ]}]
- examples: [{contentType=application/xml, example=<Pet>
<id>123456789</id> <id>123456789</id>
<name>doggie</name> <name>doggie</name>
<photoUrls> <photoUrls>
@ -213,20 +213,20 @@ open class PetAPI: APIBase {
<tags> <tags>
</tags> </tags>
<status>aeiou</status> <status>aeiou</status>
</Pet>, contentType=application/xml}, {example=[ { </Pet>}, {contentType=application/json, example=[ {
"tags" : [ { "photoUrls" : [ "aeiou" ],
"id" : 1, "name" : "doggie",
"name" : "aeiou"
} ],
"id" : 0, "id" : 0,
"category" : { "category" : {
"id" : 6, "name" : "aeiou",
"name" : "aeiou" "id" : 6
}, },
"status" : "available", "tags" : [ {
"name" : "doggie", "name" : "aeiou",
"photoUrls" : [ "aeiou" ] "id" : 1
} ], contentType=application/json}] } ],
"status" : "available"
} ]}]
- parameter status: (query) Status values that need to be considered for filter - parameter status: (query) Status values that need to be considered for filter
@ -287,7 +287,7 @@ open class PetAPI: APIBase {
- OAuth: - OAuth:
- type: oauth2 - type: oauth2
- name: petstore_auth - name: petstore_auth
- examples: [{example=<Pet> - examples: [{contentType=application/xml, example=<Pet>
<id>123456789</id> <id>123456789</id>
<name>doggie</name> <name>doggie</name>
<photoUrls> <photoUrls>
@ -296,21 +296,21 @@ open class PetAPI: APIBase {
<tags> <tags>
</tags> </tags>
<status>aeiou</status> <status>aeiou</status>
</Pet>, contentType=application/xml}, {example=[ { </Pet>}, {contentType=application/json, example=[ {
"tags" : [ { "photoUrls" : [ "aeiou" ],
"id" : 1, "name" : "doggie",
"name" : "aeiou"
} ],
"id" : 0, "id" : 0,
"category" : { "category" : {
"id" : 6, "name" : "aeiou",
"name" : "aeiou" "id" : 6
}, },
"status" : "available", "tags" : [ {
"name" : "doggie", "name" : "aeiou",
"photoUrls" : [ "aeiou" ] "id" : 1
} ], contentType=application/json}] } ],
- examples: [{example=<Pet> "status" : "available"
} ]}]
- examples: [{contentType=application/xml, example=<Pet>
<id>123456789</id> <id>123456789</id>
<name>doggie</name> <name>doggie</name>
<photoUrls> <photoUrls>
@ -319,20 +319,20 @@ open class PetAPI: APIBase {
<tags> <tags>
</tags> </tags>
<status>aeiou</status> <status>aeiou</status>
</Pet>, contentType=application/xml}, {example=[ { </Pet>}, {contentType=application/json, example=[ {
"tags" : [ { "photoUrls" : [ "aeiou" ],
"id" : 1, "name" : "doggie",
"name" : "aeiou"
} ],
"id" : 0, "id" : 0,
"category" : { "category" : {
"id" : 6, "name" : "aeiou",
"name" : "aeiou" "id" : 6
}, },
"status" : "available", "tags" : [ {
"name" : "doggie", "name" : "aeiou",
"photoUrls" : [ "aeiou" ] "id" : 1
} ], contentType=application/json}] } ],
"status" : "available"
} ]}]
- parameter tags: (query) Tags to filter by - parameter tags: (query) Tags to filter by
@ -393,7 +393,7 @@ open class PetAPI: APIBase {
- API Key: - API Key:
- type: apiKey api_key - type: apiKey api_key
- name: api_key - name: api_key
- examples: [{example=<Pet> - examples: [{contentType=application/xml, example=<Pet>
<id>123456789</id> <id>123456789</id>
<name>doggie</name> <name>doggie</name>
<photoUrls> <photoUrls>
@ -402,21 +402,21 @@ open class PetAPI: APIBase {
<tags> <tags>
</tags> </tags>
<status>aeiou</status> <status>aeiou</status>
</Pet>, contentType=application/xml}, {example={ </Pet>}, {contentType=application/json, example={
"tags" : [ { "photoUrls" : [ "aeiou" ],
"id" : 1, "name" : "doggie",
"name" : "aeiou"
} ],
"id" : 0, "id" : 0,
"category" : { "category" : {
"id" : 6, "name" : "aeiou",
"name" : "aeiou" "id" : 6
}, },
"status" : "available", "tags" : [ {
"name" : "doggie", "name" : "aeiou",
"photoUrls" : [ "aeiou" ] "id" : 1
}, contentType=application/json}] } ],
- examples: [{example=<Pet> "status" : "available"
}}]
- examples: [{contentType=application/xml, example=<Pet>
<id>123456789</id> <id>123456789</id>
<name>doggie</name> <name>doggie</name>
<photoUrls> <photoUrls>
@ -425,20 +425,20 @@ open class PetAPI: APIBase {
<tags> <tags>
</tags> </tags>
<status>aeiou</status> <status>aeiou</status>
</Pet>, contentType=application/xml}, {example={ </Pet>}, {contentType=application/json, example={
"tags" : [ { "photoUrls" : [ "aeiou" ],
"id" : 1, "name" : "doggie",
"name" : "aeiou"
} ],
"id" : 0, "id" : 0,
"category" : { "category" : {
"id" : 6, "name" : "aeiou",
"name" : "aeiou" "id" : 6
}, },
"status" : "available", "tags" : [ {
"name" : "doggie", "name" : "aeiou",
"photoUrls" : [ "aeiou" ] "id" : 1
}, contentType=application/json}] } ],
"status" : "available"
}}]
- parameter petId: (path) ID of pet to return - parameter petId: (path) ID of pet to return
@ -628,11 +628,11 @@ open class PetAPI: APIBase {
- OAuth: - OAuth:
- type: oauth2 - type: oauth2
- name: petstore_auth - name: petstore_auth
- examples: [{example={ - examples: [{contentType=application/json, example={
"message" : "aeiou",
"code" : 0, "code" : 0,
"type" : "aeiou" "type" : "aeiou",
}, contentType=application/json}] "message" : "aeiou"
}}]
- parameter petId: (path) ID of pet to update - parameter petId: (path) ID of pet to update
- parameter additionalMetadata: (form) Additional data to pass to server (optional) - parameter additionalMetadata: (form) Additional data to pass to server (optional)

View File

@ -103,9 +103,9 @@ open class StoreAPI: APIBase {
- API Key: - API Key:
- type: apiKey api_key - type: apiKey api_key
- name: api_key - name: api_key
- examples: [{example={ - examples: [{contentType=application/json, example={
"key" : 0 "key" : 0
}, contentType=application/json}] }}]
- returns: RequestBuilder<[String:Int32]> - returns: RequestBuilder<[String:Int32]>
*/ */
@ -158,36 +158,36 @@ open class StoreAPI: APIBase {
Find purchase order by ID Find purchase order by ID
- GET /store/order/{order_id} - GET /store/order/{order_id}
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - 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> <id>123456789</id>
<petId>123456789</petId> <petId>123456789</petId>
<quantity>123</quantity> <quantity>123</quantity>
<shipDate>2000-01-23T04:56:07.000Z</shipDate> <shipDate>2000-01-23T04:56:07.000Z</shipDate>
<status>aeiou</status> <status>aeiou</status>
<complete>true</complete> <complete>true</complete>
</Order>, contentType=application/xml}, {example={ </Order>}, {contentType=application/json, example={
"id" : 0,
"petId" : 6, "petId" : 6,
"complete" : false,
"status" : "placed",
"quantity" : 1, "quantity" : 1,
"shipDate" : "2000-01-23T04:56:07.000+00:00" "id" : 0,
}, contentType=application/json}] "shipDate" : "2000-01-23T04:56:07.000+00:00",
- examples: [{example=<Order> "complete" : false,
"status" : "placed"
}}]
- examples: [{contentType=application/xml, example=<Order>
<id>123456789</id> <id>123456789</id>
<petId>123456789</petId> <petId>123456789</petId>
<quantity>123</quantity> <quantity>123</quantity>
<shipDate>2000-01-23T04:56:07.000Z</shipDate> <shipDate>2000-01-23T04:56:07.000Z</shipDate>
<status>aeiou</status> <status>aeiou</status>
<complete>true</complete> <complete>true</complete>
</Order>, contentType=application/xml}, {example={ </Order>}, {contentType=application/json, example={
"id" : 0,
"petId" : 6, "petId" : 6,
"complete" : false,
"status" : "placed",
"quantity" : 1, "quantity" : 1,
"shipDate" : "2000-01-23T04:56:07.000+00:00" "id" : 0,
}, contentType=application/json}] "shipDate" : "2000-01-23T04:56:07.000+00:00",
"complete" : false,
"status" : "placed"
}}]
- parameter orderId: (path) ID of pet that needs to be fetched - 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 Place an order for a pet
- POST /store/order - POST /store/order
- -
- examples: [{example=<Order> - examples: [{contentType=application/xml, example=<Order>
<id>123456789</id> <id>123456789</id>
<petId>123456789</petId> <petId>123456789</petId>
<quantity>123</quantity> <quantity>123</quantity>
<shipDate>2000-01-23T04:56:07.000Z</shipDate> <shipDate>2000-01-23T04:56:07.000Z</shipDate>
<status>aeiou</status> <status>aeiou</status>
<complete>true</complete> <complete>true</complete>
</Order>, contentType=application/xml}, {example={ </Order>}, {contentType=application/json, example={
"id" : 0,
"petId" : 6, "petId" : 6,
"complete" : false,
"status" : "placed",
"quantity" : 1, "quantity" : 1,
"shipDate" : "2000-01-23T04:56:07.000+00:00" "id" : 0,
}, contentType=application/json}] "shipDate" : "2000-01-23T04:56:07.000+00:00",
- examples: [{example=<Order> "complete" : false,
"status" : "placed"
}}]
- examples: [{contentType=application/xml, example=<Order>
<id>123456789</id> <id>123456789</id>
<petId>123456789</petId> <petId>123456789</petId>
<quantity>123</quantity> <quantity>123</quantity>
<shipDate>2000-01-23T04:56:07.000Z</shipDate> <shipDate>2000-01-23T04:56:07.000Z</shipDate>
<status>aeiou</status> <status>aeiou</status>
<complete>true</complete> <complete>true</complete>
</Order>, contentType=application/xml}, {example={ </Order>}, {contentType=application/json, example={
"id" : 0,
"petId" : 6, "petId" : 6,
"complete" : false,
"status" : "placed",
"quantity" : 1, "quantity" : 1,
"shipDate" : "2000-01-23T04:56:07.000+00:00" "id" : 0,
}, contentType=application/json}] "shipDate" : "2000-01-23T04:56:07.000+00:00",
"complete" : false,
"status" : "placed"
}}]
- parameter body: (body) order placed for purchasing the pet - parameter body: (body) order placed for purchasing the pet

View File

@ -264,7 +264,7 @@ open class UserAPI: APIBase {
Get user by user name Get user by user name
- GET /user/{username} - GET /user/{username}
- -
- examples: [{example=<User> - examples: [{contentType=application/xml, example=<User>
<id>123456789</id> <id>123456789</id>
<username>aeiou</username> <username>aeiou</username>
<firstName>aeiou</firstName> <firstName>aeiou</firstName>
@ -273,17 +273,17 @@ open class UserAPI: APIBase {
<password>aeiou</password> <password>aeiou</password>
<phone>aeiou</phone> <phone>aeiou</phone>
<userStatus>123</userStatus> <userStatus>123</userStatus>
</User>, contentType=application/xml}, {example={ </User>}, {contentType=application/json, example={
"id" : 0,
"lastName" : "aeiou",
"phone" : "aeiou",
"username" : "aeiou",
"email" : "aeiou",
"userStatus" : 6,
"firstName" : "aeiou", "firstName" : "aeiou",
"password" : "aeiou" "lastName" : "aeiou",
}, contentType=application/json}] "password" : "aeiou",
- examples: [{example=<User> "userStatus" : 6,
"phone" : "aeiou",
"id" : 0,
"email" : "aeiou",
"username" : "aeiou"
}}]
- examples: [{contentType=application/xml, example=<User>
<id>123456789</id> <id>123456789</id>
<username>aeiou</username> <username>aeiou</username>
<firstName>aeiou</firstName> <firstName>aeiou</firstName>
@ -292,16 +292,16 @@ open class UserAPI: APIBase {
<password>aeiou</password> <password>aeiou</password>
<phone>aeiou</phone> <phone>aeiou</phone>
<userStatus>123</userStatus> <userStatus>123</userStatus>
</User>, contentType=application/xml}, {example={ </User>}, {contentType=application/json, example={
"id" : 0,
"lastName" : "aeiou",
"phone" : "aeiou",
"username" : "aeiou",
"email" : "aeiou",
"userStatus" : 6,
"firstName" : "aeiou", "firstName" : "aeiou",
"password" : "aeiou" "lastName" : "aeiou",
}, contentType=application/json}] "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. - 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)]
- 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: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
- examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}] - examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}]
- parameter username: (query) The user name for login - parameter username: (query) The user name for login
- parameter password: (query) The password for login in clear text - parameter password: (query) The password for login in clear text

View File

@ -212,7 +212,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
} }
} }
private func buildHeaders() -> [String: String] { open func buildHeaders() -> [String: String] {
var httpHeaders = SessionManager.defaultHTTPHeaders var httpHeaders = SessionManager.defaultHTTPHeaders
for (key, value) in self.headers { for (key, value) in self.headers {
httpHeaders[key] = value httpHeaders[key] = value