forked from loafle/openapi-generator-original
Merge branch 'Daxten-topic/swagger_fix'
This commit is contained in:
@@ -88,7 +88,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
|
||||
switch encodingResult {
|
||||
case .success(let upload, _, _):
|
||||
if let onProgressReady = self.onProgressReady {
|
||||
onProgressReady(upload.progress)
|
||||
onProgressReady(upload.uploadProgress)
|
||||
}
|
||||
self.processRequest(request: upload, managerId, completion)
|
||||
case .failure(let encodingError):
|
||||
|
||||
@@ -123,50 +123,50 @@ open class PetAPI: APIBase {
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456</id>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
<photoUrls>string</photoUrls>
|
||||
<photoUrls>aeiou</photoUrls>
|
||||
</photoUrls>
|
||||
<tags>
|
||||
</tags>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 123456789,
|
||||
"id" : 4,
|
||||
"category" : {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 5
|
||||
},
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 6
|
||||
} ],
|
||||
"status" : "aeiou"
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456</id>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
<photoUrls>string</photoUrls>
|
||||
<photoUrls>aeiou</photoUrls>
|
||||
</photoUrls>
|
||||
<tags>
|
||||
</tags>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 123456789,
|
||||
"id" : 4,
|
||||
"category" : {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 5
|
||||
},
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 6
|
||||
} ],
|
||||
"status" : "aeiou"
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
|
||||
- parameter status: (query) Status values that need to be considered for filter
|
||||
@@ -210,50 +210,50 @@ open class PetAPI: APIBase {
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456</id>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
<photoUrls>string</photoUrls>
|
||||
<photoUrls>aeiou</photoUrls>
|
||||
</photoUrls>
|
||||
<tags>
|
||||
</tags>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 123456789,
|
||||
"id" : 2,
|
||||
"category" : {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 5
|
||||
},
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 6
|
||||
} ],
|
||||
"status" : "aeiou"
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456</id>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
<photoUrls>string</photoUrls>
|
||||
<photoUrls>aeiou</photoUrls>
|
||||
</photoUrls>
|
||||
<tags>
|
||||
</tags>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 123456789,
|
||||
"id" : 2,
|
||||
"category" : {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 5
|
||||
},
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 6
|
||||
} ],
|
||||
"status" : "aeiou"
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
|
||||
- parameter tags: (query) Tags to filter by
|
||||
@@ -297,50 +297,50 @@ open class PetAPI: APIBase {
|
||||
- type: apiKey api_key
|
||||
- name: api_key
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456</id>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
<photoUrls>string</photoUrls>
|
||||
<photoUrls>aeiou</photoUrls>
|
||||
</photoUrls>
|
||||
<tags>
|
||||
</tags>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
</Pet>}, {contentType=application/json, example={
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 123456789,
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 5
|
||||
},
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 3
|
||||
} ],
|
||||
"status" : "aeiou"
|
||||
"status" : "available"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456</id>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
<photoUrls>string</photoUrls>
|
||||
<photoUrls>aeiou</photoUrls>
|
||||
</photoUrls>
|
||||
<tags>
|
||||
</tags>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
</Pet>}, {contentType=application/json, example={
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 123456789,
|
||||
"id" : 0,
|
||||
"category" : {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 5
|
||||
},
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 3
|
||||
} ],
|
||||
"status" : "aeiou"
|
||||
"status" : "available"
|
||||
}}]
|
||||
|
||||
- parameter petId: (path) ID of pet to return
|
||||
@@ -471,7 +471,7 @@ open class PetAPI: APIBase {
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{contentType=application/json, example={
|
||||
"code" : 123,
|
||||
"code" : 4,
|
||||
"type" : "aeiou",
|
||||
"message" : "aeiou"
|
||||
}}]
|
||||
|
||||
@@ -66,7 +66,7 @@ open class StoreAPI: APIBase {
|
||||
- type: apiKey api_key
|
||||
- name: api_key
|
||||
- examples: [{contentType=application/json, example={
|
||||
"key" : 123
|
||||
"key" : 7
|
||||
}}]
|
||||
|
||||
- returns: RequestBuilder<[String:Int32]>
|
||||
@@ -102,34 +102,34 @@ open class StoreAPI: APIBase {
|
||||
- GET /store/order/{orderId}
|
||||
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456</id>
|
||||
<petId>123456</petId>
|
||||
<quantity>0</quantity>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 123456789,
|
||||
"quantity" : 123,
|
||||
"id" : 123456789,
|
||||
"petId" : 1,
|
||||
"quantity" : 7,
|
||||
"id" : 5,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : true,
|
||||
"status" : "aeiou"
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456</id>
|
||||
<petId>123456</petId>
|
||||
<quantity>0</quantity>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 123456789,
|
||||
"quantity" : 123,
|
||||
"id" : 123456789,
|
||||
"petId" : 1,
|
||||
"quantity" : 7,
|
||||
"id" : 5,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : true,
|
||||
"status" : "aeiou"
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
|
||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||
@@ -168,34 +168,34 @@ open class StoreAPI: APIBase {
|
||||
- POST /store/order
|
||||
-
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456</id>
|
||||
<petId>123456</petId>
|
||||
<quantity>0</quantity>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 123456789,
|
||||
"quantity" : 123,
|
||||
"id" : 123456789,
|
||||
"petId" : 3,
|
||||
"quantity" : 1,
|
||||
"id" : 9,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : true,
|
||||
"status" : "aeiou"
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456</id>
|
||||
<petId>123456</petId>
|
||||
<quantity>0</quantity>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 123456789,
|
||||
"quantity" : 123,
|
||||
"id" : 123456789,
|
||||
"petId" : 3,
|
||||
"quantity" : 1,
|
||||
"id" : 9,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : true,
|
||||
"status" : "aeiou"
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
|
||||
- parameter body: (body) order placed for purchasing the pet
|
||||
|
||||
@@ -169,40 +169,40 @@ open class UserAPI: APIBase {
|
||||
- GET /user/{username}
|
||||
-
|
||||
- examples: [{contentType=application/xml, example=<User>
|
||||
<id>123456</id>
|
||||
<username>string</username>
|
||||
<firstName>string</firstName>
|
||||
<lastName>string</lastName>
|
||||
<email>string</email>
|
||||
<password>string</password>
|
||||
<phone>string</phone>
|
||||
<userStatus>0</userStatus>
|
||||
<id>123456789</id>
|
||||
<username>aeiou</username>
|
||||
<firstName>aeiou</firstName>
|
||||
<lastName>aeiou</lastName>
|
||||
<email>aeiou</email>
|
||||
<password>aeiou</password>
|
||||
<phone>aeiou</phone>
|
||||
<userStatus>123</userStatus>
|
||||
</User>}, {contentType=application/json, example={
|
||||
"firstName" : "aeiou",
|
||||
"lastName" : "aeiou",
|
||||
"password" : "aeiou",
|
||||
"userStatus" : 123,
|
||||
"userStatus" : 0,
|
||||
"phone" : "aeiou",
|
||||
"id" : 123456789,
|
||||
"id" : 7,
|
||||
"email" : "aeiou",
|
||||
"username" : "aeiou"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<User>
|
||||
<id>123456</id>
|
||||
<username>string</username>
|
||||
<firstName>string</firstName>
|
||||
<lastName>string</lastName>
|
||||
<email>string</email>
|
||||
<password>string</password>
|
||||
<phone>string</phone>
|
||||
<userStatus>0</userStatus>
|
||||
<id>123456789</id>
|
||||
<username>aeiou</username>
|
||||
<firstName>aeiou</firstName>
|
||||
<lastName>aeiou</lastName>
|
||||
<email>aeiou</email>
|
||||
<password>aeiou</password>
|
||||
<phone>aeiou</phone>
|
||||
<userStatus>123</userStatus>
|
||||
</User>}, {contentType=application/json, example={
|
||||
"firstName" : "aeiou",
|
||||
"lastName" : "aeiou",
|
||||
"password" : "aeiou",
|
||||
"userStatus" : 123,
|
||||
"userStatus" : 0,
|
||||
"phone" : "aeiou",
|
||||
"id" : 123456789,
|
||||
"id" : 7,
|
||||
"email" : "aeiou",
|
||||
"username" : "aeiou"
|
||||
}}]
|
||||
@@ -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: [{contentType=application/xml, example=string}, {contentType=application/json, example="aeiou"}]
|
||||
- examples: [{contentType=application/xml, example=string}, {contentType=application/json, example="aeiou"}]
|
||||
- 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
|
||||
|
||||
@@ -88,7 +88,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
|
||||
switch encodingResult {
|
||||
case .success(let upload, _, _):
|
||||
if let onProgressReady = self.onProgressReady {
|
||||
onProgressReady(upload.progress)
|
||||
onProgressReady(upload.uploadProgress)
|
||||
}
|
||||
self.processRequest(request: upload, managerId, completion)
|
||||
case .failure(let encodingError):
|
||||
|
||||
@@ -176,50 +176,50 @@ open class PetAPI: APIBase {
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456</id>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
<photoUrls>string</photoUrls>
|
||||
<photoUrls>aeiou</photoUrls>
|
||||
</photoUrls>
|
||||
<tags>
|
||||
</tags>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 123456789,
|
||||
"id" : 1,
|
||||
"category" : {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 0
|
||||
},
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 2
|
||||
} ],
|
||||
"status" : "aeiou"
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456</id>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
<photoUrls>string</photoUrls>
|
||||
<photoUrls>aeiou</photoUrls>
|
||||
</photoUrls>
|
||||
<tags>
|
||||
</tags>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 123456789,
|
||||
"id" : 1,
|
||||
"category" : {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 0
|
||||
},
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 2
|
||||
} ],
|
||||
"status" : "aeiou"
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
|
||||
- parameter status: (query) Status values that need to be considered for filter
|
||||
@@ -280,50 +280,50 @@ open class PetAPI: APIBase {
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456</id>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
<photoUrls>string</photoUrls>
|
||||
<photoUrls>aeiou</photoUrls>
|
||||
</photoUrls>
|
||||
<tags>
|
||||
</tags>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 123456789,
|
||||
"id" : 4,
|
||||
"category" : {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 9
|
||||
},
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 3
|
||||
} ],
|
||||
"status" : "aeiou"
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456</id>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
<photoUrls>string</photoUrls>
|
||||
<photoUrls>aeiou</photoUrls>
|
||||
</photoUrls>
|
||||
<tags>
|
||||
</tags>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 123456789,
|
||||
"id" : 4,
|
||||
"category" : {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 9
|
||||
},
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 3
|
||||
} ],
|
||||
"status" : "aeiou"
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
|
||||
- parameter tags: (query) Tags to filter by
|
||||
@@ -384,50 +384,50 @@ open class PetAPI: APIBase {
|
||||
- type: apiKey api_key
|
||||
- name: api_key
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456</id>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
<photoUrls>string</photoUrls>
|
||||
<photoUrls>aeiou</photoUrls>
|
||||
</photoUrls>
|
||||
<tags>
|
||||
</tags>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
</Pet>}, {contentType=application/json, example={
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 123456789,
|
||||
"id" : 8,
|
||||
"category" : {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 5
|
||||
},
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 4
|
||||
} ],
|
||||
"status" : "aeiou"
|
||||
"status" : "available"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456</id>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
<photoUrls>string</photoUrls>
|
||||
<photoUrls>aeiou</photoUrls>
|
||||
</photoUrls>
|
||||
<tags>
|
||||
</tags>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
</Pet>}, {contentType=application/json, example={
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 123456789,
|
||||
"id" : 8,
|
||||
"category" : {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 5
|
||||
},
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 4
|
||||
} ],
|
||||
"status" : "aeiou"
|
||||
"status" : "available"
|
||||
}}]
|
||||
|
||||
- parameter petId: (path) ID of pet to return
|
||||
@@ -613,7 +613,7 @@ open class PetAPI: APIBase {
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{contentType=application/json, example={
|
||||
"code" : 123,
|
||||
"code" : 0,
|
||||
"type" : "aeiou",
|
||||
"message" : "aeiou"
|
||||
}}]
|
||||
|
||||
@@ -100,7 +100,7 @@ open class StoreAPI: APIBase {
|
||||
- type: apiKey api_key
|
||||
- name: api_key
|
||||
- examples: [{contentType=application/json, example={
|
||||
"key" : 123
|
||||
"key" : 7
|
||||
}}]
|
||||
|
||||
- returns: RequestBuilder<[String:Int32]>
|
||||
@@ -153,34 +153,34 @@ open class StoreAPI: APIBase {
|
||||
- GET /store/order/{orderId}
|
||||
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456</id>
|
||||
<petId>123456</petId>
|
||||
<quantity>0</quantity>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 123456789,
|
||||
"quantity" : 123,
|
||||
"id" : 123456789,
|
||||
"petId" : 2,
|
||||
"quantity" : 9,
|
||||
"id" : 4,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : true,
|
||||
"status" : "aeiou"
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456</id>
|
||||
<petId>123456</petId>
|
||||
<quantity>0</quantity>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 123456789,
|
||||
"quantity" : 123,
|
||||
"id" : 123456789,
|
||||
"petId" : 2,
|
||||
"quantity" : 9,
|
||||
"id" : 4,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : true,
|
||||
"status" : "aeiou"
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
|
||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||
@@ -236,34 +236,34 @@ open class StoreAPI: APIBase {
|
||||
- POST /store/order
|
||||
-
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456</id>
|
||||
<petId>123456</petId>
|
||||
<quantity>0</quantity>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 123456789,
|
||||
"quantity" : 123,
|
||||
"id" : 123456789,
|
||||
"petId" : 8,
|
||||
"quantity" : 2,
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : true,
|
||||
"status" : "aeiou"
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456</id>
|
||||
<petId>123456</petId>
|
||||
<quantity>0</quantity>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 123456789,
|
||||
"quantity" : 123,
|
||||
"id" : 123456789,
|
||||
"petId" : 8,
|
||||
"quantity" : 2,
|
||||
"id" : 0,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : true,
|
||||
"status" : "aeiou"
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
|
||||
- parameter body: (body) order placed for purchasing the pet
|
||||
|
||||
@@ -255,40 +255,40 @@ open class UserAPI: APIBase {
|
||||
- GET /user/{username}
|
||||
-
|
||||
- examples: [{contentType=application/xml, example=<User>
|
||||
<id>123456</id>
|
||||
<username>string</username>
|
||||
<firstName>string</firstName>
|
||||
<lastName>string</lastName>
|
||||
<email>string</email>
|
||||
<password>string</password>
|
||||
<phone>string</phone>
|
||||
<userStatus>0</userStatus>
|
||||
<id>123456789</id>
|
||||
<username>aeiou</username>
|
||||
<firstName>aeiou</firstName>
|
||||
<lastName>aeiou</lastName>
|
||||
<email>aeiou</email>
|
||||
<password>aeiou</password>
|
||||
<phone>aeiou</phone>
|
||||
<userStatus>123</userStatus>
|
||||
</User>}, {contentType=application/json, example={
|
||||
"firstName" : "aeiou",
|
||||
"lastName" : "aeiou",
|
||||
"password" : "aeiou",
|
||||
"userStatus" : 123,
|
||||
"userStatus" : 9,
|
||||
"phone" : "aeiou",
|
||||
"id" : 123456789,
|
||||
"id" : 9,
|
||||
"email" : "aeiou",
|
||||
"username" : "aeiou"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<User>
|
||||
<id>123456</id>
|
||||
<username>string</username>
|
||||
<firstName>string</firstName>
|
||||
<lastName>string</lastName>
|
||||
<email>string</email>
|
||||
<password>string</password>
|
||||
<phone>string</phone>
|
||||
<userStatus>0</userStatus>
|
||||
<id>123456789</id>
|
||||
<username>aeiou</username>
|
||||
<firstName>aeiou</firstName>
|
||||
<lastName>aeiou</lastName>
|
||||
<email>aeiou</email>
|
||||
<password>aeiou</password>
|
||||
<phone>aeiou</phone>
|
||||
<userStatus>123</userStatus>
|
||||
</User>}, {contentType=application/json, example={
|
||||
"firstName" : "aeiou",
|
||||
"lastName" : "aeiou",
|
||||
"password" : "aeiou",
|
||||
"userStatus" : 123,
|
||||
"userStatus" : 9,
|
||||
"phone" : "aeiou",
|
||||
"id" : 123456789,
|
||||
"id" : 9,
|
||||
"email" : "aeiou",
|
||||
"username" : "aeiou"
|
||||
}}]
|
||||
@@ -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: [{contentType=application/xml, example=string}, {contentType=application/json, example="aeiou"}]
|
||||
- examples: [{contentType=application/xml, example=string}, {contentType=application/json, example="aeiou"}]
|
||||
- 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
|
||||
|
||||
@@ -88,7 +88,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
|
||||
switch encodingResult {
|
||||
case .success(let upload, _, _):
|
||||
if let onProgressReady = self.onProgressReady {
|
||||
onProgressReady(upload.progress)
|
||||
onProgressReady(upload.uploadProgress)
|
||||
}
|
||||
self.processRequest(request: upload, managerId, completion)
|
||||
case .failure(let encodingError):
|
||||
|
||||
@@ -182,50 +182,50 @@ open class PetAPI: APIBase {
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456</id>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
<photoUrls>string</photoUrls>
|
||||
<photoUrls>aeiou</photoUrls>
|
||||
</photoUrls>
|
||||
<tags>
|
||||
</tags>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 123456789,
|
||||
"id" : 2,
|
||||
"category" : {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 2
|
||||
},
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 0
|
||||
} ],
|
||||
"status" : "aeiou"
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456</id>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
<photoUrls>string</photoUrls>
|
||||
<photoUrls>aeiou</photoUrls>
|
||||
</photoUrls>
|
||||
<tags>
|
||||
</tags>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 123456789,
|
||||
"id" : 2,
|
||||
"category" : {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 2
|
||||
},
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 0
|
||||
} ],
|
||||
"status" : "aeiou"
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
|
||||
- parameter status: (query) Status values that need to be considered for filter
|
||||
@@ -288,50 +288,50 @@ open class PetAPI: APIBase {
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456</id>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
<photoUrls>string</photoUrls>
|
||||
<photoUrls>aeiou</photoUrls>
|
||||
</photoUrls>
|
||||
<tags>
|
||||
</tags>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 123456789,
|
||||
"id" : 4,
|
||||
"category" : {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 0
|
||||
},
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 3
|
||||
} ],
|
||||
"status" : "aeiou"
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456</id>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
<photoUrls>string</photoUrls>
|
||||
<photoUrls>aeiou</photoUrls>
|
||||
</photoUrls>
|
||||
<tags>
|
||||
</tags>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
</Pet>}, {contentType=application/json, example=[ {
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 123456789,
|
||||
"id" : 4,
|
||||
"category" : {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 0
|
||||
},
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 3
|
||||
} ],
|
||||
"status" : "aeiou"
|
||||
"status" : "available"
|
||||
} ]}]
|
||||
|
||||
- parameter tags: (query) Tags to filter by
|
||||
@@ -394,50 +394,50 @@ open class PetAPI: APIBase {
|
||||
- type: apiKey api_key
|
||||
- name: api_key
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456</id>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
<photoUrls>string</photoUrls>
|
||||
<photoUrls>aeiou</photoUrls>
|
||||
</photoUrls>
|
||||
<tags>
|
||||
</tags>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
</Pet>}, {contentType=application/json, example={
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 123456789,
|
||||
"id" : 1,
|
||||
"category" : {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 1
|
||||
},
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 2
|
||||
} ],
|
||||
"status" : "aeiou"
|
||||
"status" : "available"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Pet>
|
||||
<id>123456</id>
|
||||
<id>123456789</id>
|
||||
<name>doggie</name>
|
||||
<photoUrls>
|
||||
<photoUrls>string</photoUrls>
|
||||
<photoUrls>aeiou</photoUrls>
|
||||
</photoUrls>
|
||||
<tags>
|
||||
</tags>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
</Pet>}, {contentType=application/json, example={
|
||||
"photoUrls" : [ "aeiou" ],
|
||||
"name" : "doggie",
|
||||
"id" : 123456789,
|
||||
"id" : 1,
|
||||
"category" : {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 1
|
||||
},
|
||||
"tags" : [ {
|
||||
"name" : "aeiou",
|
||||
"id" : 123456789
|
||||
"id" : 2
|
||||
} ],
|
||||
"status" : "aeiou"
|
||||
"status" : "available"
|
||||
}}]
|
||||
|
||||
- parameter petId: (path) ID of pet to return
|
||||
@@ -629,7 +629,7 @@ open class PetAPI: APIBase {
|
||||
- type: oauth2
|
||||
- name: petstore_auth
|
||||
- examples: [{contentType=application/json, example={
|
||||
"code" : 123,
|
||||
"code" : 1,
|
||||
"type" : "aeiou",
|
||||
"message" : "aeiou"
|
||||
}}]
|
||||
|
||||
@@ -104,7 +104,7 @@ open class StoreAPI: APIBase {
|
||||
- type: apiKey api_key
|
||||
- name: api_key
|
||||
- examples: [{contentType=application/json, example={
|
||||
"key" : 123
|
||||
"key" : 7
|
||||
}}]
|
||||
|
||||
- returns: RequestBuilder<[String:Int32]>
|
||||
@@ -159,34 +159,34 @@ open class StoreAPI: APIBase {
|
||||
- GET /store/order/{orderId}
|
||||
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456</id>
|
||||
<petId>123456</petId>
|
||||
<quantity>0</quantity>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 123456789,
|
||||
"quantity" : 123,
|
||||
"id" : 123456789,
|
||||
"petId" : 6,
|
||||
"quantity" : 0,
|
||||
"id" : 5,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : true,
|
||||
"status" : "aeiou"
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456</id>
|
||||
<petId>123456</petId>
|
||||
<quantity>0</quantity>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 123456789,
|
||||
"quantity" : 123,
|
||||
"id" : 123456789,
|
||||
"petId" : 6,
|
||||
"quantity" : 0,
|
||||
"id" : 5,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : true,
|
||||
"status" : "aeiou"
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
|
||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||
@@ -244,34 +244,34 @@ open class StoreAPI: APIBase {
|
||||
- POST /store/order
|
||||
-
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456</id>
|
||||
<petId>123456</petId>
|
||||
<quantity>0</quantity>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 123456789,
|
||||
"quantity" : 123,
|
||||
"id" : 123456789,
|
||||
"petId" : 3,
|
||||
"quantity" : 8,
|
||||
"id" : 8,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : true,
|
||||
"status" : "aeiou"
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<Order>
|
||||
<id>123456</id>
|
||||
<petId>123456</petId>
|
||||
<quantity>0</quantity>
|
||||
<id>123456789</id>
|
||||
<petId>123456789</petId>
|
||||
<quantity>123</quantity>
|
||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||
<status>string</status>
|
||||
<status>aeiou</status>
|
||||
<complete>true</complete>
|
||||
</Order>}, {contentType=application/json, example={
|
||||
"petId" : 123456789,
|
||||
"quantity" : 123,
|
||||
"id" : 123456789,
|
||||
"petId" : 3,
|
||||
"quantity" : 8,
|
||||
"id" : 8,
|
||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
||||
"complete" : true,
|
||||
"status" : "aeiou"
|
||||
"complete" : false,
|
||||
"status" : "placed"
|
||||
}}]
|
||||
|
||||
- parameter body: (body) order placed for purchasing the pet
|
||||
|
||||
@@ -265,40 +265,40 @@ open class UserAPI: APIBase {
|
||||
- GET /user/{username}
|
||||
-
|
||||
- examples: [{contentType=application/xml, example=<User>
|
||||
<id>123456</id>
|
||||
<username>string</username>
|
||||
<firstName>string</firstName>
|
||||
<lastName>string</lastName>
|
||||
<email>string</email>
|
||||
<password>string</password>
|
||||
<phone>string</phone>
|
||||
<userStatus>0</userStatus>
|
||||
<id>123456789</id>
|
||||
<username>aeiou</username>
|
||||
<firstName>aeiou</firstName>
|
||||
<lastName>aeiou</lastName>
|
||||
<email>aeiou</email>
|
||||
<password>aeiou</password>
|
||||
<phone>aeiou</phone>
|
||||
<userStatus>123</userStatus>
|
||||
</User>}, {contentType=application/json, example={
|
||||
"firstName" : "aeiou",
|
||||
"lastName" : "aeiou",
|
||||
"password" : "aeiou",
|
||||
"userStatus" : 123,
|
||||
"userStatus" : 2,
|
||||
"phone" : "aeiou",
|
||||
"id" : 123456789,
|
||||
"id" : 4,
|
||||
"email" : "aeiou",
|
||||
"username" : "aeiou"
|
||||
}}]
|
||||
- examples: [{contentType=application/xml, example=<User>
|
||||
<id>123456</id>
|
||||
<username>string</username>
|
||||
<firstName>string</firstName>
|
||||
<lastName>string</lastName>
|
||||
<email>string</email>
|
||||
<password>string</password>
|
||||
<phone>string</phone>
|
||||
<userStatus>0</userStatus>
|
||||
<id>123456789</id>
|
||||
<username>aeiou</username>
|
||||
<firstName>aeiou</firstName>
|
||||
<lastName>aeiou</lastName>
|
||||
<email>aeiou</email>
|
||||
<password>aeiou</password>
|
||||
<phone>aeiou</phone>
|
||||
<userStatus>123</userStatus>
|
||||
</User>}, {contentType=application/json, example={
|
||||
"firstName" : "aeiou",
|
||||
"lastName" : "aeiou",
|
||||
"password" : "aeiou",
|
||||
"userStatus" : 123,
|
||||
"userStatus" : 2,
|
||||
"phone" : "aeiou",
|
||||
"id" : 123456789,
|
||||
"id" : 4,
|
||||
"email" : "aeiou",
|
||||
"username" : "aeiou"
|
||||
}}]
|
||||
@@ -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: [{contentType=application/xml, example=string}, {contentType=application/json, example="aeiou"}]
|
||||
- examples: [{contentType=application/xml, example=string}, {contentType=application/json, example="aeiou"}]
|
||||
- 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
|
||||
|
||||
@@ -88,7 +88,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
|
||||
switch encodingResult {
|
||||
case .success(let upload, _, _):
|
||||
if let onProgressReady = self.onProgressReady {
|
||||
onProgressReady(upload.progress)
|
||||
onProgressReady(upload.uploadProgress)
|
||||
}
|
||||
self.processRequest(request: upload, managerId, completion)
|
||||
case .failure(let encodingError):
|
||||
|
||||
Reference in New Issue
Block a user