mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-10-14 16:33:56 +00:00
[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:
parent
687692cedc
commit
55600256b2
@ -522,7 +522,7 @@ public class RustClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
if (HYPER_LIBRARY.equals(getLibrary())) {
|
if (HYPER_LIBRARY.equals(getLibrary())) {
|
||||||
operation.httpMethod = StringUtils.camelize(operation.httpMethod.toLowerCase(Locale.ROOT));
|
operation.httpMethod = StringUtils.camelize(operation.httpMethod.toLowerCase(Locale.ROOT));
|
||||||
} else if (REQWEST_LIBRARY.equals(getLibrary())) {
|
} 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
|
// add support for single request parameter using x-group-parameters
|
||||||
|
@ -94,7 +94,7 @@ pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration:
|
|||||||
let local_var_client = &configuration.client;
|
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 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}}
|
{{#queryParams}}
|
||||||
{{#required}}
|
{{#required}}
|
||||||
|
@ -24,26 +24,26 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
|||||||
|
|
||||||
Class | Method | HTTP request | Description
|
Class | Method | HTTP request | Description
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
*PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **post** /pet | Add a new pet to the store
|
*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* | [**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_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* | [**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* | [**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**](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* | [**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
|
*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* | [**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_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* | [**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
|
*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_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_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* | [**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* | [**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* | [**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* | [**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* | [**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
|
*UserApi* | [**update_user**](docs/UserApi.md#update_user) | **PUT** /user/{username} | Updated user
|
||||||
|
|
||||||
|
|
||||||
## Documentation For Models
|
## Documentation For Models
|
||||||
|
@ -4,14 +4,14 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
|||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
[**add_pet**](PetApi.md#add_pet) | **post** /pet | Add a new pet to the store
|
[**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
|
[**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_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
|
[**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
|
[**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**](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
|
[**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
|
[**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,10 +4,10 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
|||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
[**delete_order**](StoreApi.md#delete_order) | **delete** /store/order/{orderId} | Delete purchase order by ID
|
[**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_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
|
[**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
|
[**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,14 +4,14 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
|||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
[**create_user**](UserApi.md#create_user) | **post** /user | Create 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_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
|
[**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
|
[**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
|
[**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
|
[**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
|
[**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
|
[**update_user**](UserApi.md#update_user) | **PUT** /user/{username} | Updated user
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ pub async fn add_pet(configuration: &configuration::Configuration, params: AddPe
|
|||||||
let local_var_client = &configuration.client;
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/pet", configuration.base_path);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/pet/{petId}", configuration.base_path, petId=pet_id);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/pet/findByStatus", configuration.base_path);
|
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())]);
|
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 {
|
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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/pet/findByTags", configuration.base_path);
|
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())]);
|
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 {
|
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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/pet/{petId}", configuration.base_path, petId=pet_id);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/pet", configuration.base_path);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/pet/{petId}", configuration.base_path, petId=pet_id);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/pet/{petId}/uploadImage", configuration.base_path, petId=pet_id);
|
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 {
|
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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
|
||||||
|
@ -110,7 +110,7 @@ pub async fn delete_order(configuration: &configuration::Configuration, params:
|
|||||||
let local_var_client = &configuration.client;
|
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 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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/store/inventory", configuration.base_path);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/store/order/{orderId}", configuration.base_path, orderId=order_id);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/store/order", configuration.base_path);
|
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 {
|
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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
|
||||||
|
@ -203,7 +203,7 @@ pub async fn create_user(configuration: &configuration::Configuration, params: C
|
|||||||
let local_var_client = &configuration.client;
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/user", configuration.base_path);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/user/createWithArray", configuration.base_path);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/user/createWithList", configuration.base_path);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/user/{username}", configuration.base_path, username=crate::apis::urlencode(username));
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/user/{username}", configuration.base_path, username=crate::apis::urlencode(username));
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/user/login", configuration.base_path);
|
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(&[("username", &username.to_string())]);
|
||||||
local_var_req_builder = local_var_req_builder.query(&[("password", &password.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/user/logout", configuration.base_path);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/user/{username}", configuration.base_path, username=crate::apis::urlencode(username));
|
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 {
|
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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
|
||||||
|
@ -24,26 +24,26 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
|||||||
|
|
||||||
Class | Method | HTTP request | Description
|
Class | Method | HTTP request | Description
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
*PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **post** /pet | Add a new pet to the store
|
*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* | [**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_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* | [**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* | [**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**](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* | [**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
|
*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* | [**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_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* | [**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
|
*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_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_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* | [**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* | [**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* | [**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* | [**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* | [**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
|
*UserApi* | [**update_user**](docs/UserApi.md#update_user) | **PUT** /user/{username} | Updated user
|
||||||
|
|
||||||
|
|
||||||
## Documentation For Models
|
## Documentation For Models
|
||||||
|
@ -4,14 +4,14 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
|||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
[**add_pet**](PetApi.md#add_pet) | **post** /pet | Add a new pet to the store
|
[**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
|
[**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_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
|
[**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
|
[**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**](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
|
[**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
|
[**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,10 +4,10 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
|||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
[**delete_order**](StoreApi.md#delete_order) | **delete** /store/order/{orderId} | Delete purchase order by ID
|
[**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_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
|
[**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
|
[**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,14 +4,14 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
|||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
[**create_user**](UserApi.md#create_user) | **post** /user | Create 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_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
|
[**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
|
[**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
|
[**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
|
[**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
|
[**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
|
[**update_user**](UserApi.md#update_user) | **PUT** /user/{username} | Updated user
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ pub fn add_pet(configuration: &configuration::Configuration, body: crate::models
|
|||||||
let local_var_client = &configuration.client;
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/pet", configuration.base_path);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/pet/{petId}", configuration.base_path, petId=pet_id);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/pet/findByStatus", configuration.base_path);
|
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())]);
|
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 {
|
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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/pet/findByTags", configuration.base_path);
|
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())]);
|
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 {
|
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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/pet/{petId}", configuration.base_path, petId=pet_id);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/pet", configuration.base_path);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/pet/{petId}", configuration.base_path, petId=pet_id);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/pet/{petId}/uploadImage", configuration.base_path, petId=pet_id);
|
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 {
|
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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
|
||||||
|
@ -55,7 +55,7 @@ pub fn delete_order(configuration: &configuration::Configuration, order_id: &str
|
|||||||
let local_var_client = &configuration.client;
|
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 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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/store/inventory", configuration.base_path);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/store/order/{orderId}", configuration.base_path, orderId=order_id);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/store/order", configuration.base_path);
|
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 {
|
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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
|
||||||
|
@ -89,7 +89,7 @@ pub fn create_user(configuration: &configuration::Configuration, body: crate::mo
|
|||||||
let local_var_client = &configuration.client;
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/user", configuration.base_path);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/user/createWithArray", configuration.base_path);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/user/createWithList", configuration.base_path);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/user/{username}", configuration.base_path, username=crate::apis::urlencode(username));
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/user/{username}", configuration.base_path, username=crate::apis::urlencode(username));
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/user/login", configuration.base_path);
|
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(&[("username", &username.to_string())]);
|
||||||
local_var_req_builder = local_var_req_builder.query(&[("password", &password.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/user/logout", configuration.base_path);
|
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 {
|
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.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_client = &configuration.client;
|
||||||
|
|
||||||
let local_var_uri_str = format!("{}/user/{username}", configuration.base_path, username=crate::apis::urlencode(username));
|
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 {
|
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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user