William Cheng 5c275bccd2
Throw exception when config file missing (#4557)
* throw exception when config file missing

* fix bash config location
2019-11-22 14:01:57 +08:00

3.3 KiB

StoreApi

All URIs are relative to /v2

Method HTTP request Description
deleteOrder DELETE /store/order/{order_id} Delete purchase order by ID
getInventory GET /store/inventory Returns pet inventories by status
getOrderById GET /store/order/{order_id} Find purchase order by ID
placeOrder POST /store/order Place an order for a pet

deleteOrder

Delete purchase order by ID

For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors

Example

petstore-cli deleteOrder order_id=value

Parameters

Name Type Description Notes
orderId string ID of the order that needs to be deleted [default to null]

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not Applicable
  • Accept: Not Applicable

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getInventory

Returns pet inventories by status

Returns a map of status codes to quantities

Example

petstore-cli getInventory

Parameters

This endpoint does not need any parameter.

Return type

map[String, integer]

Authorization

api_key

HTTP request headers

  • Content-Type: Not Applicable
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getOrderById

Find purchase order by ID

For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions

Example

petstore-cli getOrderById order_id=value

Parameters

Name Type Description Notes
orderId integer ID of pet that needs to be fetched [default to null]

Return type

Order

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not Applicable
  • Accept: application/xml, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

placeOrder

Place an order for a pet

Example

petstore-cli placeOrder

Parameters

Name Type Description Notes
order Order order placed for purchasing the pet

Return type

Order

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/xml, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]