[rust-client]: fix reqwest not support client::options (#9745)

* fix: https://github.com/OpenAPITools/openapi-generator/issues/9743

* update samples
This commit is contained in:
Albert 2021-06-17 01:17:50 +08:00 committed by GitHub
parent 687692cedc
commit 55600256b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 122 additions and 122 deletions

View File

@ -522,7 +522,7 @@ public class RustClientCodegen extends DefaultCodegen implements CodegenConfig {
if (HYPER_LIBRARY.equals(getLibrary())) {
operation.httpMethod = StringUtils.camelize(operation.httpMethod.toLowerCase(Locale.ROOT));
} else if (REQWEST_LIBRARY.equals(getLibrary())) {
operation.httpMethod = operation.httpMethod.toLowerCase(Locale.ROOT);
operation.httpMethod = operation.httpMethod.toUpperCase(Locale.ROOT);
}
// add support for single request parameter using x-group-parameters

View File

@ -94,7 +94,7 @@ pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration:
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}{{{path}}}", configuration.base_path{{#pathParams}}, {{{baseName}}}={{#isString}}crate::apis::urlencode({{/isString}}{{{paramName}}}{{^required}}.unwrap(){{/required}}{{#required}}{{#isNullable}}.unwrap(){{/isNullable}}{{/required}}{{#isArray}}.join(",").as_ref(){{/isArray}}{{#isString}}){{/isString}}{{/pathParams}});
let mut local_var_req_builder = local_var_client.{{{httpMethod}}}(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::{{{httpMethod}}}, local_var_uri_str.as_str());
{{#queryParams}}
{{#required}}

View File

@ -24,26 +24,26 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **post** /pet | Add a new pet to the store
*PetApi* | [**delete_pet**](docs/PetApi.md#delete_pet) | **delete** /pet/{petId} | Deletes a pet
*PetApi* | [**find_pets_by_status**](docs/PetApi.md#find_pets_by_status) | **get** /pet/findByStatus | Finds Pets by status
*PetApi* | [**find_pets_by_tags**](docs/PetApi.md#find_pets_by_tags) | **get** /pet/findByTags | Finds Pets by tags
*PetApi* | [**get_pet_by_id**](docs/PetApi.md#get_pet_by_id) | **get** /pet/{petId} | Find pet by ID
*PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **put** /pet | Update an existing pet
*PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **post** /pet/{petId} | Updates a pet in the store with form data
*PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **post** /pet/{petId}/uploadImage | uploads an image
*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **delete** /store/order/{orderId} | Delete purchase order by ID
*StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **get** /store/inventory | Returns pet inventories by status
*StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **get** /store/order/{orderId} | Find purchase order by ID
*StoreApi* | [**place_order**](docs/StoreApi.md#place_order) | **post** /store/order | Place an order for a pet
*UserApi* | [**create_user**](docs/UserApi.md#create_user) | **post** /user | Create user
*UserApi* | [**create_users_with_array_input**](docs/UserApi.md#create_users_with_array_input) | **post** /user/createWithArray | Creates list of users with given input array
*UserApi* | [**create_users_with_list_input**](docs/UserApi.md#create_users_with_list_input) | **post** /user/createWithList | Creates list of users with given input array
*UserApi* | [**delete_user**](docs/UserApi.md#delete_user) | **delete** /user/{username} | Delete user
*UserApi* | [**get_user_by_name**](docs/UserApi.md#get_user_by_name) | **get** /user/{username} | Get user by user name
*UserApi* | [**login_user**](docs/UserApi.md#login_user) | **get** /user/login | Logs user into the system
*UserApi* | [**logout_user**](docs/UserApi.md#logout_user) | **get** /user/logout | Logs out current logged in user session
*UserApi* | [**update_user**](docs/UserApi.md#update_user) | **put** /user/{username} | Updated user
*PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
*PetApi* | [**delete_pet**](docs/PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApi* | [**find_pets_by_status**](docs/PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
*PetApi* | [**find_pets_by_tags**](docs/PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
*PetApi* | [**get_pet_by_id**](docs/PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
*PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
*PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
*PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
*StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
*StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID
*StoreApi* | [**place_order**](docs/StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
*UserApi* | [**create_user**](docs/UserApi.md#create_user) | **POST** /user | Create user
*UserApi* | [**create_users_with_array_input**](docs/UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array
*UserApi* | [**create_users_with_list_input**](docs/UserApi.md#create_users_with_list_input) | **POST** /user/createWithList | Creates list of users with given input array
*UserApi* | [**delete_user**](docs/UserApi.md#delete_user) | **DELETE** /user/{username} | Delete user
*UserApi* | [**get_user_by_name**](docs/UserApi.md#get_user_by_name) | **GET** /user/{username} | Get user by user name
*UserApi* | [**login_user**](docs/UserApi.md#login_user) | **GET** /user/login | Logs user into the system
*UserApi* | [**logout_user**](docs/UserApi.md#logout_user) | **GET** /user/logout | Logs out current logged in user session
*UserApi* | [**update_user**](docs/UserApi.md#update_user) | **PUT** /user/{username} | Updated user
## Documentation For Models

View File

@ -4,14 +4,14 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**add_pet**](PetApi.md#add_pet) | **post** /pet | Add a new pet to the store
[**delete_pet**](PetApi.md#delete_pet) | **delete** /pet/{petId} | Deletes a pet
[**find_pets_by_status**](PetApi.md#find_pets_by_status) | **get** /pet/findByStatus | Finds Pets by status
[**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **get** /pet/findByTags | Finds Pets by tags
[**get_pet_by_id**](PetApi.md#get_pet_by_id) | **get** /pet/{petId} | Find pet by ID
[**update_pet**](PetApi.md#update_pet) | **put** /pet | Update an existing pet
[**update_pet_with_form**](PetApi.md#update_pet_with_form) | **post** /pet/{petId} | Updates a pet in the store with form data
[**upload_file**](PetApi.md#upload_file) | **post** /pet/{petId}/uploadImage | uploads an image
[**add_pet**](PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
[**delete_pet**](PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
[**find_pets_by_status**](PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
[**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
[**get_pet_by_id**](PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
[**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
[**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image

View File

@ -4,10 +4,10 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**delete_order**](StoreApi.md#delete_order) | **delete** /store/order/{orderId} | Delete purchase order by ID
[**get_inventory**](StoreApi.md#get_inventory) | **get** /store/inventory | Returns pet inventories by status
[**get_order_by_id**](StoreApi.md#get_order_by_id) | **get** /store/order/{orderId} | Find purchase order by ID
[**place_order**](StoreApi.md#place_order) | **post** /store/order | Place an order for a pet
[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
[**get_inventory**](StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID
[**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet

View File

@ -4,14 +4,14 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_user**](UserApi.md#create_user) | **post** /user | Create user
[**create_users_with_array_input**](UserApi.md#create_users_with_array_input) | **post** /user/createWithArray | Creates list of users with given input array
[**create_users_with_list_input**](UserApi.md#create_users_with_list_input) | **post** /user/createWithList | Creates list of users with given input array
[**delete_user**](UserApi.md#delete_user) | **delete** /user/{username} | Delete user
[**get_user_by_name**](UserApi.md#get_user_by_name) | **get** /user/{username} | Get user by user name
[**login_user**](UserApi.md#login_user) | **get** /user/login | Logs user into the system
[**logout_user**](UserApi.md#logout_user) | **get** /user/logout | Logs out current logged in user session
[**update_user**](UserApi.md#update_user) | **put** /user/{username} | Updated user
[**create_user**](UserApi.md#create_user) | **POST** /user | Create user
[**create_users_with_array_input**](UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array
[**create_users_with_list_input**](UserApi.md#create_users_with_list_input) | **POST** /user/createWithList | Creates list of users with given input array
[**delete_user**](UserApi.md#delete_user) | **DELETE** /user/{username} | Delete user
[**get_user_by_name**](UserApi.md#get_user_by_name) | **GET** /user/{username} | Get user by user name
[**login_user**](UserApi.md#login_user) | **GET** /user/login | Logs user into the system
[**logout_user**](UserApi.md#logout_user) | **GET** /user/logout | Logs out current logged in user session
[**update_user**](UserApi.md#update_user) | **PUT** /user/{username} | Updated user

View File

@ -215,7 +215,7 @@ pub async fn add_pet(configuration: &configuration::Configuration, params: AddPe
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/pet", configuration.base_path);
let mut local_var_req_builder = local_var_client.post(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
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());
@ -251,7 +251,7 @@ pub async fn delete_pet(configuration: &configuration::Configuration, params: De
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/pet/{petId}", configuration.base_path, petId=pet_id);
let mut local_var_req_builder = local_var_client.delete(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
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());
@ -289,7 +289,7 @@ pub async fn find_pets_by_status(configuration: &configuration::Configuration, p
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/pet/findByStatus", configuration.base_path);
let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
local_var_req_builder = local_var_req_builder.query(&[("status", &status.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]);
if let Some(ref local_var_user_agent) = configuration.user_agent {
@ -325,7 +325,7 @@ pub async fn find_pets_by_tags(configuration: &configuration::Configuration, par
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/pet/findByTags", configuration.base_path);
let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
local_var_req_builder = local_var_req_builder.query(&[("tags", &tags.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]);
if let Some(ref local_var_user_agent) = configuration.user_agent {
@ -361,7 +361,7 @@ pub async fn get_pet_by_id(configuration: &configuration::Configuration, params:
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/pet/{petId}", configuration.base_path, petId=pet_id);
let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
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());
@ -400,7 +400,7 @@ pub async fn update_pet(configuration: &configuration::Configuration, params: Up
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/pet", configuration.base_path);
let mut local_var_req_builder = local_var_client.put(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
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());
@ -437,7 +437,7 @@ pub async fn update_pet_with_form(configuration: &configuration::Configuration,
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/pet/{petId}", configuration.base_path, petId=pet_id);
let mut local_var_req_builder = local_var_client.post(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
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());
@ -481,7 +481,7 @@ pub async fn upload_file(configuration: &configuration::Configuration, params: U
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/pet/{petId}/uploadImage", configuration.base_path, petId=pet_id);
let mut local_var_req_builder = local_var_client.post(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
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());

View File

@ -110,7 +110,7 @@ pub async fn delete_order(configuration: &configuration::Configuration, params:
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/store/order/{orderId}", configuration.base_path, orderId=crate::apis::urlencode(order_id));
let mut local_var_req_builder = local_var_client.delete(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
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());
@ -141,7 +141,7 @@ pub async fn get_inventory(configuration: &configuration::Configuration) -> Resu
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/store/inventory", configuration.base_path);
let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
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());
@ -181,7 +181,7 @@ pub async fn get_order_by_id(configuration: &configuration::Configuration, param
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/store/order/{orderId}", configuration.base_path, orderId=order_id);
let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
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());
@ -212,7 +212,7 @@ pub async fn place_order(configuration: &configuration::Configuration, params: P
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/store/order", configuration.base_path);
let mut local_var_req_builder = local_var_client.post(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
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());

View File

@ -203,7 +203,7 @@ pub async fn create_user(configuration: &configuration::Configuration, params: C
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/user", configuration.base_path);
let mut local_var_req_builder = local_var_client.post(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
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());
@ -235,7 +235,7 @@ pub async fn create_users_with_array_input(configuration: &configuration::Config
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/user/createWithArray", configuration.base_path);
let mut local_var_req_builder = local_var_client.post(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
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());
@ -267,7 +267,7 @@ pub async fn create_users_with_list_input(configuration: &configuration::Configu
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/user/createWithList", configuration.base_path);
let mut local_var_req_builder = local_var_client.post(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
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());
@ -300,7 +300,7 @@ pub async fn delete_user(configuration: &configuration::Configuration, params: D
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/user/{username}", configuration.base_path, username=crate::apis::urlencode(username));
let mut local_var_req_builder = local_var_client.delete(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
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());
@ -331,7 +331,7 @@ pub async fn get_user_by_name(configuration: &configuration::Configuration, para
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/user/{username}", configuration.base_path, username=crate::apis::urlencode(username));
let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
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());
@ -363,7 +363,7 @@ pub async fn login_user(configuration: &configuration::Configuration, params: Lo
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/user/login", configuration.base_path);
let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
local_var_req_builder = local_var_req_builder.query(&[("username", &username.to_string())]);
local_var_req_builder = local_var_req_builder.query(&[("password", &password.to_string())]);
@ -395,7 +395,7 @@ pub async fn logout_user(configuration: &configuration::Configuration) -> Result
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/user/logout", configuration.base_path);
let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
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());
@ -428,7 +428,7 @@ pub async fn update_user(configuration: &configuration::Configuration, params: U
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/user/{username}", configuration.base_path, username=crate::apis::urlencode(username));
let mut local_var_req_builder = local_var_client.put(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
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());

View File

@ -24,26 +24,26 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **post** /pet | Add a new pet to the store
*PetApi* | [**delete_pet**](docs/PetApi.md#delete_pet) | **delete** /pet/{petId} | Deletes a pet
*PetApi* | [**find_pets_by_status**](docs/PetApi.md#find_pets_by_status) | **get** /pet/findByStatus | Finds Pets by status
*PetApi* | [**find_pets_by_tags**](docs/PetApi.md#find_pets_by_tags) | **get** /pet/findByTags | Finds Pets by tags
*PetApi* | [**get_pet_by_id**](docs/PetApi.md#get_pet_by_id) | **get** /pet/{petId} | Find pet by ID
*PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **put** /pet | Update an existing pet
*PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **post** /pet/{petId} | Updates a pet in the store with form data
*PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **post** /pet/{petId}/uploadImage | uploads an image
*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **delete** /store/order/{orderId} | Delete purchase order by ID
*StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **get** /store/inventory | Returns pet inventories by status
*StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **get** /store/order/{orderId} | Find purchase order by ID
*StoreApi* | [**place_order**](docs/StoreApi.md#place_order) | **post** /store/order | Place an order for a pet
*UserApi* | [**create_user**](docs/UserApi.md#create_user) | **post** /user | Create user
*UserApi* | [**create_users_with_array_input**](docs/UserApi.md#create_users_with_array_input) | **post** /user/createWithArray | Creates list of users with given input array
*UserApi* | [**create_users_with_list_input**](docs/UserApi.md#create_users_with_list_input) | **post** /user/createWithList | Creates list of users with given input array
*UserApi* | [**delete_user**](docs/UserApi.md#delete_user) | **delete** /user/{username} | Delete user
*UserApi* | [**get_user_by_name**](docs/UserApi.md#get_user_by_name) | **get** /user/{username} | Get user by user name
*UserApi* | [**login_user**](docs/UserApi.md#login_user) | **get** /user/login | Logs user into the system
*UserApi* | [**logout_user**](docs/UserApi.md#logout_user) | **get** /user/logout | Logs out current logged in user session
*UserApi* | [**update_user**](docs/UserApi.md#update_user) | **put** /user/{username} | Updated user
*PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
*PetApi* | [**delete_pet**](docs/PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApi* | [**find_pets_by_status**](docs/PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
*PetApi* | [**find_pets_by_tags**](docs/PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
*PetApi* | [**get_pet_by_id**](docs/PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
*PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
*PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
*PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
*StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
*StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID
*StoreApi* | [**place_order**](docs/StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
*UserApi* | [**create_user**](docs/UserApi.md#create_user) | **POST** /user | Create user
*UserApi* | [**create_users_with_array_input**](docs/UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array
*UserApi* | [**create_users_with_list_input**](docs/UserApi.md#create_users_with_list_input) | **POST** /user/createWithList | Creates list of users with given input array
*UserApi* | [**delete_user**](docs/UserApi.md#delete_user) | **DELETE** /user/{username} | Delete user
*UserApi* | [**get_user_by_name**](docs/UserApi.md#get_user_by_name) | **GET** /user/{username} | Get user by user name
*UserApi* | [**login_user**](docs/UserApi.md#login_user) | **GET** /user/login | Logs user into the system
*UserApi* | [**logout_user**](docs/UserApi.md#logout_user) | **GET** /user/logout | Logs out current logged in user session
*UserApi* | [**update_user**](docs/UserApi.md#update_user) | **PUT** /user/{username} | Updated user
## Documentation For Models

View File

@ -4,14 +4,14 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**add_pet**](PetApi.md#add_pet) | **post** /pet | Add a new pet to the store
[**delete_pet**](PetApi.md#delete_pet) | **delete** /pet/{petId} | Deletes a pet
[**find_pets_by_status**](PetApi.md#find_pets_by_status) | **get** /pet/findByStatus | Finds Pets by status
[**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **get** /pet/findByTags | Finds Pets by tags
[**get_pet_by_id**](PetApi.md#get_pet_by_id) | **get** /pet/{petId} | Find pet by ID
[**update_pet**](PetApi.md#update_pet) | **put** /pet | Update an existing pet
[**update_pet_with_form**](PetApi.md#update_pet_with_form) | **post** /pet/{petId} | Updates a pet in the store with form data
[**upload_file**](PetApi.md#upload_file) | **post** /pet/{petId}/uploadImage | uploads an image
[**add_pet**](PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
[**delete_pet**](PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
[**find_pets_by_status**](PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
[**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
[**get_pet_by_id**](PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
[**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
[**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image

View File

@ -4,10 +4,10 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**delete_order**](StoreApi.md#delete_order) | **delete** /store/order/{orderId} | Delete purchase order by ID
[**get_inventory**](StoreApi.md#get_inventory) | **get** /store/inventory | Returns pet inventories by status
[**get_order_by_id**](StoreApi.md#get_order_by_id) | **get** /store/order/{orderId} | Find purchase order by ID
[**place_order**](StoreApi.md#place_order) | **post** /store/order | Place an order for a pet
[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
[**get_inventory**](StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID
[**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet

View File

@ -4,14 +4,14 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_user**](UserApi.md#create_user) | **post** /user | Create user
[**create_users_with_array_input**](UserApi.md#create_users_with_array_input) | **post** /user/createWithArray | Creates list of users with given input array
[**create_users_with_list_input**](UserApi.md#create_users_with_list_input) | **post** /user/createWithList | Creates list of users with given input array
[**delete_user**](UserApi.md#delete_user) | **delete** /user/{username} | Delete user
[**get_user_by_name**](UserApi.md#get_user_by_name) | **get** /user/{username} | Get user by user name
[**login_user**](UserApi.md#login_user) | **get** /user/login | Logs user into the system
[**logout_user**](UserApi.md#logout_user) | **get** /user/logout | Logs out current logged in user session
[**update_user**](UserApi.md#update_user) | **put** /user/{username} | Updated user
[**create_user**](UserApi.md#create_user) | **POST** /user | Create user
[**create_users_with_array_input**](UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array
[**create_users_with_list_input**](UserApi.md#create_users_with_list_input) | **POST** /user/createWithList | Creates list of users with given input array
[**delete_user**](UserApi.md#delete_user) | **DELETE** /user/{username} | Delete user
[**get_user_by_name**](UserApi.md#get_user_by_name) | **GET** /user/{username} | Get user by user name
[**login_user**](UserApi.md#login_user) | **GET** /user/login | Logs user into the system
[**logout_user**](UserApi.md#logout_user) | **GET** /user/logout | Logs out current logged in user session
[**update_user**](UserApi.md#update_user) | **PUT** /user/{username} | Updated user

View File

@ -87,7 +87,7 @@ pub fn add_pet(configuration: &configuration::Configuration, body: crate::models
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/pet", configuration.base_path);
let mut local_var_req_builder = local_var_client.post(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
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());
@ -117,7 +117,7 @@ pub fn delete_pet(configuration: &configuration::Configuration, pet_id: i64, api
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/pet/{petId}", configuration.base_path, petId=pet_id);
let mut local_var_req_builder = local_var_client.delete(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
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());
@ -150,7 +150,7 @@ pub fn find_pets_by_status(configuration: &configuration::Configuration, status:
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/pet/findByStatus", configuration.base_path);
let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
local_var_req_builder = local_var_req_builder.query(&[("status", &status.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]);
if let Some(ref local_var_user_agent) = configuration.user_agent {
@ -181,7 +181,7 @@ pub fn find_pets_by_tags(configuration: &configuration::Configuration, tags: Vec
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/pet/findByTags", configuration.base_path);
let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
local_var_req_builder = local_var_req_builder.query(&[("tags", &tags.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]);
if let Some(ref local_var_user_agent) = configuration.user_agent {
@ -212,7 +212,7 @@ pub fn get_pet_by_id(configuration: &configuration::Configuration, pet_id: i64)
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/pet/{petId}", configuration.base_path, petId=pet_id);
let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
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());
@ -246,7 +246,7 @@ pub fn update_pet(configuration: &configuration::Configuration, body: crate::mod
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/pet", configuration.base_path);
let mut local_var_req_builder = local_var_client.put(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
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());
@ -276,7 +276,7 @@ pub fn update_pet_with_form(configuration: &configuration::Configuration, pet_id
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/pet/{petId}", configuration.base_path, petId=pet_id);
let mut local_var_req_builder = local_var_client.post(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
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());
@ -313,7 +313,7 @@ pub fn upload_file(configuration: &configuration::Configuration, pet_id: i64, ad
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/pet/{petId}/uploadImage", configuration.base_path, petId=pet_id);
let mut local_var_req_builder = local_var_client.post(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
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());

View File

@ -55,7 +55,7 @@ pub fn delete_order(configuration: &configuration::Configuration, order_id: &str
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/store/order/{orderId}", configuration.base_path, orderId=crate::apis::urlencode(order_id));
let mut local_var_req_builder = local_var_client.delete(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
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());
@ -82,7 +82,7 @@ pub fn get_inventory(configuration: &configuration::Configuration, ) -> Result<:
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/store/inventory", configuration.base_path);
let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
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());
@ -117,7 +117,7 @@ pub fn get_order_by_id(configuration: &configuration::Configuration, order_id: i
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/store/order/{orderId}", configuration.base_path, orderId=order_id);
let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
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());
@ -143,7 +143,7 @@ pub fn place_order(configuration: &configuration::Configuration, body: crate::mo
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/store/order", configuration.base_path);
let mut local_var_req_builder = local_var_client.post(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
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());

View File

@ -89,7 +89,7 @@ pub fn create_user(configuration: &configuration::Configuration, body: crate::mo
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/user", configuration.base_path);
let mut local_var_req_builder = local_var_client.post(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
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());
@ -116,7 +116,7 @@ pub fn create_users_with_array_input(configuration: &configuration::Configuratio
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/user/createWithArray", configuration.base_path);
let mut local_var_req_builder = local_var_client.post(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
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());
@ -143,7 +143,7 @@ pub fn create_users_with_list_input(configuration: &configuration::Configuration
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/user/createWithList", configuration.base_path);
let mut local_var_req_builder = local_var_client.post(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
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());
@ -171,7 +171,7 @@ pub fn delete_user(configuration: &configuration::Configuration, username: &str)
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/user/{username}", configuration.base_path, username=crate::apis::urlencode(username));
let mut local_var_req_builder = local_var_client.delete(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
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());
@ -197,7 +197,7 @@ pub fn get_user_by_name(configuration: &configuration::Configuration, username:
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/user/{username}", configuration.base_path, username=crate::apis::urlencode(username));
let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
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());
@ -223,7 +223,7 @@ pub fn login_user(configuration: &configuration::Configuration, username: &str,
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/user/login", configuration.base_path);
let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
local_var_req_builder = local_var_req_builder.query(&[("username", &username.to_string())]);
local_var_req_builder = local_var_req_builder.query(&[("password", &password.to_string())]);
@ -251,7 +251,7 @@ pub fn logout_user(configuration: &configuration::Configuration, ) -> Result<(),
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/user/logout", configuration.base_path);
let mut local_var_req_builder = local_var_client.get(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
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());
@ -278,7 +278,7 @@ pub fn update_user(configuration: &configuration::Configuration, username: &str,
let local_var_client = &configuration.client;
let local_var_uri_str = format!("{}/user/{username}", configuration.base_path, username=crate::apis::urlencode(username));
let mut local_var_req_builder = local_var_client.put(local_var_uri_str.as_str());
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
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());