forked from loafle/openapi-generator-original
remove dateOfBirth from petstore.json
This commit is contained in:
parent
f639a312e8
commit
b09f4b66ff
@ -833,10 +833,6 @@
|
|||||||
"username": {
|
"username": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"dateOfBirth": {
|
|
||||||
"type": "string",
|
|
||||||
"format": "date"
|
|
||||||
},
|
|
||||||
"firstName": {
|
"firstName": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
@ -108,13 +108,13 @@ public class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"name" : "Puma",
|
"name" : "Puma",
|
||||||
"type" : "Dog",
|
"type" : "Dog",
|
||||||
"color" : "Black",
|
"color" : "Black",
|
||||||
"gender" : "Female",
|
"gender" : "Female",
|
||||||
"breed" : "Mixed"
|
"breed" : "Mixed"
|
||||||
}}]
|
}, contentType=application/json}]
|
||||||
|
|
||||||
- parameter status: (query) Status values that need to be considered for filter (optional, default to available)
|
- parameter status: (query) Status values that need to be considered for filter (optional, default to available)
|
||||||
|
|
||||||
@ -157,20 +157,20 @@ public class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
- examples: [{contentType=application/json, example=[ {
|
- examples: [{example=[ {
|
||||||
"photoUrls" : [ "aeiou" ],
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"id" : 123456789,
|
||||||
|
"name" : "aeiou"
|
||||||
|
} ],
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"category" : {
|
"category" : {
|
||||||
"name" : "aeiou",
|
"id" : 123456789,
|
||||||
"id" : 123456789
|
"name" : "aeiou"
|
||||||
},
|
},
|
||||||
"tags" : [ {
|
"status" : "aeiou",
|
||||||
"name" : "aeiou",
|
"name" : "doggie",
|
||||||
"id" : 123456789
|
"photoUrls" : [ "aeiou" ]
|
||||||
} ],
|
} ], contentType=application/json}, {example=<Pet>
|
||||||
"status" : "aeiou"
|
|
||||||
} ]}, {contentType=application/xml, example=<Pet>
|
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -179,21 +179,21 @@ public class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet>}]
|
</Pet>, contentType=application/xml}]
|
||||||
- examples: [{contentType=application/json, example=[ {
|
- examples: [{example=[ {
|
||||||
"photoUrls" : [ "aeiou" ],
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"id" : 123456789,
|
||||||
|
"name" : "aeiou"
|
||||||
|
} ],
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"category" : {
|
"category" : {
|
||||||
"name" : "aeiou",
|
"id" : 123456789,
|
||||||
"id" : 123456789
|
"name" : "aeiou"
|
||||||
},
|
},
|
||||||
"tags" : [ {
|
"status" : "aeiou",
|
||||||
"name" : "aeiou",
|
"name" : "doggie",
|
||||||
"id" : 123456789
|
"photoUrls" : [ "aeiou" ]
|
||||||
} ],
|
} ], contentType=application/json}, {example=<Pet>
|
||||||
"status" : "aeiou"
|
|
||||||
} ]}, {contentType=application/xml, example=<Pet>
|
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -202,7 +202,7 @@ public class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet>}]
|
</Pet>, contentType=application/xml}]
|
||||||
|
|
||||||
- parameter tags: (query) Tags to filter by (optional)
|
- parameter tags: (query) Tags to filter by (optional)
|
||||||
|
|
||||||
@ -242,26 +242,26 @@ public class PetAPI: APIBase {
|
|||||||
Find pet by ID
|
Find pet by ID
|
||||||
- GET /pet/{petId}
|
- GET /pet/{petId}
|
||||||
- Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
- Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
- OAuth:
|
|
||||||
- type: oauth2
|
|
||||||
- name: petstore_auth
|
|
||||||
- API Key:
|
- API Key:
|
||||||
- type: apiKey api_key
|
- type: apiKey api_key
|
||||||
- name: api_key
|
- name: api_key
|
||||||
- examples: [{contentType=application/json, example={
|
- OAuth:
|
||||||
"photoUrls" : [ "aeiou" ],
|
- type: oauth2
|
||||||
"name" : "doggie",
|
- name: petstore_auth
|
||||||
|
- examples: [{example={
|
||||||
|
"tags" : [ {
|
||||||
|
"id" : 123456789,
|
||||||
|
"name" : "aeiou"
|
||||||
|
} ],
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"category" : {
|
"category" : {
|
||||||
"name" : "aeiou",
|
"id" : 123456789,
|
||||||
"id" : 123456789
|
"name" : "aeiou"
|
||||||
},
|
},
|
||||||
"tags" : [ {
|
"status" : "aeiou",
|
||||||
"name" : "aeiou",
|
"name" : "doggie",
|
||||||
"id" : 123456789
|
"photoUrls" : [ "aeiou" ]
|
||||||
} ],
|
}, contentType=application/json}, {example=<Pet>
|
||||||
"status" : "aeiou"
|
|
||||||
}}, {contentType=application/xml, example=<Pet>
|
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -270,21 +270,21 @@ public class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet>}]
|
</Pet>, contentType=application/xml}]
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"photoUrls" : [ "aeiou" ],
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"id" : 123456789,
|
||||||
|
"name" : "aeiou"
|
||||||
|
} ],
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"category" : {
|
"category" : {
|
||||||
"name" : "aeiou",
|
"id" : 123456789,
|
||||||
"id" : 123456789
|
"name" : "aeiou"
|
||||||
},
|
},
|
||||||
"tags" : [ {
|
"status" : "aeiou",
|
||||||
"name" : "aeiou",
|
"name" : "doggie",
|
||||||
"id" : 123456789
|
"photoUrls" : [ "aeiou" ]
|
||||||
} ],
|
}, contentType=application/json}, {example=<Pet>
|
||||||
"status" : "aeiou"
|
|
||||||
}}, {contentType=application/xml, example=<Pet>
|
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -293,7 +293,7 @@ public class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet>}]
|
</Pet>, contentType=application/xml}]
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet that needs to be fetched
|
- parameter petId: (path) ID of pet that needs to be fetched
|
||||||
|
|
||||||
|
@ -67,12 +67,12 @@ public class StoreAPI: APIBase {
|
|||||||
- API Key:
|
- API Key:
|
||||||
- type: apiKey api_key
|
- type: apiKey api_key
|
||||||
- name: api_key
|
- name: api_key
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"key" : 123
|
"key" : 123
|
||||||
}}, {contentType=application/xml, example=not implemented io.swagger.models.properties.MapProperty@d1e580af}]
|
}, contentType=application/json}, {example=not implemented io.swagger.models.properties.MapProperty@d1e580af, contentType=application/xml}]
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"key" : 123
|
"key" : 123
|
||||||
}}, {contentType=application/xml, example=not implemented io.swagger.models.properties.MapProperty@d1e580af}]
|
}, contentType=application/json}, {example=not implemented io.swagger.models.properties.MapProperty@d1e580af, contentType=application/xml}]
|
||||||
|
|
||||||
- returns: RequestBuilder<[String:Int32]>
|
- returns: RequestBuilder<[String:Int32]>
|
||||||
*/
|
*/
|
||||||
@ -108,36 +108,36 @@ public class StoreAPI: APIBase {
|
|||||||
Find purchase order by ID
|
Find purchase order by ID
|
||||||
- GET /store/order/{orderId}
|
- GET /store/order/{orderId}
|
||||||
- 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: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"petId" : 123456789,
|
|
||||||
"quantity" : 123,
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
"complete" : true,
|
||||||
"status" : "aeiou"
|
"status" : "aeiou",
|
||||||
}}, {contentType=application/xml, example=<Order>
|
"quantity" : 123,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||||
|
}, contentType=application/json}, {example=<Order>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<petId>123456</petId>
|
<petId>123456</petId>
|
||||||
<quantity>0</quantity>
|
<quantity>0</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>}]
|
</Order>, contentType=application/xml}]
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"petId" : 123456789,
|
|
||||||
"quantity" : 123,
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
"complete" : true,
|
||||||
"status" : "aeiou"
|
"status" : "aeiou",
|
||||||
}}, {contentType=application/xml, example=<Order>
|
"quantity" : 123,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||||
|
}, contentType=application/json}, {example=<Order>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<petId>123456</petId>
|
<petId>123456</petId>
|
||||||
<quantity>0</quantity>
|
<quantity>0</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>}]
|
</Order>, contentType=application/xml}]
|
||||||
|
|
||||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||||
|
|
||||||
@ -176,36 +176,36 @@ public class StoreAPI: APIBase {
|
|||||||
Place an order for a pet
|
Place an order for a pet
|
||||||
- POST /store/order
|
- POST /store/order
|
||||||
-
|
-
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"petId" : 123456789,
|
|
||||||
"quantity" : 123,
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
"complete" : true,
|
||||||
"status" : "aeiou"
|
"status" : "aeiou",
|
||||||
}}, {contentType=application/xml, example=<Order>
|
"quantity" : 123,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||||
|
}, contentType=application/json}, {example=<Order>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<petId>123456</petId>
|
<petId>123456</petId>
|
||||||
<quantity>0</quantity>
|
<quantity>0</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>}]
|
</Order>, contentType=application/xml}]
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"petId" : 123456789,
|
|
||||||
"quantity" : 123,
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
"complete" : true,
|
||||||
"status" : "aeiou"
|
"status" : "aeiou",
|
||||||
}}, {contentType=application/xml, example=<Order>
|
"quantity" : 123,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||||
|
}, contentType=application/json}, {example=<Order>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<petId>123456</petId>
|
<petId>123456</petId>
|
||||||
<quantity>0</quantity>
|
<quantity>0</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>}]
|
</Order>, contentType=application/xml}]
|
||||||
|
|
||||||
- parameter body: (body) order placed for purchasing the pet (optional)
|
- parameter body: (body) order placed for purchasing the pet (optional)
|
||||||
|
|
||||||
|
@ -167,46 +167,44 @@ public class UserAPI: APIBase {
|
|||||||
Get user by user name
|
Get user by user name
|
||||||
- GET /user/{username}
|
- GET /user/{username}
|
||||||
-
|
-
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"firstName" : "aeiou",
|
|
||||||
"lastName" : "aeiou",
|
|
||||||
"password" : "aeiou",
|
|
||||||
"userStatus" : 123,
|
|
||||||
"phone" : "aeiou",
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
|
"lastName" : "aeiou",
|
||||||
|
"phone" : "aeiou",
|
||||||
|
"username" : "aeiou",
|
||||||
"email" : "aeiou",
|
"email" : "aeiou",
|
||||||
"username" : "aeiou"
|
"userStatus" : 123,
|
||||||
}}, {contentType=application/xml, example=<User>
|
"firstName" : "aeiou",
|
||||||
|
"password" : "aeiou"
|
||||||
|
}, contentType=application/json}, {example=<User>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<username>string</username>
|
<username>string</username>
|
||||||
<dateOfBirth>2000-01-23T04:56:07.000Z</dateOfBirth>
|
|
||||||
<firstName>string</firstName>
|
<firstName>string</firstName>
|
||||||
<lastName>string</lastName>
|
<lastName>string</lastName>
|
||||||
<email>string</email>
|
<email>string</email>
|
||||||
<password>string</password>
|
<password>string</password>
|
||||||
<phone>string</phone>
|
<phone>string</phone>
|
||||||
<userStatus>0</userStatus>
|
<userStatus>0</userStatus>
|
||||||
</User>}]
|
</User>, contentType=application/xml}]
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"firstName" : "aeiou",
|
|
||||||
"lastName" : "aeiou",
|
|
||||||
"password" : "aeiou",
|
|
||||||
"userStatus" : 123,
|
|
||||||
"phone" : "aeiou",
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
|
"lastName" : "aeiou",
|
||||||
|
"phone" : "aeiou",
|
||||||
|
"username" : "aeiou",
|
||||||
"email" : "aeiou",
|
"email" : "aeiou",
|
||||||
"username" : "aeiou"
|
"userStatus" : 123,
|
||||||
}}, {contentType=application/xml, example=<User>
|
"firstName" : "aeiou",
|
||||||
|
"password" : "aeiou"
|
||||||
|
}, contentType=application/json}, {example=<User>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<username>string</username>
|
<username>string</username>
|
||||||
<dateOfBirth>2000-01-23T04:56:07.000Z</dateOfBirth>
|
|
||||||
<firstName>string</firstName>
|
<firstName>string</firstName>
|
||||||
<lastName>string</lastName>
|
<lastName>string</lastName>
|
||||||
<email>string</email>
|
<email>string</email>
|
||||||
<password>string</password>
|
<password>string</password>
|
||||||
<phone>string</phone>
|
<phone>string</phone>
|
||||||
<userStatus>0</userStatus>
|
<userStatus>0</userStatus>
|
||||||
</User>}]
|
</User>, contentType=application/xml}]
|
||||||
|
|
||||||
- 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.
|
||||||
|
|
||||||
@ -246,8 +244,8 @@ public class UserAPI: APIBase {
|
|||||||
Logs user into the system
|
Logs user into the system
|
||||||
- GET /user/login
|
- GET /user/login
|
||||||
-
|
-
|
||||||
- examples: [{contentType=application/json, example="aeiou"}, {contentType=application/xml, example=string}]
|
- examples: [{example="aeiou", contentType=application/json}, {example=string, contentType=application/xml}]
|
||||||
- examples: [{contentType=application/json, example="aeiou"}, {contentType=application/xml, example=string}]
|
- examples: [{example="aeiou", contentType=application/json}, {example=string, contentType=application/xml}]
|
||||||
|
|
||||||
- parameter username: (query) The user name for login (optional)
|
- parameter username: (query) The user name for login (optional)
|
||||||
- parameter password: (query) The password for login in clear text (optional)
|
- parameter password: (query) The password for login in clear text (optional)
|
||||||
|
@ -224,7 +224,6 @@ class Decoders {
|
|||||||
let instance = User()
|
let instance = User()
|
||||||
instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"])
|
instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"])
|
||||||
instance.username = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["username"])
|
instance.username = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["username"])
|
||||||
instance.dateOfBirth = Decoders.decodeOptional(clazz: ISOFullDate.self, source: sourceDictionary["dateOfBirth"])
|
|
||||||
instance.firstName = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["firstName"])
|
instance.firstName = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["firstName"])
|
||||||
instance.lastName = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["lastName"])
|
instance.lastName = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["lastName"])
|
||||||
instance.email = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["email"])
|
instance.email = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["email"])
|
||||||
|
@ -11,7 +11,6 @@ import Foundation
|
|||||||
public class User: JSONEncodable {
|
public class User: JSONEncodable {
|
||||||
public var id: Int64?
|
public var id: Int64?
|
||||||
public var username: String?
|
public var username: String?
|
||||||
public var dateOfBirth: ISOFullDate?
|
|
||||||
public var firstName: String?
|
public var firstName: String?
|
||||||
public var lastName: String?
|
public var lastName: String?
|
||||||
public var email: String?
|
public var email: String?
|
||||||
@ -27,7 +26,6 @@ public class User: JSONEncodable {
|
|||||||
var nillableDictionary = [String:AnyObject?]()
|
var nillableDictionary = [String:AnyObject?]()
|
||||||
nillableDictionary["id"] = self.id?.encodeToJSON()
|
nillableDictionary["id"] = self.id?.encodeToJSON()
|
||||||
nillableDictionary["username"] = self.username
|
nillableDictionary["username"] = self.username
|
||||||
nillableDictionary["dateOfBirth"] = self.dateOfBirth?.encodeToJSON()
|
|
||||||
nillableDictionary["firstName"] = self.firstName
|
nillableDictionary["firstName"] = self.firstName
|
||||||
nillableDictionary["lastName"] = self.lastName
|
nillableDictionary["lastName"] = self.lastName
|
||||||
nillableDictionary["email"] = self.email
|
nillableDictionary["email"] = self.email
|
||||||
|
@ -146,7 +146,7 @@
|
|||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = 6D4EFBAE1C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClient" */;
|
buildConfigurationList = 6D4EFBAE1C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClient" */;
|
||||||
buildPhases = (
|
buildPhases = (
|
||||||
A16DAFA9EF474E5065B5B1C2 /* 📦 Check Pods Manifest.lock */,
|
6345B531824FA2069A72B604 /* 📦 Check Pods Manifest.lock */,
|
||||||
CF310079E3CB0BE5BE604471 /* [CP] Check Pods Manifest.lock */,
|
CF310079E3CB0BE5BE604471 /* [CP] Check Pods Manifest.lock */,
|
||||||
1F03F780DC2D9727E5E64BA9 /* [CP] Check Pods Manifest.lock */,
|
1F03F780DC2D9727E5E64BA9 /* [CP] Check Pods Manifest.lock */,
|
||||||
6D4EFB8D1C692C6300B96B06 /* Sources */,
|
6D4EFB8D1C692C6300B96B06 /* Sources */,
|
||||||
@ -170,7 +170,7 @@
|
|||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = 6D4EFBB11C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */;
|
buildConfigurationList = 6D4EFBB11C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */;
|
||||||
buildPhases = (
|
buildPhases = (
|
||||||
FE27E864CEDDA2D12F7972B1 /* 📦 Check Pods Manifest.lock */,
|
5B23A28C59366E7C8D31550A /* 📦 Check Pods Manifest.lock */,
|
||||||
B4DB169E5F018305D6759D34 /* [CP] Check Pods Manifest.lock */,
|
B4DB169E5F018305D6759D34 /* [CP] Check Pods Manifest.lock */,
|
||||||
79FE27B09B2DD354C831BD49 /* [CP] Check Pods Manifest.lock */,
|
79FE27B09B2DD354C831BD49 /* [CP] Check Pods Manifest.lock */,
|
||||||
6D4EFBA11C692C6300B96B06 /* Sources */,
|
6D4EFBA11C692C6300B96B06 /* Sources */,
|
||||||
@ -325,6 +325,36 @@
|
|||||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh\"\n";
|
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh\"\n";
|
||||||
showEnvVarsInLog = 0;
|
showEnvVarsInLog = 0;
|
||||||
};
|
};
|
||||||
|
5B23A28C59366E7C8D31550A /* 📦 Check Pods Manifest.lock */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
name = "📦 Check Pods Manifest.lock";
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
|
6345B531824FA2069A72B604 /* 📦 Check Pods Manifest.lock */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
name = "📦 Check Pods Manifest.lock";
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
796EAD48F1BCCDAA291CD963 /* [CP] Embed Pods Frameworks */ = {
|
796EAD48F1BCCDAA291CD963 /* [CP] Embed Pods Frameworks */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
|
@ -49,7 +49,10 @@ class UserAPITests: XCTestCase {
|
|||||||
|
|
||||||
let newUser = User()
|
let newUser = User()
|
||||||
newUser.email = "test@test.com"
|
newUser.email = "test@test.com"
|
||||||
newUser.dateOfBirth = ISOFullDate.from(string: "1999-12-31")
|
// TODO comment out the following as dateOfBirth has been removed
|
||||||
|
// from petstore.json, we'll need to add back the test after switching
|
||||||
|
// to petstore-with-fake-endpoints-models-for-testing.yaml
|
||||||
|
////newUser.dateOfBirth = ISOFullDate.from(string: "1999-12-31")
|
||||||
newUser.firstName = "Test"
|
newUser.firstName = "Test"
|
||||||
newUser.lastName = "Tester"
|
newUser.lastName = "Tester"
|
||||||
newUser.id = 1000
|
newUser.id = 1000
|
||||||
@ -86,7 +89,10 @@ class UserAPITests: XCTestCase {
|
|||||||
XCTAssert(user.lastName == "Tester", "invalid lastName")
|
XCTAssert(user.lastName == "Tester", "invalid lastName")
|
||||||
XCTAssert(user.password == "test!", "invalid password")
|
XCTAssert(user.password == "test!", "invalid password")
|
||||||
XCTAssert(user.phone == "867-5309", "invalid phone")
|
XCTAssert(user.phone == "867-5309", "invalid phone")
|
||||||
XCTAssert(user.dateOfBirth?.description == "1999-12-31", "invalid date of birth")
|
// TODO comment out the following as dateOfBirth has been removed
|
||||||
|
// from petstore.json, we'll need to add back the test after switching
|
||||||
|
// to petstore-with-fake-endpoints-models-for-testing.yaml
|
||||||
|
//XCTAssert(user.dateOfBirth?.description == "1999-12-31", "invalid date of birth")
|
||||||
|
|
||||||
expectation.fulfill()
|
expectation.fulfill()
|
||||||
}
|
}
|
||||||
|
@ -160,13 +160,13 @@ public class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"name" : "Puma",
|
"name" : "Puma",
|
||||||
"type" : "Dog",
|
"type" : "Dog",
|
||||||
"color" : "Black",
|
"color" : "Black",
|
||||||
"gender" : "Female",
|
"gender" : "Female",
|
||||||
"breed" : "Mixed"
|
"breed" : "Mixed"
|
||||||
}}]
|
}, contentType=application/json}]
|
||||||
|
|
||||||
- parameter status: (query) Status values that need to be considered for filter (optional, default to available)
|
- parameter status: (query) Status values that need to be considered for filter (optional, default to available)
|
||||||
|
|
||||||
@ -226,20 +226,20 @@ public class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
- examples: [{contentType=application/json, example=[ {
|
- examples: [{example=[ {
|
||||||
"photoUrls" : [ "aeiou" ],
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"id" : 123456789,
|
||||||
|
"name" : "aeiou"
|
||||||
|
} ],
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"category" : {
|
"category" : {
|
||||||
"name" : "aeiou",
|
"id" : 123456789,
|
||||||
"id" : 123456789
|
"name" : "aeiou"
|
||||||
},
|
},
|
||||||
"tags" : [ {
|
"status" : "aeiou",
|
||||||
"name" : "aeiou",
|
"name" : "doggie",
|
||||||
"id" : 123456789
|
"photoUrls" : [ "aeiou" ]
|
||||||
} ],
|
} ], contentType=application/json}, {example=<Pet>
|
||||||
"status" : "aeiou"
|
|
||||||
} ]}, {contentType=application/xml, example=<Pet>
|
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -248,21 +248,21 @@ public class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet>}]
|
</Pet>, contentType=application/xml}]
|
||||||
- examples: [{contentType=application/json, example=[ {
|
- examples: [{example=[ {
|
||||||
"photoUrls" : [ "aeiou" ],
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"id" : 123456789,
|
||||||
|
"name" : "aeiou"
|
||||||
|
} ],
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"category" : {
|
"category" : {
|
||||||
"name" : "aeiou",
|
"id" : 123456789,
|
||||||
"id" : 123456789
|
"name" : "aeiou"
|
||||||
},
|
},
|
||||||
"tags" : [ {
|
"status" : "aeiou",
|
||||||
"name" : "aeiou",
|
"name" : "doggie",
|
||||||
"id" : 123456789
|
"photoUrls" : [ "aeiou" ]
|
||||||
} ],
|
} ], contentType=application/json}, {example=<Pet>
|
||||||
"status" : "aeiou"
|
|
||||||
} ]}, {contentType=application/xml, example=<Pet>
|
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -271,7 +271,7 @@ public class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet>}]
|
</Pet>, contentType=application/xml}]
|
||||||
|
|
||||||
- parameter tags: (query) Tags to filter by (optional)
|
- parameter tags: (query) Tags to filter by (optional)
|
||||||
|
|
||||||
@ -328,26 +328,26 @@ public class PetAPI: APIBase {
|
|||||||
Find pet by ID
|
Find pet by ID
|
||||||
- GET /pet/{petId}
|
- GET /pet/{petId}
|
||||||
- Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
- Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
- OAuth:
|
|
||||||
- type: oauth2
|
|
||||||
- name: petstore_auth
|
|
||||||
- API Key:
|
- API Key:
|
||||||
- type: apiKey api_key
|
- type: apiKey api_key
|
||||||
- name: api_key
|
- name: api_key
|
||||||
- examples: [{contentType=application/json, example={
|
- OAuth:
|
||||||
"photoUrls" : [ "aeiou" ],
|
- type: oauth2
|
||||||
"name" : "doggie",
|
- name: petstore_auth
|
||||||
|
- examples: [{example={
|
||||||
|
"tags" : [ {
|
||||||
|
"id" : 123456789,
|
||||||
|
"name" : "aeiou"
|
||||||
|
} ],
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"category" : {
|
"category" : {
|
||||||
"name" : "aeiou",
|
"id" : 123456789,
|
||||||
"id" : 123456789
|
"name" : "aeiou"
|
||||||
},
|
},
|
||||||
"tags" : [ {
|
"status" : "aeiou",
|
||||||
"name" : "aeiou",
|
"name" : "doggie",
|
||||||
"id" : 123456789
|
"photoUrls" : [ "aeiou" ]
|
||||||
} ],
|
}, contentType=application/json}, {example=<Pet>
|
||||||
"status" : "aeiou"
|
|
||||||
}}, {contentType=application/xml, example=<Pet>
|
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -356,21 +356,21 @@ public class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet>}]
|
</Pet>, contentType=application/xml}]
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"photoUrls" : [ "aeiou" ],
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"id" : 123456789,
|
||||||
|
"name" : "aeiou"
|
||||||
|
} ],
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"category" : {
|
"category" : {
|
||||||
"name" : "aeiou",
|
"id" : 123456789,
|
||||||
"id" : 123456789
|
"name" : "aeiou"
|
||||||
},
|
},
|
||||||
"tags" : [ {
|
"status" : "aeiou",
|
||||||
"name" : "aeiou",
|
"name" : "doggie",
|
||||||
"id" : 123456789
|
"photoUrls" : [ "aeiou" ]
|
||||||
} ],
|
}, contentType=application/json}, {example=<Pet>
|
||||||
"status" : "aeiou"
|
|
||||||
}}, {contentType=application/xml, example=<Pet>
|
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -379,7 +379,7 @@ public class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet>}]
|
</Pet>, contentType=application/xml}]
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet that needs to be fetched
|
- parameter petId: (path) ID of pet that needs to be fetched
|
||||||
|
|
||||||
|
@ -101,12 +101,12 @@ public class StoreAPI: APIBase {
|
|||||||
- API Key:
|
- API Key:
|
||||||
- type: apiKey api_key
|
- type: apiKey api_key
|
||||||
- name: api_key
|
- name: api_key
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"key" : 123
|
"key" : 123
|
||||||
}}, {contentType=application/xml, example=not implemented io.swagger.models.properties.MapProperty@d1e580af}]
|
}, contentType=application/json}, {example=not implemented io.swagger.models.properties.MapProperty@d1e580af, contentType=application/xml}]
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"key" : 123
|
"key" : 123
|
||||||
}}, {contentType=application/xml, example=not implemented io.swagger.models.properties.MapProperty@d1e580af}]
|
}, contentType=application/json}, {example=not implemented io.swagger.models.properties.MapProperty@d1e580af, contentType=application/xml}]
|
||||||
|
|
||||||
- returns: RequestBuilder<[String:Int32]>
|
- returns: RequestBuilder<[String:Int32]>
|
||||||
*/
|
*/
|
||||||
@ -159,36 +159,36 @@ public class StoreAPI: APIBase {
|
|||||||
Find purchase order by ID
|
Find purchase order by ID
|
||||||
- GET /store/order/{orderId}
|
- GET /store/order/{orderId}
|
||||||
- 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: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"petId" : 123456789,
|
|
||||||
"quantity" : 123,
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
"complete" : true,
|
||||||
"status" : "aeiou"
|
"status" : "aeiou",
|
||||||
}}, {contentType=application/xml, example=<Order>
|
"quantity" : 123,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||||
|
}, contentType=application/json}, {example=<Order>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<petId>123456</petId>
|
<petId>123456</petId>
|
||||||
<quantity>0</quantity>
|
<quantity>0</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>}]
|
</Order>, contentType=application/xml}]
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"petId" : 123456789,
|
|
||||||
"quantity" : 123,
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
"complete" : true,
|
||||||
"status" : "aeiou"
|
"status" : "aeiou",
|
||||||
}}, {contentType=application/xml, example=<Order>
|
"quantity" : 123,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||||
|
}, contentType=application/json}, {example=<Order>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<petId>123456</petId>
|
<petId>123456</petId>
|
||||||
<quantity>0</quantity>
|
<quantity>0</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>}]
|
</Order>, contentType=application/xml}]
|
||||||
|
|
||||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||||
|
|
||||||
@ -244,36 +244,36 @@ public class StoreAPI: APIBase {
|
|||||||
Place an order for a pet
|
Place an order for a pet
|
||||||
- POST /store/order
|
- POST /store/order
|
||||||
-
|
-
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"petId" : 123456789,
|
|
||||||
"quantity" : 123,
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
"complete" : true,
|
||||||
"status" : "aeiou"
|
"status" : "aeiou",
|
||||||
}}, {contentType=application/xml, example=<Order>
|
"quantity" : 123,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||||
|
}, contentType=application/json}, {example=<Order>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<petId>123456</petId>
|
<petId>123456</petId>
|
||||||
<quantity>0</quantity>
|
<quantity>0</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>}]
|
</Order>, contentType=application/xml}]
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"petId" : 123456789,
|
|
||||||
"quantity" : 123,
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
"complete" : true,
|
||||||
"status" : "aeiou"
|
"status" : "aeiou",
|
||||||
}}, {contentType=application/xml, example=<Order>
|
"quantity" : 123,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||||
|
}, contentType=application/json}, {example=<Order>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<petId>123456</petId>
|
<petId>123456</petId>
|
||||||
<quantity>0</quantity>
|
<quantity>0</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>}]
|
</Order>, contentType=application/xml}]
|
||||||
|
|
||||||
- parameter body: (body) order placed for purchasing the pet (optional)
|
- parameter body: (body) order placed for purchasing the pet (optional)
|
||||||
|
|
||||||
|
@ -253,48 +253,44 @@ public class UserAPI: APIBase {
|
|||||||
Get user by user name
|
Get user by user name
|
||||||
- GET /user/{username}
|
- GET /user/{username}
|
||||||
-
|
-
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"firstName" : "aeiou",
|
|
||||||
"lastName" : "aeiou",
|
|
||||||
"password" : "aeiou",
|
|
||||||
"userStatus" : 123,
|
|
||||||
"phone" : "aeiou",
|
|
||||||
"dateOfBirth" : "2000-01-23T04:56:07.000+00:00",
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
|
"lastName" : "aeiou",
|
||||||
|
"phone" : "aeiou",
|
||||||
|
"username" : "aeiou",
|
||||||
"email" : "aeiou",
|
"email" : "aeiou",
|
||||||
"username" : "aeiou"
|
"userStatus" : 123,
|
||||||
}}, {contentType=application/xml, example=<User>
|
"firstName" : "aeiou",
|
||||||
|
"password" : "aeiou"
|
||||||
|
}, contentType=application/json}, {example=<User>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<username>string</username>
|
<username>string</username>
|
||||||
<dateOfBirth>2000-01-23T04:56:07.000Z</dateOfBirth>
|
|
||||||
<firstName>string</firstName>
|
<firstName>string</firstName>
|
||||||
<lastName>string</lastName>
|
<lastName>string</lastName>
|
||||||
<email>string</email>
|
<email>string</email>
|
||||||
<password>string</password>
|
<password>string</password>
|
||||||
<phone>string</phone>
|
<phone>string</phone>
|
||||||
<userStatus>0</userStatus>
|
<userStatus>0</userStatus>
|
||||||
</User>}]
|
</User>, contentType=application/xml}]
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"firstName" : "aeiou",
|
|
||||||
"lastName" : "aeiou",
|
|
||||||
"password" : "aeiou",
|
|
||||||
"userStatus" : 123,
|
|
||||||
"phone" : "aeiou",
|
|
||||||
"dateOfBirth" : "2000-01-23T04:56:07.000+00:00",
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
|
"lastName" : "aeiou",
|
||||||
|
"phone" : "aeiou",
|
||||||
|
"username" : "aeiou",
|
||||||
"email" : "aeiou",
|
"email" : "aeiou",
|
||||||
"username" : "aeiou"
|
"userStatus" : 123,
|
||||||
}}, {contentType=application/xml, example=<User>
|
"firstName" : "aeiou",
|
||||||
|
"password" : "aeiou"
|
||||||
|
}, contentType=application/json}, {example=<User>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<username>string</username>
|
<username>string</username>
|
||||||
<dateOfBirth>2000-01-23T04:56:07.000Z</dateOfBirth>
|
|
||||||
<firstName>string</firstName>
|
<firstName>string</firstName>
|
||||||
<lastName>string</lastName>
|
<lastName>string</lastName>
|
||||||
<email>string</email>
|
<email>string</email>
|
||||||
<password>string</password>
|
<password>string</password>
|
||||||
<phone>string</phone>
|
<phone>string</phone>
|
||||||
<userStatus>0</userStatus>
|
<userStatus>0</userStatus>
|
||||||
</User>}]
|
</User>, contentType=application/xml}]
|
||||||
|
|
||||||
- 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.
|
||||||
|
|
||||||
@ -352,8 +348,8 @@ public class UserAPI: APIBase {
|
|||||||
Logs user into the system
|
Logs user into the system
|
||||||
- GET /user/login
|
- GET /user/login
|
||||||
-
|
-
|
||||||
- examples: [{contentType=application/json, example="aeiou"}, {contentType=application/xml, example=string}]
|
- examples: [{example="aeiou", contentType=application/json}, {example=string, contentType=application/xml}]
|
||||||
- examples: [{contentType=application/json, example="aeiou"}, {contentType=application/xml, example=string}]
|
- examples: [{example="aeiou", contentType=application/json}, {example=string, contentType=application/xml}]
|
||||||
|
|
||||||
- parameter username: (query) The user name for login (optional)
|
- parameter username: (query) The user name for login (optional)
|
||||||
- parameter password: (query) The password for login in clear text (optional)
|
- parameter password: (query) The password for login in clear text (optional)
|
||||||
|
@ -224,7 +224,6 @@ class Decoders {
|
|||||||
let instance = User()
|
let instance = User()
|
||||||
instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"])
|
instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"])
|
||||||
instance.username = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["username"])
|
instance.username = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["username"])
|
||||||
instance.dateOfBirth = Decoders.decodeOptional(clazz: ISOFullDate.self, source: sourceDictionary["dateOfBirth"])
|
|
||||||
instance.firstName = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["firstName"])
|
instance.firstName = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["firstName"])
|
||||||
instance.lastName = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["lastName"])
|
instance.lastName = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["lastName"])
|
||||||
instance.email = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["email"])
|
instance.email = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["email"])
|
||||||
|
@ -11,7 +11,6 @@ import Foundation
|
|||||||
public class User: JSONEncodable {
|
public class User: JSONEncodable {
|
||||||
public var id: Int64?
|
public var id: Int64?
|
||||||
public var username: String?
|
public var username: String?
|
||||||
public var dateOfBirth: ISOFullDate?
|
|
||||||
public var firstName: String?
|
public var firstName: String?
|
||||||
public var lastName: String?
|
public var lastName: String?
|
||||||
public var email: String?
|
public var email: String?
|
||||||
@ -27,7 +26,6 @@ public class User: JSONEncodable {
|
|||||||
var nillableDictionary = [String:AnyObject?]()
|
var nillableDictionary = [String:AnyObject?]()
|
||||||
nillableDictionary["id"] = self.id?.encodeToJSON()
|
nillableDictionary["id"] = self.id?.encodeToJSON()
|
||||||
nillableDictionary["username"] = self.username
|
nillableDictionary["username"] = self.username
|
||||||
nillableDictionary["dateOfBirth"] = self.dateOfBirth?.encodeToJSON()
|
|
||||||
nillableDictionary["firstName"] = self.firstName
|
nillableDictionary["firstName"] = self.firstName
|
||||||
nillableDictionary["lastName"] = self.lastName
|
nillableDictionary["lastName"] = self.lastName
|
||||||
nillableDictionary["email"] = self.email
|
nillableDictionary["email"] = self.email
|
||||||
|
@ -166,13 +166,13 @@ public class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"name" : "Puma",
|
"name" : "Puma",
|
||||||
"type" : "Dog",
|
"type" : "Dog",
|
||||||
"color" : "Black",
|
"color" : "Black",
|
||||||
"gender" : "Female",
|
"gender" : "Female",
|
||||||
"breed" : "Mixed"
|
"breed" : "Mixed"
|
||||||
}}]
|
}, contentType=application/json}]
|
||||||
|
|
||||||
- parameter status: (query) Status values that need to be considered for filter (optional, default to available)
|
- parameter status: (query) Status values that need to be considered for filter (optional, default to available)
|
||||||
|
|
||||||
@ -234,20 +234,20 @@ public class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
- examples: [{contentType=application/json, example=[ {
|
- examples: [{example=[ {
|
||||||
"photoUrls" : [ "aeiou" ],
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"id" : 123456789,
|
||||||
|
"name" : "aeiou"
|
||||||
|
} ],
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"category" : {
|
"category" : {
|
||||||
"name" : "aeiou",
|
"id" : 123456789,
|
||||||
"id" : 123456789
|
"name" : "aeiou"
|
||||||
},
|
},
|
||||||
"tags" : [ {
|
"status" : "aeiou",
|
||||||
"name" : "aeiou",
|
"name" : "doggie",
|
||||||
"id" : 123456789
|
"photoUrls" : [ "aeiou" ]
|
||||||
} ],
|
} ], contentType=application/json}, {example=<Pet>
|
||||||
"status" : "aeiou"
|
|
||||||
} ]}, {contentType=application/xml, example=<Pet>
|
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -256,21 +256,21 @@ public class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet>}]
|
</Pet>, contentType=application/xml}]
|
||||||
- examples: [{contentType=application/json, example=[ {
|
- examples: [{example=[ {
|
||||||
"photoUrls" : [ "aeiou" ],
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"id" : 123456789,
|
||||||
|
"name" : "aeiou"
|
||||||
|
} ],
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"category" : {
|
"category" : {
|
||||||
"name" : "aeiou",
|
"id" : 123456789,
|
||||||
"id" : 123456789
|
"name" : "aeiou"
|
||||||
},
|
},
|
||||||
"tags" : [ {
|
"status" : "aeiou",
|
||||||
"name" : "aeiou",
|
"name" : "doggie",
|
||||||
"id" : 123456789
|
"photoUrls" : [ "aeiou" ]
|
||||||
} ],
|
} ], contentType=application/json}, {example=<Pet>
|
||||||
"status" : "aeiou"
|
|
||||||
} ]}, {contentType=application/xml, example=<Pet>
|
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -279,7 +279,7 @@ public class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet>}]
|
</Pet>, contentType=application/xml}]
|
||||||
|
|
||||||
- parameter tags: (query) Tags to filter by (optional)
|
- parameter tags: (query) Tags to filter by (optional)
|
||||||
|
|
||||||
@ -338,26 +338,26 @@ public class PetAPI: APIBase {
|
|||||||
Find pet by ID
|
Find pet by ID
|
||||||
- GET /pet/{petId}
|
- GET /pet/{petId}
|
||||||
- Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
- Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
- OAuth:
|
|
||||||
- type: oauth2
|
|
||||||
- name: petstore_auth
|
|
||||||
- API Key:
|
- API Key:
|
||||||
- type: apiKey api_key
|
- type: apiKey api_key
|
||||||
- name: api_key
|
- name: api_key
|
||||||
- examples: [{contentType=application/json, example={
|
- OAuth:
|
||||||
"photoUrls" : [ "aeiou" ],
|
- type: oauth2
|
||||||
"name" : "doggie",
|
- name: petstore_auth
|
||||||
|
- examples: [{example={
|
||||||
|
"tags" : [ {
|
||||||
|
"id" : 123456789,
|
||||||
|
"name" : "aeiou"
|
||||||
|
} ],
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"category" : {
|
"category" : {
|
||||||
"name" : "aeiou",
|
"id" : 123456789,
|
||||||
"id" : 123456789
|
"name" : "aeiou"
|
||||||
},
|
},
|
||||||
"tags" : [ {
|
"status" : "aeiou",
|
||||||
"name" : "aeiou",
|
"name" : "doggie",
|
||||||
"id" : 123456789
|
"photoUrls" : [ "aeiou" ]
|
||||||
} ],
|
}, contentType=application/json}, {example=<Pet>
|
||||||
"status" : "aeiou"
|
|
||||||
}}, {contentType=application/xml, example=<Pet>
|
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -366,21 +366,21 @@ public class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet>}]
|
</Pet>, contentType=application/xml}]
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"photoUrls" : [ "aeiou" ],
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"id" : 123456789,
|
||||||
|
"name" : "aeiou"
|
||||||
|
} ],
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"category" : {
|
"category" : {
|
||||||
"name" : "aeiou",
|
"id" : 123456789,
|
||||||
"id" : 123456789
|
"name" : "aeiou"
|
||||||
},
|
},
|
||||||
"tags" : [ {
|
"status" : "aeiou",
|
||||||
"name" : "aeiou",
|
"name" : "doggie",
|
||||||
"id" : 123456789
|
"photoUrls" : [ "aeiou" ]
|
||||||
} ],
|
}, contentType=application/json}, {example=<Pet>
|
||||||
"status" : "aeiou"
|
|
||||||
}}, {contentType=application/xml, example=<Pet>
|
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<name>doggie</name>
|
<name>doggie</name>
|
||||||
<photoUrls>
|
<photoUrls>
|
||||||
@ -389,7 +389,7 @@ public class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet>}]
|
</Pet>, contentType=application/xml}]
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet that needs to be fetched
|
- parameter petId: (path) ID of pet that needs to be fetched
|
||||||
|
|
||||||
|
@ -105,12 +105,12 @@ public class StoreAPI: APIBase {
|
|||||||
- API Key:
|
- API Key:
|
||||||
- type: apiKey api_key
|
- type: apiKey api_key
|
||||||
- name: api_key
|
- name: api_key
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"key" : 123
|
"key" : 123
|
||||||
}}, {contentType=application/xml, example=not implemented io.swagger.models.properties.MapProperty@d1e580af}]
|
}, contentType=application/json}, {example=not implemented io.swagger.models.properties.MapProperty@d1e580af, contentType=application/xml}]
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"key" : 123
|
"key" : 123
|
||||||
}}, {contentType=application/xml, example=not implemented io.swagger.models.properties.MapProperty@d1e580af}]
|
}, contentType=application/json}, {example=not implemented io.swagger.models.properties.MapProperty@d1e580af, contentType=application/xml}]
|
||||||
|
|
||||||
- returns: RequestBuilder<[String:Int32]>
|
- returns: RequestBuilder<[String:Int32]>
|
||||||
*/
|
*/
|
||||||
@ -165,36 +165,36 @@ public class StoreAPI: APIBase {
|
|||||||
Find purchase order by ID
|
Find purchase order by ID
|
||||||
- GET /store/order/{orderId}
|
- GET /store/order/{orderId}
|
||||||
- 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: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"petId" : 123456789,
|
|
||||||
"quantity" : 123,
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
"complete" : true,
|
||||||
"status" : "aeiou"
|
"status" : "aeiou",
|
||||||
}}, {contentType=application/xml, example=<Order>
|
"quantity" : 123,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||||
|
}, contentType=application/json}, {example=<Order>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<petId>123456</petId>
|
<petId>123456</petId>
|
||||||
<quantity>0</quantity>
|
<quantity>0</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>}]
|
</Order>, contentType=application/xml}]
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"petId" : 123456789,
|
|
||||||
"quantity" : 123,
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
"complete" : true,
|
||||||
"status" : "aeiou"
|
"status" : "aeiou",
|
||||||
}}, {contentType=application/xml, example=<Order>
|
"quantity" : 123,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||||
|
}, contentType=application/json}, {example=<Order>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<petId>123456</petId>
|
<petId>123456</petId>
|
||||||
<quantity>0</quantity>
|
<quantity>0</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>}]
|
</Order>, contentType=application/xml}]
|
||||||
|
|
||||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||||
|
|
||||||
@ -252,36 +252,36 @@ public class StoreAPI: APIBase {
|
|||||||
Place an order for a pet
|
Place an order for a pet
|
||||||
- POST /store/order
|
- POST /store/order
|
||||||
-
|
-
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"petId" : 123456789,
|
|
||||||
"quantity" : 123,
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
"complete" : true,
|
||||||
"status" : "aeiou"
|
"status" : "aeiou",
|
||||||
}}, {contentType=application/xml, example=<Order>
|
"quantity" : 123,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||||
|
}, contentType=application/json}, {example=<Order>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<petId>123456</petId>
|
<petId>123456</petId>
|
||||||
<quantity>0</quantity>
|
<quantity>0</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>}]
|
</Order>, contentType=application/xml}]
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"petId" : 123456789,
|
|
||||||
"quantity" : 123,
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+00:00",
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
"complete" : true,
|
||||||
"status" : "aeiou"
|
"status" : "aeiou",
|
||||||
}}, {contentType=application/xml, example=<Order>
|
"quantity" : 123,
|
||||||
|
"shipDate" : "2000-01-23T04:56:07.000+00:00"
|
||||||
|
}, contentType=application/json}, {example=<Order>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<petId>123456</petId>
|
<petId>123456</petId>
|
||||||
<quantity>0</quantity>
|
<quantity>0</quantity>
|
||||||
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
<complete>true</complete>
|
<complete>true</complete>
|
||||||
</Order>}]
|
</Order>, contentType=application/xml}]
|
||||||
|
|
||||||
- parameter body: (body) order placed for purchasing the pet (optional)
|
- parameter body: (body) order placed for purchasing the pet (optional)
|
||||||
|
|
||||||
|
@ -263,46 +263,44 @@ public class UserAPI: APIBase {
|
|||||||
Get user by user name
|
Get user by user name
|
||||||
- GET /user/{username}
|
- GET /user/{username}
|
||||||
-
|
-
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"firstName" : "aeiou",
|
|
||||||
"lastName" : "aeiou",
|
|
||||||
"password" : "aeiou",
|
|
||||||
"userStatus" : 123,
|
|
||||||
"phone" : "aeiou",
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
|
"lastName" : "aeiou",
|
||||||
|
"phone" : "aeiou",
|
||||||
|
"username" : "aeiou",
|
||||||
"email" : "aeiou",
|
"email" : "aeiou",
|
||||||
"username" : "aeiou"
|
"userStatus" : 123,
|
||||||
}}, {contentType=application/xml, example=<User>
|
"firstName" : "aeiou",
|
||||||
|
"password" : "aeiou"
|
||||||
|
}, contentType=application/json}, {example=<User>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<username>string</username>
|
<username>string</username>
|
||||||
<dateOfBirth>2000-01-23T04:56:07.000Z</dateOfBirth>
|
|
||||||
<firstName>string</firstName>
|
<firstName>string</firstName>
|
||||||
<lastName>string</lastName>
|
<lastName>string</lastName>
|
||||||
<email>string</email>
|
<email>string</email>
|
||||||
<password>string</password>
|
<password>string</password>
|
||||||
<phone>string</phone>
|
<phone>string</phone>
|
||||||
<userStatus>0</userStatus>
|
<userStatus>0</userStatus>
|
||||||
</User>}]
|
</User>, contentType=application/xml}]
|
||||||
- examples: [{contentType=application/json, example={
|
- examples: [{example={
|
||||||
"firstName" : "aeiou",
|
|
||||||
"lastName" : "aeiou",
|
|
||||||
"password" : "aeiou",
|
|
||||||
"userStatus" : 123,
|
|
||||||
"phone" : "aeiou",
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
|
"lastName" : "aeiou",
|
||||||
|
"phone" : "aeiou",
|
||||||
|
"username" : "aeiou",
|
||||||
"email" : "aeiou",
|
"email" : "aeiou",
|
||||||
"username" : "aeiou"
|
"userStatus" : 123,
|
||||||
}}, {contentType=application/xml, example=<User>
|
"firstName" : "aeiou",
|
||||||
|
"password" : "aeiou"
|
||||||
|
}, contentType=application/json}, {example=<User>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<username>string</username>
|
<username>string</username>
|
||||||
<dateOfBirth>2000-01-23T04:56:07.000Z</dateOfBirth>
|
|
||||||
<firstName>string</firstName>
|
<firstName>string</firstName>
|
||||||
<lastName>string</lastName>
|
<lastName>string</lastName>
|
||||||
<email>string</email>
|
<email>string</email>
|
||||||
<password>string</password>
|
<password>string</password>
|
||||||
<phone>string</phone>
|
<phone>string</phone>
|
||||||
<userStatus>0</userStatus>
|
<userStatus>0</userStatus>
|
||||||
</User>}]
|
</User>, contentType=application/xml}]
|
||||||
|
|
||||||
- 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.
|
||||||
|
|
||||||
@ -362,8 +360,8 @@ public class UserAPI: APIBase {
|
|||||||
Logs user into the system
|
Logs user into the system
|
||||||
- GET /user/login
|
- GET /user/login
|
||||||
-
|
-
|
||||||
- examples: [{contentType=application/json, example="aeiou"}, {contentType=application/xml, example=string}]
|
- examples: [{example="aeiou", contentType=application/json}, {example=string, contentType=application/xml}]
|
||||||
- examples: [{contentType=application/json, example="aeiou"}, {contentType=application/xml, example=string}]
|
- examples: [{example="aeiou", contentType=application/json}, {example=string, contentType=application/xml}]
|
||||||
|
|
||||||
- parameter username: (query) The user name for login (optional)
|
- parameter username: (query) The user name for login (optional)
|
||||||
- parameter password: (query) The password for login in clear text (optional)
|
- parameter password: (query) The password for login in clear text (optional)
|
||||||
|
@ -224,7 +224,6 @@ class Decoders {
|
|||||||
let instance = User()
|
let instance = User()
|
||||||
instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"])
|
instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"])
|
||||||
instance.username = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["username"])
|
instance.username = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["username"])
|
||||||
instance.dateOfBirth = Decoders.decodeOptional(clazz: ISOFullDate.self, source: sourceDictionary["dateOfBirth"])
|
|
||||||
instance.firstName = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["firstName"])
|
instance.firstName = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["firstName"])
|
||||||
instance.lastName = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["lastName"])
|
instance.lastName = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["lastName"])
|
||||||
instance.email = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["email"])
|
instance.email = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["email"])
|
||||||
|
@ -11,7 +11,6 @@ import Foundation
|
|||||||
public class User: JSONEncodable {
|
public class User: JSONEncodable {
|
||||||
public var id: Int64?
|
public var id: Int64?
|
||||||
public var username: String?
|
public var username: String?
|
||||||
public var dateOfBirth: ISOFullDate?
|
|
||||||
public var firstName: String?
|
public var firstName: String?
|
||||||
public var lastName: String?
|
public var lastName: String?
|
||||||
public var email: String?
|
public var email: String?
|
||||||
@ -27,7 +26,6 @@ public class User: JSONEncodable {
|
|||||||
var nillableDictionary = [String:AnyObject?]()
|
var nillableDictionary = [String:AnyObject?]()
|
||||||
nillableDictionary["id"] = self.id?.encodeToJSON()
|
nillableDictionary["id"] = self.id?.encodeToJSON()
|
||||||
nillableDictionary["username"] = self.username
|
nillableDictionary["username"] = self.username
|
||||||
nillableDictionary["dateOfBirth"] = self.dateOfBirth?.encodeToJSON()
|
|
||||||
nillableDictionary["firstName"] = self.firstName
|
nillableDictionary["firstName"] = self.firstName
|
||||||
nillableDictionary["lastName"] = self.lastName
|
nillableDictionary["lastName"] = self.lastName
|
||||||
nillableDictionary["email"] = self.email
|
nillableDictionary["email"] = self.email
|
||||||
|
Loading…
x
Reference in New Issue
Block a user