* add rust generator (1st release) * update based on feedback * fix reserved keyword * fix string parameter * Convert String to &str in trait definition * Only pass pathParams to uri builder * Fixed the html escaping in return type * Fixed the hashmap constructor * Added models into API scope * removed models subimport, reference from super * update returntype in method signature * Fixed the remaining templates inconsistencies * Fixed issues that floated up in kubernetes swagger file * add hash support, fix docstring * fix map parameter, update api.mustache * use baseName for parameter * use fully-qualfiied model name * add rust tests * fix test cases * Rust gen slightly more idiomatic (#6247) * Go -> Rust in README * Remove leftover go file in rust sample * rust: Regenerate sample * rust: Rename *Impl -> *Client * rust: one-line use line More in line with common style * rust: Replace tabs (in java) with 4 spaces * Added trivial getter implementation (#6249) * update rust petstore samples
3.3 KiB
\StoreApi
All URIs are relative to http://petstore.swagger.io/v2
Method | HTTP request | Description |
---|---|---|
DeleteOrder | Delete /store/order/{orderId} | Delete purchase order by ID |
GetInventory | Get /store/inventory | Returns pet inventories by status |
GetOrderById | Get /store/order/{orderId} | Find purchase order by ID |
PlaceOrder | Post /store/order | Place an order for a pet |
DeleteOrder
DeleteOrder(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: application/xml, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetInventory
::std::collections::HashMap<String, i32> GetInventory(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
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetOrderById
::models::Order GetOrderById(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
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]
PlaceOrder
::models::Order PlaceOrder(body) Place an order for a pet
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
body | Order | order placed for purchasing the pet |
Return type
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]