mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 12:40:53 +00:00
[rust] add tests for rust deep objects
This commit is contained in:
parent
c8bb57fead
commit
0509909a20
@ -18,6 +18,49 @@ tags:
|
|||||||
- name: user
|
- name: user
|
||||||
description: Operations about user
|
description: Operations about user
|
||||||
paths:
|
paths:
|
||||||
|
/pets:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- pet
|
||||||
|
summary: List all pets
|
||||||
|
description: Returns a list of pets
|
||||||
|
parameters:
|
||||||
|
- name: page
|
||||||
|
in: query
|
||||||
|
description: The page number
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Page'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A list of pets
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Pet'
|
||||||
|
'400':
|
||||||
|
description: Invalid page number
|
||||||
|
/pets/explode:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- pet
|
||||||
|
summary: List all pets
|
||||||
|
description: Returns a list of pets
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/PageExplode'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A list of pets
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Pet'
|
||||||
|
'400':
|
||||||
|
description: Invalid page number
|
||||||
/pet:
|
/pet:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
@ -1120,3 +1163,22 @@ components:
|
|||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/Order'
|
- $ref: '#/components/schemas/Order'
|
||||||
- $ref: '#/components/schemas/Order'
|
- $ref: '#/components/schemas/Order'
|
||||||
|
Page:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
page:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
perPage:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
parameters:
|
||||||
|
PageExplode:
|
||||||
|
name: pageExplode
|
||||||
|
in: query
|
||||||
|
description: Object containing page `size` and page `number`.
|
||||||
|
required: false
|
||||||
|
style: deepObject
|
||||||
|
explode: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Page'
|
||||||
|
@ -16,6 +16,7 @@ docs/NullableArray.md
|
|||||||
docs/NumericEnumTesting.md
|
docs/NumericEnumTesting.md
|
||||||
docs/OptionalTesting.md
|
docs/OptionalTesting.md
|
||||||
docs/Order.md
|
docs/Order.md
|
||||||
|
docs/Page.md
|
||||||
docs/Person.md
|
docs/Person.md
|
||||||
docs/Pet.md
|
docs/Pet.md
|
||||||
docs/PetApi.md
|
docs/PetApi.md
|
||||||
@ -61,6 +62,7 @@ src/models/nullable_array.rs
|
|||||||
src/models/numeric_enum_testing.rs
|
src/models/numeric_enum_testing.rs
|
||||||
src/models/optional_testing.rs
|
src/models/optional_testing.rs
|
||||||
src/models/order.rs
|
src/models/order.rs
|
||||||
|
src/models/page.rs
|
||||||
src/models/person.rs
|
src/models/person.rs
|
||||||
src/models/pet.rs
|
src/models/pet.rs
|
||||||
src/models/property_test.rs
|
src/models/property_test.rs
|
||||||
|
@ -32,6 +32,8 @@ Class | Method | HTTP request | Description
|
|||||||
*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* | [**pets_explode_post**](docs/PetApi.md#pets_explode_post) | **Post** /pets/explode | List all pets
|
||||||
|
*PetApi* | [**pets_post**](docs/PetApi.md#pets_post) | **Post** /pets | List all pets
|
||||||
*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
|
||||||
@ -68,6 +70,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [NumericEnumTesting](docs/NumericEnumTesting.md)
|
- [NumericEnumTesting](docs/NumericEnumTesting.md)
|
||||||
- [OptionalTesting](docs/OptionalTesting.md)
|
- [OptionalTesting](docs/OptionalTesting.md)
|
||||||
- [Order](docs/Order.md)
|
- [Order](docs/Order.md)
|
||||||
|
- [Page](docs/Page.md)
|
||||||
- [Person](docs/Person.md)
|
- [Person](docs/Person.md)
|
||||||
- [Pet](docs/Pet.md)
|
- [Pet](docs/Pet.md)
|
||||||
- [PropertyTest](docs/PropertyTest.md)
|
- [PropertyTest](docs/PropertyTest.md)
|
||||||
|
12
samples/client/petstore/rust/hyper/petstore/docs/Page.md
Normal file
12
samples/client/petstore/rust/hyper/petstore/docs/Page.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Page
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**page** | Option<**i32**> | | [optional]
|
||||||
|
**per_page** | Option<**i32**> | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -9,6 +9,8 @@ Method | HTTP request | Description
|
|||||||
[**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
|
||||||
|
[**pets_explode_post**](PetApi.md#pets_explode_post) | **Post** /pets/explode | List all pets
|
||||||
|
[**pets_post**](PetApi.md#pets_post) | **Post** /pets | List all pets
|
||||||
[**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
|
||||||
@ -167,6 +169,66 @@ Name | Type | Description | Required | Notes
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## pets_explode_post
|
||||||
|
|
||||||
|
> Vec<models::Pet> pets_explode_post(page_explode)
|
||||||
|
List all pets
|
||||||
|
|
||||||
|
Returns a list of pets
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**page_explode** | Option<[**Page**](.md)> | Object containing page `size` and page `number`. | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<models::Pet>**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## pets_post
|
||||||
|
|
||||||
|
> Vec<models::Pet> pets_post(page)
|
||||||
|
List all pets
|
||||||
|
|
||||||
|
Returns a list of pets
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**page** | Option<[**Page**](.md)> | The page number | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<models::Pet>**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
## update_pet
|
## update_pet
|
||||||
|
|
||||||
> models::Pet update_pet(pet)
|
> models::Pet update_pet(pet)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# PetsExplodePostPageExplodeParameter
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**size** | Option<**i64**> | The page size. | [optional][default to 10]
|
||||||
|
**number** | Option<**i64**> | The page number. | [optional][default to 1]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
# PetsExplodePostPageParameter
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**size** | Option<**i64**> | The page size. | [optional][default to 10]
|
||||||
|
**number** | Option<**i64**> | The page number. | [optional][default to 1]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -42,6 +42,8 @@ pub trait PetApi: Send + Sync {
|
|||||||
fn find_pets_by_status(&self, status: Vec<String>, r#type: Option<Vec<String>>) -> Pin<Box<dyn Future<Output = Result<Vec<models::Pet>, Error>> + Send>>;
|
fn find_pets_by_status(&self, status: Vec<String>, r#type: Option<Vec<String>>) -> Pin<Box<dyn Future<Output = Result<Vec<models::Pet>, Error>> + Send>>;
|
||||||
fn find_pets_by_tags(&self, tags: Vec<String>) -> Pin<Box<dyn Future<Output = Result<Vec<models::Pet>, Error>> + Send>>;
|
fn find_pets_by_tags(&self, tags: Vec<String>) -> Pin<Box<dyn Future<Output = Result<Vec<models::Pet>, Error>> + Send>>;
|
||||||
fn get_pet_by_id(&self, pet_id: i64) -> Pin<Box<dyn Future<Output = Result<models::Pet, Error>> + Send>>;
|
fn get_pet_by_id(&self, pet_id: i64) -> Pin<Box<dyn Future<Output = Result<models::Pet, Error>> + Send>>;
|
||||||
|
fn pets_explode_post(&self, page_explode: Option<models::Page>) -> Pin<Box<dyn Future<Output = Result<Vec<models::Pet>, Error>> + Send>>;
|
||||||
|
fn pets_post(&self, page: Option<models::Page>) -> Pin<Box<dyn Future<Output = Result<Vec<models::Pet>, Error>> + Send>>;
|
||||||
fn update_pet(&self, pet: models::Pet) -> Pin<Box<dyn Future<Output = Result<models::Pet, Error>> + Send>>;
|
fn update_pet(&self, pet: models::Pet) -> Pin<Box<dyn Future<Output = Result<models::Pet, Error>> + Send>>;
|
||||||
fn update_pet_with_form(&self, pet_id: i64, name: Option<&str>, status: Option<&str>) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
|
fn update_pet_with_form(&self, pet_id: i64, name: Option<&str>, status: Option<&str>) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
|
||||||
fn upload_file(&self, pet_id: i64, additional_metadata: Option<&str>, file: Option<std::path::PathBuf>) -> Pin<Box<dyn Future<Output = Result<models::ApiResponse, Error>> + Send>>;
|
fn upload_file(&self, pet_id: i64, additional_metadata: Option<&str>, file: Option<std::path::PathBuf>) -> Pin<Box<dyn Future<Output = Result<models::ApiResponse, Error>> + Send>>;
|
||||||
@ -111,6 +113,30 @@ impl<C: Connect>PetApi for PetApiClient<C>
|
|||||||
req.execute(self.configuration.borrow())
|
req.execute(self.configuration.borrow())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unused_mut)]
|
||||||
|
fn pets_explode_post(&self, page_explode: Option<models::Page>) -> Pin<Box<dyn Future<Output = Result<Vec<models::Pet>, Error>> + Send>> {
|
||||||
|
let mut req = __internal_request::Request::new(hyper::Method::POST, "/pets/explode".to_string())
|
||||||
|
;
|
||||||
|
if let Some(ref s) = page_explode {
|
||||||
|
let query_value = s.to_string();
|
||||||
|
req = req.with_query_param("pageExplode".to_string(), query_value);
|
||||||
|
}
|
||||||
|
|
||||||
|
req.execute(self.configuration.borrow())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_mut)]
|
||||||
|
fn pets_post(&self, page: Option<models::Page>) -> Pin<Box<dyn Future<Output = Result<Vec<models::Pet>, Error>> + Send>> {
|
||||||
|
let mut req = __internal_request::Request::new(hyper::Method::POST, "/pets".to_string())
|
||||||
|
;
|
||||||
|
if let Some(ref s) = page {
|
||||||
|
let query_value = s.to_string();
|
||||||
|
req = req.with_query_param("page".to_string(), query_value);
|
||||||
|
}
|
||||||
|
|
||||||
|
req.execute(self.configuration.borrow())
|
||||||
|
}
|
||||||
|
|
||||||
#[allow(unused_mut)]
|
#[allow(unused_mut)]
|
||||||
fn update_pet(&self, pet: models::Pet) -> Pin<Box<dyn Future<Output = Result<models::Pet, Error>> + Send>> {
|
fn update_pet(&self, pet: models::Pet) -> Pin<Box<dyn Future<Output = Result<models::Pet, Error>> + Send>> {
|
||||||
let mut req = __internal_request::Request::new(hyper::Method::PUT, "/pet".to_string())
|
let mut req = __internal_request::Request::new(hyper::Method::PUT, "/pet".to_string())
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct PetsExplodePostPageExplodeParameter {
|
||||||
|
/// The page size.
|
||||||
|
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub size: Option<i64>,
|
||||||
|
/// The page number.
|
||||||
|
#[serde(rename = "number", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub number: Option<i64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PetsExplodePostPageExplodeParameter {
|
||||||
|
pub fn new() -> PetsExplodePostPageExplodeParameter {
|
||||||
|
PetsExplodePostPageExplodeParameter {
|
||||||
|
size: None,
|
||||||
|
number: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct PetsExplodePostPageParameter {
|
||||||
|
/// The page size.
|
||||||
|
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub size: Option<i64>,
|
||||||
|
/// The page number.
|
||||||
|
#[serde(rename = "number", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub number: Option<i64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PetsExplodePostPageParameter {
|
||||||
|
pub fn new() -> PetsExplodePostPageParameter {
|
||||||
|
PetsExplodePostPageParameter {
|
||||||
|
size: None,
|
||||||
|
number: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,6 +24,8 @@ pub mod optional_testing;
|
|||||||
pub use self::optional_testing::OptionalTesting;
|
pub use self::optional_testing::OptionalTesting;
|
||||||
pub mod order;
|
pub mod order;
|
||||||
pub use self::order::Order;
|
pub use self::order::Order;
|
||||||
|
pub mod page;
|
||||||
|
pub use self::page::Page;
|
||||||
pub mod person;
|
pub mod person;
|
||||||
pub use self::person::Person;
|
pub use self::person::Person;
|
||||||
pub mod pet;
|
pub mod pet;
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct Page {
|
||||||
|
#[serde(rename = "page", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub page: Option<i32>,
|
||||||
|
#[serde(rename = "perPage", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub per_page: Option<i32>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Page {
|
||||||
|
pub fn new() -> Page {
|
||||||
|
Page {
|
||||||
|
page: None,
|
||||||
|
per_page: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -16,6 +16,7 @@ docs/NullableArray.md
|
|||||||
docs/NumericEnumTesting.md
|
docs/NumericEnumTesting.md
|
||||||
docs/OptionalTesting.md
|
docs/OptionalTesting.md
|
||||||
docs/Order.md
|
docs/Order.md
|
||||||
|
docs/Page.md
|
||||||
docs/Person.md
|
docs/Person.md
|
||||||
docs/Pet.md
|
docs/Pet.md
|
||||||
docs/PetApi.md
|
docs/PetApi.md
|
||||||
@ -59,6 +60,7 @@ src/models/nullable_array.rs
|
|||||||
src/models/numeric_enum_testing.rs
|
src/models/numeric_enum_testing.rs
|
||||||
src/models/optional_testing.rs
|
src/models/optional_testing.rs
|
||||||
src/models/order.rs
|
src/models/order.rs
|
||||||
|
src/models/page.rs
|
||||||
src/models/person.rs
|
src/models/person.rs
|
||||||
src/models/pet.rs
|
src/models/pet.rs
|
||||||
src/models/property_test.rs
|
src/models/property_test.rs
|
||||||
|
@ -32,6 +32,8 @@ Class | Method | HTTP request | Description
|
|||||||
*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* | [**pets_explode_post**](docs/PetApi.md#pets_explode_post) | **POST** /pets/explode | List all pets
|
||||||
|
*PetApi* | [**pets_post**](docs/PetApi.md#pets_post) | **POST** /pets | List all pets
|
||||||
*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
|
||||||
@ -68,6 +70,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [NumericEnumTesting](docs/NumericEnumTesting.md)
|
- [NumericEnumTesting](docs/NumericEnumTesting.md)
|
||||||
- [OptionalTesting](docs/OptionalTesting.md)
|
- [OptionalTesting](docs/OptionalTesting.md)
|
||||||
- [Order](docs/Order.md)
|
- [Order](docs/Order.md)
|
||||||
|
- [Page](docs/Page.md)
|
||||||
- [Person](docs/Person.md)
|
- [Person](docs/Person.md)
|
||||||
- [Pet](docs/Pet.md)
|
- [Pet](docs/Pet.md)
|
||||||
- [PropertyTest](docs/PropertyTest.md)
|
- [PropertyTest](docs/PropertyTest.md)
|
||||||
|
12
samples/client/petstore/rust/hyper0x/petstore/docs/Page.md
Normal file
12
samples/client/petstore/rust/hyper0x/petstore/docs/Page.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Page
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**page** | Option<**i32**> | | [optional]
|
||||||
|
**per_page** | Option<**i32**> | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -9,6 +9,8 @@ Method | HTTP request | Description
|
|||||||
[**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
|
||||||
|
[**pets_explode_post**](PetApi.md#pets_explode_post) | **POST** /pets/explode | List all pets
|
||||||
|
[**pets_post**](PetApi.md#pets_post) | **POST** /pets | List all pets
|
||||||
[**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
|
||||||
@ -167,6 +169,66 @@ Name | Type | Description | Required | Notes
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## pets_explode_post
|
||||||
|
|
||||||
|
> Vec<models::Pet> pets_explode_post(page_explode)
|
||||||
|
List all pets
|
||||||
|
|
||||||
|
Returns a list of pets
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**page_explode** | Option<[**Page**](.md)> | Object containing page `size` and page `number`. | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<models::Pet>**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## pets_post
|
||||||
|
|
||||||
|
> Vec<models::Pet> pets_post(page)
|
||||||
|
List all pets
|
||||||
|
|
||||||
|
Returns a list of pets
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**page** | Option<[**Page**](.md)> | The page number | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<models::Pet>**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
## update_pet
|
## update_pet
|
||||||
|
|
||||||
> models::Pet update_pet(pet)
|
> models::Pet update_pet(pet)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# PetsExplodePostPageExplodeParameter
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**size** | Option<**i64**> | The page size. | [optional][default to 10]
|
||||||
|
**number** | Option<**i64**> | The page number. | [optional][default to 1]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
# PetsExplodePostPageParameter
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**size** | Option<**i64**> | The page size. | [optional][default to 10]
|
||||||
|
**number** | Option<**i64**> | The page number. | [optional][default to 1]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -41,6 +41,8 @@ pub trait PetApi {
|
|||||||
fn find_pets_by_status(&self, status: Vec<String>, r#type: Option<Vec<String>>) -> Pin<Box<dyn Future<Output = Result<Vec<models::Pet>, Error>>>>;
|
fn find_pets_by_status(&self, status: Vec<String>, r#type: Option<Vec<String>>) -> Pin<Box<dyn Future<Output = Result<Vec<models::Pet>, Error>>>>;
|
||||||
fn find_pets_by_tags(&self, tags: Vec<String>) -> Pin<Box<dyn Future<Output = Result<Vec<models::Pet>, Error>>>>;
|
fn find_pets_by_tags(&self, tags: Vec<String>) -> Pin<Box<dyn Future<Output = Result<Vec<models::Pet>, Error>>>>;
|
||||||
fn get_pet_by_id(&self, pet_id: i64) -> Pin<Box<dyn Future<Output = Result<models::Pet, Error>>>>;
|
fn get_pet_by_id(&self, pet_id: i64) -> Pin<Box<dyn Future<Output = Result<models::Pet, Error>>>>;
|
||||||
|
fn pets_explode_post(&self, page_explode: Option<models::Page>) -> Pin<Box<dyn Future<Output = Result<Vec<models::Pet>, Error>>>>;
|
||||||
|
fn pets_post(&self, page: Option<models::Page>) -> Pin<Box<dyn Future<Output = Result<Vec<models::Pet>, Error>>>>;
|
||||||
fn update_pet(&self, pet: models::Pet) -> Pin<Box<dyn Future<Output = Result<models::Pet, Error>>>>;
|
fn update_pet(&self, pet: models::Pet) -> Pin<Box<dyn Future<Output = Result<models::Pet, Error>>>>;
|
||||||
fn update_pet_with_form(&self, pet_id: i64, name: Option<&str>, status: Option<&str>) -> Pin<Box<dyn Future<Output = Result<(), Error>>>>;
|
fn update_pet_with_form(&self, pet_id: i64, name: Option<&str>, status: Option<&str>) -> Pin<Box<dyn Future<Output = Result<(), Error>>>>;
|
||||||
fn upload_file(&self, pet_id: i64, additional_metadata: Option<&str>, file: Option<std::path::PathBuf>) -> Pin<Box<dyn Future<Output = Result<models::ApiResponse, Error>>>>;
|
fn upload_file(&self, pet_id: i64, additional_metadata: Option<&str>, file: Option<std::path::PathBuf>) -> Pin<Box<dyn Future<Output = Result<models::ApiResponse, Error>>>>;
|
||||||
@ -110,6 +112,30 @@ impl<C: hyper::client::connect::Connect>PetApi for PetApiClient<C>
|
|||||||
req.execute(self.configuration.borrow())
|
req.execute(self.configuration.borrow())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unused_mut)]
|
||||||
|
fn pets_explode_post(&self, page_explode: Option<models::Page>) -> Pin<Box<dyn Future<Output = Result<Vec<models::Pet>, Error>>>> {
|
||||||
|
let mut req = __internal_request::Request::new(hyper::Method::POST, "/pets/explode".to_string())
|
||||||
|
;
|
||||||
|
if let Some(ref s) = page_explode {
|
||||||
|
let query_value = s.to_string();
|
||||||
|
req = req.with_query_param("pageExplode".to_string(), query_value);
|
||||||
|
}
|
||||||
|
|
||||||
|
req.execute(self.configuration.borrow())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_mut)]
|
||||||
|
fn pets_post(&self, page: Option<models::Page>) -> Pin<Box<dyn Future<Output = Result<Vec<models::Pet>, Error>>>> {
|
||||||
|
let mut req = __internal_request::Request::new(hyper::Method::POST, "/pets".to_string())
|
||||||
|
;
|
||||||
|
if let Some(ref s) = page {
|
||||||
|
let query_value = s.to_string();
|
||||||
|
req = req.with_query_param("page".to_string(), query_value);
|
||||||
|
}
|
||||||
|
|
||||||
|
req.execute(self.configuration.borrow())
|
||||||
|
}
|
||||||
|
|
||||||
#[allow(unused_mut)]
|
#[allow(unused_mut)]
|
||||||
fn update_pet(&self, pet: models::Pet) -> Pin<Box<dyn Future<Output = Result<models::Pet, Error>>>> {
|
fn update_pet(&self, pet: models::Pet) -> Pin<Box<dyn Future<Output = Result<models::Pet, Error>>>> {
|
||||||
let mut req = __internal_request::Request::new(hyper::Method::PUT, "/pet".to_string())
|
let mut req = __internal_request::Request::new(hyper::Method::PUT, "/pet".to_string())
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct PetsExplodePostPageExplodeParameter {
|
||||||
|
/// The page size.
|
||||||
|
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub size: Option<i64>,
|
||||||
|
/// The page number.
|
||||||
|
#[serde(rename = "number", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub number: Option<i64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PetsExplodePostPageExplodeParameter {
|
||||||
|
pub fn new() -> PetsExplodePostPageExplodeParameter {
|
||||||
|
PetsExplodePostPageExplodeParameter {
|
||||||
|
size: None,
|
||||||
|
number: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct PetsExplodePostPageParameter {
|
||||||
|
/// The page size.
|
||||||
|
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub size: Option<i64>,
|
||||||
|
/// The page number.
|
||||||
|
#[serde(rename = "number", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub number: Option<i64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PetsExplodePostPageParameter {
|
||||||
|
pub fn new() -> PetsExplodePostPageParameter {
|
||||||
|
PetsExplodePostPageParameter {
|
||||||
|
size: None,
|
||||||
|
number: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,6 +24,8 @@ pub mod optional_testing;
|
|||||||
pub use self::optional_testing::OptionalTesting;
|
pub use self::optional_testing::OptionalTesting;
|
||||||
pub mod order;
|
pub mod order;
|
||||||
pub use self::order::Order;
|
pub use self::order::Order;
|
||||||
|
pub mod page;
|
||||||
|
pub use self::page::Page;
|
||||||
pub mod person;
|
pub mod person;
|
||||||
pub use self::person::Person;
|
pub use self::person::Person;
|
||||||
pub mod pet;
|
pub mod pet;
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct Page {
|
||||||
|
#[serde(rename = "page", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub page: Option<i32>,
|
||||||
|
#[serde(rename = "perPage", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub per_page: Option<i32>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Page {
|
||||||
|
pub fn new() -> Page {
|
||||||
|
Page {
|
||||||
|
page: None,
|
||||||
|
per_page: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -16,6 +16,7 @@ docs/NullableArray.md
|
|||||||
docs/NumericEnumTesting.md
|
docs/NumericEnumTesting.md
|
||||||
docs/OptionalTesting.md
|
docs/OptionalTesting.md
|
||||||
docs/Order.md
|
docs/Order.md
|
||||||
|
docs/Page.md
|
||||||
docs/Person.md
|
docs/Person.md
|
||||||
docs/Pet.md
|
docs/Pet.md
|
||||||
docs/PetApi.md
|
docs/PetApi.md
|
||||||
@ -59,6 +60,7 @@ src/models/nullable_array.rs
|
|||||||
src/models/numeric_enum_testing.rs
|
src/models/numeric_enum_testing.rs
|
||||||
src/models/optional_testing.rs
|
src/models/optional_testing.rs
|
||||||
src/models/order.rs
|
src/models/order.rs
|
||||||
|
src/models/page.rs
|
||||||
src/models/person.rs
|
src/models/person.rs
|
||||||
src/models/pet.rs
|
src/models/pet.rs
|
||||||
src/models/property_test.rs
|
src/models/property_test.rs
|
||||||
|
@ -32,6 +32,8 @@ Class | Method | HTTP request | Description
|
|||||||
*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* | [**pets_explode_post**](docs/PetApi.md#pets_explode_post) | **POST** /pets/explode | List all pets
|
||||||
|
*PetApi* | [**pets_post**](docs/PetApi.md#pets_post) | **POST** /pets | List all pets
|
||||||
*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
|
||||||
@ -68,6 +70,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [NumericEnumTesting](docs/NumericEnumTesting.md)
|
- [NumericEnumTesting](docs/NumericEnumTesting.md)
|
||||||
- [OptionalTesting](docs/OptionalTesting.md)
|
- [OptionalTesting](docs/OptionalTesting.md)
|
||||||
- [Order](docs/Order.md)
|
- [Order](docs/Order.md)
|
||||||
|
- [Page](docs/Page.md)
|
||||||
- [Person](docs/Person.md)
|
- [Person](docs/Person.md)
|
||||||
- [Pet](docs/Pet.md)
|
- [Pet](docs/Pet.md)
|
||||||
- [PropertyTest](docs/PropertyTest.md)
|
- [PropertyTest](docs/PropertyTest.md)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# Page
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**page** | Option<**i32**> | | [optional]
|
||||||
|
**per_page** | Option<**i32**> | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -9,6 +9,8 @@ Method | HTTP request | Description
|
|||||||
[**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
|
||||||
|
[**pets_explode_post**](PetApi.md#pets_explode_post) | **POST** /pets/explode | List all pets
|
||||||
|
[**pets_post**](PetApi.md#pets_post) | **POST** /pets | List all pets
|
||||||
[**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
|
||||||
@ -167,6 +169,66 @@ Name | Type | Description | Required | Notes
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## pets_explode_post
|
||||||
|
|
||||||
|
> Vec<models::Pet> pets_explode_post(page_explode)
|
||||||
|
List all pets
|
||||||
|
|
||||||
|
Returns a list of pets
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**page_explode** | Option<[**Page**](.md)> | Object containing page `size` and page `number`. | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<models::Pet>**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## pets_post
|
||||||
|
|
||||||
|
> Vec<models::Pet> pets_post(page)
|
||||||
|
List all pets
|
||||||
|
|
||||||
|
Returns a list of pets
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**page** | Option<[**Page**](.md)> | The page number | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<models::Pet>**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
## update_pet
|
## update_pet
|
||||||
|
|
||||||
> models::Pet update_pet(pet)
|
> models::Pet update_pet(pet)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# PetsExplodePostPageExplodeParameter
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**size** | Option<**i64**> | The page size. | [optional][default to 10]
|
||||||
|
**number** | Option<**i64**> | The page number. | [optional][default to 1]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
# PetsExplodePostPageParameter
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**size** | Option<**i64**> | The page size. | [optional][default to 10]
|
||||||
|
**number** | Option<**i64**> | The page number. | [optional][default to 1]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -50,8 +50,8 @@ impl FakeApi for FakeApiClient {
|
|||||||
let local_var_uri_str = format!("{}/fake/user/{user_name}", local_var_configuration.base_path, user_name=crate::apis::urlencode(user_name));
|
let local_var_uri_str = format!("{}/fake/user/{user_name}", local_var_configuration.base_path, user_name=crate::apis::urlencode(user_name));
|
||||||
let mut local_var_req_builder = local_var_client.request(reqwest::Method::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_str) = content {
|
if let Some(ref param_value) = content {
|
||||||
local_var_req_builder = local_var_req_builder.query(&[("content", &local_var_str.to_string())]);
|
local_var_req_builder = local_var_req_builder.query(&[("content", ¶m_value.to_string())]);
|
||||||
}
|
}
|
||||||
local_var_req_builder = local_var_req_builder.query(&[("anyType", &any_type.to_string())]);
|
local_var_req_builder = local_var_req_builder.query(&[("anyType", &any_type.to_string())]);
|
||||||
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
|
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
|
||||||
|
@ -46,6 +46,16 @@ pub trait PetApi: Send + Sync {
|
|||||||
/// Returns a single pet
|
/// Returns a single pet
|
||||||
async fn get_pet_by_id<'pet_id>(&self, pet_id: i64) -> Result<models::Pet, Error<GetPetByIdError>>;
|
async fn get_pet_by_id<'pet_id>(&self, pet_id: i64) -> Result<models::Pet, Error<GetPetByIdError>>;
|
||||||
|
|
||||||
|
/// POST /pets/explode
|
||||||
|
///
|
||||||
|
/// Returns a list of pets
|
||||||
|
async fn pets_explode_post<'page_explode>(&self, page_explode: Option<models::Page>) -> Result<Vec<models::Pet>, Error<PetsExplodePostError>>;
|
||||||
|
|
||||||
|
/// POST /pets
|
||||||
|
///
|
||||||
|
/// Returns a list of pets
|
||||||
|
async fn pets_post<'page>(&self, page: Option<models::Page>) -> Result<Vec<models::Pet>, Error<PetsPostError>>;
|
||||||
|
|
||||||
/// PUT /pet
|
/// PUT /pet
|
||||||
async fn update_pet<'pet>(&self, pet: models::Pet) -> Result<models::Pet, Error<UpdatePetError>>;
|
async fn update_pet<'pet>(&self, pet: models::Pet) -> Result<models::Pet, Error<UpdatePetError>>;
|
||||||
|
|
||||||
@ -159,11 +169,12 @@ impl PetApi for PetApiClient {
|
|||||||
"multi" => local_var_req_builder.query(&status.into_iter().map(|p| ("status".to_owned(), p.to_string())).collect::<Vec<(std::string::String, std::string::String)>>()),
|
"multi" => local_var_req_builder.query(&status.into_iter().map(|p| ("status".to_owned(), p.to_string())).collect::<Vec<(std::string::String, std::string::String)>>()),
|
||||||
_ => local_var_req_builder.query(&[("status", &status.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]),
|
_ => 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_str) = r#type {
|
if let Some(ref param_value) = r#type {
|
||||||
local_var_req_builder = match "csv" {
|
local_var_req_builder = match "csv" {
|
||||||
"multi" => local_var_req_builder.query(&local_var_str.into_iter().map(|p| ("type".to_owned(), p.to_string())).collect::<Vec<(std::string::String, std::string::String)>>()),
|
"multi" => local_var_req_builder.query(¶m_value.into_iter().map(|p| ("type".to_owned(), p.to_string())).collect::<Vec<(std::string::String, std::string::String)>>()),
|
||||||
_ => local_var_req_builder.query(&[("type", &local_var_str.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]),
|
_ => local_var_req_builder.query(&[("type", ¶m_value.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]),
|
||||||
};
|
};
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("type", ¶m_value.to_string())]);
|
||||||
}
|
}
|
||||||
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
|
if let Some(ref local_var_user_agent) = local_var_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());
|
||||||
@ -288,6 +299,88 @@ impl PetApi for PetApiClient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns a list of pets
|
||||||
|
async fn pets_explode_post<'page_explode>(&self, page_explode: Option<models::Page>) -> Result<Vec<models::Pet>, Error<PetsExplodePostError>> {
|
||||||
|
let local_var_configuration = &self.configuration;
|
||||||
|
|
||||||
|
let local_var_client = &local_var_configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/pets/explode", local_var_configuration.base_path);
|
||||||
|
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
|
||||||
|
|
||||||
|
if let Some(ref param_value) = page_explode {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(¶m_value);
|
||||||
|
}
|
||||||
|
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
|
||||||
|
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
|
||||||
|
}
|
||||||
|
|
||||||
|
let local_var_req = local_var_req_builder.build()?;
|
||||||
|
let local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content_type = local_var_resp
|
||||||
|
.headers()
|
||||||
|
.get("content-type")
|
||||||
|
.and_then(|v| v.to_str().ok())
|
||||||
|
.unwrap_or("application/octet-stream");
|
||||||
|
let local_var_content_type = super::ContentType::from(local_var_content_type);
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
|
||||||
|
match local_var_content_type {
|
||||||
|
ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
|
||||||
|
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Pet>`"))),
|
||||||
|
ContentType::Unsupported(local_var_unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{local_var_unknown_type}` content type response that cannot be converted to `Vec<models::Pet>`")))),
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let local_var_entity: Option<PetsExplodePostError> = serde_json::from_str(&local_var_content).ok();
|
||||||
|
let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
|
||||||
|
Err(Error::ResponseError(local_var_error))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a list of pets
|
||||||
|
async fn pets_post<'page>(&self, page: Option<models::Page>) -> Result<Vec<models::Pet>, Error<PetsPostError>> {
|
||||||
|
let local_var_configuration = &self.configuration;
|
||||||
|
|
||||||
|
let local_var_client = &local_var_configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/pets", local_var_configuration.base_path);
|
||||||
|
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
|
||||||
|
|
||||||
|
if let Some(ref param_value) = page {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("page", ¶m_value.to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
|
||||||
|
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
|
||||||
|
}
|
||||||
|
|
||||||
|
let local_var_req = local_var_req_builder.build()?;
|
||||||
|
let local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content_type = local_var_resp
|
||||||
|
.headers()
|
||||||
|
.get("content-type")
|
||||||
|
.and_then(|v| v.to_str().ok())
|
||||||
|
.unwrap_or("application/octet-stream");
|
||||||
|
let local_var_content_type = super::ContentType::from(local_var_content_type);
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
|
||||||
|
match local_var_content_type {
|
||||||
|
ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
|
||||||
|
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Pet>`"))),
|
||||||
|
ContentType::Unsupported(local_var_unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{local_var_unknown_type}` content type response that cannot be converted to `Vec<models::Pet>`")))),
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let local_var_entity: Option<PetsPostError> = serde_json::from_str(&local_var_content).ok();
|
||||||
|
let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
|
||||||
|
Err(Error::ResponseError(local_var_error))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
async fn update_pet<'pet>(&self, pet: models::Pet) -> Result<models::Pet, Error<UpdatePetError>> {
|
async fn update_pet<'pet>(&self, pet: models::Pet) -> Result<models::Pet, Error<UpdatePetError>> {
|
||||||
let local_var_configuration = &self.configuration;
|
let local_var_configuration = &self.configuration;
|
||||||
@ -459,6 +552,22 @@ pub enum GetPetByIdError {
|
|||||||
UnknownValue(serde_json::Value),
|
UnknownValue(serde_json::Value),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method [`pets_explode_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsExplodePostError {
|
||||||
|
Status400(),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method [`pets_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsPostError {
|
||||||
|
Status400(),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
/// struct for typed errors of method [`update_pet`]
|
/// struct for typed errors of method [`update_pet`]
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
#[serde(untagged)]
|
#[serde(untagged)]
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct PetsExplodePostPageExplodeParameter {
|
||||||
|
/// The page size.
|
||||||
|
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub size: Option<i64>,
|
||||||
|
/// The page number.
|
||||||
|
#[serde(rename = "number", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub number: Option<i64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PetsExplodePostPageExplodeParameter {
|
||||||
|
pub fn new() -> PetsExplodePostPageExplodeParameter {
|
||||||
|
PetsExplodePostPageExplodeParameter {
|
||||||
|
size: None,
|
||||||
|
number: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct PetsExplodePostPageParameter {
|
||||||
|
/// The page size.
|
||||||
|
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub size: Option<i64>,
|
||||||
|
/// The page number.
|
||||||
|
#[serde(rename = "number", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub number: Option<i64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PetsExplodePostPageParameter {
|
||||||
|
pub fn new() -> PetsExplodePostPageParameter {
|
||||||
|
PetsExplodePostPageParameter {
|
||||||
|
size: None,
|
||||||
|
number: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,6 +24,8 @@ pub mod optional_testing;
|
|||||||
pub use self::optional_testing::OptionalTesting;
|
pub use self::optional_testing::OptionalTesting;
|
||||||
pub mod order;
|
pub mod order;
|
||||||
pub use self::order::Order;
|
pub use self::order::Order;
|
||||||
|
pub mod page;
|
||||||
|
pub use self::page::Page;
|
||||||
pub mod person;
|
pub mod person;
|
||||||
pub use self::person::Person;
|
pub use self::person::Person;
|
||||||
pub mod pet;
|
pub mod pet;
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct Page {
|
||||||
|
#[serde(rename = "page", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub page: Option<i32>,
|
||||||
|
#[serde(rename = "perPage", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub per_page: Option<i32>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Page {
|
||||||
|
pub fn new() -> Page {
|
||||||
|
Page {
|
||||||
|
page: None,
|
||||||
|
per_page: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -16,6 +16,7 @@ docs/NullableArray.md
|
|||||||
docs/NumericEnumTesting.md
|
docs/NumericEnumTesting.md
|
||||||
docs/OptionalTesting.md
|
docs/OptionalTesting.md
|
||||||
docs/Order.md
|
docs/Order.md
|
||||||
|
docs/Page.md
|
||||||
docs/Person.md
|
docs/Person.md
|
||||||
docs/Pet.md
|
docs/Pet.md
|
||||||
docs/PetApi.md
|
docs/PetApi.md
|
||||||
@ -59,6 +60,7 @@ src/models/nullable_array.rs
|
|||||||
src/models/numeric_enum_testing.rs
|
src/models/numeric_enum_testing.rs
|
||||||
src/models/optional_testing.rs
|
src/models/optional_testing.rs
|
||||||
src/models/order.rs
|
src/models/order.rs
|
||||||
|
src/models/page.rs
|
||||||
src/models/person.rs
|
src/models/person.rs
|
||||||
src/models/pet.rs
|
src/models/pet.rs
|
||||||
src/models/property_test.rs
|
src/models/property_test.rs
|
||||||
|
@ -32,6 +32,8 @@ Class | Method | HTTP request | Description
|
|||||||
*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* | [**pets_explode_post**](docs/PetApi.md#pets_explode_post) | **POST** /pets/explode | List all pets
|
||||||
|
*PetApi* | [**pets_post**](docs/PetApi.md#pets_post) | **POST** /pets | List all pets
|
||||||
*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
|
||||||
@ -68,6 +70,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [NumericEnumTesting](docs/NumericEnumTesting.md)
|
- [NumericEnumTesting](docs/NumericEnumTesting.md)
|
||||||
- [OptionalTesting](docs/OptionalTesting.md)
|
- [OptionalTesting](docs/OptionalTesting.md)
|
||||||
- [Order](docs/Order.md)
|
- [Order](docs/Order.md)
|
||||||
|
- [Page](docs/Page.md)
|
||||||
- [Person](docs/Person.md)
|
- [Person](docs/Person.md)
|
||||||
- [Pet](docs/Pet.md)
|
- [Pet](docs/Pet.md)
|
||||||
- [PropertyTest](docs/PropertyTest.md)
|
- [PropertyTest](docs/PropertyTest.md)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# Page
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**page** | Option<**i32**> | | [optional]
|
||||||
|
**per_page** | Option<**i32**> | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -9,6 +9,8 @@ Method | HTTP request | Description
|
|||||||
[**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
|
||||||
|
[**pets_explode_post**](PetApi.md#pets_explode_post) | **POST** /pets/explode | List all pets
|
||||||
|
[**pets_post**](PetApi.md#pets_post) | **POST** /pets | List all pets
|
||||||
[**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
|
||||||
@ -167,6 +169,66 @@ Name | Type | Description | Required | Notes
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## pets_explode_post
|
||||||
|
|
||||||
|
> Vec<models::Pet> pets_explode_post(page_explode)
|
||||||
|
List all pets
|
||||||
|
|
||||||
|
Returns a list of pets
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**page_explode** | Option<[**Page**](.md)> | Object containing page `size` and page `number`. | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<models::Pet>**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## pets_post
|
||||||
|
|
||||||
|
> Vec<models::Pet> pets_post(page)
|
||||||
|
List all pets
|
||||||
|
|
||||||
|
Returns a list of pets
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**page** | Option<[**Page**](.md)> | The page number | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<models::Pet>**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
## update_pet
|
## update_pet
|
||||||
|
|
||||||
> models::Pet update_pet(pet)
|
> models::Pet update_pet(pet)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# PetsExplodePostPageExplodeParameter
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**size** | Option<**i64**> | The page size. | [optional][default to 10]
|
||||||
|
**number** | Option<**i64**> | The page number. | [optional][default to 1]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
# PetsExplodePostPageParameter
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**size** | Option<**i64**> | The page size. | [optional][default to 10]
|
||||||
|
**number** | Option<**i64**> | The page number. | [optional][default to 1]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -52,6 +52,20 @@ pub struct GetPetByIdParams {
|
|||||||
pub pet_id: i64
|
pub pet_id: i64
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// struct for passing parameters to the method [`pets_explode_post`]
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct PetsExplodePostParams {
|
||||||
|
/// Object containing page `size` and page `number`.
|
||||||
|
pub page_explode: Option<models::Page>
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for passing parameters to the method [`pets_post`]
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct PetsPostParams {
|
||||||
|
/// The page number
|
||||||
|
pub page: Option<models::Page>
|
||||||
|
}
|
||||||
|
|
||||||
/// struct for passing parameters to the method [`update_pet`]
|
/// struct for passing parameters to the method [`update_pet`]
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct UpdatePetParams {
|
pub struct UpdatePetParams {
|
||||||
@ -121,6 +135,22 @@ pub enum GetPetByIdSuccess {
|
|||||||
UnknownValue(serde_json::Value),
|
UnknownValue(serde_json::Value),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// struct for typed successes of method [`pets_explode_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsExplodePostSuccess {
|
||||||
|
Status200(Vec<models::Pet>),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed successes of method [`pets_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsPostSuccess {
|
||||||
|
Status200(Vec<models::Pet>),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
/// struct for typed successes of method [`update_pet`]
|
/// struct for typed successes of method [`update_pet`]
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
#[serde(untagged)]
|
#[serde(untagged)]
|
||||||
@ -185,6 +215,22 @@ pub enum GetPetByIdError {
|
|||||||
UnknownValue(serde_json::Value),
|
UnknownValue(serde_json::Value),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method [`pets_explode_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsExplodePostError {
|
||||||
|
Status400(),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method [`pets_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsPostError {
|
||||||
|
Status400(),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
/// struct for typed errors of method [`update_pet`]
|
/// struct for typed errors of method [`update_pet`]
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
#[serde(untagged)]
|
#[serde(untagged)]
|
||||||
@ -379,6 +425,64 @@ pub async fn get_pet_by_id(configuration: &configuration::Configuration, params:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns a list of pets
|
||||||
|
pub async fn pets_explode_post(configuration: &configuration::Configuration, params: PetsExplodePostParams) -> Result<ResponseContent<PetsExplodePostSuccess>, Error<PetsExplodePostError>> {
|
||||||
|
|
||||||
|
let uri_str = format!("{}/pets/explode", configuration.base_path);
|
||||||
|
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
||||||
|
|
||||||
|
if let Some(ref param_value) = params.page_explode {
|
||||||
|
req_builder = req_builder.query(¶m_value);
|
||||||
|
}
|
||||||
|
if let Some(ref user_agent) = configuration.user_agent {
|
||||||
|
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
||||||
|
}
|
||||||
|
|
||||||
|
let req = req_builder.build()?;
|
||||||
|
let resp = configuration.client.execute(req).await?;
|
||||||
|
|
||||||
|
let status = resp.status();
|
||||||
|
|
||||||
|
if !status.is_client_error() && !status.is_server_error() {
|
||||||
|
let content = resp.text().await?;
|
||||||
|
let entity: Option<PetsExplodePostSuccess> = serde_json::from_str(&content).ok();
|
||||||
|
Ok(ResponseContent { status, content, entity })
|
||||||
|
} else {
|
||||||
|
let content = resp.text().await?;
|
||||||
|
let entity: Option<PetsExplodePostError> = serde_json::from_str(&content).ok();
|
||||||
|
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a list of pets
|
||||||
|
pub async fn pets_post(configuration: &configuration::Configuration, params: PetsPostParams) -> Result<ResponseContent<PetsPostSuccess>, Error<PetsPostError>> {
|
||||||
|
|
||||||
|
let uri_str = format!("{}/pets", configuration.base_path);
|
||||||
|
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
||||||
|
|
||||||
|
if let Some(ref param_value) = params.page {
|
||||||
|
req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref user_agent) = configuration.user_agent {
|
||||||
|
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
||||||
|
}
|
||||||
|
|
||||||
|
let req = req_builder.build()?;
|
||||||
|
let resp = configuration.client.execute(req).await?;
|
||||||
|
|
||||||
|
let status = resp.status();
|
||||||
|
|
||||||
|
if !status.is_client_error() && !status.is_server_error() {
|
||||||
|
let content = resp.text().await?;
|
||||||
|
let entity: Option<PetsPostSuccess> = serde_json::from_str(&content).ok();
|
||||||
|
Ok(ResponseContent { status, content, entity })
|
||||||
|
} else {
|
||||||
|
let content = resp.text().await?;
|
||||||
|
let entity: Option<PetsPostError> = serde_json::from_str(&content).ok();
|
||||||
|
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
pub async fn update_pet(configuration: &configuration::Configuration, params: UpdatePetParams) -> Result<ResponseContent<UpdatePetSuccess>, Error<UpdatePetError>> {
|
pub async fn update_pet(configuration: &configuration::Configuration, params: UpdatePetParams) -> Result<ResponseContent<UpdatePetSuccess>, Error<UpdatePetError>> {
|
||||||
|
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct PetsExplodePostPageExplodeParameter {
|
||||||
|
/// The page size.
|
||||||
|
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub size: Option<i64>,
|
||||||
|
/// The page number.
|
||||||
|
#[serde(rename = "number", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub number: Option<i64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PetsExplodePostPageExplodeParameter {
|
||||||
|
pub fn new() -> PetsExplodePostPageExplodeParameter {
|
||||||
|
PetsExplodePostPageExplodeParameter {
|
||||||
|
size: None,
|
||||||
|
number: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct PetsExplodePostPageParameter {
|
||||||
|
/// The page size.
|
||||||
|
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub size: Option<i64>,
|
||||||
|
/// The page number.
|
||||||
|
#[serde(rename = "number", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub number: Option<i64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PetsExplodePostPageParameter {
|
||||||
|
pub fn new() -> PetsExplodePostPageParameter {
|
||||||
|
PetsExplodePostPageParameter {
|
||||||
|
size: None,
|
||||||
|
number: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,6 +24,8 @@ pub mod optional_testing;
|
|||||||
pub use self::optional_testing::OptionalTesting;
|
pub use self::optional_testing::OptionalTesting;
|
||||||
pub mod order;
|
pub mod order;
|
||||||
pub use self::order::Order;
|
pub use self::order::Order;
|
||||||
|
pub mod page;
|
||||||
|
pub use self::page::Page;
|
||||||
pub mod person;
|
pub mod person;
|
||||||
pub use self::person::Person;
|
pub use self::person::Person;
|
||||||
pub mod pet;
|
pub mod pet;
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct Page {
|
||||||
|
#[serde(rename = "page", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub page: Option<i32>,
|
||||||
|
#[serde(rename = "perPage", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub per_page: Option<i32>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Page {
|
||||||
|
pub fn new() -> Page {
|
||||||
|
Page {
|
||||||
|
page: None,
|
||||||
|
per_page: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -16,6 +16,7 @@ docs/NullableArray.md
|
|||||||
docs/NumericEnumTesting.md
|
docs/NumericEnumTesting.md
|
||||||
docs/OptionalTesting.md
|
docs/OptionalTesting.md
|
||||||
docs/Order.md
|
docs/Order.md
|
||||||
|
docs/Page.md
|
||||||
docs/Person.md
|
docs/Person.md
|
||||||
docs/Pet.md
|
docs/Pet.md
|
||||||
docs/PetApi.md
|
docs/PetApi.md
|
||||||
@ -59,6 +60,7 @@ src/models/nullable_array.rs
|
|||||||
src/models/numeric_enum_testing.rs
|
src/models/numeric_enum_testing.rs
|
||||||
src/models/optional_testing.rs
|
src/models/optional_testing.rs
|
||||||
src/models/order.rs
|
src/models/order.rs
|
||||||
|
src/models/page.rs
|
||||||
src/models/person.rs
|
src/models/person.rs
|
||||||
src/models/pet.rs
|
src/models/pet.rs
|
||||||
src/models/property_test.rs
|
src/models/property_test.rs
|
||||||
|
@ -32,6 +32,8 @@ Class | Method | HTTP request | Description
|
|||||||
*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* | [**pets_explode_post**](docs/PetApi.md#pets_explode_post) | **POST** /pets/explode | List all pets
|
||||||
|
*PetApi* | [**pets_post**](docs/PetApi.md#pets_post) | **POST** /pets | List all pets
|
||||||
*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
|
||||||
@ -68,6 +70,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [NumericEnumTesting](docs/NumericEnumTesting.md)
|
- [NumericEnumTesting](docs/NumericEnumTesting.md)
|
||||||
- [OptionalTesting](docs/OptionalTesting.md)
|
- [OptionalTesting](docs/OptionalTesting.md)
|
||||||
- [Order](docs/Order.md)
|
- [Order](docs/Order.md)
|
||||||
|
- [Page](docs/Page.md)
|
||||||
- [Person](docs/Person.md)
|
- [Person](docs/Person.md)
|
||||||
- [Pet](docs/Pet.md)
|
- [Pet](docs/Pet.md)
|
||||||
- [PropertyTest](docs/PropertyTest.md)
|
- [PropertyTest](docs/PropertyTest.md)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# Page
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**page** | Option<**i32**> | | [optional]
|
||||||
|
**per_page** | Option<**i32**> | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -9,6 +9,8 @@ Method | HTTP request | Description
|
|||||||
[**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
|
||||||
|
[**pets_explode_post**](PetApi.md#pets_explode_post) | **POST** /pets/explode | List all pets
|
||||||
|
[**pets_post**](PetApi.md#pets_post) | **POST** /pets | List all pets
|
||||||
[**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
|
||||||
@ -167,6 +169,66 @@ Name | Type | Description | Required | Notes
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## pets_explode_post
|
||||||
|
|
||||||
|
> Vec<models::Pet> pets_explode_post(page_explode)
|
||||||
|
List all pets
|
||||||
|
|
||||||
|
Returns a list of pets
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**page_explode** | Option<[**Page**](.md)> | Object containing page `size` and page `number`. | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<models::Pet>**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## pets_post
|
||||||
|
|
||||||
|
> Vec<models::Pet> pets_post(page)
|
||||||
|
List all pets
|
||||||
|
|
||||||
|
Returns a list of pets
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**page** | Option<[**Page**](.md)> | The page number | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<models::Pet>**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
## update_pet
|
## update_pet
|
||||||
|
|
||||||
> models::Pet update_pet(pet)
|
> models::Pet update_pet(pet)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# PetsExplodePostPageExplodeParameter
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**size** | Option<**i64**> | The page size. | [optional][default to 10]
|
||||||
|
**number** | Option<**i64**> | The page number. | [optional][default to 1]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
# PetsExplodePostPageParameter
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**size** | Option<**i64**> | The page size. | [optional][default to 10]
|
||||||
|
**number** | Option<**i64**> | The page number. | [optional][default to 1]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -52,6 +52,20 @@ pub struct GetPetByIdParams {
|
|||||||
pub pet_id: i64
|
pub pet_id: i64
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// struct for passing parameters to the method [`pets_explode_post`]
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct PetsExplodePostParams {
|
||||||
|
/// Object containing page `size` and page `number`.
|
||||||
|
pub page_explode: Option<models::Page>
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for passing parameters to the method [`pets_post`]
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct PetsPostParams {
|
||||||
|
/// The page number
|
||||||
|
pub page: Option<models::Page>
|
||||||
|
}
|
||||||
|
|
||||||
/// struct for passing parameters to the method [`update_pet`]
|
/// struct for passing parameters to the method [`update_pet`]
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct UpdatePetParams {
|
pub struct UpdatePetParams {
|
||||||
@ -121,6 +135,22 @@ pub enum GetPetByIdSuccess {
|
|||||||
UnknownValue(serde_json::Value),
|
UnknownValue(serde_json::Value),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// struct for typed successes of method [`pets_explode_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsExplodePostSuccess {
|
||||||
|
Status200(Vec<models::Pet>),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed successes of method [`pets_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsPostSuccess {
|
||||||
|
Status200(Vec<models::Pet>),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
/// struct for typed successes of method [`update_pet`]
|
/// struct for typed successes of method [`update_pet`]
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
#[serde(untagged)]
|
#[serde(untagged)]
|
||||||
@ -185,6 +215,22 @@ pub enum GetPetByIdError {
|
|||||||
UnknownValue(serde_json::Value),
|
UnknownValue(serde_json::Value),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method [`pets_explode_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsExplodePostError {
|
||||||
|
Status400(),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method [`pets_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsPostError {
|
||||||
|
Status400(),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
/// struct for typed errors of method [`update_pet`]
|
/// struct for typed errors of method [`update_pet`]
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
#[serde(untagged)]
|
#[serde(untagged)]
|
||||||
@ -384,6 +430,64 @@ pub async fn get_pet_by_id(configuration: &configuration::Configuration, params:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns a list of pets
|
||||||
|
pub async fn pets_explode_post(configuration: &configuration::Configuration, params: PetsExplodePostParams) -> Result<ResponseContent<PetsExplodePostSuccess>, Error<PetsExplodePostError>> {
|
||||||
|
|
||||||
|
let uri_str = format!("{}/pets/explode", configuration.base_path);
|
||||||
|
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
||||||
|
|
||||||
|
if let Some(ref param_value) = params.page_explode {
|
||||||
|
req_builder = req_builder.query(¶m_value);
|
||||||
|
}
|
||||||
|
if let Some(ref user_agent) = configuration.user_agent {
|
||||||
|
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
||||||
|
}
|
||||||
|
|
||||||
|
let req = req_builder.build()?;
|
||||||
|
let resp = configuration.client.execute(req).await?;
|
||||||
|
|
||||||
|
let status = resp.status();
|
||||||
|
|
||||||
|
if !status.is_client_error() && !status.is_server_error() {
|
||||||
|
let content = resp.text().await?;
|
||||||
|
let entity: Option<PetsExplodePostSuccess> = serde_json::from_str(&content).ok();
|
||||||
|
Ok(ResponseContent { status, content, entity })
|
||||||
|
} else {
|
||||||
|
let content = resp.text().await?;
|
||||||
|
let entity: Option<PetsExplodePostError> = serde_json::from_str(&content).ok();
|
||||||
|
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a list of pets
|
||||||
|
pub async fn pets_post(configuration: &configuration::Configuration, params: PetsPostParams) -> Result<ResponseContent<PetsPostSuccess>, Error<PetsPostError>> {
|
||||||
|
|
||||||
|
let uri_str = format!("{}/pets", configuration.base_path);
|
||||||
|
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
||||||
|
|
||||||
|
if let Some(ref param_value) = params.page {
|
||||||
|
req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref user_agent) = configuration.user_agent {
|
||||||
|
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
||||||
|
}
|
||||||
|
|
||||||
|
let req = req_builder.build()?;
|
||||||
|
let resp = configuration.client.execute(req).await?;
|
||||||
|
|
||||||
|
let status = resp.status();
|
||||||
|
|
||||||
|
if !status.is_client_error() && !status.is_server_error() {
|
||||||
|
let content = resp.text().await?;
|
||||||
|
let entity: Option<PetsPostSuccess> = serde_json::from_str(&content).ok();
|
||||||
|
Ok(ResponseContent { status, content, entity })
|
||||||
|
} else {
|
||||||
|
let content = resp.text().await?;
|
||||||
|
let entity: Option<PetsPostError> = serde_json::from_str(&content).ok();
|
||||||
|
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
pub async fn update_pet(configuration: &configuration::Configuration, params: UpdatePetParams) -> Result<ResponseContent<UpdatePetSuccess>, Error<UpdatePetError>> {
|
pub async fn update_pet(configuration: &configuration::Configuration, params: UpdatePetParams) -> Result<ResponseContent<UpdatePetSuccess>, Error<UpdatePetError>> {
|
||||||
|
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct PetsExplodePostPageExplodeParameter {
|
||||||
|
/// The page size.
|
||||||
|
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub size: Option<i64>,
|
||||||
|
/// The page number.
|
||||||
|
#[serde(rename = "number", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub number: Option<i64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PetsExplodePostPageExplodeParameter {
|
||||||
|
pub fn new() -> PetsExplodePostPageExplodeParameter {
|
||||||
|
PetsExplodePostPageExplodeParameter {
|
||||||
|
size: None,
|
||||||
|
number: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct PetsExplodePostPageParameter {
|
||||||
|
/// The page size.
|
||||||
|
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub size: Option<i64>,
|
||||||
|
/// The page number.
|
||||||
|
#[serde(rename = "number", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub number: Option<i64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PetsExplodePostPageParameter {
|
||||||
|
pub fn new() -> PetsExplodePostPageParameter {
|
||||||
|
PetsExplodePostPageParameter {
|
||||||
|
size: None,
|
||||||
|
number: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,6 +24,8 @@ pub mod optional_testing;
|
|||||||
pub use self::optional_testing::OptionalTesting;
|
pub use self::optional_testing::OptionalTesting;
|
||||||
pub mod order;
|
pub mod order;
|
||||||
pub use self::order::Order;
|
pub use self::order::Order;
|
||||||
|
pub mod page;
|
||||||
|
pub use self::page::Page;
|
||||||
pub mod person;
|
pub mod person;
|
||||||
pub use self::person::Person;
|
pub use self::person::Person;
|
||||||
pub mod pet;
|
pub mod pet;
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct Page {
|
||||||
|
#[serde(rename = "page", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub page: Option<i32>,
|
||||||
|
#[serde(rename = "perPage", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub per_page: Option<i32>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Page {
|
||||||
|
pub fn new() -> Page {
|
||||||
|
Page {
|
||||||
|
page: None,
|
||||||
|
per_page: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -16,6 +16,7 @@ docs/NullableArray.md
|
|||||||
docs/NumericEnumTesting.md
|
docs/NumericEnumTesting.md
|
||||||
docs/OptionalTesting.md
|
docs/OptionalTesting.md
|
||||||
docs/Order.md
|
docs/Order.md
|
||||||
|
docs/Page.md
|
||||||
docs/Person.md
|
docs/Person.md
|
||||||
docs/Pet.md
|
docs/Pet.md
|
||||||
docs/PetApi.md
|
docs/PetApi.md
|
||||||
@ -59,6 +60,7 @@ src/models/nullable_array.rs
|
|||||||
src/models/numeric_enum_testing.rs
|
src/models/numeric_enum_testing.rs
|
||||||
src/models/optional_testing.rs
|
src/models/optional_testing.rs
|
||||||
src/models/order.rs
|
src/models/order.rs
|
||||||
|
src/models/page.rs
|
||||||
src/models/person.rs
|
src/models/person.rs
|
||||||
src/models/pet.rs
|
src/models/pet.rs
|
||||||
src/models/property_test.rs
|
src/models/property_test.rs
|
||||||
|
@ -32,6 +32,8 @@ Class | Method | HTTP request | Description
|
|||||||
*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* | [**pets_explode_post**](docs/PetApi.md#pets_explode_post) | **POST** /pets/explode | List all pets
|
||||||
|
*PetApi* | [**pets_post**](docs/PetApi.md#pets_post) | **POST** /pets | List all pets
|
||||||
*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
|
||||||
@ -68,6 +70,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [NumericEnumTesting](docs/NumericEnumTesting.md)
|
- [NumericEnumTesting](docs/NumericEnumTesting.md)
|
||||||
- [OptionalTesting](docs/OptionalTesting.md)
|
- [OptionalTesting](docs/OptionalTesting.md)
|
||||||
- [Order](docs/Order.md)
|
- [Order](docs/Order.md)
|
||||||
|
- [Page](docs/Page.md)
|
||||||
- [Person](docs/Person.md)
|
- [Person](docs/Person.md)
|
||||||
- [Pet](docs/Pet.md)
|
- [Pet](docs/Pet.md)
|
||||||
- [PropertyTest](docs/PropertyTest.md)
|
- [PropertyTest](docs/PropertyTest.md)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# Page
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**page** | Option<**i32**> | | [optional]
|
||||||
|
**per_page** | Option<**i32**> | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -9,6 +9,8 @@ Method | HTTP request | Description
|
|||||||
[**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
|
||||||
|
[**pets_explode_post**](PetApi.md#pets_explode_post) | **POST** /pets/explode | List all pets
|
||||||
|
[**pets_post**](PetApi.md#pets_post) | **POST** /pets | List all pets
|
||||||
[**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
|
||||||
@ -167,6 +169,66 @@ Name | Type | Description | Required | Notes
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## pets_explode_post
|
||||||
|
|
||||||
|
> Vec<models::Pet> pets_explode_post(page_explode)
|
||||||
|
List all pets
|
||||||
|
|
||||||
|
Returns a list of pets
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**page_explode** | Option<[**Page**](.md)> | Object containing page `size` and page `number`. | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<models::Pet>**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## pets_post
|
||||||
|
|
||||||
|
> Vec<models::Pet> pets_post(page)
|
||||||
|
List all pets
|
||||||
|
|
||||||
|
Returns a list of pets
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**page** | Option<[**Page**](.md)> | The page number | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<models::Pet>**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
## update_pet
|
## update_pet
|
||||||
|
|
||||||
> models::Pet update_pet(pet)
|
> models::Pet update_pet(pet)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# PetsExplodePostPageExplodeParameter
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**size** | Option<**i64**> | The page size. | [optional][default to 10]
|
||||||
|
**number** | Option<**i64**> | The page number. | [optional][default to 1]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
# PetsExplodePostPageParameter
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**size** | Option<**i64**> | The page size. | [optional][default to 10]
|
||||||
|
**number** | Option<**i64**> | The page number. | [optional][default to 1]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -52,6 +52,20 @@ pub struct GetPetByIdParams {
|
|||||||
pub pet_id: i64
|
pub pet_id: i64
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// struct for passing parameters to the method [`pets_explode_post`]
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct PetsExplodePostParams {
|
||||||
|
/// Object containing page `size` and page `number`.
|
||||||
|
pub page_explode: Option<models::Page>
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for passing parameters to the method [`pets_post`]
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct PetsPostParams {
|
||||||
|
/// The page number
|
||||||
|
pub page: Option<models::Page>
|
||||||
|
}
|
||||||
|
|
||||||
/// struct for passing parameters to the method [`update_pet`]
|
/// struct for passing parameters to the method [`update_pet`]
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct UpdatePetParams {
|
pub struct UpdatePetParams {
|
||||||
@ -121,6 +135,22 @@ pub enum GetPetByIdSuccess {
|
|||||||
UnknownValue(serde_json::Value),
|
UnknownValue(serde_json::Value),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// struct for typed successes of method [`pets_explode_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsExplodePostSuccess {
|
||||||
|
Status200(Vec<models::Pet>),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed successes of method [`pets_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsPostSuccess {
|
||||||
|
Status200(Vec<models::Pet>),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
/// struct for typed successes of method [`update_pet`]
|
/// struct for typed successes of method [`update_pet`]
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
#[serde(untagged)]
|
#[serde(untagged)]
|
||||||
@ -185,6 +215,22 @@ pub enum GetPetByIdError {
|
|||||||
UnknownValue(serde_json::Value),
|
UnknownValue(serde_json::Value),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method [`pets_explode_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsExplodePostError {
|
||||||
|
Status400(),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method [`pets_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsPostError {
|
||||||
|
Status400(),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
/// struct for typed errors of method [`update_pet`]
|
/// struct for typed errors of method [`update_pet`]
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
#[serde(untagged)]
|
#[serde(untagged)]
|
||||||
@ -379,6 +425,64 @@ pub async fn get_pet_by_id(configuration: &configuration::Configuration, params:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns a list of pets
|
||||||
|
pub async fn pets_explode_post(configuration: &configuration::Configuration, params: PetsExplodePostParams) -> Result<ResponseContent<PetsExplodePostSuccess>, Error<PetsExplodePostError>> {
|
||||||
|
|
||||||
|
let uri_str = format!("{}/pets/explode", configuration.base_path);
|
||||||
|
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
||||||
|
|
||||||
|
if let Some(ref param_value) = params.page_explode {
|
||||||
|
req_builder = req_builder.query(¶m_value);
|
||||||
|
}
|
||||||
|
if let Some(ref user_agent) = configuration.user_agent {
|
||||||
|
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
||||||
|
}
|
||||||
|
|
||||||
|
let req = req_builder.build()?;
|
||||||
|
let resp = configuration.client.execute(req).await?;
|
||||||
|
|
||||||
|
let status = resp.status();
|
||||||
|
|
||||||
|
if !status.is_client_error() && !status.is_server_error() {
|
||||||
|
let content = resp.text().await?;
|
||||||
|
let entity: Option<PetsExplodePostSuccess> = serde_json::from_str(&content).ok();
|
||||||
|
Ok(ResponseContent { status, content, entity })
|
||||||
|
} else {
|
||||||
|
let content = resp.text().await?;
|
||||||
|
let entity: Option<PetsExplodePostError> = serde_json::from_str(&content).ok();
|
||||||
|
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a list of pets
|
||||||
|
pub async fn pets_post(configuration: &configuration::Configuration, params: PetsPostParams) -> Result<ResponseContent<PetsPostSuccess>, Error<PetsPostError>> {
|
||||||
|
|
||||||
|
let uri_str = format!("{}/pets", configuration.base_path);
|
||||||
|
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
||||||
|
|
||||||
|
if let Some(ref param_value) = params.page {
|
||||||
|
req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref user_agent) = configuration.user_agent {
|
||||||
|
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
||||||
|
}
|
||||||
|
|
||||||
|
let req = req_builder.build()?;
|
||||||
|
let resp = configuration.client.execute(req).await?;
|
||||||
|
|
||||||
|
let status = resp.status();
|
||||||
|
|
||||||
|
if !status.is_client_error() && !status.is_server_error() {
|
||||||
|
let content = resp.text().await?;
|
||||||
|
let entity: Option<PetsPostSuccess> = serde_json::from_str(&content).ok();
|
||||||
|
Ok(ResponseContent { status, content, entity })
|
||||||
|
} else {
|
||||||
|
let content = resp.text().await?;
|
||||||
|
let entity: Option<PetsPostError> = serde_json::from_str(&content).ok();
|
||||||
|
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
pub async fn update_pet(configuration: &configuration::Configuration, params: UpdatePetParams) -> Result<ResponseContent<UpdatePetSuccess>, Error<UpdatePetError>> {
|
pub async fn update_pet(configuration: &configuration::Configuration, params: UpdatePetParams) -> Result<ResponseContent<UpdatePetSuccess>, Error<UpdatePetError>> {
|
||||||
|
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct PetsExplodePostPageExplodeParameter {
|
||||||
|
/// The page size.
|
||||||
|
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub size: Option<i64>,
|
||||||
|
/// The page number.
|
||||||
|
#[serde(rename = "number", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub number: Option<i64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PetsExplodePostPageExplodeParameter {
|
||||||
|
pub fn new() -> PetsExplodePostPageExplodeParameter {
|
||||||
|
PetsExplodePostPageExplodeParameter {
|
||||||
|
size: None,
|
||||||
|
number: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct PetsExplodePostPageParameter {
|
||||||
|
/// The page size.
|
||||||
|
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub size: Option<i64>,
|
||||||
|
/// The page number.
|
||||||
|
#[serde(rename = "number", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub number: Option<i64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PetsExplodePostPageParameter {
|
||||||
|
pub fn new() -> PetsExplodePostPageParameter {
|
||||||
|
PetsExplodePostPageParameter {
|
||||||
|
size: None,
|
||||||
|
number: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,6 +24,8 @@ pub mod optional_testing;
|
|||||||
pub use self::optional_testing::OptionalTesting;
|
pub use self::optional_testing::OptionalTesting;
|
||||||
pub mod order;
|
pub mod order;
|
||||||
pub use self::order::Order;
|
pub use self::order::Order;
|
||||||
|
pub mod page;
|
||||||
|
pub use self::page::Page;
|
||||||
pub mod person;
|
pub mod person;
|
||||||
pub use self::person::Person;
|
pub use self::person::Person;
|
||||||
pub mod pet;
|
pub mod pet;
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct Page {
|
||||||
|
#[serde(rename = "page", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub page: Option<i32>,
|
||||||
|
#[serde(rename = "perPage", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub per_page: Option<i32>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Page {
|
||||||
|
pub fn new() -> Page {
|
||||||
|
Page {
|
||||||
|
page: None,
|
||||||
|
per_page: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -16,6 +16,7 @@ docs/NullableArray.md
|
|||||||
docs/NumericEnumTesting.md
|
docs/NumericEnumTesting.md
|
||||||
docs/OptionalTesting.md
|
docs/OptionalTesting.md
|
||||||
docs/Order.md
|
docs/Order.md
|
||||||
|
docs/Page.md
|
||||||
docs/Person.md
|
docs/Person.md
|
||||||
docs/Pet.md
|
docs/Pet.md
|
||||||
docs/PetApi.md
|
docs/PetApi.md
|
||||||
@ -59,6 +60,7 @@ src/models/nullable_array.rs
|
|||||||
src/models/numeric_enum_testing.rs
|
src/models/numeric_enum_testing.rs
|
||||||
src/models/optional_testing.rs
|
src/models/optional_testing.rs
|
||||||
src/models/order.rs
|
src/models/order.rs
|
||||||
|
src/models/page.rs
|
||||||
src/models/person.rs
|
src/models/person.rs
|
||||||
src/models/pet.rs
|
src/models/pet.rs
|
||||||
src/models/property_test.rs
|
src/models/property_test.rs
|
||||||
|
@ -32,6 +32,8 @@ Class | Method | HTTP request | Description
|
|||||||
*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* | [**pets_explode_post**](docs/PetApi.md#pets_explode_post) | **POST** /pets/explode | List all pets
|
||||||
|
*PetApi* | [**pets_post**](docs/PetApi.md#pets_post) | **POST** /pets | List all pets
|
||||||
*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
|
||||||
@ -68,6 +70,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [NumericEnumTesting](docs/NumericEnumTesting.md)
|
- [NumericEnumTesting](docs/NumericEnumTesting.md)
|
||||||
- [OptionalTesting](docs/OptionalTesting.md)
|
- [OptionalTesting](docs/OptionalTesting.md)
|
||||||
- [Order](docs/Order.md)
|
- [Order](docs/Order.md)
|
||||||
|
- [Page](docs/Page.md)
|
||||||
- [Person](docs/Person.md)
|
- [Person](docs/Person.md)
|
||||||
- [Pet](docs/Pet.md)
|
- [Pet](docs/Pet.md)
|
||||||
- [PropertyTest](docs/PropertyTest.md)
|
- [PropertyTest](docs/PropertyTest.md)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# Page
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**page** | Option<**i32**> | | [optional]
|
||||||
|
**per_page** | Option<**i32**> | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -9,6 +9,8 @@ Method | HTTP request | Description
|
|||||||
[**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
|
||||||
|
[**pets_explode_post**](PetApi.md#pets_explode_post) | **POST** /pets/explode | List all pets
|
||||||
|
[**pets_post**](PetApi.md#pets_post) | **POST** /pets | List all pets
|
||||||
[**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
|
||||||
@ -167,6 +169,66 @@ Name | Type | Description | Required | Notes
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## pets_explode_post
|
||||||
|
|
||||||
|
> Vec<models::Pet> pets_explode_post(page_explode)
|
||||||
|
List all pets
|
||||||
|
|
||||||
|
Returns a list of pets
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**page_explode** | Option<[**Page**](.md)> | Object containing page `size` and page `number`. | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<models::Pet>**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## pets_post
|
||||||
|
|
||||||
|
> Vec<models::Pet> pets_post(page)
|
||||||
|
List all pets
|
||||||
|
|
||||||
|
Returns a list of pets
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**page** | Option<[**Page**](.md)> | The page number | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<models::Pet>**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
## update_pet
|
## update_pet
|
||||||
|
|
||||||
> models::Pet update_pet(pet)
|
> models::Pet update_pet(pet)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# PetsExplodePostPageExplodeParameter
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**size** | Option<**i64**> | The page size. | [optional][default to 10]
|
||||||
|
**number** | Option<**i64**> | The page number. | [optional][default to 1]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
# PetsExplodePostPageParameter
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**size** | Option<**i64**> | The page size. | [optional][default to 10]
|
||||||
|
**number** | Option<**i64**> | The page number. | [optional][default to 1]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -52,6 +52,20 @@ pub struct GetPetByIdParams {
|
|||||||
pub pet_id: i64
|
pub pet_id: i64
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// struct for passing parameters to the method [`pets_explode_post`]
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct PetsExplodePostParams {
|
||||||
|
/// Object containing page `size` and page `number`.
|
||||||
|
pub page_explode: Option<models::Page>
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for passing parameters to the method [`pets_post`]
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct PetsPostParams {
|
||||||
|
/// The page number
|
||||||
|
pub page: Option<models::Page>
|
||||||
|
}
|
||||||
|
|
||||||
/// struct for passing parameters to the method [`update_pet`]
|
/// struct for passing parameters to the method [`update_pet`]
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct UpdatePetParams {
|
pub struct UpdatePetParams {
|
||||||
@ -121,6 +135,22 @@ pub enum GetPetByIdSuccess {
|
|||||||
UnknownValue(serde_json::Value),
|
UnknownValue(serde_json::Value),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// struct for typed successes of method [`pets_explode_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsExplodePostSuccess {
|
||||||
|
Status200(Vec<models::Pet>),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed successes of method [`pets_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsPostSuccess {
|
||||||
|
Status200(Vec<models::Pet>),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
/// struct for typed successes of method [`update_pet`]
|
/// struct for typed successes of method [`update_pet`]
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
#[serde(untagged)]
|
#[serde(untagged)]
|
||||||
@ -185,6 +215,22 @@ pub enum GetPetByIdError {
|
|||||||
UnknownValue(serde_json::Value),
|
UnknownValue(serde_json::Value),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method [`pets_explode_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsExplodePostError {
|
||||||
|
Status400(),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method [`pets_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsPostError {
|
||||||
|
Status400(),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
/// struct for typed errors of method [`update_pet`]
|
/// struct for typed errors of method [`update_pet`]
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
#[serde(untagged)]
|
#[serde(untagged)]
|
||||||
@ -379,6 +425,64 @@ pub async fn get_pet_by_id(configuration: &configuration::Configuration, params:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns a list of pets
|
||||||
|
pub async fn pets_explode_post(configuration: &configuration::Configuration, params: PetsExplodePostParams) -> Result<ResponseContent<PetsExplodePostSuccess>, Error<PetsExplodePostError>> {
|
||||||
|
|
||||||
|
let uri_str = format!("{}/pets/explode", configuration.base_path);
|
||||||
|
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
||||||
|
|
||||||
|
if let Some(ref param_value) = params.page_explode {
|
||||||
|
req_builder = req_builder.query(¶m_value);
|
||||||
|
}
|
||||||
|
if let Some(ref user_agent) = configuration.user_agent {
|
||||||
|
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
||||||
|
}
|
||||||
|
|
||||||
|
let req = req_builder.build()?;
|
||||||
|
let resp = configuration.client.execute(req).await?;
|
||||||
|
|
||||||
|
let status = resp.status();
|
||||||
|
|
||||||
|
if !status.is_client_error() && !status.is_server_error() {
|
||||||
|
let content = resp.text().await?;
|
||||||
|
let entity: Option<PetsExplodePostSuccess> = serde_json::from_str(&content).ok();
|
||||||
|
Ok(ResponseContent { status, content, entity })
|
||||||
|
} else {
|
||||||
|
let content = resp.text().await?;
|
||||||
|
let entity: Option<PetsExplodePostError> = serde_json::from_str(&content).ok();
|
||||||
|
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a list of pets
|
||||||
|
pub async fn pets_post(configuration: &configuration::Configuration, params: PetsPostParams) -> Result<ResponseContent<PetsPostSuccess>, Error<PetsPostError>> {
|
||||||
|
|
||||||
|
let uri_str = format!("{}/pets", configuration.base_path);
|
||||||
|
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
||||||
|
|
||||||
|
if let Some(ref param_value) = params.page {
|
||||||
|
req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref user_agent) = configuration.user_agent {
|
||||||
|
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
||||||
|
}
|
||||||
|
|
||||||
|
let req = req_builder.build()?;
|
||||||
|
let resp = configuration.client.execute(req).await?;
|
||||||
|
|
||||||
|
let status = resp.status();
|
||||||
|
|
||||||
|
if !status.is_client_error() && !status.is_server_error() {
|
||||||
|
let content = resp.text().await?;
|
||||||
|
let entity: Option<PetsPostSuccess> = serde_json::from_str(&content).ok();
|
||||||
|
Ok(ResponseContent { status, content, entity })
|
||||||
|
} else {
|
||||||
|
let content = resp.text().await?;
|
||||||
|
let entity: Option<PetsPostError> = serde_json::from_str(&content).ok();
|
||||||
|
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
pub async fn update_pet(configuration: &configuration::Configuration, params: UpdatePetParams) -> Result<ResponseContent<UpdatePetSuccess>, Error<UpdatePetError>> {
|
pub async fn update_pet(configuration: &configuration::Configuration, params: UpdatePetParams) -> Result<ResponseContent<UpdatePetSuccess>, Error<UpdatePetError>> {
|
||||||
|
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct PetsExplodePostPageExplodeParameter {
|
||||||
|
/// The page size.
|
||||||
|
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub size: Option<i64>,
|
||||||
|
/// The page number.
|
||||||
|
#[serde(rename = "number", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub number: Option<i64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PetsExplodePostPageExplodeParameter {
|
||||||
|
pub fn new() -> PetsExplodePostPageExplodeParameter {
|
||||||
|
PetsExplodePostPageExplodeParameter {
|
||||||
|
size: None,
|
||||||
|
number: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct PetsExplodePostPageParameter {
|
||||||
|
/// The page size.
|
||||||
|
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub size: Option<i64>,
|
||||||
|
/// The page number.
|
||||||
|
#[serde(rename = "number", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub number: Option<i64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PetsExplodePostPageParameter {
|
||||||
|
pub fn new() -> PetsExplodePostPageParameter {
|
||||||
|
PetsExplodePostPageParameter {
|
||||||
|
size: None,
|
||||||
|
number: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,6 +24,8 @@ pub mod optional_testing;
|
|||||||
pub use self::optional_testing::OptionalTesting;
|
pub use self::optional_testing::OptionalTesting;
|
||||||
pub mod order;
|
pub mod order;
|
||||||
pub use self::order::Order;
|
pub use self::order::Order;
|
||||||
|
pub mod page;
|
||||||
|
pub use self::page::Page;
|
||||||
pub mod person;
|
pub mod person;
|
||||||
pub use self::person::Person;
|
pub use self::person::Person;
|
||||||
pub mod pet;
|
pub mod pet;
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct Page {
|
||||||
|
#[serde(rename = "page", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub page: Option<i32>,
|
||||||
|
#[serde(rename = "perPage", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub per_page: Option<i32>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Page {
|
||||||
|
pub fn new() -> Page {
|
||||||
|
Page {
|
||||||
|
page: None,
|
||||||
|
per_page: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -16,6 +16,7 @@ docs/NullableArray.md
|
|||||||
docs/NumericEnumTesting.md
|
docs/NumericEnumTesting.md
|
||||||
docs/OptionalTesting.md
|
docs/OptionalTesting.md
|
||||||
docs/Order.md
|
docs/Order.md
|
||||||
|
docs/Page.md
|
||||||
docs/Person.md
|
docs/Person.md
|
||||||
docs/Pet.md
|
docs/Pet.md
|
||||||
docs/PetApi.md
|
docs/PetApi.md
|
||||||
@ -59,6 +60,7 @@ src/models/nullable_array.rs
|
|||||||
src/models/numeric_enum_testing.rs
|
src/models/numeric_enum_testing.rs
|
||||||
src/models/optional_testing.rs
|
src/models/optional_testing.rs
|
||||||
src/models/order.rs
|
src/models/order.rs
|
||||||
|
src/models/page.rs
|
||||||
src/models/person.rs
|
src/models/person.rs
|
||||||
src/models/pet.rs
|
src/models/pet.rs
|
||||||
src/models/property_test.rs
|
src/models/property_test.rs
|
||||||
|
@ -32,6 +32,8 @@ Class | Method | HTTP request | Description
|
|||||||
*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* | [**pets_explode_post**](docs/PetApi.md#pets_explode_post) | **POST** /pets/explode | List all pets
|
||||||
|
*PetApi* | [**pets_post**](docs/PetApi.md#pets_post) | **POST** /pets | List all pets
|
||||||
*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
|
||||||
@ -68,6 +70,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [NumericEnumTesting](docs/NumericEnumTesting.md)
|
- [NumericEnumTesting](docs/NumericEnumTesting.md)
|
||||||
- [OptionalTesting](docs/OptionalTesting.md)
|
- [OptionalTesting](docs/OptionalTesting.md)
|
||||||
- [Order](docs/Order.md)
|
- [Order](docs/Order.md)
|
||||||
|
- [Page](docs/Page.md)
|
||||||
- [Person](docs/Person.md)
|
- [Person](docs/Person.md)
|
||||||
- [Pet](docs/Pet.md)
|
- [Pet](docs/Pet.md)
|
||||||
- [PropertyTest](docs/PropertyTest.md)
|
- [PropertyTest](docs/PropertyTest.md)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# Page
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**page** | Option<**i32**> | | [optional]
|
||||||
|
**per_page** | Option<**i32**> | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -9,6 +9,8 @@ Method | HTTP request | Description
|
|||||||
[**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
|
||||||
|
[**pets_explode_post**](PetApi.md#pets_explode_post) | **POST** /pets/explode | List all pets
|
||||||
|
[**pets_post**](PetApi.md#pets_post) | **POST** /pets | List all pets
|
||||||
[**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
|
||||||
@ -167,6 +169,66 @@ Name | Type | Description | Required | Notes
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## pets_explode_post
|
||||||
|
|
||||||
|
> Vec<models::Pet> pets_explode_post(page_explode)
|
||||||
|
List all pets
|
||||||
|
|
||||||
|
Returns a list of pets
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**page_explode** | Option<[**Page**](.md)> | Object containing page `size` and page `number`. | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<models::Pet>**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## pets_post
|
||||||
|
|
||||||
|
> Vec<models::Pet> pets_post(page)
|
||||||
|
List all pets
|
||||||
|
|
||||||
|
Returns a list of pets
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**page** | Option<[**Page**](.md)> | The page number | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<models::Pet>**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
## update_pet
|
## update_pet
|
||||||
|
|
||||||
> models::Pet update_pet(pet)
|
> models::Pet update_pet(pet)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# PetsExplodePostPageExplodeParameter
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**size** | Option<**i64**> | The page size. | [optional][default to 10]
|
||||||
|
**number** | Option<**i64**> | The page number. | [optional][default to 1]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
# PetsExplodePostPageParameter
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**size** | Option<**i64**> | The page size. | [optional][default to 10]
|
||||||
|
**number** | Option<**i64**> | The page number. | [optional][default to 1]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -56,6 +56,22 @@ pub enum GetPetByIdError {
|
|||||||
UnknownValue(serde_json::Value),
|
UnknownValue(serde_json::Value),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method [`pets_explode_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsExplodePostError {
|
||||||
|
Status400(),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method [`pets_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsPostError {
|
||||||
|
Status400(),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
/// struct for typed errors of method [`update_pet`]
|
/// struct for typed errors of method [`update_pet`]
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
#[serde(untagged)]
|
#[serde(untagged)]
|
||||||
@ -361,6 +377,86 @@ pub fn get_pet_by_id(configuration: &configuration::Configuration, pet_id: i64)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns a list of pets
|
||||||
|
pub fn pets_explode_post(configuration: &configuration::Configuration, page_explode: Option<models::Page>) -> Result<Vec<models::Pet>, Error<PetsExplodePostError>> {
|
||||||
|
// add a prefix to parameters to efficiently prevent name collisions
|
||||||
|
let p_page_explode = page_explode;
|
||||||
|
|
||||||
|
let uri_str = format!("{}/pets/explode", configuration.base_path);
|
||||||
|
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
||||||
|
|
||||||
|
if let Some(ref param_value) = p_page_explode {
|
||||||
|
req_builder = req_builder.query(¶m_value);
|
||||||
|
}
|
||||||
|
if let Some(ref user_agent) = configuration.user_agent {
|
||||||
|
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
||||||
|
}
|
||||||
|
|
||||||
|
let req = req_builder.build()?;
|
||||||
|
let resp = configuration.client.execute(req)?;
|
||||||
|
|
||||||
|
let status = resp.status();
|
||||||
|
let content_type = resp
|
||||||
|
.headers()
|
||||||
|
.get("content-type")
|
||||||
|
.and_then(|v| v.to_str().ok())
|
||||||
|
.unwrap_or("application/octet-stream");
|
||||||
|
let content_type = super::ContentType::from(content_type);
|
||||||
|
|
||||||
|
if !status.is_client_error() && !status.is_server_error() {
|
||||||
|
let content = resp.text()?;
|
||||||
|
match content_type {
|
||||||
|
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
|
||||||
|
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Pet>`"))),
|
||||||
|
ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Pet>`")))),
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let content = resp.text()?;
|
||||||
|
let entity: Option<PetsExplodePostError> = serde_json::from_str(&content).ok();
|
||||||
|
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a list of pets
|
||||||
|
pub fn pets_post(configuration: &configuration::Configuration, page: Option<models::Page>) -> Result<Vec<models::Pet>, Error<PetsPostError>> {
|
||||||
|
// add a prefix to parameters to efficiently prevent name collisions
|
||||||
|
let p_page = page;
|
||||||
|
|
||||||
|
let uri_str = format!("{}/pets", configuration.base_path);
|
||||||
|
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
||||||
|
|
||||||
|
if let Some(ref param_value) = p_page {
|
||||||
|
req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref user_agent) = configuration.user_agent {
|
||||||
|
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
||||||
|
}
|
||||||
|
|
||||||
|
let req = req_builder.build()?;
|
||||||
|
let resp = configuration.client.execute(req)?;
|
||||||
|
|
||||||
|
let status = resp.status();
|
||||||
|
let content_type = resp
|
||||||
|
.headers()
|
||||||
|
.get("content-type")
|
||||||
|
.and_then(|v| v.to_str().ok())
|
||||||
|
.unwrap_or("application/octet-stream");
|
||||||
|
let content_type = super::ContentType::from(content_type);
|
||||||
|
|
||||||
|
if !status.is_client_error() && !status.is_server_error() {
|
||||||
|
let content = resp.text()?;
|
||||||
|
match content_type {
|
||||||
|
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
|
||||||
|
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Pet>`"))),
|
||||||
|
ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Pet>`")))),
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let content = resp.text()?;
|
||||||
|
let entity: Option<PetsPostError> = serde_json::from_str(&content).ok();
|
||||||
|
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
pub fn update_pet(configuration: &configuration::Configuration, pet: models::Pet) -> Result<models::Pet, Error<UpdatePetError>> {
|
pub fn update_pet(configuration: &configuration::Configuration, pet: models::Pet) -> Result<models::Pet, Error<UpdatePetError>> {
|
||||||
// add a prefix to parameters to efficiently prevent name collisions
|
// add a prefix to parameters to efficiently prevent name collisions
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct PetsExplodePostPageExplodeParameter {
|
||||||
|
/// The page size.
|
||||||
|
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub size: Option<i64>,
|
||||||
|
/// The page number.
|
||||||
|
#[serde(rename = "number", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub number: Option<i64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PetsExplodePostPageExplodeParameter {
|
||||||
|
pub fn new() -> PetsExplodePostPageExplodeParameter {
|
||||||
|
PetsExplodePostPageExplodeParameter {
|
||||||
|
size: None,
|
||||||
|
number: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct PetsExplodePostPageParameter {
|
||||||
|
/// The page size.
|
||||||
|
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub size: Option<i64>,
|
||||||
|
/// The page number.
|
||||||
|
#[serde(rename = "number", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub number: Option<i64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PetsExplodePostPageParameter {
|
||||||
|
pub fn new() -> PetsExplodePostPageParameter {
|
||||||
|
PetsExplodePostPageParameter {
|
||||||
|
size: None,
|
||||||
|
number: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,6 +24,8 @@ pub mod optional_testing;
|
|||||||
pub use self::optional_testing::OptionalTesting;
|
pub use self::optional_testing::OptionalTesting;
|
||||||
pub mod order;
|
pub mod order;
|
||||||
pub use self::order::Order;
|
pub use self::order::Order;
|
||||||
|
pub mod page;
|
||||||
|
pub use self::page::Page;
|
||||||
pub mod person;
|
pub mod person;
|
||||||
pub use self::person::Person;
|
pub use self::person::Person;
|
||||||
pub mod pet;
|
pub mod pet;
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct Page {
|
||||||
|
#[serde(rename = "page", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub page: Option<i32>,
|
||||||
|
#[serde(rename = "perPage", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub per_page: Option<i32>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Page {
|
||||||
|
pub fn new() -> Page {
|
||||||
|
Page {
|
||||||
|
page: None,
|
||||||
|
per_page: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -16,6 +16,7 @@ docs/FooNullableArray.md
|
|||||||
docs/FooNumericEnumTesting.md
|
docs/FooNumericEnumTesting.md
|
||||||
docs/FooOptionalTesting.md
|
docs/FooOptionalTesting.md
|
||||||
docs/FooOrder.md
|
docs/FooOrder.md
|
||||||
|
docs/FooPage.md
|
||||||
docs/FooPerson.md
|
docs/FooPerson.md
|
||||||
docs/FooPet.md
|
docs/FooPet.md
|
||||||
docs/FooPropertyTest.md
|
docs/FooPropertyTest.md
|
||||||
@ -56,6 +57,7 @@ src/models/foo_nullable_array.rs
|
|||||||
src/models/foo_numeric_enum_testing.rs
|
src/models/foo_numeric_enum_testing.rs
|
||||||
src/models/foo_optional_testing.rs
|
src/models/foo_optional_testing.rs
|
||||||
src/models/foo_order.rs
|
src/models/foo_order.rs
|
||||||
|
src/models/foo_page.rs
|
||||||
src/models/foo_person.rs
|
src/models/foo_person.rs
|
||||||
src/models/foo_pet.rs
|
src/models/foo_pet.rs
|
||||||
src/models/foo_property_test.rs
|
src/models/foo_property_test.rs
|
||||||
|
@ -32,6 +32,8 @@ Class | Method | HTTP request | Description
|
|||||||
*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* | [**pets_explode_post**](docs/PetApi.md#pets_explode_post) | **POST** /pets/explode | List all pets
|
||||||
|
*PetApi* | [**pets_post**](docs/PetApi.md#pets_post) | **POST** /pets | List all pets
|
||||||
*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
|
||||||
@ -68,6 +70,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [FooNumericEnumTesting](docs/FooNumericEnumTesting.md)
|
- [FooNumericEnumTesting](docs/FooNumericEnumTesting.md)
|
||||||
- [FooOptionalTesting](docs/FooOptionalTesting.md)
|
- [FooOptionalTesting](docs/FooOptionalTesting.md)
|
||||||
- [FooOrder](docs/FooOrder.md)
|
- [FooOrder](docs/FooOrder.md)
|
||||||
|
- [FooPage](docs/FooPage.md)
|
||||||
- [FooPerson](docs/FooPerson.md)
|
- [FooPerson](docs/FooPerson.md)
|
||||||
- [FooPet](docs/FooPet.md)
|
- [FooPet](docs/FooPet.md)
|
||||||
- [FooPropertyTest](docs/FooPropertyTest.md)
|
- [FooPropertyTest](docs/FooPropertyTest.md)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# FooPage
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**page** | Option<**i32**> | | [optional]
|
||||||
|
**per_page** | Option<**i32**> | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
# FooPetsExplodePostPageExplodeParameter
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**size** | Option<**i64**> | The page size. | [optional][default to 10]
|
||||||
|
**number** | Option<**i64**> | The page number. | [optional][default to 1]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
# FooPetsExplodePostPageParameter
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**size** | Option<**i64**> | The page size. | [optional][default to 10]
|
||||||
|
**number** | Option<**i64**> | The page number. | [optional][default to 1]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -9,6 +9,8 @@ Method | HTTP request | Description
|
|||||||
[**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
|
||||||
|
[**pets_explode_post**](PetApi.md#pets_explode_post) | **POST** /pets/explode | List all pets
|
||||||
|
[**pets_post**](PetApi.md#pets_post) | **POST** /pets | List all pets
|
||||||
[**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
|
||||||
@ -167,6 +169,66 @@ Name | Type | Description | Required | Notes
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## pets_explode_post
|
||||||
|
|
||||||
|
> Vec<models::FooPet> pets_explode_post(page_explode)
|
||||||
|
List all pets
|
||||||
|
|
||||||
|
Returns a list of pets
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**page_explode** | Option<[**FooPage**](.md)> | Object containing page `size` and page `number`. | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<models::FooPet>**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## pets_post
|
||||||
|
|
||||||
|
> Vec<models::FooPet> pets_post(page)
|
||||||
|
List all pets
|
||||||
|
|
||||||
|
Returns a list of pets
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**page** | Option<[**FooPage**](.md)> | The page number | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<models::FooPet>**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
## update_pet
|
## update_pet
|
||||||
|
|
||||||
> models::FooPet update_pet(foo_pet)
|
> models::FooPet update_pet(foo_pet)
|
||||||
|
@ -56,6 +56,22 @@ pub enum GetPetByIdError {
|
|||||||
UnknownValue(serde_json::Value),
|
UnknownValue(serde_json::Value),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method [`pets_explode_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsExplodePostError {
|
||||||
|
Status400(),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method [`pets_post`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum PetsPostError {
|
||||||
|
Status400(),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
/// struct for typed errors of method [`update_pet`]
|
/// struct for typed errors of method [`update_pet`]
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
#[serde(untagged)]
|
#[serde(untagged)]
|
||||||
@ -296,6 +312,86 @@ pub fn get_pet_by_id(configuration: &configuration::Configuration, pet_id: i64)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns a list of pets
|
||||||
|
pub fn pets_explode_post(configuration: &configuration::Configuration, page_explode: Option<models::FooPage>) -> Result<Vec<models::FooPet>, Error<PetsExplodePostError>> {
|
||||||
|
// add a prefix to parameters to efficiently prevent name collisions
|
||||||
|
let p_page_explode = page_explode;
|
||||||
|
|
||||||
|
let uri_str = format!("{}/pets/explode", configuration.base_path);
|
||||||
|
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
||||||
|
|
||||||
|
if let Some(ref param_value) = p_page_explode {
|
||||||
|
req_builder = req_builder.query(¶m_value);
|
||||||
|
}
|
||||||
|
if let Some(ref user_agent) = configuration.user_agent {
|
||||||
|
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
||||||
|
}
|
||||||
|
|
||||||
|
let req = req_builder.build()?;
|
||||||
|
let resp = configuration.client.execute(req)?;
|
||||||
|
|
||||||
|
let status = resp.status();
|
||||||
|
let content_type = resp
|
||||||
|
.headers()
|
||||||
|
.get("content-type")
|
||||||
|
.and_then(|v| v.to_str().ok())
|
||||||
|
.unwrap_or("application/octet-stream");
|
||||||
|
let content_type = super::ContentType::from(content_type);
|
||||||
|
|
||||||
|
if !status.is_client_error() && !status.is_server_error() {
|
||||||
|
let content = resp.text()?;
|
||||||
|
match content_type {
|
||||||
|
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
|
||||||
|
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::FooPet>`"))),
|
||||||
|
ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::FooPet>`")))),
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let content = resp.text()?;
|
||||||
|
let entity: Option<PetsExplodePostError> = serde_json::from_str(&content).ok();
|
||||||
|
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a list of pets
|
||||||
|
pub fn pets_post(configuration: &configuration::Configuration, page: Option<models::FooPage>) -> Result<Vec<models::FooPet>, Error<PetsPostError>> {
|
||||||
|
// add a prefix to parameters to efficiently prevent name collisions
|
||||||
|
let p_page = page;
|
||||||
|
|
||||||
|
let uri_str = format!("{}/pets", configuration.base_path);
|
||||||
|
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
||||||
|
|
||||||
|
if let Some(ref param_value) = p_page {
|
||||||
|
req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref user_agent) = configuration.user_agent {
|
||||||
|
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
||||||
|
}
|
||||||
|
|
||||||
|
let req = req_builder.build()?;
|
||||||
|
let resp = configuration.client.execute(req)?;
|
||||||
|
|
||||||
|
let status = resp.status();
|
||||||
|
let content_type = resp
|
||||||
|
.headers()
|
||||||
|
.get("content-type")
|
||||||
|
.and_then(|v| v.to_str().ok())
|
||||||
|
.unwrap_or("application/octet-stream");
|
||||||
|
let content_type = super::ContentType::from(content_type);
|
||||||
|
|
||||||
|
if !status.is_client_error() && !status.is_server_error() {
|
||||||
|
let content = resp.text()?;
|
||||||
|
match content_type {
|
||||||
|
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
|
||||||
|
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::FooPet>`"))),
|
||||||
|
ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::FooPet>`")))),
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let content = resp.text()?;
|
||||||
|
let entity: Option<PetsPostError> = serde_json::from_str(&content).ok();
|
||||||
|
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
pub fn update_pet(configuration: &configuration::Configuration, foo_pet: models::FooPet) -> Result<models::FooPet, Error<UpdatePetError>> {
|
pub fn update_pet(configuration: &configuration::Configuration, foo_pet: models::FooPet) -> Result<models::FooPet, Error<UpdatePetError>> {
|
||||||
// add a prefix to parameters to efficiently prevent name collisions
|
// add a prefix to parameters to efficiently prevent name collisions
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct FooPetsExplodePostPageExplodeParameter {
|
||||||
|
/// The page size.
|
||||||
|
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub size: Option<i64>,
|
||||||
|
/// The page number.
|
||||||
|
#[serde(rename = "number", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub number: Option<i64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FooPetsExplodePostPageExplodeParameter {
|
||||||
|
pub fn new() -> FooPetsExplodePostPageExplodeParameter {
|
||||||
|
FooPetsExplodePostPageExplodeParameter {
|
||||||
|
size: None,
|
||||||
|
number: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct FooPetsExplodePostPageParameter {
|
||||||
|
/// The page size.
|
||||||
|
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub size: Option<i64>,
|
||||||
|
/// The page number.
|
||||||
|
#[serde(rename = "number", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub number: Option<i64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FooPetsExplodePostPageParameter {
|
||||||
|
pub fn new() -> FooPetsExplodePostPageParameter {
|
||||||
|
FooPetsExplodePostPageParameter {
|
||||||
|
size: None,
|
||||||
|
number: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct FooPage {
|
||||||
|
#[serde(rename = "page", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub page: Option<i32>,
|
||||||
|
#[serde(rename = "perPage", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub per_page: Option<i32>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FooPage {
|
||||||
|
pub fn new() -> FooPage {
|
||||||
|
FooPage {
|
||||||
|
page: None,
|
||||||
|
per_page: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user