forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin' into 7.0.x
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#![allow(missing_docs, trivial_casts, unused_variables, unused_mut, unused_imports, unused_extern_crates, non_camel_case_types)]
|
||||
#![allow(unused_imports, unused_attributes)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::blacklisted_name)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)]
|
||||
|
||||
use async_trait::async_trait;
|
||||
use futures::Stream;
|
||||
|
||||
@@ -20,7 +20,7 @@ components:
|
||||
schemas:
|
||||
_op_get_request:
|
||||
properties:
|
||||
propery:
|
||||
property:
|
||||
type: string
|
||||
required:
|
||||
- property
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**propery** | **String** | | [optional] [default to None]
|
||||
**property** | **String** | | [optional] [default to None]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**propery** | **String** | | [optional] [default to None]
|
||||
**property** | **String** | | [optional] [default to None]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**propery** | **String** | | [optional] [default to None]
|
||||
**property** | **String** | |
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#![allow(missing_docs, trivial_casts, unused_variables, unused_mut, unused_imports, unused_extern_crates, non_camel_case_types)]
|
||||
#![allow(unused_imports, unused_attributes)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::blacklisted_name)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)]
|
||||
|
||||
use async_trait::async_trait;
|
||||
use futures::Stream;
|
||||
|
||||
@@ -7,17 +7,16 @@ use crate::header;
|
||||
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
|
||||
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
|
||||
pub struct OpGetRequest {
|
||||
#[serde(rename = "propery")]
|
||||
#[serde(skip_serializing_if="Option::is_none")]
|
||||
pub propery: Option<String>,
|
||||
#[serde(rename = "property")]
|
||||
pub property: String,
|
||||
|
||||
}
|
||||
|
||||
impl OpGetRequest {
|
||||
#[allow(clippy::new_without_default)]
|
||||
pub fn new() -> OpGetRequest {
|
||||
pub fn new(property: String, ) -> OpGetRequest {
|
||||
OpGetRequest {
|
||||
propery: None,
|
||||
property,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,12 +28,8 @@ impl std::string::ToString for OpGetRequest {
|
||||
fn to_string(&self) -> String {
|
||||
let params: Vec<Option<String>> = vec![
|
||||
|
||||
self.propery.as_ref().map(|propery| {
|
||||
vec![
|
||||
"propery".to_string(),
|
||||
propery.to_string(),
|
||||
].join(",")
|
||||
}),
|
||||
Some("property".to_string()),
|
||||
Some(self.property.to_string()),
|
||||
|
||||
];
|
||||
|
||||
@@ -53,7 +48,7 @@ impl std::str::FromStr for OpGetRequest {
|
||||
#[derive(Default)]
|
||||
#[allow(dead_code)]
|
||||
struct IntermediateRep {
|
||||
pub propery: Vec<String>,
|
||||
pub property: Vec<String>,
|
||||
}
|
||||
|
||||
let mut intermediate_rep = IntermediateRep::default();
|
||||
@@ -72,7 +67,7 @@ impl std::str::FromStr for OpGetRequest {
|
||||
#[allow(clippy::match_single_binding)]
|
||||
match key {
|
||||
#[allow(clippy::redundant_clone)]
|
||||
"propery" => intermediate_rep.propery.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
|
||||
"property" => intermediate_rep.property.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
|
||||
_ => return std::result::Result::Err("Unexpected key while parsing OpGetRequest".to_string())
|
||||
}
|
||||
}
|
||||
@@ -83,7 +78,7 @@ impl std::str::FromStr for OpGetRequest {
|
||||
|
||||
// Use the intermediate representation to return the struct
|
||||
std::result::Result::Ok(OpGetRequest {
|
||||
propery: intermediate_rep.propery.into_iter().next(),
|
||||
property: intermediate_rep.property.into_iter().next().ok_or_else(|| "property missing in OpGetRequest".to_string())?,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
Ok(body) => {
|
||||
let mut unused_elements = Vec::new();
|
||||
let param_op_get_request: Option<models::OpGetRequest> = if !body.is_empty() {
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&*body);
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&body);
|
||||
match serde_ignored::deserialize(deserializer, |path| {
|
||||
warn!("Ignoring unknown field in body: {}", path);
|
||||
unused_elements.push(path.to_string());
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#![allow(missing_docs, trivial_casts, unused_variables, unused_mut, unused_imports, unused_extern_crates, non_camel_case_types)]
|
||||
#![allow(unused_imports, unused_attributes)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::blacklisted_name)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)]
|
||||
|
||||
use async_trait::async_trait;
|
||||
use futures::Stream;
|
||||
|
||||
@@ -111,7 +111,7 @@ impl<'a> std::iter::IntoIterator for &'a AnotherXmlArray {
|
||||
type IntoIter = std::slice::Iter<'a, String>;
|
||||
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
(&self.0).iter()
|
||||
self.0.iter()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ impl<'a> std::iter::IntoIterator for &'a mut AnotherXmlArray {
|
||||
type IntoIter = std::slice::IterMut<'a, String>;
|
||||
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
(&mut self.0).iter_mut()
|
||||
self.0.iter_mut()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -639,7 +639,7 @@ impl AnyOfObject {
|
||||
}
|
||||
|
||||
/// Enumeration of values.
|
||||
/// Since this enum's variants do not hold data, we can easily define them them as `#[repr(C)]`
|
||||
/// Since this enum's variants do not hold data, we can easily define them as `#[repr(C)]`
|
||||
/// which helps with FFI.
|
||||
#[allow(non_camel_case_types)]
|
||||
#[repr(C)]
|
||||
@@ -975,7 +975,7 @@ impl DuplicateXmlObject {
|
||||
|
||||
/// Test a model containing a special character in the enum
|
||||
/// Enumeration of values.
|
||||
/// Since this enum's variants do not hold data, we can easily define them them as `#[repr(C)]`
|
||||
/// Since this enum's variants do not hold data, we can easily define them as `#[repr(C)]`
|
||||
/// which helps with FFI.
|
||||
#[allow(non_camel_case_types)]
|
||||
#[repr(C)]
|
||||
@@ -1243,7 +1243,7 @@ impl Model12345AnyOfObject {
|
||||
}
|
||||
|
||||
/// Enumeration of values.
|
||||
/// Since this enum's variants do not hold data, we can easily define them them as `#[repr(C)]`
|
||||
/// Since this enum's variants do not hold data, we can easily define them as `#[repr(C)]`
|
||||
/// which helps with FFI.
|
||||
#[allow(non_camel_case_types)]
|
||||
#[repr(C)]
|
||||
@@ -1499,7 +1499,7 @@ impl<'a> std::iter::IntoIterator for &'a MyIdList {
|
||||
type IntoIter = std::slice::Iter<'a, i32>;
|
||||
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
(&self.0).iter()
|
||||
self.0.iter()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1508,7 +1508,7 @@ impl<'a> std::iter::IntoIterator for &'a mut MyIdList {
|
||||
type IntoIter = std::slice::IterMut<'a, i32>;
|
||||
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
(&mut self.0).iter_mut()
|
||||
self.0.iter_mut()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2670,7 +2670,7 @@ impl Result {
|
||||
}
|
||||
|
||||
/// Enumeration of values.
|
||||
/// Since this enum's variants do not hold data, we can easily define them them as `#[repr(C)]`
|
||||
/// Since this enum's variants do not hold data, we can easily define them as `#[repr(C)]`
|
||||
/// which helps with FFI.
|
||||
#[allow(non_camel_case_types)]
|
||||
#[repr(C)]
|
||||
@@ -2853,7 +2853,7 @@ impl<'a> std::iter::IntoIterator for &'a XmlArray {
|
||||
type IntoIter = std::slice::Iter<'a, String>;
|
||||
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
(&self.0).iter()
|
||||
self.0.iter()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2862,7 +2862,7 @@ impl<'a> std::iter::IntoIterator for &'a mut XmlArray {
|
||||
type IntoIter = std::slice::IterMut<'a, String>;
|
||||
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
(&mut self.0).iter_mut()
|
||||
self.0.iter_mut()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -271,6 +271,7 @@ impl<S, C> CallbackApi<C> for Client<S, C> where
|
||||
});
|
||||
|
||||
// Header parameters
|
||||
#[allow(clippy::single_match)]
|
||||
match param_information {
|
||||
Some(param_information) => {
|
||||
request.headers_mut().append(
|
||||
|
||||
@@ -228,7 +228,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
hyper::Method::GET if path.matched(paths::ID_ANY_OF) => {
|
||||
// Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
|
||||
let query_params = form_urlencoded::parse(uri.query().unwrap_or_default().as_bytes()).collect::<Vec<_>>();
|
||||
let param_any_of = query_params.iter().filter(|e| e.0 == "any-of").map(|e| e.1.to_owned())
|
||||
let param_any_of = query_params.iter().filter(|e| e.0 == "any-of").map(|e| e.1.clone())
|
||||
.filter_map(|param_any_of| param_any_of.parse().ok())
|
||||
.collect::<Vec<_>>();
|
||||
let param_any_of = if !param_any_of.is_empty() {
|
||||
@@ -298,7 +298,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
hyper::Method::POST if path.matched(paths::ID_CALLBACK_WITH_HEADER) => {
|
||||
// Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
|
||||
let query_params = form_urlencoded::parse(uri.query().unwrap_or_default().as_bytes()).collect::<Vec<_>>();
|
||||
let param_url = query_params.iter().filter(|e| e.0 == "url").map(|e| e.1.to_owned())
|
||||
let param_url = query_params.iter().filter(|e| e.0 == "url").map(|e| e.1.clone())
|
||||
.next();
|
||||
let param_url = match param_url {
|
||||
Some(param_url) => {
|
||||
@@ -355,7 +355,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
hyper::Method::GET if path.matched(paths::ID_COMPLEX_QUERY_PARAM) => {
|
||||
// Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
|
||||
let query_params = form_urlencoded::parse(uri.query().unwrap_or_default().as_bytes()).collect::<Vec<_>>();
|
||||
let param_list_of_strings = query_params.iter().filter(|e| e.0 == "list-of-strings").map(|e| e.1.to_owned())
|
||||
let param_list_of_strings = query_params.iter().filter(|e| e.0 == "list-of-strings").map(|e| e.1.clone())
|
||||
.filter_map(|param_list_of_strings| param_list_of_strings.parse().ok())
|
||||
.collect::<Vec<_>>();
|
||||
let param_list_of_strings = if !param_list_of_strings.is_empty() {
|
||||
@@ -449,7 +449,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
hyper::Method::GET if path.matched(paths::ID_JSON_COMPLEX_QUERY_PARAM) => {
|
||||
// Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
|
||||
let query_params = form_urlencoded::parse(uri.query().unwrap_or_default().as_bytes()).collect::<Vec<_>>();
|
||||
let param_list_of_strings = query_params.iter().filter(|e| e.0 == "list-of-strings").map(|e| e.1.to_owned())
|
||||
let param_list_of_strings = query_params.iter().filter(|e| e.0 == "list-of-strings").map(|e| e.1.clone())
|
||||
.next();
|
||||
let param_list_of_strings = match param_list_of_strings {
|
||||
Some(param_list_of_strings) => {
|
||||
@@ -814,7 +814,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
hyper::Method::GET if path.matched(paths::ID_PARAMGET) => {
|
||||
// Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
|
||||
let query_params = form_urlencoded::parse(uri.query().unwrap_or_default().as_bytes()).collect::<Vec<_>>();
|
||||
let param_uuid = query_params.iter().filter(|e| e.0 == "uuid").map(|e| e.1.to_owned())
|
||||
let param_uuid = query_params.iter().filter(|e| e.0 == "uuid").map(|e| e.1.clone())
|
||||
.next();
|
||||
let param_uuid = match param_uuid {
|
||||
Some(param_uuid) => {
|
||||
@@ -831,7 +831,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
},
|
||||
None => None,
|
||||
};
|
||||
let param_some_object = query_params.iter().filter(|e| e.0 == "someObject").map(|e| e.1.to_owned())
|
||||
let param_some_object = query_params.iter().filter(|e| e.0 == "someObject").map(|e| e.1.clone())
|
||||
.next();
|
||||
let param_some_object = match param_some_object {
|
||||
Some(param_some_object) => {
|
||||
@@ -848,7 +848,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
},
|
||||
None => None,
|
||||
};
|
||||
let param_some_list = query_params.iter().filter(|e| e.0 == "someList").map(|e| e.1.to_owned())
|
||||
let param_some_list = query_params.iter().filter(|e| e.0 == "someList").map(|e| e.1.clone())
|
||||
.next();
|
||||
let param_some_list = match param_some_list {
|
||||
Some(param_some_list) => {
|
||||
@@ -965,7 +965,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
hyper::Method::POST if path.matched(paths::ID_REGISTER_CALLBACK) => {
|
||||
// Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
|
||||
let query_params = form_urlencoded::parse(uri.query().unwrap_or_default().as_bytes()).collect::<Vec<_>>();
|
||||
let param_url = query_params.iter().filter(|e| e.0 == "url").map(|e| e.1.to_owned())
|
||||
let param_url = query_params.iter().filter(|e| e.0 == "url").map(|e| e.1.clone())
|
||||
.next();
|
||||
let param_url = match param_url {
|
||||
Some(param_url) => {
|
||||
@@ -1268,7 +1268,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
Ok(body) => {
|
||||
let mut unused_elements = Vec::new();
|
||||
let param_object_untyped_props: Option<models::ObjectUntypedProps> = if !body.is_empty() {
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&*body);
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&body);
|
||||
match serde_ignored::deserialize(deserializer, |path| {
|
||||
warn!("Ignoring unknown field in body: {}", path);
|
||||
unused_elements.push(path.to_string());
|
||||
@@ -1713,7 +1713,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
Ok(body) => {
|
||||
let mut unused_elements = Vec::new();
|
||||
let param_object_param: Option<models::ObjectParam> = if !body.is_empty() {
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&*body);
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&body);
|
||||
match serde_ignored::deserialize(deserializer, |path| {
|
||||
warn!("Ignoring unknown field in body: {}", path);
|
||||
unused_elements.push(path.to_string());
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#![allow(missing_docs, trivial_casts, unused_variables, unused_mut, unused_imports, unused_extern_crates, non_camel_case_types)]
|
||||
#![allow(unused_imports, unused_attributes)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::blacklisted_name)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)]
|
||||
|
||||
use async_trait::async_trait;
|
||||
use futures::Stream;
|
||||
|
||||
@@ -202,6 +202,21 @@ Method | HTTP request | Description
|
||||
|
||||
## Documentation For Authorization
|
||||
|
||||
## petstore_auth
|
||||
- **Type**: OAuth
|
||||
- **Flow**: implicit
|
||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Scopes**:
|
||||
- **write:pets**: modify pets in your account
|
||||
- **read:pets**: read your pets
|
||||
|
||||
Example
|
||||
```
|
||||
```
|
||||
|
||||
Or via OAuth2 module to automatically refresh tokens and perform user authentication.
|
||||
```
|
||||
```
|
||||
## api_key
|
||||
- **Type**: API key
|
||||
|
||||
@@ -220,21 +235,6 @@ Example
|
||||
Example
|
||||
```
|
||||
```
|
||||
## petstore_auth
|
||||
- **Type**: OAuth
|
||||
- **Flow**: implicit
|
||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Scopes**:
|
||||
- **write:pets**: modify pets in your account
|
||||
- **read:pets**: read your pets
|
||||
|
||||
Example
|
||||
```
|
||||
```
|
||||
|
||||
Or via OAuth2 module to automatically refresh tokens and perform user authentication.
|
||||
```
|
||||
```
|
||||
|
||||
## Author
|
||||
|
||||
|
||||
@@ -342,7 +342,7 @@ paths:
|
||||
- store
|
||||
get:
|
||||
description: For valid response try integer IDs with value <= 5 or > 10. Other
|
||||
values will generated exceptions
|
||||
values will generate exceptions
|
||||
operationId: getOrderById
|
||||
parameters:
|
||||
- description: ID of pet that needs to be fetched
|
||||
|
||||
@@ -65,7 +65,7 @@ This endpoint does not need any parameter.
|
||||
> models::Order getOrderById(order_id)
|
||||
Find purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
@@ -1442,6 +1442,7 @@ impl<S, C> Api<C> for Client<S, C> where
|
||||
});
|
||||
|
||||
// Header parameters
|
||||
#[allow(clippy::single_match)]
|
||||
match param_enum_header_string_array {
|
||||
Some(param_enum_header_string_array) => {
|
||||
request.headers_mut().append(
|
||||
@@ -1458,6 +1459,7 @@ impl<S, C> Api<C> for Client<S, C> where
|
||||
None => {}
|
||||
}
|
||||
|
||||
#[allow(clippy::single_match)]
|
||||
match param_enum_header_string {
|
||||
Some(param_enum_header_string) => {
|
||||
request.headers_mut().append(
|
||||
@@ -1927,6 +1929,7 @@ impl<S, C> Api<C> for Client<S, C> where
|
||||
}
|
||||
|
||||
// Header parameters
|
||||
#[allow(clippy::single_match)]
|
||||
match param_api_key {
|
||||
Some(param_api_key) => {
|
||||
request.headers_mut().append(
|
||||
|
||||
@@ -104,6 +104,17 @@ impl<T, A, B, C, D, ReqBody> Service<Request<ReqBody>> for AddContext<T, A, B, C
|
||||
let context = A::default().push(XSpanIdString::get_or_generate(&request));
|
||||
let headers = request.headers();
|
||||
|
||||
{
|
||||
use swagger::auth::Bearer;
|
||||
use std::ops::Deref;
|
||||
if let Some(bearer) = swagger::auth::from_headers::<Bearer>(headers) {
|
||||
let auth_data = AuthData::Bearer(bearer);
|
||||
let context = context.push(Some(auth_data));
|
||||
let context = context.push(None::<Authorization>);
|
||||
|
||||
return self.inner.call((request, context))
|
||||
}
|
||||
}
|
||||
{
|
||||
use swagger::auth::api_key_from_header;
|
||||
|
||||
@@ -139,17 +150,6 @@ impl<T, A, B, C, D, ReqBody> Service<Request<ReqBody>> for AddContext<T, A, B, C
|
||||
return self.inner.call((request, context))
|
||||
}
|
||||
}
|
||||
{
|
||||
use swagger::auth::Bearer;
|
||||
use std::ops::Deref;
|
||||
if let Some(bearer) = swagger::auth::from_headers::<Bearer>(headers) {
|
||||
let auth_data = AuthData::Bearer(bearer);
|
||||
let context = context.push(Some(auth_data));
|
||||
let context = context.push(None::<Authorization>);
|
||||
|
||||
return self.inner.call((request, context))
|
||||
}
|
||||
}
|
||||
|
||||
let context = context.push(None::<AuthData>);
|
||||
let context = context.push(None::<Authorization>);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#![allow(missing_docs, trivial_casts, unused_variables, unused_mut, unused_imports, unused_extern_crates, non_camel_case_types)]
|
||||
#![allow(unused_imports, unused_attributes)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::blacklisted_name)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)]
|
||||
|
||||
use async_trait::async_trait;
|
||||
use futures::Stream;
|
||||
|
||||
@@ -322,7 +322,7 @@ impl<'a> std::iter::IntoIterator for &'a AnimalFarm {
|
||||
type IntoIter = std::slice::Iter<'a, Animal>;
|
||||
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
(&self.0).iter()
|
||||
self.0.iter()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -331,7 +331,7 @@ impl<'a> std::iter::IntoIterator for &'a mut AnimalFarm {
|
||||
type IntoIter = std::slice::IterMut<'a, Animal>;
|
||||
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
(&mut self.0).iter_mut()
|
||||
self.0.iter_mut()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2526,7 +2526,7 @@ impl EnumArrays {
|
||||
}
|
||||
|
||||
/// Enumeration of values.
|
||||
/// Since this enum's variants do not hold data, we can easily define them them as `#[repr(C)]`
|
||||
/// Since this enum's variants do not hold data, we can easily define them as `#[repr(C)]`
|
||||
/// which helps with FFI.
|
||||
#[allow(non_camel_case_types)]
|
||||
#[repr(C)]
|
||||
@@ -4706,7 +4706,7 @@ impl OuterComposite {
|
||||
}
|
||||
|
||||
/// Enumeration of values.
|
||||
/// Since this enum's variants do not hold data, we can easily define them them as `#[repr(C)]`
|
||||
/// Since this enum's variants do not hold data, we can easily define them as `#[repr(C)]`
|
||||
/// which helps with FFI.
|
||||
#[allow(non_camel_case_types)]
|
||||
#[repr(C)]
|
||||
|
||||
@@ -267,7 +267,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
Ok(body) => {
|
||||
let mut unused_elements = Vec::new();
|
||||
let param_body: Option<models::Client> = if !body.is_empty() {
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&*body);
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&body);
|
||||
match serde_ignored::deserialize(deserializer, |path| {
|
||||
warn!("Ignoring unknown field in body: {}", path);
|
||||
unused_elements.push(path.to_string());
|
||||
@@ -376,7 +376,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
Ok(body) => {
|
||||
let mut unused_elements = Vec::new();
|
||||
let param_body: Option<models::OuterBoolean> = if !body.is_empty() {
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&*body);
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&body);
|
||||
match serde_ignored::deserialize(deserializer, |path| {
|
||||
warn!("Ignoring unknown field in body: {}", path);
|
||||
unused_elements.push(path.to_string());
|
||||
@@ -446,7 +446,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
Ok(body) => {
|
||||
let mut unused_elements = Vec::new();
|
||||
let param_body: Option<models::OuterComposite> = if !body.is_empty() {
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&*body);
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&body);
|
||||
match serde_ignored::deserialize(deserializer, |path| {
|
||||
warn!("Ignoring unknown field in body: {}", path);
|
||||
unused_elements.push(path.to_string());
|
||||
@@ -516,7 +516,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
Ok(body) => {
|
||||
let mut unused_elements = Vec::new();
|
||||
let param_body: Option<models::OuterNumber> = if !body.is_empty() {
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&*body);
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&body);
|
||||
match serde_ignored::deserialize(deserializer, |path| {
|
||||
warn!("Ignoring unknown field in body: {}", path);
|
||||
unused_elements.push(path.to_string());
|
||||
@@ -586,7 +586,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
Ok(body) => {
|
||||
let mut unused_elements = Vec::new();
|
||||
let param_body: Option<models::OuterString> = if !body.is_empty() {
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&*body);
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&body);
|
||||
match serde_ignored::deserialize(deserializer, |path| {
|
||||
warn!("Ignoring unknown field in body: {}", path);
|
||||
unused_elements.push(path.to_string());
|
||||
@@ -732,7 +732,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
hyper::Method::PUT if path.matched(paths::ID_FAKE_BODY_WITH_QUERY_PARAMS) => {
|
||||
// Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
|
||||
let query_params = form_urlencoded::parse(uri.query().unwrap_or_default().as_bytes()).collect::<Vec<_>>();
|
||||
let param_query = query_params.iter().filter(|e| e.0 == "query").map(|e| e.1.to_owned())
|
||||
let param_query = query_params.iter().filter(|e| e.0 == "query").map(|e| e.1.clone())
|
||||
.next();
|
||||
let param_query = match param_query {
|
||||
Some(param_query) => {
|
||||
@@ -765,7 +765,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
Ok(body) => {
|
||||
let mut unused_elements = Vec::new();
|
||||
let param_body: Option<models::User> = if !body.is_empty() {
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&*body);
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&body);
|
||||
match serde_ignored::deserialize(deserializer, |path| {
|
||||
warn!("Ignoring unknown field in body: {}", path);
|
||||
unused_elements.push(path.to_string());
|
||||
@@ -839,7 +839,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
Ok(body) => {
|
||||
let mut unused_elements = Vec::new();
|
||||
let param_body: Option<models::Client> = if !body.is_empty() {
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&*body);
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&body);
|
||||
match serde_ignored::deserialize(deserializer, |path| {
|
||||
warn!("Ignoring unknown field in body: {}", path);
|
||||
unused_elements.push(path.to_string());
|
||||
@@ -1024,7 +1024,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
|
||||
// Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
|
||||
let query_params = form_urlencoded::parse(uri.query().unwrap_or_default().as_bytes()).collect::<Vec<_>>();
|
||||
let param_enum_query_string_array = query_params.iter().filter(|e| e.0 == "enum_query_string_array").map(|e| e.1.to_owned())
|
||||
let param_enum_query_string_array = query_params.iter().filter(|e| e.0 == "enum_query_string_array").map(|e| e.1.clone())
|
||||
.filter_map(|param_enum_query_string_array| param_enum_query_string_array.parse().ok())
|
||||
.collect::<Vec<_>>();
|
||||
let param_enum_query_string_array = if !param_enum_query_string_array.is_empty() {
|
||||
@@ -1032,7 +1032,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let param_enum_query_string = query_params.iter().filter(|e| e.0 == "enum_query_string").map(|e| e.1.to_owned())
|
||||
let param_enum_query_string = query_params.iter().filter(|e| e.0 == "enum_query_string").map(|e| e.1.clone())
|
||||
.next();
|
||||
let param_enum_query_string = match param_enum_query_string {
|
||||
Some(param_enum_query_string) => {
|
||||
@@ -1049,7 +1049,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
},
|
||||
None => None,
|
||||
};
|
||||
let param_enum_query_integer = query_params.iter().filter(|e| e.0 == "enum_query_integer").map(|e| e.1.to_owned())
|
||||
let param_enum_query_integer = query_params.iter().filter(|e| e.0 == "enum_query_integer").map(|e| e.1.clone())
|
||||
.next();
|
||||
let param_enum_query_integer = match param_enum_query_integer {
|
||||
Some(param_enum_query_integer) => {
|
||||
@@ -1066,7 +1066,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
},
|
||||
None => None,
|
||||
};
|
||||
let param_enum_query_double = query_params.iter().filter(|e| e.0 == "enum_query_double").map(|e| e.1.to_owned())
|
||||
let param_enum_query_double = query_params.iter().filter(|e| e.0 == "enum_query_double").map(|e| e.1.clone())
|
||||
.next();
|
||||
let param_enum_query_double = match param_enum_query_double {
|
||||
Some(param_enum_query_double) => {
|
||||
@@ -1135,7 +1135,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
Ok(body) => {
|
||||
let mut unused_elements = Vec::new();
|
||||
let param_param: Option<std::collections::HashMap<String, String>> = if !body.is_empty() {
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&*body);
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&body);
|
||||
match serde_ignored::deserialize(deserializer, |path| {
|
||||
warn!("Ignoring unknown field in body: {}", path);
|
||||
unused_elements.push(path.to_string());
|
||||
@@ -1253,7 +1253,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
Ok(body) => {
|
||||
let mut unused_elements = Vec::new();
|
||||
let param_body: Option<models::Client> = if !body.is_empty() {
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&*body);
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&body);
|
||||
match serde_ignored::deserialize(deserializer, |path| {
|
||||
warn!("Ignoring unknown field in body: {}", path);
|
||||
unused_elements.push(path.to_string());
|
||||
@@ -1564,7 +1564,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
|
||||
// Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
|
||||
let query_params = form_urlencoded::parse(uri.query().unwrap_or_default().as_bytes()).collect::<Vec<_>>();
|
||||
let param_status = query_params.iter().filter(|e| e.0 == "status").map(|e| e.1.to_owned())
|
||||
let param_status = query_params.iter().filter(|e| e.0 == "status").map(|e| e.1.clone())
|
||||
.filter_map(|param_status| param_status.parse().ok())
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
@@ -1641,7 +1641,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
|
||||
// Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
|
||||
let query_params = form_urlencoded::parse(uri.query().unwrap_or_default().as_bytes()).collect::<Vec<_>>();
|
||||
let param_tags = query_params.iter().filter(|e| e.0 == "tags").map(|e| e.1.to_owned())
|
||||
let param_tags = query_params.iter().filter(|e| e.0 == "tags").map(|e| e.1.clone())
|
||||
.filter_map(|param_tags| param_tags.parse().ok())
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
@@ -2317,7 +2317,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
Ok(body) => {
|
||||
let mut unused_elements = Vec::new();
|
||||
let param_body: Option<models::Order> = if !body.is_empty() {
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&*body);
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&body);
|
||||
match serde_ignored::deserialize(deserializer, |path| {
|
||||
warn!("Ignoring unknown field in body: {}", path);
|
||||
unused_elements.push(path.to_string());
|
||||
@@ -2401,7 +2401,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
Ok(body) => {
|
||||
let mut unused_elements = Vec::new();
|
||||
let param_body: Option<models::User> = if !body.is_empty() {
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&*body);
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&body);
|
||||
match serde_ignored::deserialize(deserializer, |path| {
|
||||
warn!("Ignoring unknown field in body: {}", path);
|
||||
unused_elements.push(path.to_string());
|
||||
@@ -2474,7 +2474,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
Ok(body) => {
|
||||
let mut unused_elements = Vec::new();
|
||||
let param_body: Option<Vec<models::User>> = if !body.is_empty() {
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&*body);
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&body);
|
||||
match serde_ignored::deserialize(deserializer, |path| {
|
||||
warn!("Ignoring unknown field in body: {}", path);
|
||||
unused_elements.push(path.to_string());
|
||||
@@ -2547,7 +2547,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
Ok(body) => {
|
||||
let mut unused_elements = Vec::new();
|
||||
let param_body: Option<Vec<models::User>> = if !body.is_empty() {
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&*body);
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&body);
|
||||
match serde_ignored::deserialize(deserializer, |path| {
|
||||
warn!("Ignoring unknown field in body: {}", path);
|
||||
unused_elements.push(path.to_string());
|
||||
@@ -2739,7 +2739,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
hyper::Method::GET if path.matched(paths::ID_USER_LOGIN) => {
|
||||
// Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
|
||||
let query_params = form_urlencoded::parse(uri.query().unwrap_or_default().as_bytes()).collect::<Vec<_>>();
|
||||
let param_username = query_params.iter().filter(|e| e.0 == "username").map(|e| e.1.to_owned())
|
||||
let param_username = query_params.iter().filter(|e| e.0 == "username").map(|e| e.1.clone())
|
||||
.next();
|
||||
let param_username = match param_username {
|
||||
Some(param_username) => {
|
||||
@@ -2763,7 +2763,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
.body(Body::from("Missing required query parameter username"))
|
||||
.expect("Unable to create Bad Request response for missing query parameter username")),
|
||||
};
|
||||
let param_password = query_params.iter().filter(|e| e.0 == "password").map(|e| e.1.to_owned())
|
||||
let param_password = query_params.iter().filter(|e| e.0 == "password").map(|e| e.1.clone())
|
||||
.next();
|
||||
let param_password = match param_password {
|
||||
Some(param_password) => {
|
||||
@@ -2926,7 +2926,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
Ok(body) => {
|
||||
let mut unused_elements = Vec::new();
|
||||
let param_body: Option<models::User> = if !body.is_empty() {
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&*body);
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&body);
|
||||
match serde_ignored::deserialize(deserializer, |path| {
|
||||
warn!("Ignoring unknown field in body: {}", path);
|
||||
unused_elements.push(path.to_string());
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#![allow(missing_docs, trivial_casts, unused_variables, unused_mut, unused_imports, unused_extern_crates, non_camel_case_types)]
|
||||
#![allow(unused_imports, unused_attributes)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::blacklisted_name)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)]
|
||||
|
||||
use async_trait::async_trait;
|
||||
use futures::Stream;
|
||||
|
||||
@@ -153,7 +153,7 @@ components:
|
||||
type: string
|
||||
baseAllOf:
|
||||
properties:
|
||||
sampleBasePropery:
|
||||
sampleBaseProperty:
|
||||
type: string
|
||||
type: object
|
||||
aNullableContainer:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**sample_property** | **String** | | [optional] [default to None]
|
||||
**sample_base_propery** | **String** | | [optional] [default to None]
|
||||
**sample_base_property** | **String** | | [optional] [default to None]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**sample_base_propery** | **String** | | [optional] [default to None]
|
||||
**sample_base_property** | **String** | | [optional] [default to None]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#![allow(missing_docs, trivial_casts, unused_variables, unused_mut, unused_imports, unused_extern_crates, non_camel_case_types)]
|
||||
#![allow(unused_imports, unused_attributes)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::blacklisted_name)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)]
|
||||
|
||||
use async_trait::async_trait;
|
||||
use futures::Stream;
|
||||
|
||||
@@ -197,9 +197,9 @@ pub struct AllOfObject {
|
||||
#[serde(skip_serializing_if="Option::is_none")]
|
||||
pub sample_property: Option<String>,
|
||||
|
||||
#[serde(rename = "sampleBasePropery")]
|
||||
#[serde(rename = "sampleBaseProperty")]
|
||||
#[serde(skip_serializing_if="Option::is_none")]
|
||||
pub sample_base_propery: Option<String>,
|
||||
pub sample_base_property: Option<String>,
|
||||
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ impl AllOfObject {
|
||||
pub fn new() -> AllOfObject {
|
||||
AllOfObject {
|
||||
sample_property: None,
|
||||
sample_base_propery: None,
|
||||
sample_base_property: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -228,10 +228,10 @@ impl std::string::ToString for AllOfObject {
|
||||
}),
|
||||
|
||||
|
||||
self.sample_base_propery.as_ref().map(|sample_base_propery| {
|
||||
self.sample_base_property.as_ref().map(|sample_base_property| {
|
||||
vec![
|
||||
"sampleBasePropery".to_string(),
|
||||
sample_base_propery.to_string(),
|
||||
"sampleBaseProperty".to_string(),
|
||||
sample_base_property.to_string(),
|
||||
].join(",")
|
||||
}),
|
||||
|
||||
@@ -253,7 +253,7 @@ impl std::str::FromStr for AllOfObject {
|
||||
#[allow(dead_code)]
|
||||
struct IntermediateRep {
|
||||
pub sample_property: Vec<String>,
|
||||
pub sample_base_propery: Vec<String>,
|
||||
pub sample_base_property: Vec<String>,
|
||||
}
|
||||
|
||||
let mut intermediate_rep = IntermediateRep::default();
|
||||
@@ -274,7 +274,7 @@ impl std::str::FromStr for AllOfObject {
|
||||
#[allow(clippy::redundant_clone)]
|
||||
"sampleProperty" => intermediate_rep.sample_property.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
|
||||
#[allow(clippy::redundant_clone)]
|
||||
"sampleBasePropery" => intermediate_rep.sample_base_propery.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
|
||||
"sampleBaseProperty" => intermediate_rep.sample_base_property.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
|
||||
_ => return std::result::Result::Err("Unexpected key while parsing AllOfObject".to_string())
|
||||
}
|
||||
}
|
||||
@@ -286,7 +286,7 @@ impl std::str::FromStr for AllOfObject {
|
||||
// Use the intermediate representation to return the struct
|
||||
std::result::Result::Ok(AllOfObject {
|
||||
sample_property: intermediate_rep.sample_property.into_iter().next(),
|
||||
sample_base_propery: intermediate_rep.sample_base_propery.into_iter().next(),
|
||||
sample_base_property: intermediate_rep.sample_base_property.into_iter().next(),
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -333,9 +333,9 @@ impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderVal
|
||||
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
|
||||
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
|
||||
pub struct BaseAllOf {
|
||||
#[serde(rename = "sampleBasePropery")]
|
||||
#[serde(rename = "sampleBaseProperty")]
|
||||
#[serde(skip_serializing_if="Option::is_none")]
|
||||
pub sample_base_propery: Option<String>,
|
||||
pub sample_base_property: Option<String>,
|
||||
|
||||
}
|
||||
|
||||
@@ -343,7 +343,7 @@ impl BaseAllOf {
|
||||
#[allow(clippy::new_without_default)]
|
||||
pub fn new() -> BaseAllOf {
|
||||
BaseAllOf {
|
||||
sample_base_propery: None,
|
||||
sample_base_property: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -355,10 +355,10 @@ impl std::string::ToString for BaseAllOf {
|
||||
fn to_string(&self) -> String {
|
||||
let params: Vec<Option<String>> = vec![
|
||||
|
||||
self.sample_base_propery.as_ref().map(|sample_base_propery| {
|
||||
self.sample_base_property.as_ref().map(|sample_base_property| {
|
||||
vec![
|
||||
"sampleBasePropery".to_string(),
|
||||
sample_base_propery.to_string(),
|
||||
"sampleBaseProperty".to_string(),
|
||||
sample_base_property.to_string(),
|
||||
].join(",")
|
||||
}),
|
||||
|
||||
@@ -379,7 +379,7 @@ impl std::str::FromStr for BaseAllOf {
|
||||
#[derive(Default)]
|
||||
#[allow(dead_code)]
|
||||
struct IntermediateRep {
|
||||
pub sample_base_propery: Vec<String>,
|
||||
pub sample_base_property: Vec<String>,
|
||||
}
|
||||
|
||||
let mut intermediate_rep = IntermediateRep::default();
|
||||
@@ -398,7 +398,7 @@ impl std::str::FromStr for BaseAllOf {
|
||||
#[allow(clippy::match_single_binding)]
|
||||
match key {
|
||||
#[allow(clippy::redundant_clone)]
|
||||
"sampleBasePropery" => intermediate_rep.sample_base_propery.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
|
||||
"sampleBaseProperty" => intermediate_rep.sample_base_property.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
|
||||
_ => return std::result::Result::Err("Unexpected key while parsing BaseAllOf".to_string())
|
||||
}
|
||||
}
|
||||
@@ -409,7 +409,7 @@ impl std::str::FromStr for BaseAllOf {
|
||||
|
||||
// Use the intermediate representation to return the struct
|
||||
std::result::Result::Ok(BaseAllOf {
|
||||
sample_base_propery: intermediate_rep.sample_base_propery.into_iter().next(),
|
||||
sample_base_property: intermediate_rep.sample_base_property.into_iter().next(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
Ok(body) => {
|
||||
let mut unused_elements = Vec::new();
|
||||
let param_nested_response: Option<models::DummyPutRequest> = if !body.is_empty() {
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&*body);
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&body);
|
||||
match serde_ignored::deserialize(deserializer, |path| {
|
||||
warn!("Ignoring unknown field in body: {}", path);
|
||||
unused_elements.push(path.to_string());
|
||||
@@ -546,7 +546,7 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
|
||||
Ok(body) => {
|
||||
let mut unused_elements = Vec::new();
|
||||
let param_value: Option<serde_json::Value> = if !body.is_empty() {
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&*body);
|
||||
let deserializer = &mut serde_json::Deserializer::from_slice(&body);
|
||||
match serde_ignored::deserialize(deserializer, |path| {
|
||||
warn!("Ignoring unknown field in body: {}", path);
|
||||
unused_elements.push(path.to_string());
|
||||
|
||||
Reference in New Issue
Block a user