mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 11:23:58 +00:00
Merge pull request #2596 from jaz-ah/swift/spacing
[Swift] minor spacing cleanup in Models.mustache
This commit is contained in:
commit
c880928519
@ -207,20 +207,20 @@ public class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
- examples: [{example=[ {
|
- examples: [{contentType=application/json, example=[ {
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 123456789,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 123456789,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 123456789
|
||||||
},
|
},
|
||||||
"status" : "aeiou",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 123456789
|
||||||
} ], 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>
|
||||||
@ -229,21 +229,21 @@ public class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet>, contentType=application/xml}]
|
</Pet>}]
|
||||||
- examples: [{example=[ {
|
- examples: [{contentType=application/json, example=[ {
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 123456789,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 123456789,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 123456789
|
||||||
},
|
},
|
||||||
"status" : "aeiou",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 123456789
|
||||||
} ], 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>
|
||||||
@ -252,7 +252,7 @@ public class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet>, contentType=application/xml}]
|
</Pet>}]
|
||||||
|
|
||||||
- parameter status: (query) Status values that need to be considered for query (optional, default to available)
|
- parameter status: (query) Status values that need to be considered for query (optional, default to available)
|
||||||
|
|
||||||
@ -309,20 +309,20 @@ public class PetAPI: APIBase {
|
|||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
- examples: [{example=[ {
|
- examples: [{contentType=application/json, example=[ {
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 123456789,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 123456789,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 123456789
|
||||||
},
|
},
|
||||||
"status" : "aeiou",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 123456789
|
||||||
} ], 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>
|
||||||
@ -331,21 +331,21 @@ public class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet>, contentType=application/xml}]
|
</Pet>}]
|
||||||
- examples: [{example=[ {
|
- examples: [{contentType=application/json, example=[ {
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 123456789,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 123456789,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 123456789
|
||||||
},
|
},
|
||||||
"status" : "aeiou",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 123456789
|
||||||
} ], 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>
|
||||||
@ -354,7 +354,7 @@ public class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet>, contentType=application/xml}]
|
</Pet>}]
|
||||||
|
|
||||||
- parameter tags: (query) Tags to filter by (optional)
|
- parameter tags: (query) Tags to filter by (optional)
|
||||||
|
|
||||||
@ -408,26 +408,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
|
||||||
- API Key:
|
|
||||||
- type: apiKey api_key
|
|
||||||
- name: api_key
|
|
||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
- examples: [{example={
|
- API Key:
|
||||||
"tags" : [ {
|
- type: apiKey api_key
|
||||||
"id" : 123456789,
|
- name: api_key
|
||||||
"name" : "aeiou"
|
- examples: [{contentType=application/json, example={
|
||||||
} ],
|
"photoUrls" : [ "aeiou" ],
|
||||||
|
"name" : "doggie",
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 123456789,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 123456789
|
||||||
},
|
},
|
||||||
"status" : "aeiou",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 123456789
|
||||||
}, 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>
|
||||||
@ -436,21 +436,21 @@ public class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet>, contentType=application/xml}]
|
</Pet>}]
|
||||||
- examples: [{example={
|
- examples: [{contentType=application/json, example={
|
||||||
"tags" : [ {
|
"photoUrls" : [ "aeiou" ],
|
||||||
"id" : 123456789,
|
"name" : "doggie",
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"id" : 123456789,
|
"id" : 123456789,
|
||||||
"category" : {
|
"category" : {
|
||||||
"id" : 123456789,
|
"name" : "aeiou",
|
||||||
"name" : "aeiou"
|
"id" : 123456789
|
||||||
},
|
},
|
||||||
"status" : "aeiou",
|
"tags" : [ {
|
||||||
"name" : "doggie",
|
"name" : "aeiou",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 123456789
|
||||||
}, 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>
|
||||||
@ -459,7 +459,7 @@ public class PetAPI: APIBase {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet>, contentType=application/xml}]
|
</Pet>}]
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet that needs to be fetched
|
- parameter petId: (path) ID of pet that needs to be fetched
|
||||||
|
|
||||||
@ -512,46 +512,46 @@ public class PetAPI: APIBase {
|
|||||||
Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||||
- GET /pet/{petId}?response=inline_arbitrary_object
|
- GET /pet/{petId}?response=inline_arbitrary_object
|
||||||
- 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
|
||||||
- API Key:
|
|
||||||
- type: apiKey api_key
|
|
||||||
- name: api_key
|
|
||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
- examples: [{example={
|
- API Key:
|
||||||
"id" : 123456789,
|
- type: apiKey api_key
|
||||||
"tags" : [ {
|
- name: api_key
|
||||||
"id" : 123456789,
|
- examples: [{contentType=application/json, example={
|
||||||
"name" : "aeiou"
|
"photoUrls" : [ "aeiou" ],
|
||||||
} ],
|
|
||||||
"category" : "{}",
|
|
||||||
"status" : "aeiou",
|
|
||||||
"name" : "doggie",
|
"name" : "doggie",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 123456789,
|
||||||
}, contentType=application/json}, {example=<null>
|
"category" : "{}",
|
||||||
|
"tags" : [ {
|
||||||
|
"name" : "aeiou",
|
||||||
|
"id" : 123456789
|
||||||
|
} ],
|
||||||
|
"status" : "aeiou"
|
||||||
|
}}, {contentType=application/xml, example=<null>
|
||||||
|
<photoUrls>string</photoUrls>
|
||||||
|
<name>doggie</name>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<category>not implemented io.swagger.models.properties.ObjectProperty@37ff6855</category>
|
<category>not implemented io.swagger.models.properties.ObjectProperty@37ff6855</category>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
<name>doggie</name>
|
</null>}]
|
||||||
<photoUrls>string</photoUrls>
|
- examples: [{contentType=application/json, example={
|
||||||
</null>, contentType=application/xml}]
|
"photoUrls" : [ "aeiou" ],
|
||||||
- examples: [{example={
|
|
||||||
"id" : 123456789,
|
|
||||||
"tags" : [ {
|
|
||||||
"id" : 123456789,
|
|
||||||
"name" : "aeiou"
|
|
||||||
} ],
|
|
||||||
"category" : "{}",
|
|
||||||
"status" : "aeiou",
|
|
||||||
"name" : "doggie",
|
"name" : "doggie",
|
||||||
"photoUrls" : [ "aeiou" ]
|
"id" : 123456789,
|
||||||
}, contentType=application/json}, {example=<null>
|
"category" : "{}",
|
||||||
|
"tags" : [ {
|
||||||
|
"name" : "aeiou",
|
||||||
|
"id" : 123456789
|
||||||
|
} ],
|
||||||
|
"status" : "aeiou"
|
||||||
|
}}, {contentType=application/xml, example=<null>
|
||||||
|
<photoUrls>string</photoUrls>
|
||||||
|
<name>doggie</name>
|
||||||
<id>123456</id>
|
<id>123456</id>
|
||||||
<category>not implemented io.swagger.models.properties.ObjectProperty@37ff6855</category>
|
<category>not implemented io.swagger.models.properties.ObjectProperty@37ff6855</category>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
<name>doggie</name>
|
</null>}]
|
||||||
<photoUrls>string</photoUrls>
|
|
||||||
</null>, 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
|
||||||
|
|
||||||
@ -604,14 +604,14 @@ public class PetAPI: APIBase {
|
|||||||
Fake endpoint to test byte array return by 'Find pet by ID'
|
Fake endpoint to test byte array return by 'Find pet by ID'
|
||||||
- GET /pet/{petId}?testing_byte_array=true
|
- GET /pet/{petId}?testing_byte_array=true
|
||||||
- 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
|
||||||
- API Key:
|
|
||||||
- type: apiKey api_key
|
|
||||||
- name: api_key
|
|
||||||
- OAuth:
|
- OAuth:
|
||||||
- type: oauth2
|
- type: oauth2
|
||||||
- name: petstore_auth
|
- name: petstore_auth
|
||||||
- examples: [{example="", contentType=application/json}, {example=not implemented io.swagger.models.properties.BinaryProperty@55e6ae9e, contentType=application/xml}]
|
- API Key:
|
||||||
- examples: [{example="", contentType=application/json}, {example=not implemented io.swagger.models.properties.BinaryProperty@55e6ae9e, contentType=application/xml}]
|
- type: apiKey api_key
|
||||||
|
- name: api_key
|
||||||
|
- examples: [{contentType=application/json, example=""}, {contentType=application/xml, example=not implemented io.swagger.models.properties.BinaryProperty@55e6ae9e}]
|
||||||
|
- examples: [{contentType=application/json, example=""}, {contentType=application/xml, example=not implemented io.swagger.models.properties.BinaryProperty@55e6ae9e}]
|
||||||
|
|
||||||
- parameter petId: (path) ID of pet that needs to be fetched
|
- parameter petId: (path) ID of pet that needs to be fetched
|
||||||
|
|
||||||
|
@ -103,36 +103,36 @@ public class StoreAPI: APIBase {
|
|||||||
- API Key:
|
- API Key:
|
||||||
- type: apiKey x-test_api_client_secret
|
- type: apiKey x-test_api_client_secret
|
||||||
- name: test_api_client_secret
|
- name: test_api_client_secret
|
||||||
- examples: [{example=[ {
|
- examples: [{contentType=application/json, example=[ {
|
||||||
"id" : 123456789,
|
|
||||||
"petId" : 123456789,
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
|
||||||
"status" : "aeiou",
|
|
||||||
"quantity" : 123,
|
"quantity" : 123,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+0000"
|
"id" : 123456789,
|
||||||
} ], contentType=application/json}, {example=<Order>
|
"shipDate" : "2000-01-23T04:56:07.000+0000",
|
||||||
|
"complete" : true,
|
||||||
|
"status" : "aeiou"
|
||||||
|
} ]}, {contentType=application/xml, 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>, contentType=application/xml}]
|
</Order>}]
|
||||||
- examples: [{example=[ {
|
- examples: [{contentType=application/json, example=[ {
|
||||||
"id" : 123456789,
|
|
||||||
"petId" : 123456789,
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
|
||||||
"status" : "aeiou",
|
|
||||||
"quantity" : 123,
|
"quantity" : 123,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+0000"
|
"id" : 123456789,
|
||||||
} ], contentType=application/json}, {example=<Order>
|
"shipDate" : "2000-01-23T04:56:07.000+0000",
|
||||||
|
"complete" : true,
|
||||||
|
"status" : "aeiou"
|
||||||
|
} ]}, {contentType=application/xml, 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>, contentType=application/xml}]
|
</Order>}]
|
||||||
|
|
||||||
- parameter status: (query) Status value that needs to be considered for query (optional, default to placed)
|
- parameter status: (query) Status value that needs to be considered for query (optional, default to placed)
|
||||||
|
|
||||||
@ -187,12 +187,12 @@ public class StoreAPI: APIBase {
|
|||||||
- API Key:
|
- API Key:
|
||||||
- type: apiKey api_key
|
- type: apiKey api_key
|
||||||
- name: api_key
|
- name: api_key
|
||||||
- examples: [{example={
|
- examples: [{contentType=application/json, example={
|
||||||
"key" : 123
|
"key" : 123
|
||||||
}, contentType=application/json}, {example=not implemented io.swagger.models.properties.MapProperty@d1e580af, contentType=application/xml}]
|
}}, {contentType=application/xml, example=not implemented io.swagger.models.properties.MapProperty@d1e580af}]
|
||||||
- examples: [{example={
|
- examples: [{contentType=application/json, example={
|
||||||
"key" : 123
|
"key" : 123
|
||||||
}, contentType=application/json}, {example=not implemented io.swagger.models.properties.MapProperty@d1e580af, contentType=application/xml}]
|
}}, {contentType=application/xml, example=not implemented io.swagger.models.properties.MapProperty@d1e580af}]
|
||||||
|
|
||||||
- returns: RequestBuilder<[String:Int32]>
|
- returns: RequestBuilder<[String:Int32]>
|
||||||
*/
|
*/
|
||||||
@ -243,8 +243,8 @@ public class StoreAPI: APIBase {
|
|||||||
- API Key:
|
- API Key:
|
||||||
- type: apiKey api_key
|
- type: apiKey api_key
|
||||||
- name: api_key
|
- name: api_key
|
||||||
- examples: [{example="{}", contentType=application/json}, {example=not implemented io.swagger.models.properties.ObjectProperty@37aadb4f, contentType=application/xml}]
|
- examples: [{contentType=application/json, example="{}"}, {contentType=application/xml, example=not implemented io.swagger.models.properties.ObjectProperty@37aadb4f}]
|
||||||
- examples: [{example="{}", contentType=application/json}, {example=not implemented io.swagger.models.properties.ObjectProperty@37aadb4f, contentType=application/xml}]
|
- examples: [{contentType=application/json, example="{}"}, {contentType=application/xml, example=not implemented io.swagger.models.properties.ObjectProperty@37aadb4f}]
|
||||||
|
|
||||||
- returns: RequestBuilder<AnyObject>
|
- returns: RequestBuilder<AnyObject>
|
||||||
*/
|
*/
|
||||||
@ -294,42 +294,42 @@ 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
|
||||||
- API Key:
|
|
||||||
- type: apiKey test_api_key_header
|
|
||||||
- name: test_api_key_header
|
|
||||||
- API Key:
|
- API Key:
|
||||||
- type: apiKey test_api_key_query (QUERY)
|
- type: apiKey test_api_key_query (QUERY)
|
||||||
- name: test_api_key_query
|
- name: test_api_key_query
|
||||||
- examples: [{example={
|
- API Key:
|
||||||
"id" : 123456789,
|
- type: apiKey test_api_key_header
|
||||||
|
- name: test_api_key_header
|
||||||
|
- examples: [{contentType=application/json, example={
|
||||||
"petId" : 123456789,
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
|
||||||
"status" : "aeiou",
|
|
||||||
"quantity" : 123,
|
"quantity" : 123,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+0000"
|
"id" : 123456789,
|
||||||
}, contentType=application/json}, {example=<Order>
|
"shipDate" : "2000-01-23T04:56:07.000+0000",
|
||||||
|
"complete" : true,
|
||||||
|
"status" : "aeiou"
|
||||||
|
}}, {contentType=application/xml, 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>, contentType=application/xml}]
|
</Order>}]
|
||||||
- examples: [{example={
|
- examples: [{contentType=application/json, example={
|
||||||
"id" : 123456789,
|
|
||||||
"petId" : 123456789,
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
|
||||||
"status" : "aeiou",
|
|
||||||
"quantity" : 123,
|
"quantity" : 123,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+0000"
|
"id" : 123456789,
|
||||||
}, contentType=application/json}, {example=<Order>
|
"shipDate" : "2000-01-23T04:56:07.000+0000",
|
||||||
|
"complete" : true,
|
||||||
|
"status" : "aeiou"
|
||||||
|
}}, {contentType=application/xml, 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>, contentType=application/xml}]
|
</Order>}]
|
||||||
|
|
||||||
- parameter orderId: (path) ID of pet that needs to be fetched
|
- parameter orderId: (path) ID of pet that needs to be fetched
|
||||||
|
|
||||||
@ -388,36 +388,36 @@ public class StoreAPI: APIBase {
|
|||||||
- API Key:
|
- API Key:
|
||||||
- type: apiKey x-test_api_client_secret
|
- type: apiKey x-test_api_client_secret
|
||||||
- name: test_api_client_secret
|
- name: test_api_client_secret
|
||||||
- examples: [{example={
|
- examples: [{contentType=application/json, example={
|
||||||
"id" : 123456789,
|
|
||||||
"petId" : 123456789,
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
|
||||||
"status" : "aeiou",
|
|
||||||
"quantity" : 123,
|
"quantity" : 123,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+0000"
|
"id" : 123456789,
|
||||||
}, contentType=application/json}, {example=<Order>
|
"shipDate" : "2000-01-23T04:56:07.000+0000",
|
||||||
|
"complete" : true,
|
||||||
|
"status" : "aeiou"
|
||||||
|
}}, {contentType=application/xml, 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>, contentType=application/xml}]
|
</Order>}]
|
||||||
- examples: [{example={
|
- examples: [{contentType=application/json, example={
|
||||||
"id" : 123456789,
|
|
||||||
"petId" : 123456789,
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
|
||||||
"status" : "aeiou",
|
|
||||||
"quantity" : 123,
|
"quantity" : 123,
|
||||||
"shipDate" : "2000-01-23T04:56:07.000+0000"
|
"id" : 123456789,
|
||||||
}, contentType=application/json}, {example=<Order>
|
"shipDate" : "2000-01-23T04:56:07.000+0000",
|
||||||
|
"complete" : true,
|
||||||
|
"status" : "aeiou"
|
||||||
|
}}, {contentType=application/xml, 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>, contentType=application/xml}]
|
</Order>}]
|
||||||
|
|
||||||
- parameter body: (body) order placed for purchasing the pet (optional)
|
- parameter body: (body) order placed for purchasing the pet (optional)
|
||||||
|
|
||||||
|
@ -247,7 +247,7 @@ public class UserAPI: APIBase {
|
|||||||
Get user by user name
|
Get user by user name
|
||||||
- GET /user/{username}
|
- GET /user/{username}
|
||||||
-
|
-
|
||||||
- examples: [{example={
|
- examples: [{contentType=application/json, example={
|
||||||
"id" : 1,
|
"id" : 1,
|
||||||
"username" : "johnp",
|
"username" : "johnp",
|
||||||
"firstName" : "John",
|
"firstName" : "John",
|
||||||
@ -256,7 +256,7 @@ public class UserAPI: APIBase {
|
|||||||
"password" : "-secret-",
|
"password" : "-secret-",
|
||||||
"phone" : "0123456789",
|
"phone" : "0123456789",
|
||||||
"userStatus" : 0
|
"userStatus" : 0
|
||||||
}, contentType=application/json}]
|
}}]
|
||||||
|
|
||||||
- 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.
|
||||||
|
|
||||||
@ -311,8 +311,8 @@ public class UserAPI: APIBase {
|
|||||||
Logs user into the system
|
Logs user into the system
|
||||||
- GET /user/login
|
- GET /user/login
|
||||||
-
|
-
|
||||||
- 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}]
|
- examples: [{contentType=application/json, example="aeiou"}, {contentType=application/xml, example=string}]
|
||||||
|
|
||||||
- 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)
|
||||||
|
@ -203,7 +203,8 @@ class Decoders {
|
|||||||
instance.byte = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["byte"])
|
instance.byte = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["byte"])
|
||||||
instance.binary = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["binary"])
|
instance.binary = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["binary"])
|
||||||
instance.date = Decoders.decodeOptional(clazz: NSDate.self, source: sourceDictionary["date"])
|
instance.date = Decoders.decodeOptional(clazz: NSDate.self, source: sourceDictionary["date"])
|
||||||
instance.dateTime = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["dateTime"])
|
instance.dateTime = Decoders.decodeOptional(clazz: NSDate.self, source: sourceDictionary["dateTime"])
|
||||||
|
instance.password = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["password"])
|
||||||
return instance
|
return instance
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,12 +217,12 @@ class Decoders {
|
|||||||
Decoders.addDecoder(clazz: InlineResponse200.self) { (source: AnyObject) -> InlineResponse200 in
|
Decoders.addDecoder(clazz: InlineResponse200.self) { (source: AnyObject) -> InlineResponse200 in
|
||||||
let sourceDictionary = source as! [NSObject:AnyObject]
|
let sourceDictionary = source as! [NSObject:AnyObject]
|
||||||
let instance = InlineResponse200()
|
let instance = InlineResponse200()
|
||||||
instance.tags = Decoders.decodeOptional(clazz: Array.self, source: sourceDictionary["tags"])
|
instance.photoUrls = Decoders.decodeOptional(clazz: Array.self, source: sourceDictionary["photoUrls"])
|
||||||
|
instance.name = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["name"])
|
||||||
instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"])
|
instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"])
|
||||||
instance.category = Decoders.decodeOptional(clazz: AnyObject.self, source: sourceDictionary["category"])
|
instance.category = Decoders.decodeOptional(clazz: AnyObject.self, source: sourceDictionary["category"])
|
||||||
|
instance.tags = Decoders.decodeOptional(clazz: Array.self, source: sourceDictionary["tags"])
|
||||||
instance.status = InlineResponse200.Status(rawValue: (sourceDictionary["status"] as? String) ?? "")
|
instance.status = InlineResponse200.Status(rawValue: (sourceDictionary["status"] as? String) ?? "")
|
||||||
instance.name = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["name"])
|
|
||||||
instance.photoUrls = Decoders.decodeOptional(clazz: Array.self, source: sourceDictionary["photoUrls"])
|
|
||||||
return instance
|
return instance
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,8 @@ public class FormatTest: JSONEncodable {
|
|||||||
public var byte: String?
|
public var byte: String?
|
||||||
public var binary: String?
|
public var binary: String?
|
||||||
public var date: NSDate?
|
public var date: NSDate?
|
||||||
public var dateTime: String?
|
public var dateTime: NSDate?
|
||||||
|
public var password: String?
|
||||||
|
|
||||||
public init() {}
|
public init() {}
|
||||||
|
|
||||||
@ -37,7 +38,8 @@ public class FormatTest: JSONEncodable {
|
|||||||
nillableDictionary["byte"] = self.byte
|
nillableDictionary["byte"] = self.byte
|
||||||
nillableDictionary["binary"] = self.binary
|
nillableDictionary["binary"] = self.binary
|
||||||
nillableDictionary["date"] = self.date?.encodeToJSON()
|
nillableDictionary["date"] = self.date?.encodeToJSON()
|
||||||
nillableDictionary["dateTime"] = self.dateTime
|
nillableDictionary["dateTime"] = self.dateTime?.encodeToJSON()
|
||||||
|
nillableDictionary["password"] = self.password
|
||||||
let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:]
|
let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:]
|
||||||
return dictionary
|
return dictionary
|
||||||
}
|
}
|
||||||
|
@ -14,26 +14,26 @@ public class InlineResponse200: JSONEncodable {
|
|||||||
case Pending = "pending"
|
case Pending = "pending"
|
||||||
case Sold = "sold"
|
case Sold = "sold"
|
||||||
}
|
}
|
||||||
public var tags: [Tag]?
|
public var photoUrls: [String]?
|
||||||
|
public var name: String?
|
||||||
public var id: Int64?
|
public var id: Int64?
|
||||||
public var category: AnyObject?
|
public var category: AnyObject?
|
||||||
|
public var tags: [Tag]?
|
||||||
/** pet status in the store */
|
/** pet status in the store */
|
||||||
public var status: Status?
|
public var status: Status?
|
||||||
public var name: String?
|
|
||||||
public var photoUrls: [String]?
|
|
||||||
|
|
||||||
public init() {}
|
public init() {}
|
||||||
|
|
||||||
// MARK: JSONEncodable
|
// MARK: JSONEncodable
|
||||||
func encodeToJSON() -> AnyObject {
|
func encodeToJSON() -> AnyObject {
|
||||||
var nillableDictionary = [String:AnyObject?]()
|
var nillableDictionary = [String:AnyObject?]()
|
||||||
nillableDictionary["tags"] = self.tags?.encodeToJSON()
|
nillableDictionary["photoUrls"] = self.photoUrls?.encodeToJSON()
|
||||||
|
nillableDictionary["name"] = self.name
|
||||||
nillableDictionary["id"] = self.id?.encodeToJSON()
|
nillableDictionary["id"] = self.id?.encodeToJSON()
|
||||||
nillableDictionary["id"] = self.id?.encodeToJSON()
|
nillableDictionary["id"] = self.id?.encodeToJSON()
|
||||||
nillableDictionary["category"] = self.category
|
nillableDictionary["category"] = self.category
|
||||||
|
nillableDictionary["tags"] = self.tags?.encodeToJSON()
|
||||||
nillableDictionary["status"] = self.status?.rawValue
|
nillableDictionary["status"] = self.status?.rawValue
|
||||||
nillableDictionary["name"] = self.name
|
|
||||||
nillableDictionary["photoUrls"] = self.photoUrls?.encodeToJSON()
|
|
||||||
let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:]
|
let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:]
|
||||||
return dictionary
|
return dictionary
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user