-
Notifications
You must be signed in to change notification settings - Fork 452
Sample.markdown
#API Document
BasePath: http://petstore.swagger.wordnik.com/api
information about usha
POST /user.{format}/createWithArray
Creates list of users with given input array
http://petstore.swagger.wordnik.com/api/user.{format}/createWithArray
-
body
Parameter Required Description Data Type Array[User] true List of user object Array[User]
| Status Code | Reason |
|---|
POST /user.{format}
Create user This can only be done by the logged in user.
http://petstore.swagger.wordnik.com/api/user.{format}
-
body
Parameter Required Description Data Type User true Created user object User
| Status Code | Reason |
|---|
POST /user.{format}/createWithList
Creates list of users with given list input
http://petstore.swagger.wordnik.com/api/user.{format}/createWithList
-
body
Parameter Required Description Data Type List[User] true List of user object List[User]
| Status Code | Reason |
|---|
PUT /user.{format}/{username}
Updated user This can only be done by the logged in user.
http://petstore.swagger.wordnik.com/api/user.{format}/{username}
-
body
Parameter Required Description Data Type User true Updated user object User -
path
Parameter Required Description Data Type username true name that need to be deleted string
| Status Code | Reason |
|---|---|
| 400 | Invalid username supplied |
| 404 | User not found |
DELETE /user.{format}/{username}
Delete user This can only be done by the logged in user.
http://petstore.swagger.wordnik.com/api/user.{format}/{username}
-
path
Parameter Required Description Data Type username true The name that needs to be deleted string
| Status Code | Reason |
|---|---|
| 400 | Invalid username supplied |
| 404 | User not found |
GET /user.{format}/{username}
Get user by user name
http://petstore.swagger.wordnik.com/api/user.{format}/{username}
-
path
Parameter Required Description Data Type username true The name that needs to be fetched. Use user1 for testing. string
| Status Code | Reason |
|---|---|
| 400 | Invalid username supplied |
| 404 | User not found |
GET /user.{format}/login
Logs user into the system
http://petstore.swagger.wordnik.com/api/user.{format}/login
-
query
Parameter Required Description Data Type username true The user name for login string password true The password for login in clear text string
| Status Code | Reason |
|---|---|
| 400 | Invalid username and password combination |
GET /user.{format}/logout
Logs out current logged in user session
http://petstore.swagger.wordnik.com/api/user.{format}/logout
| Status Code | Reason |
|---|
Operations about pets
GET /pet.{format}/{petId}
Find pet by ID Returns a pet based on ID
http://petstore.swagger.wordnik.com/api/pet.{format}/{petId}
-
path
Parameter Required Description Data Type petId true ID of pet that needs to be fetched string
| Status Code | Reason |
|---|---|
| 400 | Invalid ID supplied |
| 404 | Pet not found |
POST /pet.{format}
Add a new pet to the store
http://petstore.swagger.wordnik.com/api/pet.{format}
-
body
Parameter Required Description Data Type Pet true Pet object that needs to be added to the store Pet
| Status Code | Reason |
|---|---|
| 405 | Invalid input |
PUT /pet.{format}
Update an existing pet
http://petstore.swagger.wordnik.com/api/pet.{format}
-
body
Parameter Required Description Data Type Pet true Pet object that needs to be updated in the store Pet
| Status Code | Reason |
|---|---|
| 400 | Invalid ID supplied |
| 404 | Pet not found |
| 405 | Validation exception |
GET /pet.{format}/findByStatus
Finds Pets by status Multiple status values can be provided with comma seperated strings
http://petstore.swagger.wordnik.com/api/pet.{format}/findByStatus
-
query
Parameter Required Description Data Type status true Status values that need to be considered for filter string
| Status Code | Reason |
|---|---|
| 400 | Invalid status value |
GET /pet.{format}/findByTags
Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
http://petstore.swagger.wordnik.com/api/pet.{format}/findByTags
-
query
Parameter Required Description Data Type tags true Tags to filter by string
| Status Code | Reason |
|---|---|
| 400 | Invalid tag value |
Operations about store
GET /store.{format}/order/{orderId}
Find purchase order by ID For valid response try integer IDs with value <= 5. Anything above 5 or nonintegers will generate API errors
http://petstore.swagger.wordnik.com/api/store.{format}/order/{orderId}
-
path
Parameter Required Description Data Type orderId true ID of pet that needs to be fetched string
| Status Code | Reason |
|---|---|
| 400 | Invalid ID supplied |
| 404 | Order not found |
DELETE /store.{format}/order/{orderId}
Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
http://petstore.swagger.wordnik.com/api/store.{format}/order/{orderId}
-
path
Parameter Required Description Data Type orderId true ID of the order that needs to be deleted string
| Status Code | Reason |
|---|---|
| 400 | Invalid ID supplied |
| 404 | Order not found |
POST /store.{format}/order
Place an order for a pet
http://petstore.swagger.wordnik.com/api/store.{format}/order
-
body
Parameter Required Description Data Type Order true order placed for purchasing the pet Order
| Status Code | Reason |
|---|---|
| 400 | Invalid order |
| type | required | access | description | notes |
|---|---|---|---|---|
| id | long | optional | - | - |
| lastName | string | optional | - | - |
| phone | string | optional | - | - |
| username | string | optional | - | - |
| string | optional | - | - | |
| userStatus | int | optional | User Status | - |
| firstName | string | optional | - | - |
| password | string | optional | - | - |
| type | required | access | description | notes |
|---|---|---|---|---|
| id | long | optional | - | - |
| name | string | optional | - | - |
| type | required | access | description | notes |
|---|---|---|---|---|
| tags | Array:Tag | optional | - | - |
| id | long | optional | - | - |
| category | Category | optional | - | - |
| status | string | optional | pet status in the store | - |
| name | string | optional | - | - |
| photoUrls | Array:string | optional | - | - |
| type | required | access | description | notes |
|---|---|---|---|---|
| id | long | optional | - | - |
| name | string | optional | - | - |
| type | required | access | description | notes |
|---|---|---|---|---|
| id | long | optional | - | - |
| petId | long | optional | - | - |
| status | string | optional | Order Status | - |
| quantity | int | optional | - | - |
| shipDate | Date | optional | - | - |