forked from loafle/openapi-generator-original
Rust client docs improvements (#10461)
* docs(rust,client): link from parameter structs to operation methods * docs(rust,client): move "more information" text up This prevents the "more information" text from flowing into the previous bullet point. * docs(rust,client): use code formatting for generatorClass * docs(rust,client): use packageName variable for Cargo.toml dependencies example * chore(rust,client): capture sample updates
This commit is contained in:
parent
1d934643fd
commit
5096a00087
@ -4,6 +4,10 @@
|
||||
{{{.}}}
|
||||
{{/appDescriptionWithNewLines}}
|
||||
|
||||
{{#infoUrl}}
|
||||
For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
|
||||
{{/infoUrl}}
|
||||
|
||||
## Overview
|
||||
|
||||
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client.
|
||||
@ -13,17 +17,14 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat
|
||||
{{^hideGenerationTimestamp}}
|
||||
- Build date: {{{generatedDate}}}
|
||||
{{/hideGenerationTimestamp}}
|
||||
- Build package: {{{generatorClass}}}
|
||||
{{#infoUrl}}
|
||||
For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
|
||||
{{/infoUrl}}
|
||||
- Build package: `{{{generatorClass}}}`
|
||||
|
||||
## Installation
|
||||
|
||||
Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`:
|
||||
|
||||
```
|
||||
openapi = { path = "./generated" }
|
||||
{{{packageName}}} = { path = "./generated" }
|
||||
```
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
@ -10,7 +10,7 @@ use super::{Error, configuration};
|
||||
{{#vendorExtensions.x-group-parameters}}
|
||||
{{#allParams}}
|
||||
{{#-first}}
|
||||
/// struct for passing parameters to the method `{{operationId}}`
|
||||
/// struct for passing parameters to the method [`{{operationId}}`]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct {{{operationIdCamelCase}}}Params {
|
||||
{{/-first}}
|
||||
@ -30,7 +30,7 @@ pub struct {{{operationIdCamelCase}}}Params {
|
||||
{{#supportMultipleResponses}}
|
||||
{{#operations}}
|
||||
{{#operation}}
|
||||
/// struct for typed successes of method `{{operationId}}`
|
||||
/// struct for typed successes of method [`{{operationId}}`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum {{{operationIdCamelCase}}}Success {
|
||||
@ -50,7 +50,7 @@ pub enum {{{operationIdCamelCase}}}Success {
|
||||
{{/supportMultipleResponses}}
|
||||
{{#operations}}
|
||||
{{#operation}}
|
||||
/// struct for typed errors of method `{{operationId}}`
|
||||
/// struct for typed errors of method [`{{operationId}}`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum {{{operationIdCamelCase}}}Error {
|
||||
|
@ -2,20 +2,21 @@
|
||||
|
||||
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
|
||||
|
||||
## Overview
|
||||
|
||||
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client.
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version: 1.0.0
|
||||
- Build package: org.openapitools.codegen.languages.RustClientCodegen
|
||||
- Build package: `org.openapitools.codegen.languages.RustClientCodegen`
|
||||
|
||||
## Installation
|
||||
|
||||
Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`:
|
||||
|
||||
```
|
||||
openapi = { path = "./generated" }
|
||||
petstore-hyper = { path = "./generated" }
|
||||
```
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
@ -2,20 +2,21 @@
|
||||
|
||||
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
|
||||
|
||||
## Overview
|
||||
|
||||
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client.
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version: 1.0.0
|
||||
- Build package: org.openapitools.codegen.languages.RustClientCodegen
|
||||
- Build package: `org.openapitools.codegen.languages.RustClientCodegen`
|
||||
|
||||
## Installation
|
||||
|
||||
Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`:
|
||||
|
||||
```
|
||||
openapi = { path = "./generated" }
|
||||
petstore-reqwest-async = { path = "./generated" }
|
||||
```
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
@ -14,14 +14,14 @@ use reqwest;
|
||||
use crate::apis::ResponseContent;
|
||||
use super::{Error, configuration};
|
||||
|
||||
/// struct for passing parameters to the method `add_pet`
|
||||
/// struct for passing parameters to the method [`add_pet`]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct AddPetParams {
|
||||
/// Pet object that needs to be added to the store
|
||||
pub pet: crate::models::Pet
|
||||
}
|
||||
|
||||
/// struct for passing parameters to the method `delete_pet`
|
||||
/// struct for passing parameters to the method [`delete_pet`]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct DeletePetParams {
|
||||
/// Pet id to delete
|
||||
@ -29,35 +29,35 @@ pub struct DeletePetParams {
|
||||
pub api_key: Option<String>
|
||||
}
|
||||
|
||||
/// struct for passing parameters to the method `find_pets_by_status`
|
||||
/// struct for passing parameters to the method [`find_pets_by_status`]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct FindPetsByStatusParams {
|
||||
/// Status values that need to be considered for filter
|
||||
pub status: Vec<String>
|
||||
}
|
||||
|
||||
/// struct for passing parameters to the method `find_pets_by_tags`
|
||||
/// struct for passing parameters to the method [`find_pets_by_tags`]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct FindPetsByTagsParams {
|
||||
/// Tags to filter by
|
||||
pub tags: Vec<String>
|
||||
}
|
||||
|
||||
/// struct for passing parameters to the method `get_pet_by_id`
|
||||
/// struct for passing parameters to the method [`get_pet_by_id`]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct GetPetByIdParams {
|
||||
/// ID of pet to return
|
||||
pub pet_id: i64
|
||||
}
|
||||
|
||||
/// struct for passing parameters to the method `update_pet`
|
||||
/// struct for passing parameters to the method [`update_pet`]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct UpdatePetParams {
|
||||
/// Pet object that needs to be added to the store
|
||||
pub pet: crate::models::Pet
|
||||
}
|
||||
|
||||
/// struct for passing parameters to the method `update_pet_with_form`
|
||||
/// struct for passing parameters to the method [`update_pet_with_form`]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct UpdatePetWithFormParams {
|
||||
/// ID of pet that needs to be updated
|
||||
@ -68,7 +68,7 @@ pub struct UpdatePetWithFormParams {
|
||||
pub status: Option<String>
|
||||
}
|
||||
|
||||
/// struct for passing parameters to the method `upload_file`
|
||||
/// struct for passing parameters to the method [`upload_file`]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct UploadFileParams {
|
||||
/// ID of pet to update
|
||||
@ -80,7 +80,7 @@ pub struct UploadFileParams {
|
||||
}
|
||||
|
||||
|
||||
/// struct for typed successes of method `add_pet`
|
||||
/// struct for typed successes of method [`add_pet`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum AddPetSuccess {
|
||||
@ -88,14 +88,14 @@ pub enum AddPetSuccess {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed successes of method `delete_pet`
|
||||
/// struct for typed successes of method [`delete_pet`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum DeletePetSuccess {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed successes of method `find_pets_by_status`
|
||||
/// struct for typed successes of method [`find_pets_by_status`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum FindPetsByStatusSuccess {
|
||||
@ -103,7 +103,7 @@ pub enum FindPetsByStatusSuccess {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed successes of method `find_pets_by_tags`
|
||||
/// struct for typed successes of method [`find_pets_by_tags`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum FindPetsByTagsSuccess {
|
||||
@ -111,7 +111,7 @@ pub enum FindPetsByTagsSuccess {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed successes of method `get_pet_by_id`
|
||||
/// struct for typed successes of method [`get_pet_by_id`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetPetByIdSuccess {
|
||||
@ -119,7 +119,7 @@ pub enum GetPetByIdSuccess {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed successes of method `update_pet`
|
||||
/// struct for typed successes of method [`update_pet`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum UpdatePetSuccess {
|
||||
@ -127,14 +127,14 @@ pub enum UpdatePetSuccess {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed successes of method `update_pet_with_form`
|
||||
/// struct for typed successes of method [`update_pet_with_form`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum UpdatePetWithFormSuccess {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed successes of method `upload_file`
|
||||
/// struct for typed successes of method [`upload_file`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum UploadFileSuccess {
|
||||
@ -142,7 +142,7 @@ pub enum UploadFileSuccess {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `add_pet`
|
||||
/// struct for typed errors of method [`add_pet`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum AddPetError {
|
||||
@ -150,7 +150,7 @@ pub enum AddPetError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `delete_pet`
|
||||
/// struct for typed errors of method [`delete_pet`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum DeletePetError {
|
||||
@ -158,7 +158,7 @@ pub enum DeletePetError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `find_pets_by_status`
|
||||
/// struct for typed errors of method [`find_pets_by_status`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum FindPetsByStatusError {
|
||||
@ -166,7 +166,7 @@ pub enum FindPetsByStatusError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `find_pets_by_tags`
|
||||
/// struct for typed errors of method [`find_pets_by_tags`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum FindPetsByTagsError {
|
||||
@ -174,7 +174,7 @@ pub enum FindPetsByTagsError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `get_pet_by_id`
|
||||
/// struct for typed errors of method [`get_pet_by_id`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetPetByIdError {
|
||||
@ -183,7 +183,7 @@ pub enum GetPetByIdError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `update_pet`
|
||||
/// struct for typed errors of method [`update_pet`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum UpdatePetError {
|
||||
@ -193,7 +193,7 @@ pub enum UpdatePetError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `update_pet_with_form`
|
||||
/// struct for typed errors of method [`update_pet_with_form`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum UpdatePetWithFormError {
|
||||
@ -201,7 +201,7 @@ pub enum UpdatePetWithFormError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `upload_file`
|
||||
/// struct for typed errors of method [`upload_file`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum UploadFileError {
|
||||
|
@ -14,21 +14,21 @@ use reqwest;
|
||||
use crate::apis::ResponseContent;
|
||||
use super::{Error, configuration};
|
||||
|
||||
/// struct for passing parameters to the method `delete_order`
|
||||
/// struct for passing parameters to the method [`delete_order`]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct DeleteOrderParams {
|
||||
/// ID of the order that needs to be deleted
|
||||
pub order_id: String
|
||||
}
|
||||
|
||||
/// struct for passing parameters to the method `get_order_by_id`
|
||||
/// struct for passing parameters to the method [`get_order_by_id`]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct GetOrderByIdParams {
|
||||
/// ID of pet that needs to be fetched
|
||||
pub order_id: i64
|
||||
}
|
||||
|
||||
/// struct for passing parameters to the method `place_order`
|
||||
/// struct for passing parameters to the method [`place_order`]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct PlaceOrderParams {
|
||||
/// order placed for purchasing the pet
|
||||
@ -36,14 +36,14 @@ pub struct PlaceOrderParams {
|
||||
}
|
||||
|
||||
|
||||
/// struct for typed successes of method `delete_order`
|
||||
/// struct for typed successes of method [`delete_order`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum DeleteOrderSuccess {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed successes of method `get_inventory`
|
||||
/// struct for typed successes of method [`get_inventory`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetInventorySuccess {
|
||||
@ -51,7 +51,7 @@ pub enum GetInventorySuccess {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed successes of method `get_order_by_id`
|
||||
/// struct for typed successes of method [`get_order_by_id`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetOrderByIdSuccess {
|
||||
@ -59,7 +59,7 @@ pub enum GetOrderByIdSuccess {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed successes of method `place_order`
|
||||
/// struct for typed successes of method [`place_order`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum PlaceOrderSuccess {
|
||||
@ -67,7 +67,7 @@ pub enum PlaceOrderSuccess {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `delete_order`
|
||||
/// struct for typed errors of method [`delete_order`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum DeleteOrderError {
|
||||
@ -76,14 +76,14 @@ pub enum DeleteOrderError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `get_inventory`
|
||||
/// struct for typed errors of method [`get_inventory`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetInventoryError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `get_order_by_id`
|
||||
/// struct for typed errors of method [`get_order_by_id`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetOrderByIdError {
|
||||
@ -92,7 +92,7 @@ pub enum GetOrderByIdError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `place_order`
|
||||
/// struct for typed errors of method [`place_order`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum PlaceOrderError {
|
||||
|
@ -14,42 +14,42 @@ use reqwest;
|
||||
use crate::apis::ResponseContent;
|
||||
use super::{Error, configuration};
|
||||
|
||||
/// struct for passing parameters to the method `create_user`
|
||||
/// struct for passing parameters to the method [`create_user`]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct CreateUserParams {
|
||||
/// Created user object
|
||||
pub user: crate::models::User
|
||||
}
|
||||
|
||||
/// struct for passing parameters to the method `create_users_with_array_input`
|
||||
/// struct for passing parameters to the method [`create_users_with_array_input`]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct CreateUsersWithArrayInputParams {
|
||||
/// List of user object
|
||||
pub user: Vec<crate::models::User>
|
||||
}
|
||||
|
||||
/// struct for passing parameters to the method `create_users_with_list_input`
|
||||
/// struct for passing parameters to the method [`create_users_with_list_input`]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct CreateUsersWithListInputParams {
|
||||
/// List of user object
|
||||
pub user: Vec<crate::models::User>
|
||||
}
|
||||
|
||||
/// struct for passing parameters to the method `delete_user`
|
||||
/// struct for passing parameters to the method [`delete_user`]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct DeleteUserParams {
|
||||
/// The name that needs to be deleted
|
||||
pub username: String
|
||||
}
|
||||
|
||||
/// struct for passing parameters to the method `get_user_by_name`
|
||||
/// struct for passing parameters to the method [`get_user_by_name`]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct GetUserByNameParams {
|
||||
/// The name that needs to be fetched. Use user1 for testing.
|
||||
pub username: String
|
||||
}
|
||||
|
||||
/// struct for passing parameters to the method `login_user`
|
||||
/// struct for passing parameters to the method [`login_user`]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct LoginUserParams {
|
||||
/// The user name for login
|
||||
@ -58,7 +58,7 @@ pub struct LoginUserParams {
|
||||
pub password: String
|
||||
}
|
||||
|
||||
/// struct for passing parameters to the method `update_user`
|
||||
/// struct for passing parameters to the method [`update_user`]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct UpdateUserParams {
|
||||
/// name that need to be deleted
|
||||
@ -68,35 +68,35 @@ pub struct UpdateUserParams {
|
||||
}
|
||||
|
||||
|
||||
/// struct for typed successes of method `create_user`
|
||||
/// struct for typed successes of method [`create_user`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum CreateUserSuccess {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed successes of method `create_users_with_array_input`
|
||||
/// struct for typed successes of method [`create_users_with_array_input`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum CreateUsersWithArrayInputSuccess {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed successes of method `create_users_with_list_input`
|
||||
/// struct for typed successes of method [`create_users_with_list_input`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum CreateUsersWithListInputSuccess {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed successes of method `delete_user`
|
||||
/// struct for typed successes of method [`delete_user`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum DeleteUserSuccess {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed successes of method `get_user_by_name`
|
||||
/// struct for typed successes of method [`get_user_by_name`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetUserByNameSuccess {
|
||||
@ -104,7 +104,7 @@ pub enum GetUserByNameSuccess {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed successes of method `login_user`
|
||||
/// struct for typed successes of method [`login_user`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum LoginUserSuccess {
|
||||
@ -112,21 +112,21 @@ pub enum LoginUserSuccess {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed successes of method `logout_user`
|
||||
/// struct for typed successes of method [`logout_user`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum LogoutUserSuccess {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed successes of method `update_user`
|
||||
/// struct for typed successes of method [`update_user`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum UpdateUserSuccess {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `create_user`
|
||||
/// struct for typed errors of method [`create_user`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum CreateUserError {
|
||||
@ -134,7 +134,7 @@ pub enum CreateUserError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `create_users_with_array_input`
|
||||
/// struct for typed errors of method [`create_users_with_array_input`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum CreateUsersWithArrayInputError {
|
||||
@ -142,7 +142,7 @@ pub enum CreateUsersWithArrayInputError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `create_users_with_list_input`
|
||||
/// struct for typed errors of method [`create_users_with_list_input`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum CreateUsersWithListInputError {
|
||||
@ -150,7 +150,7 @@ pub enum CreateUsersWithListInputError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `delete_user`
|
||||
/// struct for typed errors of method [`delete_user`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum DeleteUserError {
|
||||
@ -159,7 +159,7 @@ pub enum DeleteUserError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `get_user_by_name`
|
||||
/// struct for typed errors of method [`get_user_by_name`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetUserByNameError {
|
||||
@ -168,7 +168,7 @@ pub enum GetUserByNameError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `login_user`
|
||||
/// struct for typed errors of method [`login_user`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum LoginUserError {
|
||||
@ -176,7 +176,7 @@ pub enum LoginUserError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `logout_user`
|
||||
/// struct for typed errors of method [`logout_user`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum LogoutUserError {
|
||||
@ -184,7 +184,7 @@ pub enum LogoutUserError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `update_user`
|
||||
/// struct for typed errors of method [`update_user`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum UpdateUserError {
|
||||
|
@ -2,20 +2,21 @@
|
||||
|
||||
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
|
||||
|
||||
## Overview
|
||||
|
||||
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client.
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version: 1.0.0
|
||||
- Build package: org.openapitools.codegen.languages.RustClientCodegen
|
||||
- Build package: `org.openapitools.codegen.languages.RustClientCodegen`
|
||||
|
||||
## Installation
|
||||
|
||||
Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`:
|
||||
|
||||
```
|
||||
openapi = { path = "./generated" }
|
||||
petstore-reqwest = { path = "./generated" }
|
||||
```
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
@ -15,7 +15,7 @@ use crate::apis::ResponseContent;
|
||||
use super::{Error, configuration};
|
||||
|
||||
|
||||
/// struct for typed errors of method `add_pet`
|
||||
/// struct for typed errors of method [`add_pet`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum AddPetError {
|
||||
@ -23,7 +23,7 @@ pub enum AddPetError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `delete_pet`
|
||||
/// struct for typed errors of method [`delete_pet`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum DeletePetError {
|
||||
@ -31,7 +31,7 @@ pub enum DeletePetError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `find_pets_by_status`
|
||||
/// struct for typed errors of method [`find_pets_by_status`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum FindPetsByStatusError {
|
||||
@ -39,7 +39,7 @@ pub enum FindPetsByStatusError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `find_pets_by_tags`
|
||||
/// struct for typed errors of method [`find_pets_by_tags`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum FindPetsByTagsError {
|
||||
@ -47,7 +47,7 @@ pub enum FindPetsByTagsError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `get_pet_by_id`
|
||||
/// struct for typed errors of method [`get_pet_by_id`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetPetByIdError {
|
||||
@ -56,7 +56,7 @@ pub enum GetPetByIdError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `update_pet`
|
||||
/// struct for typed errors of method [`update_pet`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum UpdatePetError {
|
||||
@ -66,7 +66,7 @@ pub enum UpdatePetError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `update_pet_with_form`
|
||||
/// struct for typed errors of method [`update_pet_with_form`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum UpdatePetWithFormError {
|
||||
@ -74,7 +74,7 @@ pub enum UpdatePetWithFormError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `upload_file`
|
||||
/// struct for typed errors of method [`upload_file`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum UploadFileError {
|
||||
|
@ -15,7 +15,7 @@ use crate::apis::ResponseContent;
|
||||
use super::{Error, configuration};
|
||||
|
||||
|
||||
/// struct for typed errors of method `delete_order`
|
||||
/// struct for typed errors of method [`delete_order`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum DeleteOrderError {
|
||||
@ -24,14 +24,14 @@ pub enum DeleteOrderError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `get_inventory`
|
||||
/// struct for typed errors of method [`get_inventory`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetInventoryError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `get_order_by_id`
|
||||
/// struct for typed errors of method [`get_order_by_id`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetOrderByIdError {
|
||||
@ -40,7 +40,7 @@ pub enum GetOrderByIdError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `place_order`
|
||||
/// struct for typed errors of method [`place_order`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum PlaceOrderError {
|
||||
|
@ -15,7 +15,7 @@ use crate::apis::ResponseContent;
|
||||
use super::{Error, configuration};
|
||||
|
||||
|
||||
/// struct for typed errors of method `create_user`
|
||||
/// struct for typed errors of method [`create_user`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum CreateUserError {
|
||||
@ -23,7 +23,7 @@ pub enum CreateUserError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `create_users_with_array_input`
|
||||
/// struct for typed errors of method [`create_users_with_array_input`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum CreateUsersWithArrayInputError {
|
||||
@ -31,7 +31,7 @@ pub enum CreateUsersWithArrayInputError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `create_users_with_list_input`
|
||||
/// struct for typed errors of method [`create_users_with_list_input`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum CreateUsersWithListInputError {
|
||||
@ -39,7 +39,7 @@ pub enum CreateUsersWithListInputError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `delete_user`
|
||||
/// struct for typed errors of method [`delete_user`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum DeleteUserError {
|
||||
@ -48,7 +48,7 @@ pub enum DeleteUserError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `get_user_by_name`
|
||||
/// struct for typed errors of method [`get_user_by_name`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetUserByNameError {
|
||||
@ -57,7 +57,7 @@ pub enum GetUserByNameError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `login_user`
|
||||
/// struct for typed errors of method [`login_user`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum LoginUserError {
|
||||
@ -65,7 +65,7 @@ pub enum LoginUserError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `logout_user`
|
||||
/// struct for typed errors of method [`logout_user`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum LogoutUserError {
|
||||
@ -73,7 +73,7 @@ pub enum LogoutUserError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `update_user`
|
||||
/// struct for typed errors of method [`update_user`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum UpdateUserError {
|
||||
|
Loading…
x
Reference in New Issue
Block a user