Merge remote-tracking branch 'origin/5.3.x' into 6.0.x

This commit is contained in:
William Cheng
2021-07-27 11:52:19 +08:00
1011 changed files with 34058 additions and 5848 deletions

View File

@@ -17,7 +17,7 @@ Method | HTTP request | Description
## add_pet
> add_pet(body)
> crate::models::Pet add_pet(pet)
Add a new pet to the store
### Parameters
@@ -25,11 +25,11 @@ Add a new pet to the store
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | [required] |
**pet** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | [required] |
### Return type
(empty response body)
[**crate::models::Pet**](Pet.md)
### Authorization
@@ -38,7 +38,7 @@ Name | Type | Description | Required | Notes
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -164,7 +164,7 @@ Name | Type | Description | Required | Notes
## update_pet
> update_pet(body)
> crate::models::Pet update_pet(pet)
Update an existing pet
### Parameters
@@ -172,11 +172,11 @@ Update an existing pet
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | [required] |
**pet** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | [required] |
### Return type
(empty response body)
[**crate::models::Pet**](Pet.md)
### Authorization
@@ -185,7 +185,7 @@ Name | Type | Description | Required | Notes
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -100,7 +100,7 @@ No authorization required
## place_order
> crate::models::Order place_order(body)
> crate::models::Order place_order(order)
Place an order for a pet
### Parameters
@@ -108,7 +108,7 @@ Place an order for a pet
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**body** | [**Order**](Order.md) | order placed for purchasing the pet | [required] |
**order** | [**Order**](Order.md) | order placed for purchasing the pet | [required] |
### Return type
@@ -120,7 +120,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -17,7 +17,7 @@ Method | HTTP request | Description
## create_user
> create_user(body)
> create_user(user)
Create user
This can only be done by the logged in user.
@@ -27,7 +27,7 @@ This can only be done by the logged in user.
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**body** | [**User**](User.md) | Created user object | [required] |
**user** | [**User**](User.md) | Created user object | [required] |
### Return type
@@ -35,11 +35,11 @@ Name | Type | Description | Required | Notes
### Authorization
No authorization required
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -47,7 +47,7 @@ No authorization required
## create_users_with_array_input
> create_users_with_array_input(body)
> create_users_with_array_input(user)
Creates list of users with given input array
### Parameters
@@ -55,7 +55,7 @@ Creates list of users with given input array
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**body** | [**Vec<crate::models::User>**](User.md) | List of user object | [required] |
**user** | [**Vec<crate::models::User>**](User.md) | List of user object | [required] |
### Return type
@@ -63,11 +63,11 @@ Name | Type | Description | Required | Notes
### Authorization
No authorization required
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -75,7 +75,7 @@ No authorization required
## create_users_with_list_input
> create_users_with_list_input(body)
> create_users_with_list_input(user)
Creates list of users with given input array
### Parameters
@@ -83,7 +83,7 @@ Creates list of users with given input array
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**body** | [**Vec<crate::models::User>**](User.md) | List of user object | [required] |
**user** | [**Vec<crate::models::User>**](User.md) | List of user object | [required] |
### Return type
@@ -91,11 +91,11 @@ Name | Type | Description | Required | Notes
### Authorization
No authorization required
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -121,7 +121,7 @@ Name | Type | Description | Required | Notes
### Authorization
No authorization required
[api_key](../README.md#api_key)
### HTTP request headers
@@ -203,7 +203,7 @@ This endpoint does not need any parameter.
### Authorization
No authorization required
[api_key](../README.md#api_key)
### HTTP request headers
@@ -215,7 +215,7 @@ No authorization required
## update_user
> update_user(username, body)
> update_user(username, user)
Updated user
This can only be done by the logged in user.
@@ -226,7 +226,7 @@ This can only be done by the logged in user.
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**username** | **String** | name that need to be deleted | [required] |
**body** | [**User**](User.md) | Updated user object | [required] |
**user** | [**User**](User.md) | Updated user object | [required] |
### Return type
@@ -234,11 +234,11 @@ Name | Type | Description | Required | Notes
### Authorization
No authorization required
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -18,7 +18,7 @@ use super::{Error, configuration};
#[derive(Clone, Debug)]
pub struct AddPetParams {
/// Pet object that needs to be added to the store
pub body: crate::models::Pet
pub pet: crate::models::Pet
}
/// struct for passing parameters to the method `delete_pet`
@@ -54,7 +54,7 @@ pub struct GetPetByIdParams {
#[derive(Clone, Debug)]
pub struct UpdatePetParams {
/// Pet object that needs to be added to the store
pub body: crate::models::Pet
pub pet: crate::models::Pet
}
/// struct for passing parameters to the method `update_pet_with_form`
@@ -84,6 +84,7 @@ pub struct UploadFileParams {
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum AddPetSuccess {
Status200(crate::models::Pet),
UnknownValue(serde_json::Value),
}
@@ -122,6 +123,7 @@ pub enum GetPetByIdSuccess {
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdatePetSuccess {
Status200(crate::models::Pet),
UnknownValue(serde_json::Value),
}
@@ -209,7 +211,7 @@ pub enum UploadFileError {
pub async fn add_pet(configuration: &configuration::Configuration, params: AddPetParams) -> Result<ResponseContent<AddPetSuccess>, Error<AddPetError>> {
// unbox the parameters
let body = params.body;
let pet = params.pet;
let local_var_client = &configuration.client;
@@ -223,7 +225,7 @@ pub async fn add_pet(configuration: &configuration::Configuration, params: AddPe
if let Some(ref local_var_token) = configuration.oauth_access_token {
local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
};
local_var_req_builder = local_var_req_builder.json(&body);
local_var_req_builder = local_var_req_builder.json(&pet);
let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;
@@ -394,7 +396,7 @@ pub async fn get_pet_by_id(configuration: &configuration::Configuration, params:
pub async fn update_pet(configuration: &configuration::Configuration, params: UpdatePetParams) -> Result<ResponseContent<UpdatePetSuccess>, Error<UpdatePetError>> {
// unbox the parameters
let body = params.body;
let pet = params.pet;
let local_var_client = &configuration.client;
@@ -408,7 +410,7 @@ pub async fn update_pet(configuration: &configuration::Configuration, params: Up
if let Some(ref local_var_token) = configuration.oauth_access_token {
local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
};
local_var_req_builder = local_var_req_builder.json(&body);
local_var_req_builder = local_var_req_builder.json(&pet);
let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;

View File

@@ -32,7 +32,7 @@ pub struct GetOrderByIdParams {
#[derive(Clone, Debug)]
pub struct PlaceOrderParams {
/// order placed for purchasing the pet
pub body: crate::models::Order
pub order: crate::models::Order
}
@@ -206,7 +206,7 @@ pub async fn get_order_by_id(configuration: &configuration::Configuration, param
pub async fn place_order(configuration: &configuration::Configuration, params: PlaceOrderParams) -> Result<ResponseContent<PlaceOrderSuccess>, Error<PlaceOrderError>> {
// unbox the parameters
let body = params.body;
let order = params.order;
let local_var_client = &configuration.client;
@@ -217,7 +217,7 @@ pub async fn place_order(configuration: &configuration::Configuration, params: P
if let Some(ref local_var_user_agent) = configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&body);
local_var_req_builder = local_var_req_builder.json(&order);
let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;

View File

@@ -18,21 +18,21 @@ use super::{Error, configuration};
#[derive(Clone, Debug)]
pub struct CreateUserParams {
/// Created user object
pub body: crate::models::User
pub user: crate::models::User
}
/// struct for passing parameters to the method `create_users_with_array_input`
#[derive(Clone, Debug)]
pub struct CreateUsersWithArrayInputParams {
/// List of user object
pub body: Vec<crate::models::User>
pub user: Vec<crate::models::User>
}
/// struct for passing parameters to the method `create_users_with_list_input`
#[derive(Clone, Debug)]
pub struct CreateUsersWithListInputParams {
/// List of user object
pub body: Vec<crate::models::User>
pub user: Vec<crate::models::User>
}
/// struct for passing parameters to the method `delete_user`
@@ -64,7 +64,7 @@ pub struct UpdateUserParams {
/// name that need to be deleted
pub username: String,
/// Updated user object
pub body: crate::models::User
pub user: crate::models::User
}
@@ -197,7 +197,7 @@ pub enum UpdateUserError {
/// This can only be done by the logged in user.
pub async fn create_user(configuration: &configuration::Configuration, params: CreateUserParams) -> Result<ResponseContent<CreateUserSuccess>, Error<CreateUserError>> {
// unbox the parameters
let body = params.body;
let user = params.user;
let local_var_client = &configuration.client;
@@ -208,7 +208,15 @@ pub async fn create_user(configuration: &configuration::Configuration, params: C
if let Some(ref local_var_user_agent) = configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&body);
if let Some(ref local_var_apikey) = configuration.api_key {
let local_var_key = local_var_apikey.key.clone();
let local_var_value = match local_var_apikey.prefix {
Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
None => local_var_key,
};
local_var_req_builder = local_var_req_builder.header("api_key", local_var_value);
};
local_var_req_builder = local_var_req_builder.json(&user);
let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;
@@ -229,7 +237,7 @@ pub async fn create_user(configuration: &configuration::Configuration, params: C
pub async fn create_users_with_array_input(configuration: &configuration::Configuration, params: CreateUsersWithArrayInputParams) -> Result<ResponseContent<CreateUsersWithArrayInputSuccess>, Error<CreateUsersWithArrayInputError>> {
// unbox the parameters
let body = params.body;
let user = params.user;
let local_var_client = &configuration.client;
@@ -240,7 +248,15 @@ pub async fn create_users_with_array_input(configuration: &configuration::Config
if let Some(ref local_var_user_agent) = configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&body);
if let Some(ref local_var_apikey) = configuration.api_key {
let local_var_key = local_var_apikey.key.clone();
let local_var_value = match local_var_apikey.prefix {
Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
None => local_var_key,
};
local_var_req_builder = local_var_req_builder.header("api_key", local_var_value);
};
local_var_req_builder = local_var_req_builder.json(&user);
let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;
@@ -261,7 +277,7 @@ pub async fn create_users_with_array_input(configuration: &configuration::Config
pub async fn create_users_with_list_input(configuration: &configuration::Configuration, params: CreateUsersWithListInputParams) -> Result<ResponseContent<CreateUsersWithListInputSuccess>, Error<CreateUsersWithListInputError>> {
// unbox the parameters
let body = params.body;
let user = params.user;
let local_var_client = &configuration.client;
@@ -272,7 +288,15 @@ pub async fn create_users_with_list_input(configuration: &configuration::Configu
if let Some(ref local_var_user_agent) = configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&body);
if let Some(ref local_var_apikey) = configuration.api_key {
let local_var_key = local_var_apikey.key.clone();
let local_var_value = match local_var_apikey.prefix {
Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
None => local_var_key,
};
local_var_req_builder = local_var_req_builder.header("api_key", local_var_value);
};
local_var_req_builder = local_var_req_builder.json(&user);
let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;
@@ -305,6 +329,14 @@ pub async fn delete_user(configuration: &configuration::Configuration, params: D
if let Some(ref local_var_user_agent) = configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
if let Some(ref local_var_apikey) = configuration.api_key {
let local_var_key = local_var_apikey.key.clone();
let local_var_value = match local_var_apikey.prefix {
Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
None => local_var_key,
};
local_var_req_builder = local_var_req_builder.header("api_key", local_var_value);
};
let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;
@@ -400,6 +432,14 @@ pub async fn logout_user(configuration: &configuration::Configuration) -> Result
if let Some(ref local_var_user_agent) = configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
if let Some(ref local_var_apikey) = configuration.api_key {
let local_var_key = local_var_apikey.key.clone();
let local_var_value = match local_var_apikey.prefix {
Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
None => local_var_key,
};
local_var_req_builder = local_var_req_builder.header("api_key", local_var_value);
};
let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;
@@ -422,7 +462,7 @@ pub async fn logout_user(configuration: &configuration::Configuration) -> Result
pub async fn update_user(configuration: &configuration::Configuration, params: UpdateUserParams) -> Result<ResponseContent<UpdateUserSuccess>, Error<UpdateUserError>> {
// unbox the parameters
let username = params.username;
let body = params.body;
let user = params.user;
let local_var_client = &configuration.client;
@@ -433,7 +473,15 @@ pub async fn update_user(configuration: &configuration::Configuration, params: U
if let Some(ref local_var_user_agent) = configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&body);
if let Some(ref local_var_apikey) = configuration.api_key {
let local_var_key = local_var_apikey.key.clone();
let local_var_value = match local_var_apikey.prefix {
Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
None => local_var_key,
};
local_var_req_builder = local_var_req_builder.header("api_key", local_var_value);
};
local_var_req_builder = local_var_req_builder.json(&user);
let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;