forked from loafle/openapi-generator-original
update swift samples
This commit is contained in:
parent
f435cb65ce
commit
a4a1372fc1
2
.gitignore
vendored
2
.gitignore
vendored
@ -58,6 +58,8 @@ samples/client/petstore/silex/SwaggerServer/venodr/
|
|||||||
samples/client/petstore/python/.projectile
|
samples/client/petstore/python/.projectile
|
||||||
samples/client/petstore/python/.venv/
|
samples/client/petstore/python/.venv/
|
||||||
|
|
||||||
|
samples/client/petstore/objc/SwaggerClientTests/SwaggerClient.xcodeproj/xcuserdata
|
||||||
|
|
||||||
.settings
|
.settings
|
||||||
|
|
||||||
*.mustache~
|
*.mustache~
|
||||||
|
@ -71,20 +71,20 @@ extension PetstoreClientAPI {
|
|||||||
- 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>
|
||||||
@ -93,21 +93,21 @@ extension PetstoreClientAPI {
|
|||||||
<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>
|
||||||
@ -116,7 +116,7 @@ extension PetstoreClientAPI {
|
|||||||
<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 filter
|
- parameter status: (query) Status values that need to be considered for filter
|
||||||
|
|
||||||
@ -145,20 +145,20 @@ extension PetstoreClientAPI {
|
|||||||
- 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>
|
||||||
@ -167,21 +167,21 @@ extension PetstoreClientAPI {
|
|||||||
<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>
|
||||||
@ -190,7 +190,7 @@ extension PetstoreClientAPI {
|
|||||||
<tags>
|
<tags>
|
||||||
</tags>
|
</tags>
|
||||||
<status>string</status>
|
<status>string</status>
|
||||||
</Pet>, contentType=application/xml}]
|
</Pet>}]
|
||||||
|
|
||||||
- parameter tags: (query) Tags to filter by
|
- parameter tags: (query) Tags to filter by
|
||||||
|
|
||||||
@ -219,20 +219,20 @@ extension PetstoreClientAPI {
|
|||||||
- 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={
|
||||||
"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>
|
||||||
@ -241,21 +241,21 @@ extension PetstoreClientAPI {
|
|||||||
<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>
|
||||||
@ -264,7 +264,7 @@ extension PetstoreClientAPI {
|
|||||||
<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
|
||||||
|
|
||||||
|
@ -21,12 +21,12 @@ extension PetstoreClientAPI {
|
|||||||
- 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:Int]>
|
- returns: RequestBuilder<[String:Int]>
|
||||||
*/
|
*/
|
||||||
@ -48,36 +48,36 @@ extension PetstoreClientAPI {
|
|||||||
|
|
||||||
- POST /store/order
|
- POST /store/order
|
||||||
-
|
-
|
||||||
- examples: [{example={
|
- examples: [{contentType=application/json, example={
|
||||||
"id" : 123456789,
|
|
||||||
"petId" : 123456789,
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
|
||||||
"status" : "aeiou",
|
|
||||||
"quantity" : 123,
|
"quantity" : 123,
|
||||||
"shipDate" : "2015-12-26T08:15:52.206+0000"
|
"id" : 123456789,
|
||||||
}, contentType=application/json}, {example=<Order>
|
"shipDate" : "2016-02-07T13:55:23.709+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>2015-12-26T16:15:52.210Z</shipDate>
|
<shipDate>2016-02-07T05:55:23.712Z</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" : "2015-12-26T08:15:52.206+0000"
|
"id" : 123456789,
|
||||||
}, contentType=application/json}, {example=<Order>
|
"shipDate" : "2016-02-07T13:55:23.709+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>2015-12-26T16:15:52.210Z</shipDate>
|
<shipDate>2016-02-07T05:55:23.712Z</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
|
- parameter body: (body) order placed for purchasing the pet
|
||||||
|
|
||||||
@ -100,36 +100,36 @@ extension PetstoreClientAPI {
|
|||||||
|
|
||||||
- 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: [{example={
|
- examples: [{contentType=application/json, example={
|
||||||
"id" : 123456789,
|
|
||||||
"petId" : 123456789,
|
"petId" : 123456789,
|
||||||
"complete" : true,
|
|
||||||
"status" : "aeiou",
|
|
||||||
"quantity" : 123,
|
"quantity" : 123,
|
||||||
"shipDate" : "2015-12-26T08:15:52.211+0000"
|
"id" : 123456789,
|
||||||
}, contentType=application/json}, {example=<Order>
|
"shipDate" : "2016-02-07T13:55:23.713+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>2015-12-26T16:15:52.212Z</shipDate>
|
<shipDate>2016-02-07T05:55:23.713Z</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" : "2015-12-26T08:15:52.211+0000"
|
"id" : 123456789,
|
||||||
}, contentType=application/json}, {example=<Order>
|
"shipDate" : "2016-02-07T13:55:23.713+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>2015-12-26T16:15:52.212Z</shipDate>
|
<shipDate>2016-02-07T05:55:23.713Z</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
|
||||||
|
|
||||||
|
@ -84,8 +84,8 @@ extension PetstoreClientAPI {
|
|||||||
|
|
||||||
- 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
|
- parameter username: (query) The user name for login
|
||||||
- parameter password: (query) The password for login in clear text
|
- parameter password: (query) The password for login in clear text
|
||||||
@ -134,7 +134,7 @@ extension PetstoreClientAPI {
|
|||||||
|
|
||||||
- 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",
|
||||||
@ -143,7 +143,7 @@ extension PetstoreClientAPI {
|
|||||||
"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.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user