Benoît Courtine 26b8d1f4c2 Better Rust client imports (#3332)
* Better Rust client imports.

* No more "unused_imports" in models for serde_json::Value.
* No more compilation problem for apis requiring serde_json::Value.
* "crate::" prefix for models and apis imports, for compatibility with Rust 2018 edition.

* Rust samples regeneration using new code.
2019-07-18 10:08:48 +01:00

3.3 KiB

\StoreApi

All URIs are relative to http://petstore.swagger.io/v2

Method HTTP request Description
delete_order Delete /store/order/{orderId} Delete purchase order by ID
get_inventory Get /store/inventory Returns pet inventories by status
get_order_by_id Get /store/order/{orderId} Find purchase order by ID
place_order Post /store/order Place an order for a pet

delete_order

delete_order(order_id) Delete purchase order by ID

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

Required Parameters

Name Type Description Notes
order_id String ID of the order that needs to be deleted

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

get_inventory

::std::collections::HashMap<String, i32> get_inventory(ctx, ) Returns pet inventories by status

Returns a map of status codes to quantities

Required Parameters

This endpoint does not need any parameter.

Return type

::std::collections::HashMap<String, i32>

Authorization

api_key

HTTP request headers

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

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

get_order_by_id

crate::models::Order get_order_by_id(order_id) Find purchase order by ID

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

Required Parameters

Name Type Description Notes
order_id i64 ID of pet that needs to be fetched

Return type

crate::models::Order

Authorization

No authorization required

HTTP request headers

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

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

place_order

crate::models::Order place_order(body) Place an order for a pet

Required Parameters

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

Return type

crate::models::Order

Authorization

No authorization required

HTTP request headers

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

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