[JavaSpring] Fix when openapi spec file has array of files (#21524)

* [JavaSpring] Fix when openapi spec file has array of files

The isArray is not checked for non-reactive isFile condition. This is remediated.

* update samples

---------

Co-authored-by: Siddharth Wagle <SidWagz@users.noreply.github.com>
This commit is contained in:
William Cheng 2025-07-07 17:45:22 +08:00 committed by GitHub
parent d966f1234d
commit a809c187b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
32 changed files with 1 additions and 905 deletions

View File

@ -274,7 +274,7 @@ public interface {{classname}} {
} }
// Override this method // Override this method
{{#jdk8-default-interface}}default {{/jdk8-default-interface}} {{>responseType}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{>optionalDataType}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#reactive}}Flux<Part>{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}{{#springFoxDocumentationProvider}}@ApiIgnore{{/springFoxDocumentationProvider}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}}, {{/hasParams}}{{^hasParams}}{{#reactive}}, {{/reactive}}{{/hasParams}}{{#springFoxDocumentationProvider}}@ApiIgnore{{/springFoxDocumentationProvider}}final Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}} { {{#jdk8-default-interface}}default {{/jdk8-default-interface}} {{>responseType}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{>optionalDataType}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#reactive}}Flux<Part>{{/reactive}}{{^reactive}}{{#isArray}}List<MultipartFile>{{/isArray}}{{^isArray}}MultipartFile{{/isArray}}{{/reactive}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}{{#springFoxDocumentationProvider}}@ApiIgnore{{/springFoxDocumentationProvider}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}}, {{/hasParams}}{{^hasParams}}{{#reactive}}, {{/reactive}}{{/hasParams}}{{#springFoxDocumentationProvider}}@ApiIgnore{{/springFoxDocumentationProvider}}final Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}} {
{{/delegate-method}} {{/delegate-method}}
{{^isDelegate}} {{^isDelegate}}
{{>methodBody}}{{! prevent indent}} {{>methodBody}}{{! prevent indent}}

View File

@ -123,7 +123,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("multipart_related_request_post({:?}, {:?}, {:?}) - X-Span-ID: {:?}", required_binary_field, object_field, optional_binary_field, context.get().0.clone()); info!("multipart_related_request_post({:?}, {:?}, {:?}) - X-Span-ID: {:?}", required_binary_field, object_field, optional_binary_field, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn multipart_request_post( async fn multipart_request_post(
&self, &self,
string_field: String, string_field: String,
@ -135,7 +134,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("multipart_request_post(\"{}\", {:?}, {:?}, {:?}) - X-Span-ID: {:?}", string_field, binary_field, optional_string_field, object_field, context.get().0.clone()); info!("multipart_request_post(\"{}\", {:?}, {:?}, {:?}) - X-Span-ID: {:?}", string_field, binary_field, optional_string_field, object_field, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn multiple_identical_mime_types_post( async fn multiple_identical_mime_types_post(
&self, &self,
binary1: Option<swagger::ByteArray>, binary1: Option<swagger::ByteArray>,
@ -145,5 +143,4 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("multiple_identical_mime_types_post({:?}, {:?}) - X-Span-ID: {:?}", binary1, binary2, context.get().0.clone()); info!("multiple_identical_mime_types_post({:?}, {:?}) - X-Span-ID: {:?}", binary1, binary2, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
} }

View File

@ -444,7 +444,6 @@ impl<S, C> Api<C> for Client<S, C> where
}); });
body_parts.push(part); body_parts.push(part);
} }
if let Some(optional_binary_field) = param_optional_binary_field { if let Some(optional_binary_field) = param_optional_binary_field {
let part = Node::Part(Part { let part = Node::Part(Part {
headers: { headers: {
@ -457,7 +456,6 @@ impl<S, C> Api<C> for Client<S, C> where
}); });
body_parts.push(part); body_parts.push(part);
} }
{ {
let part = Node::Part(Part { let part = Node::Part(Part {
headers: { headers: {
@ -479,7 +477,6 @@ impl<S, C> Api<C> for Client<S, C> where
write_multipart(&mut body, &boundary, &body_parts) write_multipart(&mut body, &boundary, &body_parts)
.expect("Failed to write multipart body"); .expect("Failed to write multipart body");
let header = "multipart/related"; let header = "multipart/related";
request.headers_mut().insert(CONTENT_TYPE, request.headers_mut().insert(CONTENT_TYPE,
match HeaderValue::from_bytes( match HeaderValue::from_bytes(
@ -491,7 +488,6 @@ impl<S, C> Api<C> for Client<S, C> where
// Add the message body to the request object. // Add the message body to the request object.
*request.body_mut() = Body::from(body); *request.body_mut() = Body::from(body);
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -524,7 +520,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn multipart_request_post( async fn multipart_request_post(
&self, &self,
param_string_field: String, param_string_field: String,
@ -643,8 +638,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {multipart_header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {multipart_header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -677,7 +670,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn multiple_identical_mime_types_post( async fn multiple_identical_mime_types_post(
&self, &self,
param_binary1: Option<swagger::ByteArray>, param_binary1: Option<swagger::ByteArray>,
@ -730,7 +722,6 @@ impl<S, C> Api<C> for Client<S, C> where
}); });
body_parts.push(part); body_parts.push(part);
} }
if let Some(binary2) = param_binary2 { if let Some(binary2) = param_binary2 {
let part = Node::Part(Part { let part = Node::Part(Part {
headers: { headers: {
@ -752,7 +743,6 @@ impl<S, C> Api<C> for Client<S, C> where
write_multipart(&mut body, &boundary, &body_parts) write_multipart(&mut body, &boundary, &body_parts)
.expect("Failed to write multipart body"); .expect("Failed to write multipart body");
let header = "multipart/related"; let header = "multipart/related";
request.headers_mut().insert(CONTENT_TYPE, request.headers_mut().insert(CONTENT_TYPE,
match HeaderValue::from_bytes( match HeaderValue::from_bytes(
@ -764,7 +754,6 @@ impl<S, C> Api<C> for Client<S, C> where
// Add the message body to the request object. // Add the message body to the request object.
*request.body_mut() = Body::from(body); *request.body_mut() = Body::from(body);
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -797,5 +786,4 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
} }

View File

@ -25,19 +25,16 @@ pub enum MultipartRelatedRequestPostResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum MultipartRequestPostResponse { pub enum MultipartRequestPostResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum MultipleIdenticalMimeTypesPostResponse { pub enum MultipleIdenticalMimeTypesPostResponse {
/// OK /// OK
OK OK
} }
/// API /// API
#[async_trait] #[async_trait]
#[allow(clippy::too_many_arguments, clippy::ptr_arg)] #[allow(clippy::too_many_arguments, clippy::ptr_arg)]

View File

@ -52,7 +52,6 @@ mod paths {
pub(crate) static ID_MULTIPLE_IDENTICAL_MIME_TYPES: usize = 2; pub(crate) static ID_MULTIPLE_IDENTICAL_MIME_TYPES: usize = 2;
} }
pub struct MakeService<T, C> where pub struct MakeService<T, C> where
T: Api<C> + Clone + Send + 'static, T: Api<C> + Clone + Send + 'static,
C: Has<XSpanIdString> + Send + Sync + 'static C: Has<XSpanIdString> + Send + Sync + 'static
@ -104,7 +103,6 @@ impl<T, C, Target> hyper::service::Service<Target> for MakeService<T, C> where
future::ok(service) future::ok(service)
} }
} }
fn method_not_allowed() -> Result<Response<Body>, crate::ServiceError> { fn method_not_allowed() -> Result<Response<Body>, crate::ServiceError> {
Ok( Ok(
Response::builder().status(StatusCode::METHOD_NOT_ALLOWED) Response::builder().status(StatusCode::METHOD_NOT_ALLOWED)
@ -185,7 +183,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
let path = paths::GLOBAL_REGEX_SET.matches(uri.path()); let path = paths::GLOBAL_REGEX_SET.matches(uri.path());
match method { match method {
// MultipartRelatedRequestPost - POST /multipart_related_request // MultipartRelatedRequestPost - POST /multipart_related_request
hyper::Method::POST if path.matched(paths::ID_MULTIPART_RELATED_REQUEST) => { hyper::Method::POST if path.matched(paths::ID_MULTIPART_RELATED_REQUEST) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -272,8 +269,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.body(Body::from("Missing required multipart/related parameter required_binary_field".to_string())) .body(Body::from("Missing required multipart/related parameter required_binary_field".to_string()))
.expect("Unable to create Bad Request response for missing multipart/related parameter required_binary_field due to schema")) .expect("Unable to create Bad Request response for missing multipart/related parameter required_binary_field due to schema"))
}; };
let result = api_impl.multipart_related_request_post( let result = api_impl.multipart_related_request_post(
param_required_binary_field, param_required_binary_field,
param_object_field, param_object_field,
@ -297,7 +292,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
MultipartRelatedRequestPostResponse::OK MultipartRelatedRequestPostResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(201).expect("Unable to turn 201 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(201).expect("Unable to turn 201 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -316,7 +310,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// MultipartRequestPost - POST /multipart_request // MultipartRequestPost - POST /multipart_request
hyper::Method::POST if path.matched(paths::ID_MULTIPART_REQUEST) => { hyper::Method::POST if path.matched(paths::ID_MULTIPART_REQUEST) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -465,8 +458,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request due to missing required form parameter binary_field")) .expect("Unable to create Bad Request due to missing required form parameter binary_field"))
} }
}; };
let result = api_impl.multipart_request_post( let result = api_impl.multipart_request_post(
param_string_field, param_string_field,
param_binary_field, param_binary_field,
@ -485,7 +476,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
MultipartRequestPostResponse::OK MultipartRequestPostResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(201).expect("Unable to turn 201 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(201).expect("Unable to turn 201 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -504,7 +494,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// MultipleIdenticalMimeTypesPost - POST /multiple-identical-mime-types // MultipleIdenticalMimeTypesPost - POST /multiple-identical-mime-types
hyper::Method::POST if path.matched(paths::ID_MULTIPLE_IDENTICAL_MIME_TYPES) => { hyper::Method::POST if path.matched(paths::ID_MULTIPLE_IDENTICAL_MIME_TYPES) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -567,8 +556,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
} }
// Check that the required multipart chunks are present. // Check that the required multipart chunks are present.
let result = api_impl.multiple_identical_mime_types_post( let result = api_impl.multiple_identical_mime_types_post(
param_binary1, param_binary1,
param_binary2, param_binary2,
@ -591,7 +578,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
MultipleIdenticalMimeTypesPostResponse::OK MultipleIdenticalMimeTypesPostResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -610,7 +596,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
_ if path.matched(paths::ID_MULTIPART_RELATED_REQUEST) => method_not_allowed(), _ if path.matched(paths::ID_MULTIPART_RELATED_REQUEST) => method_not_allowed(),
_ if path.matched(paths::ID_MULTIPART_REQUEST) => method_not_allowed(), _ if path.matched(paths::ID_MULTIPART_REQUEST) => method_not_allowed(),
_ if path.matched(paths::ID_MULTIPLE_IDENTICAL_MIME_TYPES) => method_not_allowed(), _ if path.matched(paths::ID_MULTIPLE_IDENTICAL_MIME_TYPES) => method_not_allowed(),
@ -626,7 +611,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
)) ))
} }
} }
/// Request parser for `Api`. /// Request parser for `Api`.
pub struct ApiRequestParser; pub struct ApiRequestParser;
impl<T> RequestParser<T> for ApiRequestParser { impl<T> RequestParser<T> for ApiRequestParser {

View File

@ -119,5 +119,4 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op_get({:?}) - X-Span-ID: {:?}", op_get_request, context.get().0.clone()); info!("op_get({:?}) - X-Span-ID: {:?}", op_get_request, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
} }

View File

@ -427,7 +427,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -460,5 +459,4 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
} }

View File

@ -25,7 +25,6 @@ pub enum OpGetResponse {
/// OK /// OK
OK OK
} }
/// API /// API
#[async_trait] #[async_trait]
#[allow(clippy::too_many_arguments, clippy::ptr_arg)] #[allow(clippy::too_many_arguments, clippy::ptr_arg)]

View File

@ -41,7 +41,6 @@ mod paths {
pub(crate) static ID_OP: usize = 0; pub(crate) static ID_OP: usize = 0;
} }
pub struct MakeService<T, C> where pub struct MakeService<T, C> where
T: Api<C> + Clone + Send + 'static, T: Api<C> + Clone + Send + 'static,
C: Has<XSpanIdString> + Send + Sync + 'static C: Has<XSpanIdString> + Send + Sync + 'static
@ -80,7 +79,6 @@ impl<T, C, Target> hyper::service::Service<Target> for MakeService<T, C> where
future::ok(service) future::ok(service)
} }
} }
fn method_not_allowed() -> Result<Response<Body>, crate::ServiceError> { fn method_not_allowed() -> Result<Response<Body>, crate::ServiceError> {
Ok( Ok(
Response::builder().status(StatusCode::METHOD_NOT_ALLOWED) Response::builder().status(StatusCode::METHOD_NOT_ALLOWED)
@ -147,7 +145,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
let path = paths::GLOBAL_REGEX_SET.matches(uri.path()); let path = paths::GLOBAL_REGEX_SET.matches(uri.path());
match method { match method {
// OpGet - GET /op // OpGet - GET /op
hyper::Method::GET if path.matched(paths::ID_OP) => { hyper::Method::GET if path.matched(paths::ID_OP) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -179,8 +176,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.body(Body::from("Missing required body parameter OpGetRequest")) .body(Body::from("Missing required body parameter OpGetRequest"))
.expect("Unable to create Bad Request response for missing body parameter OpGetRequest")), .expect("Unable to create Bad Request response for missing body parameter OpGetRequest")),
}; };
let result = api_impl.op_get( let result = api_impl.op_get(
param_op_get_request, param_op_get_request,
&context &context
@ -202,7 +197,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
OpGetResponse::OK OpGetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -221,7 +215,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
_ if path.matched(paths::ID_OP) => method_not_allowed(), _ if path.matched(paths::ID_OP) => method_not_allowed(),
_ => Ok(Response::builder().status(StatusCode::NOT_FOUND) _ => Ok(Response::builder().status(StatusCode::NOT_FOUND)
.body(Body::empty()) .body(Body::empty())
@ -234,7 +227,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
)) ))
} }
} }
/// Request parser for `Api`. /// Request parser for `Api`.
pub struct ApiRequestParser; pub struct ApiRequestParser;
impl<T> RequestParser<T> for ApiRequestParser { impl<T> RequestParser<T> for ApiRequestParser {

View File

@ -112,7 +112,6 @@ impl<C> CallbackApi<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("callback_callback_with_header_post({:?}) - X-Span-ID: {:?}", information, context.get().0.clone()); info!("callback_callback_with_header_post({:?}) - X-Span-ID: {:?}", information, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn callback_callback_post( async fn callback_callback_post(
&self, &self,
callback_request_query_url: String, callback_request_query_url: String,
@ -121,5 +120,4 @@ impl<C> CallbackApi<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("callback_callback_post() - X-Span-ID: {:?}", context.get().0.clone()); info!("callback_callback_post() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
} }

View File

@ -149,7 +149,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("any_of_get({:?}) - X-Span-ID: {:?}", any_of, context.get().0.clone()); info!("any_of_get({:?}) - X-Span-ID: {:?}", any_of, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn callback_with_header_post( async fn callback_with_header_post(
&self, &self,
url: String, url: String,
@ -158,7 +157,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("callback_with_header_post(\"{}\") - X-Span-ID: {:?}", url, context.get().0.clone()); info!("callback_with_header_post(\"{}\") - X-Span-ID: {:?}", url, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn complex_query_param_get( async fn complex_query_param_get(
&self, &self,
list_of_strings: Option<&Vec<models::StringObject>>, list_of_strings: Option<&Vec<models::StringObject>>,
@ -167,7 +165,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("complex_query_param_get({:?}) - X-Span-ID: {:?}", list_of_strings, context.get().0.clone()); info!("complex_query_param_get({:?}) - X-Span-ID: {:?}", list_of_strings, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Test examples /// Test examples
async fn examples_test( async fn examples_test(
&self, &self,
@ -177,7 +174,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("examples_test({:?}) - X-Span-ID: {:?}", ids, context.get().0.clone()); info!("examples_test({:?}) - X-Span-ID: {:?}", ids, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Test a Form Post /// Test a Form Post
async fn form_test( async fn form_test(
&self, &self,
@ -187,7 +183,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("form_test({:?}) - X-Span-ID: {:?}", required_array, context.get().0.clone()); info!("form_test({:?}) - X-Span-ID: {:?}", required_array, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn get_with_boolean_parameter( async fn get_with_boolean_parameter(
&self, &self,
iambool: bool, iambool: bool,
@ -196,7 +191,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("get_with_boolean_parameter({}) - X-Span-ID: {:?}", iambool, context.get().0.clone()); info!("get_with_boolean_parameter({}) - X-Span-ID: {:?}", iambool, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn json_complex_query_param_get( async fn json_complex_query_param_get(
&self, &self,
list_of_strings: Option<&Vec<models::StringObject>>, list_of_strings: Option<&Vec<models::StringObject>>,
@ -205,7 +199,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("json_complex_query_param_get({:?}) - X-Span-ID: {:?}", list_of_strings, context.get().0.clone()); info!("json_complex_query_param_get({:?}) - X-Span-ID: {:?}", list_of_strings, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn mandatory_request_header_get( async fn mandatory_request_header_get(
&self, &self,
x_header: String, x_header: String,
@ -214,7 +207,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("mandatory_request_header_get(\"{}\") - X-Span-ID: {:?}", x_header, context.get().0.clone()); info!("mandatory_request_header_get(\"{}\") - X-Span-ID: {:?}", x_header, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn merge_patch_json_get( async fn merge_patch_json_get(
&self, &self,
context: &C) -> Result<MergePatchJsonGetResponse, ApiError> context: &C) -> Result<MergePatchJsonGetResponse, ApiError>
@ -222,7 +214,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("merge_patch_json_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("merge_patch_json_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Get some stuff. /// Get some stuff.
async fn multiget_get( async fn multiget_get(
&self, &self,
@ -231,7 +222,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("multiget_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("multiget_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn multiple_auth_scheme_get( async fn multiple_auth_scheme_get(
&self, &self,
context: &C) -> Result<MultipleAuthSchemeGetResponse, ApiError> context: &C) -> Result<MultipleAuthSchemeGetResponse, ApiError>
@ -239,7 +229,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("multiple_auth_scheme_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("multiple_auth_scheme_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn one_of_get( async fn one_of_get(
&self, &self,
context: &C) -> Result<OneOfGetResponse, ApiError> context: &C) -> Result<OneOfGetResponse, ApiError>
@ -247,7 +236,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("one_of_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("one_of_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn override_server_get( async fn override_server_get(
&self, &self,
context: &C) -> Result<OverrideServerGetResponse, ApiError> context: &C) -> Result<OverrideServerGetResponse, ApiError>
@ -255,7 +243,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("override_server_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("override_server_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Get some stuff with parameters. /// Get some stuff with parameters.
async fn paramget_get( async fn paramget_get(
&self, &self,
@ -267,7 +254,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("paramget_get({:?}, {:?}, {:?}) - X-Span-ID: {:?}", uuid, some_object, some_list, context.get().0.clone()); info!("paramget_get({:?}, {:?}, {:?}) - X-Span-ID: {:?}", uuid, some_object, some_list, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn readonly_auth_scheme_get( async fn readonly_auth_scheme_get(
&self, &self,
context: &C) -> Result<ReadonlyAuthSchemeGetResponse, ApiError> context: &C) -> Result<ReadonlyAuthSchemeGetResponse, ApiError>
@ -275,7 +261,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("readonly_auth_scheme_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("readonly_auth_scheme_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn register_callback_post( async fn register_callback_post(
&self, &self,
url: String, url: String,
@ -284,7 +269,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("register_callback_post(\"{}\") - X-Span-ID: {:?}", url, context.get().0.clone()); info!("register_callback_post(\"{}\") - X-Span-ID: {:?}", url, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn required_octet_stream_put( async fn required_octet_stream_put(
&self, &self,
body: swagger::ByteArray, body: swagger::ByteArray,
@ -293,7 +277,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("required_octet_stream_put({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); info!("required_octet_stream_put({:?}) - X-Span-ID: {:?}", body, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn responses_with_headers_get( async fn responses_with_headers_get(
&self, &self,
context: &C) -> Result<ResponsesWithHeadersGetResponse, ApiError> context: &C) -> Result<ResponsesWithHeadersGetResponse, ApiError>
@ -301,7 +284,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("responses_with_headers_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("responses_with_headers_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn rfc7807_get( async fn rfc7807_get(
&self, &self,
context: &C) -> Result<Rfc7807GetResponse, ApiError> context: &C) -> Result<Rfc7807GetResponse, ApiError>
@ -309,7 +291,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("rfc7807_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("rfc7807_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn two_first_letter_headers( async fn two_first_letter_headers(
&self, &self,
x_header_one: Option<bool>, x_header_one: Option<bool>,
@ -319,7 +300,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("two_first_letter_headers({:?}, {:?}) - X-Span-ID: {:?}", x_header_one, x_header_two, context.get().0.clone()); info!("two_first_letter_headers({:?}, {:?}) - X-Span-ID: {:?}", x_header_one, x_header_two, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn untyped_property_get( async fn untyped_property_get(
&self, &self,
object_untyped_props: Option<models::ObjectUntypedProps>, object_untyped_props: Option<models::ObjectUntypedProps>,
@ -328,7 +308,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("untyped_property_get({:?}) - X-Span-ID: {:?}", object_untyped_props, context.get().0.clone()); info!("untyped_property_get({:?}) - X-Span-ID: {:?}", object_untyped_props, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn uuid_get( async fn uuid_get(
&self, &self,
context: &C) -> Result<UuidGetResponse, ApiError> context: &C) -> Result<UuidGetResponse, ApiError>
@ -336,7 +315,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("uuid_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("uuid_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn xml_extra_post( async fn xml_extra_post(
&self, &self,
duplicate_xml_object: Option<models::DuplicateXmlObject>, duplicate_xml_object: Option<models::DuplicateXmlObject>,
@ -345,7 +323,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("xml_extra_post({:?}) - X-Span-ID: {:?}", duplicate_xml_object, context.get().0.clone()); info!("xml_extra_post({:?}) - X-Span-ID: {:?}", duplicate_xml_object, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn xml_other_post( async fn xml_other_post(
&self, &self,
another_xml_object: Option<models::AnotherXmlObject>, another_xml_object: Option<models::AnotherXmlObject>,
@ -354,7 +331,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("xml_other_post({:?}) - X-Span-ID: {:?}", another_xml_object, context.get().0.clone()); info!("xml_other_post({:?}) - X-Span-ID: {:?}", another_xml_object, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn xml_other_put( async fn xml_other_put(
&self, &self,
another_xml_array: Option<models::AnotherXmlArray>, another_xml_array: Option<models::AnotherXmlArray>,
@ -363,7 +339,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("xml_other_put({:?}) - X-Span-ID: {:?}", another_xml_array, context.get().0.clone()); info!("xml_other_put({:?}) - X-Span-ID: {:?}", another_xml_array, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Post an array. It's important we test apostrophes, so include one here. /// Post an array. It's important we test apostrophes, so include one here.
async fn xml_post( async fn xml_post(
&self, &self,
@ -373,7 +348,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("xml_post({:?}) - X-Span-ID: {:?}", xml_array, context.get().0.clone()); info!("xml_post({:?}) - X-Span-ID: {:?}", xml_array, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn xml_put( async fn xml_put(
&self, &self,
xml_object: Option<models::XmlObject>, xml_object: Option<models::XmlObject>,
@ -382,7 +356,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("xml_put({:?}) - X-Span-ID: {:?}", xml_object, context.get().0.clone()); info!("xml_put({:?}) - X-Span-ID: {:?}", xml_object, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn enum_in_path_path_param_get( async fn enum_in_path_path_param_get(
&self, &self,
path_param: models::StringEnum, path_param: models::StringEnum,
@ -391,7 +364,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("enum_in_path_path_param_get({:?}) - X-Span-ID: {:?}", path_param, context.get().0.clone()); info!("enum_in_path_path_param_get({:?}) - X-Span-ID: {:?}", path_param, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn multiple_path_params_with_very_long_path_to_test_formatting_path_param_a_path_param_b_get( async fn multiple_path_params_with_very_long_path_to_test_formatting_path_param_a_path_param_b_get(
&self, &self,
path_param_a: String, path_param_a: String,
@ -401,7 +373,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("multiple_path_params_with_very_long_path_to_test_formatting_path_param_a_path_param_b_get(\"{}\", \"{}\") - X-Span-ID: {:?}", path_param_a, path_param_b, context.get().0.clone()); info!("multiple_path_params_with_very_long_path_to_test_formatting_path_param_a_path_param_b_get(\"{}\", \"{}\") - X-Span-ID: {:?}", path_param_a, path_param_b, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn create_repo( async fn create_repo(
&self, &self,
object_param: models::ObjectParam, object_param: models::ObjectParam,
@ -410,7 +381,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("create_repo({:?}) - X-Span-ID: {:?}", object_param, context.get().0.clone()); info!("create_repo({:?}) - X-Span-ID: {:?}", object_param, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn get_repo_info( async fn get_repo_info(
&self, &self,
repo_id: String, repo_id: String,
@ -419,5 +389,4 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("get_repo_info(\"{}\") - X-Span-ID: {:?}", repo_id, context.get().0.clone()); info!("get_repo_info(\"{}\") - X-Span-ID: {:?}", repo_id, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
} }

View File

@ -54,7 +54,6 @@ mod paths {
} }
pub struct MakeService<T, C> where pub struct MakeService<T, C> where
T: Api<C> + Clone + Send + 'static, T: Api<C> + Clone + Send + 'static,
C: Has<XSpanIdString> + Has<Option<Authorization>> + Send + Sync + 'static C: Has<XSpanIdString> + Has<Option<Authorization>> + Send + Sync + 'static
@ -94,7 +93,6 @@ impl<T, C, Target> hyper::service::Service<Target> for MakeService<T, C> where
} }
} }
fn method_not_allowed() -> Result<Response<Body>, crate::ServiceError> { fn method_not_allowed() -> Result<Response<Body>, crate::ServiceError> {
Ok( Ok(
Response::builder().status(StatusCode::METHOD_NOT_ALLOWED) Response::builder().status(StatusCode::METHOD_NOT_ALLOWED)
@ -161,7 +159,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
let path = paths::GLOBAL_REGEX_SET.matches(uri.path()); let path = paths::GLOBAL_REGEX_SET.matches(uri.path());
match method { match method {
// CallbackCallbackWithHeaderPost - POST /{$request.query.url}/callback-with-header // CallbackCallbackWithHeaderPost - POST /{$request.query.url}/callback-with-header
hyper::Method::POST if path.matched(paths::ID_REQUEST_QUERY_URL_CALLBACK_WITH_HEADER) => { hyper::Method::POST if path.matched(paths::ID_REQUEST_QUERY_URL_CALLBACK_WITH_HEADER) => {
// Path parameters // Path parameters
@ -210,7 +207,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
CallbackCallbackWithHeaderPostResponse::OK CallbackCallbackWithHeaderPostResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(204).expect("Unable to turn 204 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(204).expect("Unable to turn 204 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -223,7 +219,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// CallbackCallbackPost - POST /{$request.query.url}/callback // CallbackCallbackPost - POST /{$request.query.url}/callback
hyper::Method::POST if path.matched(paths::ID_REQUEST_QUERY_URL_CALLBACK) => { hyper::Method::POST if path.matched(paths::ID_REQUEST_QUERY_URL_CALLBACK) => {
// Path parameters // Path parameters
@ -251,7 +246,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
CallbackCallbackPostResponse::OK CallbackCallbackPostResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(204).expect("Unable to turn 204 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(204).expect("Unable to turn 204 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -264,7 +258,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
_ if path.matched(paths::ID_REQUEST_QUERY_URL_CALLBACK) => method_not_allowed(), _ if path.matched(paths::ID_REQUEST_QUERY_URL_CALLBACK) => method_not_allowed(),
_ if path.matched(paths::ID_REQUEST_QUERY_URL_CALLBACK_WITH_HEADER) => method_not_allowed(), _ if path.matched(paths::ID_REQUEST_QUERY_URL_CALLBACK_WITH_HEADER) => method_not_allowed(),
_ => Ok(Response::builder().status(StatusCode::NOT_FOUND) _ => Ok(Response::builder().status(StatusCode::NOT_FOUND)
@ -278,7 +271,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
)) ))
} }
} }
/// Request parser for `Api`. /// Request parser for `Api`.
pub struct ApiRequestParser; pub struct ApiRequestParser;
impl<T> RequestParser<T> for ApiRequestParser { impl<T> RequestParser<T> for ApiRequestParser {

View File

@ -452,7 +452,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -474,7 +473,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<models::AnyOfObject>(body) let body = serde_json::from_str::<models::AnyOfObject>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(AnyOfGetResponse::Success Ok(AnyOfGetResponse::Success
(body) (body)
) )
@ -490,7 +488,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<models::Model12345AnyOfObject>(body) let body = serde_json::from_str::<models::Model12345AnyOfObject>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(AnyOfGetResponse::AlternateSuccess Ok(AnyOfGetResponse::AlternateSuccess
(body) (body)
) )
@ -506,7 +503,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<models::AnyOfGet202Response>(body) let body = serde_json::from_str::<models::AnyOfGet202Response>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(AnyOfGetResponse::AnyOfSuccess Ok(AnyOfGetResponse::AnyOfSuccess
(body) (body)
) )
@ -528,7 +524,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn callback_with_header_post( async fn callback_with_header_post(
&self, &self,
param_url: String, param_url: String,
@ -565,7 +560,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -598,7 +592,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn complex_query_param_get( async fn complex_query_param_get(
&self, &self,
param_list_of_strings: Option<&Vec<models::StringObject>>, param_list_of_strings: Option<&Vec<models::StringObject>>,
@ -637,7 +630,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -670,7 +662,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn examples_test( async fn examples_test(
&self, &self,
param_ids: Option<&Vec<String>>, param_ids: Option<&Vec<String>>,
@ -709,7 +700,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -731,7 +721,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<models::AdditionalPropertiesReferencedAnyOfObject>(body) let body = serde_json::from_str::<models::AdditionalPropertiesReferencedAnyOfObject>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(ExamplesTestResponse::OK Ok(ExamplesTestResponse::OK
(body) (body)
) )
@ -753,7 +742,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn form_test( async fn form_test(
&self, &self,
param_required_array: Option<&Vec<String>>, param_required_array: Option<&Vec<String>>,
@ -810,7 +798,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -843,7 +830,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn get_with_boolean_parameter( async fn get_with_boolean_parameter(
&self, &self,
param_iambool: bool, param_iambool: bool,
@ -880,7 +866,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -913,7 +898,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn json_complex_query_param_get( async fn json_complex_query_param_get(
&self, &self,
param_list_of_strings: Option<&Vec<models::StringObject>>, param_list_of_strings: Option<&Vec<models::StringObject>>,
@ -955,7 +939,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -988,7 +971,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn mandatory_request_header_get( async fn mandatory_request_header_get(
&self, &self,
param_x_header: String, param_x_header: String,
@ -1023,7 +1005,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1068,7 +1049,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn merge_patch_json_get( async fn merge_patch_json_get(
&self, &self,
context: &C) -> Result<MergePatchJsonGetResponse, ApiError> context: &C) -> Result<MergePatchJsonGetResponse, ApiError>
@ -1102,7 +1082,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1124,7 +1103,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<models::AnotherXmlObject>(body) let body = serde_json::from_str::<models::AnotherXmlObject>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(MergePatchJsonGetResponse::Merge Ok(MergePatchJsonGetResponse::Merge
(body) (body)
) )
@ -1146,7 +1124,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn multiget_get( async fn multiget_get(
&self, &self,
context: &C) -> Result<MultigetGetResponse, ApiError> context: &C) -> Result<MultigetGetResponse, ApiError>
@ -1180,7 +1157,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1202,7 +1178,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<models::AnotherXmlObject>(body) let body = serde_json::from_str::<models::AnotherXmlObject>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(MultigetGetResponse::JSONRsp Ok(MultigetGetResponse::JSONRsp
(body) (body)
) )
@ -1220,7 +1195,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_xml_rs::from_str::<models::MultigetGet201Response>(body) let body = serde_xml_rs::from_str::<models::MultigetGet201Response>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(MultigetGetResponse::XMLRsp Ok(MultigetGetResponse::XMLRsp
(body) (body)
) )
@ -1233,7 +1207,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = swagger::ByteArray(body.to_vec()); let body = swagger::ByteArray(body.to_vec());
Ok(MultigetGetResponse::OctetRsp Ok(MultigetGetResponse::OctetRsp
(body) (body)
) )
@ -1248,7 +1221,6 @@ impl<S, C> Api<C> for Client<S, C> where
.map_err(|e| ApiError(format!("Response was not valid UTF8: {e}")))?; .map_err(|e| ApiError(format!("Response was not valid UTF8: {e}")))?;
let body = body.to_string(); let body = body.to_string();
Ok(MultigetGetResponse::StringRsp Ok(MultigetGetResponse::StringRsp
(body) (body)
) )
@ -1264,7 +1236,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<models::AnotherXmlObject>(body) let body = serde_json::from_str::<models::AnotherXmlObject>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(MultigetGetResponse::DuplicateResponseLongText Ok(MultigetGetResponse::DuplicateResponseLongText
(body) (body)
) )
@ -1280,7 +1251,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<models::AnotherXmlObject>(body) let body = serde_json::from_str::<models::AnotherXmlObject>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(MultigetGetResponse::DuplicateResponseLongText_2 Ok(MultigetGetResponse::DuplicateResponseLongText_2
(body) (body)
) )
@ -1296,7 +1266,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<models::AnotherXmlObject>(body) let body = serde_json::from_str::<models::AnotherXmlObject>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(MultigetGetResponse::DuplicateResponseLongText_3 Ok(MultigetGetResponse::DuplicateResponseLongText_3
(body) (body)
) )
@ -1318,7 +1287,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn multiple_auth_scheme_get( async fn multiple_auth_scheme_get(
&self, &self,
context: &C) -> Result<MultipleAuthSchemeGetResponse, ApiError> context: &C) -> Result<MultipleAuthSchemeGetResponse, ApiError>
@ -1352,7 +1320,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1403,7 +1370,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn one_of_get( async fn one_of_get(
&self, &self,
context: &C) -> Result<OneOfGetResponse, ApiError> context: &C) -> Result<OneOfGetResponse, ApiError>
@ -1437,7 +1403,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1459,7 +1424,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<models::OneOfGet200Response>(body) let body = serde_json::from_str::<models::OneOfGet200Response>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(OneOfGetResponse::Success Ok(OneOfGetResponse::Success
(body) (body)
) )
@ -1481,7 +1445,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn override_server_get( async fn override_server_get(
&self, &self,
context: &C) -> Result<OverrideServerGetResponse, ApiError> context: &C) -> Result<OverrideServerGetResponse, ApiError>
@ -1515,7 +1478,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1548,7 +1510,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn paramget_get( async fn paramget_get(
&self, &self,
param_uuid: Option<uuid::Uuid>, param_uuid: Option<uuid::Uuid>,
@ -1597,7 +1558,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1619,7 +1579,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<models::AnotherXmlObject>(body) let body = serde_json::from_str::<models::AnotherXmlObject>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(ParamgetGetResponse::JSONRsp Ok(ParamgetGetResponse::JSONRsp
(body) (body)
) )
@ -1641,7 +1600,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn readonly_auth_scheme_get( async fn readonly_auth_scheme_get(
&self, &self,
context: &C) -> Result<ReadonlyAuthSchemeGetResponse, ApiError> context: &C) -> Result<ReadonlyAuthSchemeGetResponse, ApiError>
@ -1675,7 +1633,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1726,7 +1683,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn register_callback_post( async fn register_callback_post(
&self, &self,
param_url: String, param_url: String,
@ -1763,7 +1719,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1796,7 +1751,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn required_octet_stream_put( async fn required_octet_stream_put(
&self, &self,
param_body: swagger::ByteArray, param_body: swagger::ByteArray,
@ -1842,7 +1796,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1875,7 +1828,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn responses_with_headers_get( async fn responses_with_headers_get(
&self, &self,
context: &C) -> Result<ResponsesWithHeadersGetResponse, ApiError> context: &C) -> Result<ResponsesWithHeadersGetResponse, ApiError>
@ -1909,7 +1861,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1973,7 +1924,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<String>(body) let body = serde_json::from_str::<String>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(ResponsesWithHeadersGetResponse::Success Ok(ResponsesWithHeadersGetResponse::Success
{ {
body, body,
@ -2037,7 +1987,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn rfc7807_get( async fn rfc7807_get(
&self, &self,
context: &C) -> Result<Rfc7807GetResponse, ApiError> context: &C) -> Result<Rfc7807GetResponse, ApiError>
@ -2071,7 +2020,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2093,7 +2041,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<models::ObjectWithArrayOfObjects>(body) let body = serde_json::from_str::<models::ObjectWithArrayOfObjects>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(Rfc7807GetResponse::OK Ok(Rfc7807GetResponse::OK
(body) (body)
) )
@ -2109,7 +2056,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<models::ObjectWithArrayOfObjects>(body) let body = serde_json::from_str::<models::ObjectWithArrayOfObjects>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(Rfc7807GetResponse::NotFound Ok(Rfc7807GetResponse::NotFound
(body) (body)
) )
@ -2127,7 +2073,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_xml_rs::from_str::<models::ObjectWithArrayOfObjects>(body) let body = serde_xml_rs::from_str::<models::ObjectWithArrayOfObjects>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(Rfc7807GetResponse::NotAcceptable Ok(Rfc7807GetResponse::NotAcceptable
(body) (body)
) )
@ -2149,7 +2094,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn two_first_letter_headers( async fn two_first_letter_headers(
&self, &self,
param_x_header_one: Option<bool>, param_x_header_one: Option<bool>,
@ -2185,7 +2129,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2253,7 +2196,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn untyped_property_get( async fn untyped_property_get(
&self, &self,
param_object_untyped_props: Option<models::ObjectUntypedProps>, param_object_untyped_props: Option<models::ObjectUntypedProps>,
@ -2301,7 +2243,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2334,7 +2275,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn uuid_get( async fn uuid_get(
&self, &self,
context: &C) -> Result<UuidGetResponse, ApiError> context: &C) -> Result<UuidGetResponse, ApiError>
@ -2368,7 +2308,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2390,7 +2329,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<uuid::Uuid>(body) let body = serde_json::from_str::<uuid::Uuid>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(UuidGetResponse::DuplicateResponseLongText Ok(UuidGetResponse::DuplicateResponseLongText
(body) (body)
) )
@ -2412,7 +2350,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn xml_extra_post( async fn xml_extra_post(
&self, &self,
param_duplicate_xml_object: Option<models::DuplicateXmlObject>, param_duplicate_xml_object: Option<models::DuplicateXmlObject>,
@ -2460,7 +2397,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2498,7 +2434,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn xml_other_post( async fn xml_other_post(
&self, &self,
param_another_xml_object: Option<models::AnotherXmlObject>, param_another_xml_object: Option<models::AnotherXmlObject>,
@ -2546,7 +2481,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2570,7 +2504,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_xml_rs::from_str::<models::AnotherXmlObject>(body) let body = serde_xml_rs::from_str::<models::AnotherXmlObject>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(XmlOtherPostResponse::OK Ok(XmlOtherPostResponse::OK
(body) (body)
) )
@ -2597,7 +2530,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn xml_other_put( async fn xml_other_put(
&self, &self,
param_another_xml_array: Option<models::AnotherXmlArray>, param_another_xml_array: Option<models::AnotherXmlArray>,
@ -2645,7 +2577,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2683,7 +2614,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn xml_post( async fn xml_post(
&self, &self,
param_xml_array: Option<models::XmlArray>, param_xml_array: Option<models::XmlArray>,
@ -2731,7 +2661,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2769,7 +2698,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn xml_put( async fn xml_put(
&self, &self,
param_xml_object: Option<models::XmlObject>, param_xml_object: Option<models::XmlObject>,
@ -2817,7 +2745,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2855,7 +2782,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn enum_in_path_path_param_get( async fn enum_in_path_path_param_get(
&self, &self,
param_path_param: models::StringEnum, param_path_param: models::StringEnum,
@ -2891,7 +2817,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2924,7 +2849,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn multiple_path_params_with_very_long_path_to_test_formatting_path_param_a_path_param_b_get( async fn multiple_path_params_with_very_long_path_to_test_formatting_path_param_a_path_param_b_get(
&self, &self,
param_path_param_a: String, param_path_param_a: String,
@ -2962,7 +2886,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2995,7 +2918,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn create_repo( async fn create_repo(
&self, &self,
param_object_param: models::ObjectParam, param_object_param: models::ObjectParam,
@ -3041,7 +2963,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -3074,7 +2995,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn get_repo_info( async fn get_repo_info(
&self, &self,
param_repo_id: String, param_repo_id: String,
@ -3110,7 +3030,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -3132,7 +3051,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<String>(body) let body = serde_json::from_str::<String>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(GetRepoInfoResponse::OK Ok(GetRepoInfoResponse::OK
(body) (body)
) )
@ -3154,5 +3072,4 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
} }

View File

@ -35,57 +35,48 @@ pub enum AnyOfGetResponse {
AnyOfSuccess AnyOfSuccess
(models::AnyOfGet202Response) (models::AnyOfGet202Response)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum CallbackWithHeaderPostResponse { pub enum CallbackWithHeaderPostResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum ComplexQueryParamGetResponse { pub enum ComplexQueryParamGetResponse {
/// Success /// Success
Success Success
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum ExamplesTestResponse { pub enum ExamplesTestResponse {
/// OK /// OK
OK OK
(models::AdditionalPropertiesReferencedAnyOfObject) (models::AdditionalPropertiesReferencedAnyOfObject)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum FormTestResponse { pub enum FormTestResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum GetWithBooleanParameterResponse { pub enum GetWithBooleanParameterResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum JsonComplexQueryParamGetResponse { pub enum JsonComplexQueryParamGetResponse {
/// Success /// Success
Success Success
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum MandatoryRequestHeaderGetResponse { pub enum MandatoryRequestHeaderGetResponse {
/// Success /// Success
Success Success
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum MergePatchJsonGetResponse { pub enum MergePatchJsonGetResponse {
/// merge-patch+json-encoded response /// merge-patch+json-encoded response
Merge Merge
(models::AnotherXmlObject) (models::AnotherXmlObject)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use] #[must_use]
pub enum MultigetGetResponse { pub enum MultigetGetResponse {
@ -117,51 +108,43 @@ pub enum MultigetGetResponse {
DuplicateResponseLongText_3 DuplicateResponseLongText_3
(models::AnotherXmlObject) (models::AnotherXmlObject)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum MultipleAuthSchemeGetResponse { pub enum MultipleAuthSchemeGetResponse {
/// Check that limiting to multiple required auth schemes works /// Check that limiting to multiple required auth schemes works
CheckThatLimitingToMultipleRequiredAuthSchemesWorks CheckThatLimitingToMultipleRequiredAuthSchemesWorks
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum OneOfGetResponse { pub enum OneOfGetResponse {
/// Success /// Success
Success Success
(models::OneOfGet200Response) (models::OneOfGet200Response)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum OverrideServerGetResponse { pub enum OverrideServerGetResponse {
/// Success. /// Success.
Success Success
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum ParamgetGetResponse { pub enum ParamgetGetResponse {
/// JSON rsp /// JSON rsp
JSONRsp JSONRsp
(models::AnotherXmlObject) (models::AnotherXmlObject)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum ReadonlyAuthSchemeGetResponse { pub enum ReadonlyAuthSchemeGetResponse {
/// Check that limiting to a single required auth scheme works /// Check that limiting to a single required auth scheme works
CheckThatLimitingToASingleRequiredAuthSchemeWorks CheckThatLimitingToASingleRequiredAuthSchemeWorks
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum RegisterCallbackPostResponse { pub enum RegisterCallbackPostResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum RequiredOctetStreamPutResponse { pub enum RequiredOctetStreamPutResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use] #[must_use]
pub enum ResponsesWithHeadersGetResponse { pub enum ResponsesWithHeadersGetResponse {
@ -197,7 +180,6 @@ pub enum ResponsesWithHeadersGetResponse {
> >
} }
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use] #[must_use]
pub enum Rfc7807GetResponse { pub enum Rfc7807GetResponse {
@ -213,26 +195,22 @@ pub enum Rfc7807GetResponse {
NotAcceptable NotAcceptable
(models::ObjectWithArrayOfObjects) (models::ObjectWithArrayOfObjects)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum TwoFirstLetterHeadersResponse { pub enum TwoFirstLetterHeadersResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum UntypedPropertyGetResponse { pub enum UntypedPropertyGetResponse {
/// Check that untyped properties works /// Check that untyped properties works
CheckThatUntypedPropertiesWorks CheckThatUntypedPropertiesWorks
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum UuidGetResponse { pub enum UuidGetResponse {
/// Duplicate Response long text. One. /// Duplicate Response long text. One.
DuplicateResponseLongText DuplicateResponseLongText
(uuid::Uuid) (uuid::Uuid)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use] #[must_use]
pub enum XmlExtraPostResponse { pub enum XmlExtraPostResponse {
@ -242,7 +220,6 @@ pub enum XmlExtraPostResponse {
/// Bad Request /// Bad Request
BadRequest BadRequest
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use] #[must_use]
pub enum XmlOtherPostResponse { pub enum XmlOtherPostResponse {
@ -253,7 +230,6 @@ pub enum XmlOtherPostResponse {
/// Bad Request /// Bad Request
BadRequest BadRequest
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use] #[must_use]
pub enum XmlOtherPutResponse { pub enum XmlOtherPutResponse {
@ -263,7 +239,6 @@ pub enum XmlOtherPutResponse {
/// Bad Request /// Bad Request
BadRequest BadRequest
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use] #[must_use]
pub enum XmlPostResponse { pub enum XmlPostResponse {
@ -273,7 +248,6 @@ pub enum XmlPostResponse {
/// Bad Request /// Bad Request
BadRequest BadRequest
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use] #[must_use]
pub enum XmlPutResponse { pub enum XmlPutResponse {
@ -283,32 +257,27 @@ pub enum XmlPutResponse {
/// Bad Request /// Bad Request
BadRequest BadRequest
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum EnumInPathPathParamGetResponse { pub enum EnumInPathPathParamGetResponse {
/// Success /// Success
Success Success
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum MultiplePathParamsWithVeryLongPathToTestFormattingPathParamAPathParamBGetResponse { pub enum MultiplePathParamsWithVeryLongPathToTestFormattingPathParamAPathParamBGetResponse {
/// Success /// Success
Success Success
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum CreateRepoResponse { pub enum CreateRepoResponse {
/// Success /// Success
Success Success
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum GetRepoInfoResponse { pub enum GetRepoInfoResponse {
/// OK /// OK
OK OK
(String) (String)
} }
/// API /// API
#[async_trait] #[async_trait]
#[allow(clippy::too_many_arguments, clippy::ptr_arg)] #[allow(clippy::too_many_arguments, clippy::ptr_arg)]
@ -950,14 +919,12 @@ pub enum CallbackCallbackWithHeaderPostResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum CallbackCallbackPostResponse { pub enum CallbackCallbackPostResponse {
/// OK /// OK
OK OK
} }
/// Callback API /// Callback API
#[async_trait] #[async_trait]
pub trait CallbackApi<C: Send + Sync> { pub trait CallbackApi<C: Send + Sync> {

View File

@ -266,7 +266,6 @@ impl<S, C> CallbackApi<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -317,7 +316,6 @@ impl<S, C> CallbackApi<C> for Client<S, C> where
} }
} }
} }
async fn callback_callback_post( async fn callback_callback_post(
&self, &self,
callback_request_query_url: String, callback_request_query_url: String,
@ -352,7 +350,6 @@ impl<S, C> CallbackApi<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -385,5 +382,4 @@ impl<S, C> CallbackApi<C> for Client<S, C> where
} }
} }
} }
} }

View File

@ -147,7 +147,6 @@ mod paths {
pub(crate) static ID_XML_OTHER: usize = 28; pub(crate) static ID_XML_OTHER: usize = 28;
} }
pub struct MakeService<T, C> where pub struct MakeService<T, C> where
T: Api<C> + Clone + Send + 'static, T: Api<C> + Clone + Send + 'static,
C: Has<XSpanIdString> + Has<Option<Authorization>> + Send + Sync + 'static C: Has<XSpanIdString> + Has<Option<Authorization>> + Send + Sync + 'static
@ -186,7 +185,6 @@ impl<T, C, Target> hyper::service::Service<Target> for MakeService<T, C> where
future::ok(service) future::ok(service)
} }
} }
fn method_not_allowed() -> Result<Response<Body>, crate::ServiceError> { fn method_not_allowed() -> Result<Response<Body>, crate::ServiceError> {
Ok( Ok(
Response::builder().status(StatusCode::METHOD_NOT_ALLOWED) Response::builder().status(StatusCode::METHOD_NOT_ALLOWED)
@ -253,7 +251,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
let path = paths::GLOBAL_REGEX_SET.matches(uri.path()); let path = paths::GLOBAL_REGEX_SET.matches(uri.path());
match method { match method {
// AnyOfGet - GET /any-of // AnyOfGet - GET /any-of
hyper::Method::GET if path.matched(paths::ID_ANY_OF) => { 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) // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
@ -290,7 +287,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
AnyOfGetResponse::AlternateSuccess AnyOfGetResponse::AlternateSuccess
(body) (body)
@ -303,7 +299,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
AnyOfGetResponse::AnyOfSuccess AnyOfGetResponse::AnyOfSuccess
(body) (body)
@ -316,7 +311,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -329,7 +323,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// CallbackWithHeaderPost - POST /callback-with-header // CallbackWithHeaderPost - POST /callback-with-header
hyper::Method::POST if path.matched(paths::ID_CALLBACK_WITH_HEADER) => { 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) // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
@ -374,7 +367,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
CallbackWithHeaderPostResponse::OK CallbackWithHeaderPostResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(204).expect("Unable to turn 204 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(204).expect("Unable to turn 204 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -387,7 +379,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// ComplexQueryParamGet - GET /complex-query-param // ComplexQueryParamGet - GET /complex-query-param
hyper::Method::GET if path.matched(paths::ID_COMPLEX_QUERY_PARAM) => { 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) // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
@ -416,7 +407,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
ComplexQueryParamGetResponse::Success ComplexQueryParamGetResponse::Success
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -429,7 +419,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// ExamplesTest - GET /examples-test // ExamplesTest - GET /examples-test
hyper::Method::GET if path.matched(paths::ID_EXAMPLES_TEST) => { hyper::Method::GET if path.matched(paths::ID_EXAMPLES_TEST) => {
// Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
@ -466,7 +455,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -479,7 +467,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// FormTest - POST /form-test // FormTest - POST /form-test
hyper::Method::POST if path.matched(paths::ID_FORM_TEST) => { hyper::Method::POST if path.matched(paths::ID_FORM_TEST) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -491,8 +478,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// Form parameters // Form parameters
let param_required_array = let param_required_array =
None; None;
let result = api_impl.form_test( let result = api_impl.form_test(
param_required_array.as_ref(), param_required_array.as_ref(),
&context &context
@ -508,7 +493,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
FormTestResponse::OK FormTestResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -527,7 +511,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// GetWithBooleanParameter - GET /get-with-bool // GetWithBooleanParameter - GET /get-with-bool
hyper::Method::GET if path.matched(paths::ID_GET_WITH_BOOL) => { hyper::Method::GET if path.matched(paths::ID_GET_WITH_BOOL) => {
// Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
@ -572,7 +555,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
GetWithBooleanParameterResponse::OK GetWithBooleanParameterResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -585,7 +567,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// JsonComplexQueryParamGet - GET /json-complex-query-param // JsonComplexQueryParamGet - GET /json-complex-query-param
hyper::Method::GET if path.matched(paths::ID_JSON_COMPLEX_QUERY_PARAM) => { 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) // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
@ -623,7 +604,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
JsonComplexQueryParamGetResponse::Success JsonComplexQueryParamGetResponse::Success
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -636,7 +616,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// MandatoryRequestHeaderGet - GET /mandatory-request-header // MandatoryRequestHeaderGet - GET /mandatory-request-header
hyper::Method::GET if path.matched(paths::ID_MANDATORY_REQUEST_HEADER) => { hyper::Method::GET if path.matched(paths::ID_MANDATORY_REQUEST_HEADER) => {
// Header parameters // Header parameters
@ -677,7 +656,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
MandatoryRequestHeaderGetResponse::Success MandatoryRequestHeaderGetResponse::Success
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -690,7 +668,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// MergePatchJsonGet - GET /merge-patch-json // MergePatchJsonGet - GET /merge-patch-json
hyper::Method::GET if path.matched(paths::ID_MERGE_PATCH_JSON) => { hyper::Method::GET if path.matched(paths::ID_MERGE_PATCH_JSON) => {
let result = api_impl.merge_patch_json_get( let result = api_impl.merge_patch_json_get(
@ -715,7 +692,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -728,7 +704,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// MultigetGet - GET /multiget // MultigetGet - GET /multiget
hyper::Method::GET if path.matched(paths::ID_MULTIGET) => { hyper::Method::GET if path.matched(paths::ID_MULTIGET) => {
let result = api_impl.multiget_get( let result = api_impl.multiget_get(
@ -753,7 +728,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
MultigetGetResponse::XMLRsp MultigetGetResponse::XMLRsp
(body) (body)
@ -766,7 +740,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// XML Body // XML Body
let body = serde_xml_rs::to_string(&body).expect("impossible to fail to serialize"); let body = serde_xml_rs::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
MultigetGetResponse::OctetRsp MultigetGetResponse::OctetRsp
(body) (body)
@ -779,7 +752,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// Binary Body // Binary Body
let body = body.0; let body = body.0;
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
MultigetGetResponse::StringRsp MultigetGetResponse::StringRsp
(body) (body)
@ -792,7 +764,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// Plain text Body // Plain text Body
let body = body; let body = body;
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
MultigetGetResponse::DuplicateResponseLongText MultigetGetResponse::DuplicateResponseLongText
(body) (body)
@ -805,7 +776,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
MultigetGetResponse::DuplicateResponseLongText_2 MultigetGetResponse::DuplicateResponseLongText_2
(body) (body)
@ -818,7 +788,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
MultigetGetResponse::DuplicateResponseLongText_3 MultigetGetResponse::DuplicateResponseLongText_3
(body) (body)
@ -831,7 +800,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -844,7 +812,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// MultipleAuthSchemeGet - GET /multiple_auth_scheme // MultipleAuthSchemeGet - GET /multiple_auth_scheme
hyper::Method::GET if path.matched(paths::ID_MULTIPLE_AUTH_SCHEME) => { hyper::Method::GET if path.matched(paths::ID_MULTIPLE_AUTH_SCHEME) => {
{ {
@ -891,7 +858,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
MultipleAuthSchemeGetResponse::CheckThatLimitingToMultipleRequiredAuthSchemesWorks MultipleAuthSchemeGetResponse::CheckThatLimitingToMultipleRequiredAuthSchemesWorks
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -904,7 +870,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// OneOfGet - GET /one-of // OneOfGet - GET /one-of
hyper::Method::GET if path.matched(paths::ID_ONE_OF) => { hyper::Method::GET if path.matched(paths::ID_ONE_OF) => {
let result = api_impl.one_of_get( let result = api_impl.one_of_get(
@ -929,7 +894,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -942,7 +906,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// OverrideServerGet - GET /override-server // OverrideServerGet - GET /override-server
hyper::Method::GET if path.matched(paths::ID_OVERRIDE_SERVER) => { hyper::Method::GET if path.matched(paths::ID_OVERRIDE_SERVER) => {
let result = api_impl.override_server_get( let result = api_impl.override_server_get(
@ -959,7 +922,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
OverrideServerGetResponse::Success OverrideServerGetResponse::Success
=> { => {
*response.status_mut() = StatusCode::from_u16(204).expect("Unable to turn 204 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(204).expect("Unable to turn 204 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -972,7 +934,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// ParamgetGet - GET /paramget // ParamgetGet - GET /paramget
hyper::Method::GET if path.matched(paths::ID_PARAMGET) => { 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) // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
@ -1045,7 +1006,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -1058,7 +1018,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// ReadonlyAuthSchemeGet - GET /readonly_auth_scheme // ReadonlyAuthSchemeGet - GET /readonly_auth_scheme
hyper::Method::GET if path.matched(paths::ID_READONLY_AUTH_SCHEME) => { hyper::Method::GET if path.matched(paths::ID_READONLY_AUTH_SCHEME) => {
{ {
@ -1104,7 +1063,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
ReadonlyAuthSchemeGetResponse::CheckThatLimitingToASingleRequiredAuthSchemeWorks ReadonlyAuthSchemeGetResponse::CheckThatLimitingToASingleRequiredAuthSchemeWorks
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1117,7 +1075,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// RegisterCallbackPost - POST /register-callback // RegisterCallbackPost - POST /register-callback
hyper::Method::POST if path.matched(paths::ID_REGISTER_CALLBACK) => { 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) // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
@ -1162,7 +1119,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
RegisterCallbackPostResponse::OK RegisterCallbackPostResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(204).expect("Unable to turn 204 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(204).expect("Unable to turn 204 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1175,7 +1131,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// RequiredOctetStreamPut - PUT /required_octet_stream // RequiredOctetStreamPut - PUT /required_octet_stream
hyper::Method::PUT if path.matched(paths::ID_REQUIRED_OCTET_STREAM) => { hyper::Method::PUT if path.matched(paths::ID_REQUIRED_OCTET_STREAM) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -1196,8 +1151,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.body(Body::from("Missing required body parameter body")) .body(Body::from("Missing required body parameter body"))
.expect("Unable to create Bad Request response for missing body parameter body")), .expect("Unable to create Bad Request response for missing body parameter body")),
}; };
let result = api_impl.required_octet_stream_put( let result = api_impl.required_octet_stream_put(
param_body, param_body,
&context &context
@ -1213,7 +1166,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
RequiredOctetStreamPutResponse::OK RequiredOctetStreamPutResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1232,7 +1184,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// ResponsesWithHeadersGet - GET /responses_with_headers // ResponsesWithHeadersGet - GET /responses_with_headers
hyper::Method::GET if path.matched(paths::ID_RESPONSES_WITH_HEADERS) => { hyper::Method::GET if path.matched(paths::ID_RESPONSES_WITH_HEADERS) => {
let result = api_impl.responses_with_headers_get( let result = api_impl.responses_with_headers_get(
@ -1311,7 +1262,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
ResponsesWithHeadersGetResponse::PreconditionFailed ResponsesWithHeadersGetResponse::PreconditionFailed
{ {
@ -1354,7 +1304,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
failure_info failure_info
); );
} }
}, },
}, },
Err(_) => { Err(_) => {
@ -1367,7 +1316,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Rfc7807Get - GET /rfc7807 // Rfc7807Get - GET /rfc7807
hyper::Method::GET if path.matched(paths::ID_RFC7807) => { hyper::Method::GET if path.matched(paths::ID_RFC7807) => {
let result = api_impl.rfc7807_get( let result = api_impl.rfc7807_get(
@ -1392,7 +1340,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
Rfc7807GetResponse::NotFound Rfc7807GetResponse::NotFound
(body) (body)
@ -1405,7 +1352,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
Rfc7807GetResponse::NotAcceptable Rfc7807GetResponse::NotAcceptable
(body) (body)
@ -1418,7 +1364,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// XML Body // XML Body
let body = serde_xml_rs::to_string(&body).expect("impossible to fail to serialize"); let body = serde_xml_rs::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -1431,7 +1376,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// TwoFirstLetterHeaders - POST /operation-two-first-letter-headers // TwoFirstLetterHeaders - POST /operation-two-first-letter-headers
hyper::Method::POST if path.matched(paths::ID_OPERATION_TWO_FIRST_LETTER_HEADERS) => { hyper::Method::POST if path.matched(paths::ID_OPERATION_TWO_FIRST_LETTER_HEADERS) => {
// Header parameters // Header parameters
@ -1488,7 +1432,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
TwoFirstLetterHeadersResponse::OK TwoFirstLetterHeadersResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1501,7 +1444,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// UntypedPropertyGet - GET /untyped_property // UntypedPropertyGet - GET /untyped_property
hyper::Method::GET if path.matched(paths::ID_UNTYPED_PROPERTY) => { hyper::Method::GET if path.matched(paths::ID_UNTYPED_PROPERTY) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -1523,8 +1465,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
} else { } else {
None None
}; };
let result = api_impl.untyped_property_get( let result = api_impl.untyped_property_get(
param_object_untyped_props, param_object_untyped_props,
&context &context
@ -1546,7 +1486,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
UntypedPropertyGetResponse::CheckThatUntypedPropertiesWorks UntypedPropertyGetResponse::CheckThatUntypedPropertiesWorks
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1565,7 +1504,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// UuidGet - GET /uuid // UuidGet - GET /uuid
hyper::Method::GET if path.matched(paths::ID_UUID) => { hyper::Method::GET if path.matched(paths::ID_UUID) => {
let result = api_impl.uuid_get( let result = api_impl.uuid_get(
@ -1590,7 +1528,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -1603,7 +1540,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// XmlExtraPost - POST /xml_extra // XmlExtraPost - POST /xml_extra
hyper::Method::POST if path.matched(paths::ID_XML_EXTRA) => { hyper::Method::POST if path.matched(paths::ID_XML_EXTRA) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -1625,8 +1561,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
} else { } else {
None None
}; };
let result = api_impl.xml_extra_post( let result = api_impl.xml_extra_post(
param_duplicate_xml_object, param_duplicate_xml_object,
&context &context
@ -1648,12 +1582,10 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
XmlExtraPostResponse::OK XmlExtraPostResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(201).expect("Unable to turn 201 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(201).expect("Unable to turn 201 into a StatusCode");
}, },
XmlExtraPostResponse::BadRequest XmlExtraPostResponse::BadRequest
=> { => {
*response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1672,7 +1604,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// XmlOtherPost - POST /xml_other // XmlOtherPost - POST /xml_other
hyper::Method::POST if path.matched(paths::ID_XML_OTHER) => { hyper::Method::POST if path.matched(paths::ID_XML_OTHER) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -1694,8 +1625,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
} else { } else {
None None
}; };
let result = api_impl.xml_other_post( let result = api_impl.xml_other_post(
param_another_xml_object, param_another_xml_object,
&context &context
@ -1729,12 +1658,10 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
namespaces.insert("".to_string(), models::AnotherXmlObject::NAMESPACE.to_string()); namespaces.insert("".to_string(), models::AnotherXmlObject::NAMESPACE.to_string());
let body = serde_xml_rs::to_string_with_namespaces(&body, namespaces).expect("impossible to fail to serialize"); let body = serde_xml_rs::to_string_with_namespaces(&body, namespaces).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
XmlOtherPostResponse::BadRequest XmlOtherPostResponse::BadRequest
=> { => {
*response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1753,7 +1680,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// XmlOtherPut - PUT /xml_other // XmlOtherPut - PUT /xml_other
hyper::Method::PUT if path.matched(paths::ID_XML_OTHER) => { hyper::Method::PUT if path.matched(paths::ID_XML_OTHER) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -1775,8 +1701,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
} else { } else {
None None
}; };
let result = api_impl.xml_other_put( let result = api_impl.xml_other_put(
param_another_xml_array, param_another_xml_array,
&context &context
@ -1798,12 +1722,10 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
XmlOtherPutResponse::OK XmlOtherPutResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(201).expect("Unable to turn 201 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(201).expect("Unable to turn 201 into a StatusCode");
}, },
XmlOtherPutResponse::BadRequest XmlOtherPutResponse::BadRequest
=> { => {
*response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1822,7 +1744,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// XmlPost - POST /xml // XmlPost - POST /xml
hyper::Method::POST if path.matched(paths::ID_XML) => { hyper::Method::POST if path.matched(paths::ID_XML) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -1844,8 +1765,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
} else { } else {
None None
}; };
let result = api_impl.xml_post( let result = api_impl.xml_post(
param_xml_array, param_xml_array,
&context &context
@ -1867,12 +1786,10 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
XmlPostResponse::OK XmlPostResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(201).expect("Unable to turn 201 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(201).expect("Unable to turn 201 into a StatusCode");
}, },
XmlPostResponse::BadRequest XmlPostResponse::BadRequest
=> { => {
*response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1891,7 +1808,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// XmlPut - PUT /xml // XmlPut - PUT /xml
hyper::Method::PUT if path.matched(paths::ID_XML) => { hyper::Method::PUT if path.matched(paths::ID_XML) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -1913,8 +1829,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
} else { } else {
None None
}; };
let result = api_impl.xml_put( let result = api_impl.xml_put(
param_xml_object, param_xml_object,
&context &context
@ -1936,12 +1850,10 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
XmlPutResponse::OK XmlPutResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(201).expect("Unable to turn 201 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(201).expect("Unable to turn 201 into a StatusCode");
}, },
XmlPutResponse::BadRequest XmlPutResponse::BadRequest
=> { => {
*response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1960,7 +1872,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// EnumInPathPathParamGet - GET /enum_in_path/{path_param} // EnumInPathPathParamGet - GET /enum_in_path/{path_param}
hyper::Method::GET if path.matched(paths::ID_ENUM_IN_PATH_PATH_PARAM) => { hyper::Method::GET if path.matched(paths::ID_ENUM_IN_PATH_PATH_PARAM) => {
// Path parameters // Path parameters
@ -2001,7 +1912,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
EnumInPathPathParamGetResponse::Success EnumInPathPathParamGetResponse::Success
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -2014,7 +1924,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// MultiplePathParamsWithVeryLongPathToTestFormattingPathParamAPathParamBGet - GET /multiple-path-params-with-very-long-path-to-test-formatting/{path_param_a}/{path_param_b} // MultiplePathParamsWithVeryLongPathToTestFormattingPathParamAPathParamBGet - GET /multiple-path-params-with-very-long-path-to-test-formatting/{path_param_a}/{path_param_b}
hyper::Method::GET if path.matched(paths::ID_MULTIPLE_PATH_PARAMS_WITH_VERY_LONG_PATH_TO_TEST_FORMATTING_PATH_PARAM_A_PATH_PARAM_B) => { hyper::Method::GET if path.matched(paths::ID_MULTIPLE_PATH_PARAMS_WITH_VERY_LONG_PATH_TO_TEST_FORMATTING_PATH_PARAM_A_PATH_PARAM_B) => {
// Path parameters // Path parameters
@ -2070,7 +1979,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
MultiplePathParamsWithVeryLongPathToTestFormattingPathParamAPathParamBGetResponse::Success MultiplePathParamsWithVeryLongPathToTestFormattingPathParamAPathParamBGetResponse::Success
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -2083,7 +1991,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// CreateRepo - POST /repos // CreateRepo - POST /repos
hyper::Method::POST if path.matched(paths::ID_REPOS) => { hyper::Method::POST if path.matched(paths::ID_REPOS) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -2115,8 +2022,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.body(Body::from("Missing required body parameter ObjectParam")) .body(Body::from("Missing required body parameter ObjectParam"))
.expect("Unable to create Bad Request response for missing body parameter ObjectParam")), .expect("Unable to create Bad Request response for missing body parameter ObjectParam")),
}; };
let result = api_impl.create_repo( let result = api_impl.create_repo(
param_object_param, param_object_param,
&context &context
@ -2138,7 +2043,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
CreateRepoResponse::Success CreateRepoResponse::Success
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -2157,7 +2061,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// GetRepoInfo - GET /repos/{repoId} // GetRepoInfo - GET /repos/{repoId}
hyper::Method::GET if path.matched(paths::ID_REPOS_REPOID) => { hyper::Method::GET if path.matched(paths::ID_REPOS_REPOID) => {
// Path parameters // Path parameters
@ -2206,7 +2109,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -2219,7 +2121,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
_ if path.matched(paths::ID_ANY_OF) => method_not_allowed(), _ if path.matched(paths::ID_ANY_OF) => method_not_allowed(),
_ if path.matched(paths::ID_CALLBACK_WITH_HEADER) => method_not_allowed(), _ if path.matched(paths::ID_CALLBACK_WITH_HEADER) => method_not_allowed(),
_ if path.matched(paths::ID_COMPLEX_QUERY_PARAM) => method_not_allowed(), _ if path.matched(paths::ID_COMPLEX_QUERY_PARAM) => method_not_allowed(),
@ -2260,7 +2161,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
)) ))
} }
} }
/// Request parser for `Api`. /// Request parser for `Api`.
pub struct ApiRequestParser; pub struct ApiRequestParser;
impl<T> RequestParser<T> for ApiRequestParser { impl<T> RequestParser<T> for ApiRequestParser {

View File

@ -154,7 +154,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op10_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op10_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op11_get( async fn op11_get(
&self, &self,
context: &C) -> Result<Op11GetResponse, ApiError> context: &C) -> Result<Op11GetResponse, ApiError>
@ -162,7 +161,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op11_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op11_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op12_get( async fn op12_get(
&self, &self,
context: &C) -> Result<Op12GetResponse, ApiError> context: &C) -> Result<Op12GetResponse, ApiError>
@ -170,7 +168,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op12_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op12_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op13_get( async fn op13_get(
&self, &self,
context: &C) -> Result<Op13GetResponse, ApiError> context: &C) -> Result<Op13GetResponse, ApiError>
@ -178,7 +175,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op13_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op13_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op14_get( async fn op14_get(
&self, &self,
context: &C) -> Result<Op14GetResponse, ApiError> context: &C) -> Result<Op14GetResponse, ApiError>
@ -186,7 +182,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op14_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op14_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op15_get( async fn op15_get(
&self, &self,
context: &C) -> Result<Op15GetResponse, ApiError> context: &C) -> Result<Op15GetResponse, ApiError>
@ -194,7 +189,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op15_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op15_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op16_get( async fn op16_get(
&self, &self,
context: &C) -> Result<Op16GetResponse, ApiError> context: &C) -> Result<Op16GetResponse, ApiError>
@ -202,7 +196,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op16_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op16_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op17_get( async fn op17_get(
&self, &self,
context: &C) -> Result<Op17GetResponse, ApiError> context: &C) -> Result<Op17GetResponse, ApiError>
@ -210,7 +203,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op17_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op17_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op18_get( async fn op18_get(
&self, &self,
context: &C) -> Result<Op18GetResponse, ApiError> context: &C) -> Result<Op18GetResponse, ApiError>
@ -218,7 +210,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op18_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op18_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op19_get( async fn op19_get(
&self, &self,
context: &C) -> Result<Op19GetResponse, ApiError> context: &C) -> Result<Op19GetResponse, ApiError>
@ -226,7 +217,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op19_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op19_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op1_get( async fn op1_get(
&self, &self,
context: &C) -> Result<Op1GetResponse, ApiError> context: &C) -> Result<Op1GetResponse, ApiError>
@ -234,7 +224,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op1_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op1_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op20_get( async fn op20_get(
&self, &self,
context: &C) -> Result<Op20GetResponse, ApiError> context: &C) -> Result<Op20GetResponse, ApiError>
@ -242,7 +231,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op20_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op20_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op21_get( async fn op21_get(
&self, &self,
context: &C) -> Result<Op21GetResponse, ApiError> context: &C) -> Result<Op21GetResponse, ApiError>
@ -250,7 +238,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op21_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op21_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op22_get( async fn op22_get(
&self, &self,
context: &C) -> Result<Op22GetResponse, ApiError> context: &C) -> Result<Op22GetResponse, ApiError>
@ -258,7 +245,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op22_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op22_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op23_get( async fn op23_get(
&self, &self,
context: &C) -> Result<Op23GetResponse, ApiError> context: &C) -> Result<Op23GetResponse, ApiError>
@ -266,7 +252,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op23_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op23_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op24_get( async fn op24_get(
&self, &self,
context: &C) -> Result<Op24GetResponse, ApiError> context: &C) -> Result<Op24GetResponse, ApiError>
@ -274,7 +259,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op24_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op24_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op25_get( async fn op25_get(
&self, &self,
context: &C) -> Result<Op25GetResponse, ApiError> context: &C) -> Result<Op25GetResponse, ApiError>
@ -282,7 +266,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op25_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op25_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op26_get( async fn op26_get(
&self, &self,
context: &C) -> Result<Op26GetResponse, ApiError> context: &C) -> Result<Op26GetResponse, ApiError>
@ -290,7 +273,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op26_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op26_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op27_get( async fn op27_get(
&self, &self,
context: &C) -> Result<Op27GetResponse, ApiError> context: &C) -> Result<Op27GetResponse, ApiError>
@ -298,7 +280,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op27_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op27_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op28_get( async fn op28_get(
&self, &self,
context: &C) -> Result<Op28GetResponse, ApiError> context: &C) -> Result<Op28GetResponse, ApiError>
@ -306,7 +287,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op28_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op28_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op29_get( async fn op29_get(
&self, &self,
context: &C) -> Result<Op29GetResponse, ApiError> context: &C) -> Result<Op29GetResponse, ApiError>
@ -314,7 +294,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op29_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op29_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op2_get( async fn op2_get(
&self, &self,
context: &C) -> Result<Op2GetResponse, ApiError> context: &C) -> Result<Op2GetResponse, ApiError>
@ -322,7 +301,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op2_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op2_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op30_get( async fn op30_get(
&self, &self,
context: &C) -> Result<Op30GetResponse, ApiError> context: &C) -> Result<Op30GetResponse, ApiError>
@ -330,7 +308,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op30_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op30_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op31_get( async fn op31_get(
&self, &self,
context: &C) -> Result<Op31GetResponse, ApiError> context: &C) -> Result<Op31GetResponse, ApiError>
@ -338,7 +315,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op31_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op31_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op32_get( async fn op32_get(
&self, &self,
context: &C) -> Result<Op32GetResponse, ApiError> context: &C) -> Result<Op32GetResponse, ApiError>
@ -346,7 +322,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op32_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op32_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op33_get( async fn op33_get(
&self, &self,
context: &C) -> Result<Op33GetResponse, ApiError> context: &C) -> Result<Op33GetResponse, ApiError>
@ -354,7 +329,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op33_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op33_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op34_get( async fn op34_get(
&self, &self,
context: &C) -> Result<Op34GetResponse, ApiError> context: &C) -> Result<Op34GetResponse, ApiError>
@ -362,7 +336,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op34_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op34_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op35_get( async fn op35_get(
&self, &self,
context: &C) -> Result<Op35GetResponse, ApiError> context: &C) -> Result<Op35GetResponse, ApiError>
@ -370,7 +343,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op35_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op35_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op36_get( async fn op36_get(
&self, &self,
context: &C) -> Result<Op36GetResponse, ApiError> context: &C) -> Result<Op36GetResponse, ApiError>
@ -378,7 +350,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op36_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op36_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op37_get( async fn op37_get(
&self, &self,
context: &C) -> Result<Op37GetResponse, ApiError> context: &C) -> Result<Op37GetResponse, ApiError>
@ -386,7 +357,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op37_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op37_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op3_get( async fn op3_get(
&self, &self,
context: &C) -> Result<Op3GetResponse, ApiError> context: &C) -> Result<Op3GetResponse, ApiError>
@ -394,7 +364,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op3_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op3_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op4_get( async fn op4_get(
&self, &self,
context: &C) -> Result<Op4GetResponse, ApiError> context: &C) -> Result<Op4GetResponse, ApiError>
@ -402,7 +371,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op4_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op4_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op5_get( async fn op5_get(
&self, &self,
context: &C) -> Result<Op5GetResponse, ApiError> context: &C) -> Result<Op5GetResponse, ApiError>
@ -410,7 +378,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op5_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op5_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op6_get( async fn op6_get(
&self, &self,
context: &C) -> Result<Op6GetResponse, ApiError> context: &C) -> Result<Op6GetResponse, ApiError>
@ -418,7 +385,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op6_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op6_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op7_get( async fn op7_get(
&self, &self,
context: &C) -> Result<Op7GetResponse, ApiError> context: &C) -> Result<Op7GetResponse, ApiError>
@ -426,7 +392,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op7_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op7_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op8_get( async fn op8_get(
&self, &self,
context: &C) -> Result<Op8GetResponse, ApiError> context: &C) -> Result<Op8GetResponse, ApiError>
@ -434,7 +399,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op8_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op8_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn op9_get( async fn op9_get(
&self, &self,
context: &C) -> Result<Op9GetResponse, ApiError> context: &C) -> Result<Op9GetResponse, ApiError>
@ -442,5 +406,4 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("op9_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("op9_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
} }

View File

@ -451,7 +451,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -484,7 +483,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op11_get( async fn op11_get(
&self, &self,
context: &C) -> Result<Op11GetResponse, ApiError> context: &C) -> Result<Op11GetResponse, ApiError>
@ -518,7 +516,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -551,7 +548,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op12_get( async fn op12_get(
&self, &self,
context: &C) -> Result<Op12GetResponse, ApiError> context: &C) -> Result<Op12GetResponse, ApiError>
@ -585,7 +581,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -618,7 +613,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op13_get( async fn op13_get(
&self, &self,
context: &C) -> Result<Op13GetResponse, ApiError> context: &C) -> Result<Op13GetResponse, ApiError>
@ -652,7 +646,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -685,7 +678,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op14_get( async fn op14_get(
&self, &self,
context: &C) -> Result<Op14GetResponse, ApiError> context: &C) -> Result<Op14GetResponse, ApiError>
@ -719,7 +711,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -752,7 +743,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op15_get( async fn op15_get(
&self, &self,
context: &C) -> Result<Op15GetResponse, ApiError> context: &C) -> Result<Op15GetResponse, ApiError>
@ -786,7 +776,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -819,7 +808,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op16_get( async fn op16_get(
&self, &self,
context: &C) -> Result<Op16GetResponse, ApiError> context: &C) -> Result<Op16GetResponse, ApiError>
@ -853,7 +841,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -886,7 +873,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op17_get( async fn op17_get(
&self, &self,
context: &C) -> Result<Op17GetResponse, ApiError> context: &C) -> Result<Op17GetResponse, ApiError>
@ -920,7 +906,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -953,7 +938,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op18_get( async fn op18_get(
&self, &self,
context: &C) -> Result<Op18GetResponse, ApiError> context: &C) -> Result<Op18GetResponse, ApiError>
@ -987,7 +971,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1020,7 +1003,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op19_get( async fn op19_get(
&self, &self,
context: &C) -> Result<Op19GetResponse, ApiError> context: &C) -> Result<Op19GetResponse, ApiError>
@ -1054,7 +1036,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1087,7 +1068,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op1_get( async fn op1_get(
&self, &self,
context: &C) -> Result<Op1GetResponse, ApiError> context: &C) -> Result<Op1GetResponse, ApiError>
@ -1121,7 +1101,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1154,7 +1133,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op20_get( async fn op20_get(
&self, &self,
context: &C) -> Result<Op20GetResponse, ApiError> context: &C) -> Result<Op20GetResponse, ApiError>
@ -1188,7 +1166,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1221,7 +1198,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op21_get( async fn op21_get(
&self, &self,
context: &C) -> Result<Op21GetResponse, ApiError> context: &C) -> Result<Op21GetResponse, ApiError>
@ -1255,7 +1231,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1288,7 +1263,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op22_get( async fn op22_get(
&self, &self,
context: &C) -> Result<Op22GetResponse, ApiError> context: &C) -> Result<Op22GetResponse, ApiError>
@ -1322,7 +1296,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1355,7 +1328,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op23_get( async fn op23_get(
&self, &self,
context: &C) -> Result<Op23GetResponse, ApiError> context: &C) -> Result<Op23GetResponse, ApiError>
@ -1389,7 +1361,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1422,7 +1393,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op24_get( async fn op24_get(
&self, &self,
context: &C) -> Result<Op24GetResponse, ApiError> context: &C) -> Result<Op24GetResponse, ApiError>
@ -1456,7 +1426,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1489,7 +1458,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op25_get( async fn op25_get(
&self, &self,
context: &C) -> Result<Op25GetResponse, ApiError> context: &C) -> Result<Op25GetResponse, ApiError>
@ -1523,7 +1491,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1556,7 +1523,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op26_get( async fn op26_get(
&self, &self,
context: &C) -> Result<Op26GetResponse, ApiError> context: &C) -> Result<Op26GetResponse, ApiError>
@ -1590,7 +1556,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1623,7 +1588,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op27_get( async fn op27_get(
&self, &self,
context: &C) -> Result<Op27GetResponse, ApiError> context: &C) -> Result<Op27GetResponse, ApiError>
@ -1657,7 +1621,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1690,7 +1653,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op28_get( async fn op28_get(
&self, &self,
context: &C) -> Result<Op28GetResponse, ApiError> context: &C) -> Result<Op28GetResponse, ApiError>
@ -1724,7 +1686,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1757,7 +1718,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op29_get( async fn op29_get(
&self, &self,
context: &C) -> Result<Op29GetResponse, ApiError> context: &C) -> Result<Op29GetResponse, ApiError>
@ -1791,7 +1751,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1824,7 +1783,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op2_get( async fn op2_get(
&self, &self,
context: &C) -> Result<Op2GetResponse, ApiError> context: &C) -> Result<Op2GetResponse, ApiError>
@ -1858,7 +1816,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1891,7 +1848,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op30_get( async fn op30_get(
&self, &self,
context: &C) -> Result<Op30GetResponse, ApiError> context: &C) -> Result<Op30GetResponse, ApiError>
@ -1925,7 +1881,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1958,7 +1913,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op31_get( async fn op31_get(
&self, &self,
context: &C) -> Result<Op31GetResponse, ApiError> context: &C) -> Result<Op31GetResponse, ApiError>
@ -1992,7 +1946,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2025,7 +1978,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op32_get( async fn op32_get(
&self, &self,
context: &C) -> Result<Op32GetResponse, ApiError> context: &C) -> Result<Op32GetResponse, ApiError>
@ -2059,7 +2011,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2092,7 +2043,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op33_get( async fn op33_get(
&self, &self,
context: &C) -> Result<Op33GetResponse, ApiError> context: &C) -> Result<Op33GetResponse, ApiError>
@ -2126,7 +2076,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2159,7 +2108,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op34_get( async fn op34_get(
&self, &self,
context: &C) -> Result<Op34GetResponse, ApiError> context: &C) -> Result<Op34GetResponse, ApiError>
@ -2193,7 +2141,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2226,7 +2173,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op35_get( async fn op35_get(
&self, &self,
context: &C) -> Result<Op35GetResponse, ApiError> context: &C) -> Result<Op35GetResponse, ApiError>
@ -2260,7 +2206,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2293,7 +2238,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op36_get( async fn op36_get(
&self, &self,
context: &C) -> Result<Op36GetResponse, ApiError> context: &C) -> Result<Op36GetResponse, ApiError>
@ -2327,7 +2271,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2360,7 +2303,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op37_get( async fn op37_get(
&self, &self,
context: &C) -> Result<Op37GetResponse, ApiError> context: &C) -> Result<Op37GetResponse, ApiError>
@ -2394,7 +2336,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2427,7 +2368,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op3_get( async fn op3_get(
&self, &self,
context: &C) -> Result<Op3GetResponse, ApiError> context: &C) -> Result<Op3GetResponse, ApiError>
@ -2461,7 +2401,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2494,7 +2433,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op4_get( async fn op4_get(
&self, &self,
context: &C) -> Result<Op4GetResponse, ApiError> context: &C) -> Result<Op4GetResponse, ApiError>
@ -2528,7 +2466,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2561,7 +2498,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op5_get( async fn op5_get(
&self, &self,
context: &C) -> Result<Op5GetResponse, ApiError> context: &C) -> Result<Op5GetResponse, ApiError>
@ -2595,7 +2531,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2628,7 +2563,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op6_get( async fn op6_get(
&self, &self,
context: &C) -> Result<Op6GetResponse, ApiError> context: &C) -> Result<Op6GetResponse, ApiError>
@ -2662,7 +2596,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2695,7 +2628,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op7_get( async fn op7_get(
&self, &self,
context: &C) -> Result<Op7GetResponse, ApiError> context: &C) -> Result<Op7GetResponse, ApiError>
@ -2729,7 +2661,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2762,7 +2693,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op8_get( async fn op8_get(
&self, &self,
context: &C) -> Result<Op8GetResponse, ApiError> context: &C) -> Result<Op8GetResponse, ApiError>
@ -2796,7 +2726,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2829,7 +2758,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn op9_get( async fn op9_get(
&self, &self,
context: &C) -> Result<Op9GetResponse, ApiError> context: &C) -> Result<Op9GetResponse, ApiError>
@ -2863,7 +2791,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2896,5 +2823,4 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
} }

View File

@ -25,223 +25,186 @@ pub enum Op10GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op11GetResponse { pub enum Op11GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op12GetResponse { pub enum Op12GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op13GetResponse { pub enum Op13GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op14GetResponse { pub enum Op14GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op15GetResponse { pub enum Op15GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op16GetResponse { pub enum Op16GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op17GetResponse { pub enum Op17GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op18GetResponse { pub enum Op18GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op19GetResponse { pub enum Op19GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op1GetResponse { pub enum Op1GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op20GetResponse { pub enum Op20GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op21GetResponse { pub enum Op21GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op22GetResponse { pub enum Op22GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op23GetResponse { pub enum Op23GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op24GetResponse { pub enum Op24GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op25GetResponse { pub enum Op25GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op26GetResponse { pub enum Op26GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op27GetResponse { pub enum Op27GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op28GetResponse { pub enum Op28GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op29GetResponse { pub enum Op29GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op2GetResponse { pub enum Op2GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op30GetResponse { pub enum Op30GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op31GetResponse { pub enum Op31GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op32GetResponse { pub enum Op32GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op33GetResponse { pub enum Op33GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op34GetResponse { pub enum Op34GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op35GetResponse { pub enum Op35GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op36GetResponse { pub enum Op36GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op37GetResponse { pub enum Op37GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op3GetResponse { pub enum Op3GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op4GetResponse { pub enum Op4GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op5GetResponse { pub enum Op5GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op6GetResponse { pub enum Op6GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op7GetResponse { pub enum Op7GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op8GetResponse { pub enum Op8GetResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Op9GetResponse { pub enum Op9GetResponse {
/// OK /// OK
OK OK
} }
/// API /// API
#[async_trait] #[async_trait]
#[allow(clippy::too_many_arguments, clippy::ptr_arg)] #[allow(clippy::too_many_arguments, clippy::ptr_arg)]

View File

@ -149,7 +149,6 @@ mod paths {
pub(crate) static ID_OP9: usize = 36; pub(crate) static ID_OP9: usize = 36;
} }
pub struct MakeService<T, C> where pub struct MakeService<T, C> where
T: Api<C> + Clone + Send + 'static, T: Api<C> + Clone + Send + 'static,
C: Has<XSpanIdString> + Send + Sync + 'static C: Has<XSpanIdString> + Send + Sync + 'static
@ -188,7 +187,6 @@ impl<T, C, Target> hyper::service::Service<Target> for MakeService<T, C> where
future::ok(service) future::ok(service)
} }
} }
fn method_not_allowed() -> Result<Response<Body>, crate::ServiceError> { fn method_not_allowed() -> Result<Response<Body>, crate::ServiceError> {
Ok( Ok(
Response::builder().status(StatusCode::METHOD_NOT_ALLOWED) Response::builder().status(StatusCode::METHOD_NOT_ALLOWED)
@ -255,7 +253,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
let path = paths::GLOBAL_REGEX_SET.matches(uri.path()); let path = paths::GLOBAL_REGEX_SET.matches(uri.path());
match method { match method {
// Op10Get - GET /op10 // Op10Get - GET /op10
hyper::Method::GET if path.matched(paths::ID_OP10) => { hyper::Method::GET if path.matched(paths::ID_OP10) => {
let result = api_impl.op10_get( let result = api_impl.op10_get(
@ -272,7 +269,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op10GetResponse::OK Op10GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -285,7 +281,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op11Get - GET /op11 // Op11Get - GET /op11
hyper::Method::GET if path.matched(paths::ID_OP11) => { hyper::Method::GET if path.matched(paths::ID_OP11) => {
let result = api_impl.op11_get( let result = api_impl.op11_get(
@ -302,7 +297,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op11GetResponse::OK Op11GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -315,7 +309,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op12Get - GET /op12 // Op12Get - GET /op12
hyper::Method::GET if path.matched(paths::ID_OP12) => { hyper::Method::GET if path.matched(paths::ID_OP12) => {
let result = api_impl.op12_get( let result = api_impl.op12_get(
@ -332,7 +325,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op12GetResponse::OK Op12GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -345,7 +337,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op13Get - GET /op13 // Op13Get - GET /op13
hyper::Method::GET if path.matched(paths::ID_OP13) => { hyper::Method::GET if path.matched(paths::ID_OP13) => {
let result = api_impl.op13_get( let result = api_impl.op13_get(
@ -362,7 +353,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op13GetResponse::OK Op13GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -375,7 +365,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op14Get - GET /op14 // Op14Get - GET /op14
hyper::Method::GET if path.matched(paths::ID_OP14) => { hyper::Method::GET if path.matched(paths::ID_OP14) => {
let result = api_impl.op14_get( let result = api_impl.op14_get(
@ -392,7 +381,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op14GetResponse::OK Op14GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -405,7 +393,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op15Get - GET /op15 // Op15Get - GET /op15
hyper::Method::GET if path.matched(paths::ID_OP15) => { hyper::Method::GET if path.matched(paths::ID_OP15) => {
let result = api_impl.op15_get( let result = api_impl.op15_get(
@ -422,7 +409,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op15GetResponse::OK Op15GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -435,7 +421,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op16Get - GET /op16 // Op16Get - GET /op16
hyper::Method::GET if path.matched(paths::ID_OP16) => { hyper::Method::GET if path.matched(paths::ID_OP16) => {
let result = api_impl.op16_get( let result = api_impl.op16_get(
@ -452,7 +437,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op16GetResponse::OK Op16GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -465,7 +449,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op17Get - GET /op17 // Op17Get - GET /op17
hyper::Method::GET if path.matched(paths::ID_OP17) => { hyper::Method::GET if path.matched(paths::ID_OP17) => {
let result = api_impl.op17_get( let result = api_impl.op17_get(
@ -482,7 +465,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op17GetResponse::OK Op17GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -495,7 +477,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op18Get - GET /op18 // Op18Get - GET /op18
hyper::Method::GET if path.matched(paths::ID_OP18) => { hyper::Method::GET if path.matched(paths::ID_OP18) => {
let result = api_impl.op18_get( let result = api_impl.op18_get(
@ -512,7 +493,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op18GetResponse::OK Op18GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -525,7 +505,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op19Get - GET /op19 // Op19Get - GET /op19
hyper::Method::GET if path.matched(paths::ID_OP19) => { hyper::Method::GET if path.matched(paths::ID_OP19) => {
let result = api_impl.op19_get( let result = api_impl.op19_get(
@ -542,7 +521,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op19GetResponse::OK Op19GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -555,7 +533,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op1Get - GET /op1 // Op1Get - GET /op1
hyper::Method::GET if path.matched(paths::ID_OP1) => { hyper::Method::GET if path.matched(paths::ID_OP1) => {
let result = api_impl.op1_get( let result = api_impl.op1_get(
@ -572,7 +549,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op1GetResponse::OK Op1GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -585,7 +561,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op20Get - GET /op20 // Op20Get - GET /op20
hyper::Method::GET if path.matched(paths::ID_OP20) => { hyper::Method::GET if path.matched(paths::ID_OP20) => {
let result = api_impl.op20_get( let result = api_impl.op20_get(
@ -602,7 +577,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op20GetResponse::OK Op20GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -615,7 +589,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op21Get - GET /op21 // Op21Get - GET /op21
hyper::Method::GET if path.matched(paths::ID_OP21) => { hyper::Method::GET if path.matched(paths::ID_OP21) => {
let result = api_impl.op21_get( let result = api_impl.op21_get(
@ -632,7 +605,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op21GetResponse::OK Op21GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -645,7 +617,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op22Get - GET /op22 // Op22Get - GET /op22
hyper::Method::GET if path.matched(paths::ID_OP22) => { hyper::Method::GET if path.matched(paths::ID_OP22) => {
let result = api_impl.op22_get( let result = api_impl.op22_get(
@ -662,7 +633,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op22GetResponse::OK Op22GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -675,7 +645,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op23Get - GET /op23 // Op23Get - GET /op23
hyper::Method::GET if path.matched(paths::ID_OP23) => { hyper::Method::GET if path.matched(paths::ID_OP23) => {
let result = api_impl.op23_get( let result = api_impl.op23_get(
@ -692,7 +661,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op23GetResponse::OK Op23GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -705,7 +673,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op24Get - GET /op24 // Op24Get - GET /op24
hyper::Method::GET if path.matched(paths::ID_OP24) => { hyper::Method::GET if path.matched(paths::ID_OP24) => {
let result = api_impl.op24_get( let result = api_impl.op24_get(
@ -722,7 +689,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op24GetResponse::OK Op24GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -735,7 +701,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op25Get - GET /op25 // Op25Get - GET /op25
hyper::Method::GET if path.matched(paths::ID_OP25) => { hyper::Method::GET if path.matched(paths::ID_OP25) => {
let result = api_impl.op25_get( let result = api_impl.op25_get(
@ -752,7 +717,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op25GetResponse::OK Op25GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -765,7 +729,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op26Get - GET /op26 // Op26Get - GET /op26
hyper::Method::GET if path.matched(paths::ID_OP26) => { hyper::Method::GET if path.matched(paths::ID_OP26) => {
let result = api_impl.op26_get( let result = api_impl.op26_get(
@ -782,7 +745,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op26GetResponse::OK Op26GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -795,7 +757,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op27Get - GET /op27 // Op27Get - GET /op27
hyper::Method::GET if path.matched(paths::ID_OP27) => { hyper::Method::GET if path.matched(paths::ID_OP27) => {
let result = api_impl.op27_get( let result = api_impl.op27_get(
@ -812,7 +773,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op27GetResponse::OK Op27GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -825,7 +785,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op28Get - GET /op28 // Op28Get - GET /op28
hyper::Method::GET if path.matched(paths::ID_OP28) => { hyper::Method::GET if path.matched(paths::ID_OP28) => {
let result = api_impl.op28_get( let result = api_impl.op28_get(
@ -842,7 +801,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op28GetResponse::OK Op28GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -855,7 +813,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op29Get - GET /op29 // Op29Get - GET /op29
hyper::Method::GET if path.matched(paths::ID_OP29) => { hyper::Method::GET if path.matched(paths::ID_OP29) => {
let result = api_impl.op29_get( let result = api_impl.op29_get(
@ -872,7 +829,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op29GetResponse::OK Op29GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -885,7 +841,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op2Get - GET /op2 // Op2Get - GET /op2
hyper::Method::GET if path.matched(paths::ID_OP2) => { hyper::Method::GET if path.matched(paths::ID_OP2) => {
let result = api_impl.op2_get( let result = api_impl.op2_get(
@ -902,7 +857,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op2GetResponse::OK Op2GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -915,7 +869,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op30Get - GET /op30 // Op30Get - GET /op30
hyper::Method::GET if path.matched(paths::ID_OP30) => { hyper::Method::GET if path.matched(paths::ID_OP30) => {
let result = api_impl.op30_get( let result = api_impl.op30_get(
@ -932,7 +885,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op30GetResponse::OK Op30GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -945,7 +897,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op31Get - GET /op31 // Op31Get - GET /op31
hyper::Method::GET if path.matched(paths::ID_OP31) => { hyper::Method::GET if path.matched(paths::ID_OP31) => {
let result = api_impl.op31_get( let result = api_impl.op31_get(
@ -962,7 +913,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op31GetResponse::OK Op31GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -975,7 +925,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op32Get - GET /op32 // Op32Get - GET /op32
hyper::Method::GET if path.matched(paths::ID_OP32) => { hyper::Method::GET if path.matched(paths::ID_OP32) => {
let result = api_impl.op32_get( let result = api_impl.op32_get(
@ -992,7 +941,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op32GetResponse::OK Op32GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1005,7 +953,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op33Get - GET /op33 // Op33Get - GET /op33
hyper::Method::GET if path.matched(paths::ID_OP33) => { hyper::Method::GET if path.matched(paths::ID_OP33) => {
let result = api_impl.op33_get( let result = api_impl.op33_get(
@ -1022,7 +969,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op33GetResponse::OK Op33GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1035,7 +981,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op34Get - GET /op34 // Op34Get - GET /op34
hyper::Method::GET if path.matched(paths::ID_OP34) => { hyper::Method::GET if path.matched(paths::ID_OP34) => {
let result = api_impl.op34_get( let result = api_impl.op34_get(
@ -1052,7 +997,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op34GetResponse::OK Op34GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1065,7 +1009,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op35Get - GET /op35 // Op35Get - GET /op35
hyper::Method::GET if path.matched(paths::ID_OP35) => { hyper::Method::GET if path.matched(paths::ID_OP35) => {
let result = api_impl.op35_get( let result = api_impl.op35_get(
@ -1082,7 +1025,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op35GetResponse::OK Op35GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1095,7 +1037,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op36Get - GET /op36 // Op36Get - GET /op36
hyper::Method::GET if path.matched(paths::ID_OP36) => { hyper::Method::GET if path.matched(paths::ID_OP36) => {
let result = api_impl.op36_get( let result = api_impl.op36_get(
@ -1112,7 +1053,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op36GetResponse::OK Op36GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1125,7 +1065,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op37Get - GET /op37 // Op37Get - GET /op37
hyper::Method::GET if path.matched(paths::ID_OP37) => { hyper::Method::GET if path.matched(paths::ID_OP37) => {
let result = api_impl.op37_get( let result = api_impl.op37_get(
@ -1142,7 +1081,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op37GetResponse::OK Op37GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1155,7 +1093,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op3Get - GET /op3 // Op3Get - GET /op3
hyper::Method::GET if path.matched(paths::ID_OP3) => { hyper::Method::GET if path.matched(paths::ID_OP3) => {
let result = api_impl.op3_get( let result = api_impl.op3_get(
@ -1172,7 +1109,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op3GetResponse::OK Op3GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1185,7 +1121,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op4Get - GET /op4 // Op4Get - GET /op4
hyper::Method::GET if path.matched(paths::ID_OP4) => { hyper::Method::GET if path.matched(paths::ID_OP4) => {
let result = api_impl.op4_get( let result = api_impl.op4_get(
@ -1202,7 +1137,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op4GetResponse::OK Op4GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1215,7 +1149,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op5Get - GET /op5 // Op5Get - GET /op5
hyper::Method::GET if path.matched(paths::ID_OP5) => { hyper::Method::GET if path.matched(paths::ID_OP5) => {
let result = api_impl.op5_get( let result = api_impl.op5_get(
@ -1232,7 +1165,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op5GetResponse::OK Op5GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1245,7 +1177,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op6Get - GET /op6 // Op6Get - GET /op6
hyper::Method::GET if path.matched(paths::ID_OP6) => { hyper::Method::GET if path.matched(paths::ID_OP6) => {
let result = api_impl.op6_get( let result = api_impl.op6_get(
@ -1262,7 +1193,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op6GetResponse::OK Op6GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1275,7 +1205,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op7Get - GET /op7 // Op7Get - GET /op7
hyper::Method::GET if path.matched(paths::ID_OP7) => { hyper::Method::GET if path.matched(paths::ID_OP7) => {
let result = api_impl.op7_get( let result = api_impl.op7_get(
@ -1292,7 +1221,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op7GetResponse::OK Op7GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1305,7 +1233,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op8Get - GET /op8 // Op8Get - GET /op8
hyper::Method::GET if path.matched(paths::ID_OP8) => { hyper::Method::GET if path.matched(paths::ID_OP8) => {
let result = api_impl.op8_get( let result = api_impl.op8_get(
@ -1322,7 +1249,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op8GetResponse::OK Op8GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1335,7 +1261,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// Op9Get - GET /op9 // Op9Get - GET /op9
hyper::Method::GET if path.matched(paths::ID_OP9) => { hyper::Method::GET if path.matched(paths::ID_OP9) => {
let result = api_impl.op9_get( let result = api_impl.op9_get(
@ -1352,7 +1277,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Op9GetResponse::OK Op9GetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1365,7 +1289,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
_ if path.matched(paths::ID_OP1) => method_not_allowed(), _ if path.matched(paths::ID_OP1) => method_not_allowed(),
_ if path.matched(paths::ID_OP10) => method_not_allowed(), _ if path.matched(paths::ID_OP10) => method_not_allowed(),
_ if path.matched(paths::ID_OP11) => method_not_allowed(), _ if path.matched(paths::ID_OP11) => method_not_allowed(),
@ -1414,7 +1337,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
)) ))
} }
} }
/// Request parser for `Api`. /// Request parser for `Api`.
pub struct ApiRequestParser; pub struct ApiRequestParser;
impl<T> RequestParser<T> for ApiRequestParser { impl<T> RequestParser<T> for ApiRequestParser {

View File

@ -154,7 +154,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("test_special_tags({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); info!("test_special_tags({:?}) - X-Span-ID: {:?}", body, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn call123example( async fn call123example(
&self, &self,
context: &C) -> Result<Call123exampleResponse, ApiError> context: &C) -> Result<Call123exampleResponse, ApiError>
@ -162,7 +161,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("call123example() - X-Span-ID: {:?}", context.get().0.clone()); info!("call123example() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn fake_outer_boolean_serialize( async fn fake_outer_boolean_serialize(
&self, &self,
body: Option<models::OuterBoolean>, body: Option<models::OuterBoolean>,
@ -171,7 +169,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("fake_outer_boolean_serialize({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); info!("fake_outer_boolean_serialize({:?}) - X-Span-ID: {:?}", body, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn fake_outer_composite_serialize( async fn fake_outer_composite_serialize(
&self, &self,
body: Option<models::OuterComposite>, body: Option<models::OuterComposite>,
@ -180,7 +177,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("fake_outer_composite_serialize({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); info!("fake_outer_composite_serialize({:?}) - X-Span-ID: {:?}", body, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn fake_outer_number_serialize( async fn fake_outer_number_serialize(
&self, &self,
body: Option<models::OuterNumber>, body: Option<models::OuterNumber>,
@ -189,7 +185,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("fake_outer_number_serialize({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); info!("fake_outer_number_serialize({:?}) - X-Span-ID: {:?}", body, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn fake_outer_string_serialize( async fn fake_outer_string_serialize(
&self, &self,
body: Option<models::OuterString>, body: Option<models::OuterString>,
@ -198,7 +193,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("fake_outer_string_serialize({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); info!("fake_outer_string_serialize({:?}) - X-Span-ID: {:?}", body, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn fake_response_with_numerical_description( async fn fake_response_with_numerical_description(
&self, &self,
context: &C) -> Result<FakeResponseWithNumericalDescriptionResponse, ApiError> context: &C) -> Result<FakeResponseWithNumericalDescriptionResponse, ApiError>
@ -206,7 +200,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("fake_response_with_numerical_description() - X-Span-ID: {:?}", context.get().0.clone()); info!("fake_response_with_numerical_description() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn test_body_with_query_params( async fn test_body_with_query_params(
&self, &self,
query: String, query: String,
@ -216,7 +209,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("test_body_with_query_params(\"{}\", {:?}) - X-Span-ID: {:?}", query, body, context.get().0.clone()); info!("test_body_with_query_params(\"{}\", {:?}) - X-Span-ID: {:?}", query, body, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// To test \"client\" model /// To test \"client\" model
async fn test_client_model( async fn test_client_model(
&self, &self,
@ -226,7 +218,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("test_client_model({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); info!("test_client_model({:?}) - X-Span-ID: {:?}", body, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
async fn test_endpoint_parameters( async fn test_endpoint_parameters(
&self, &self,
@ -249,7 +240,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("test_endpoint_parameters({}, {}, \"{}\", {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", number, double, pattern_without_delimiter, byte, integer, int32, int64, float, string, binary, date, date_time, password, callback, context.get().0.clone()); info!("test_endpoint_parameters({}, {}, \"{}\", {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", number, double, pattern_without_delimiter, byte, integer, int32, int64, float, string, binary, date, date_time, password, callback, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// To test enum parameters /// To test enum parameters
async fn test_enum_parameters( async fn test_enum_parameters(
&self, &self,
@ -265,7 +255,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("test_enum_parameters({:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", enum_header_string_array, enum_header_string, enum_query_string_array, enum_query_string, enum_query_integer, enum_query_double, enum_form_string, context.get().0.clone()); info!("test_enum_parameters({:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", enum_header_string_array, enum_header_string, enum_query_string_array, enum_query_string, enum_query_integer, enum_query_double, enum_form_string, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// test inline additionalProperties /// test inline additionalProperties
async fn test_inline_additional_properties( async fn test_inline_additional_properties(
&self, &self,
@ -275,7 +264,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("test_inline_additional_properties({:?}) - X-Span-ID: {:?}", param, context.get().0.clone()); info!("test_inline_additional_properties({:?}) - X-Span-ID: {:?}", param, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// test json serialization of form data /// test json serialization of form data
async fn test_json_form_data( async fn test_json_form_data(
&self, &self,
@ -286,7 +274,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("test_json_form_data(\"{}\", \"{}\") - X-Span-ID: {:?}", param, param2, context.get().0.clone()); info!("test_json_form_data(\"{}\", \"{}\") - X-Span-ID: {:?}", param, param2, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn hyphen_param( async fn hyphen_param(
&self, &self,
hyphen_param: String, hyphen_param: String,
@ -295,7 +282,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("hyphen_param(\"{}\") - X-Span-ID: {:?}", hyphen_param, context.get().0.clone()); info!("hyphen_param(\"{}\") - X-Span-ID: {:?}", hyphen_param, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// To test class name in snake case /// To test class name in snake case
async fn test_classname( async fn test_classname(
&self, &self,
@ -305,7 +291,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("test_classname({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); info!("test_classname({:?}) - X-Span-ID: {:?}", body, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Add a new pet to the store /// Add a new pet to the store
async fn add_pet( async fn add_pet(
&self, &self,
@ -315,7 +300,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("add_pet({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); info!("add_pet({:?}) - X-Span-ID: {:?}", body, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Finds Pets by status /// Finds Pets by status
async fn find_pets_by_status( async fn find_pets_by_status(
&self, &self,
@ -325,7 +309,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("find_pets_by_status({:?}) - X-Span-ID: {:?}", status, context.get().0.clone()); info!("find_pets_by_status({:?}) - X-Span-ID: {:?}", status, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Finds Pets by tags /// Finds Pets by tags
async fn find_pets_by_tags( async fn find_pets_by_tags(
&self, &self,
@ -335,7 +318,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("find_pets_by_tags({:?}) - X-Span-ID: {:?}", tags, context.get().0.clone()); info!("find_pets_by_tags({:?}) - X-Span-ID: {:?}", tags, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Update an existing pet /// Update an existing pet
async fn update_pet( async fn update_pet(
&self, &self,
@ -345,7 +327,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("update_pet({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); info!("update_pet({:?}) - X-Span-ID: {:?}", body, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Deletes a pet /// Deletes a pet
async fn delete_pet( async fn delete_pet(
&self, &self,
@ -356,7 +337,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("delete_pet({}, {:?}) - X-Span-ID: {:?}", pet_id, api_key, context.get().0.clone()); info!("delete_pet({}, {:?}) - X-Span-ID: {:?}", pet_id, api_key, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Find pet by ID /// Find pet by ID
async fn get_pet_by_id( async fn get_pet_by_id(
&self, &self,
@ -366,7 +346,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("get_pet_by_id({}) - X-Span-ID: {:?}", pet_id, context.get().0.clone()); info!("get_pet_by_id({}) - X-Span-ID: {:?}", pet_id, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Updates a pet in the store with form data /// Updates a pet in the store with form data
async fn update_pet_with_form( async fn update_pet_with_form(
&self, &self,
@ -378,7 +357,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("update_pet_with_form({}, {:?}, {:?}) - X-Span-ID: {:?}", pet_id, name, status, context.get().0.clone()); info!("update_pet_with_form({}, {:?}, {:?}) - X-Span-ID: {:?}", pet_id, name, status, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// uploads an image /// uploads an image
async fn upload_file( async fn upload_file(
&self, &self,
@ -390,7 +368,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("upload_file({}, {:?}, {:?}) - X-Span-ID: {:?}", pet_id, additional_metadata, file, context.get().0.clone()); info!("upload_file({}, {:?}, {:?}) - X-Span-ID: {:?}", pet_id, additional_metadata, file, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Returns pet inventories by status /// Returns pet inventories by status
async fn get_inventory( async fn get_inventory(
&self, &self,
@ -399,7 +376,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("get_inventory() - X-Span-ID: {:?}", context.get().0.clone()); info!("get_inventory() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Place an order for a pet /// Place an order for a pet
async fn place_order( async fn place_order(
&self, &self,
@ -409,7 +385,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("place_order({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); info!("place_order({:?}) - X-Span-ID: {:?}", body, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Delete purchase order by ID /// Delete purchase order by ID
async fn delete_order( async fn delete_order(
&self, &self,
@ -419,7 +394,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("delete_order(\"{}\") - X-Span-ID: {:?}", order_id, context.get().0.clone()); info!("delete_order(\"{}\") - X-Span-ID: {:?}", order_id, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Find purchase order by ID /// Find purchase order by ID
async fn get_order_by_id( async fn get_order_by_id(
&self, &self,
@ -429,7 +403,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("get_order_by_id({}) - X-Span-ID: {:?}", order_id, context.get().0.clone()); info!("get_order_by_id({}) - X-Span-ID: {:?}", order_id, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Create user /// Create user
async fn create_user( async fn create_user(
&self, &self,
@ -439,7 +412,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("create_user({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); info!("create_user({:?}) - X-Span-ID: {:?}", body, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Creates list of users with given input array /// Creates list of users with given input array
async fn create_users_with_array_input( async fn create_users_with_array_input(
&self, &self,
@ -449,7 +421,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("create_users_with_array_input({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); info!("create_users_with_array_input({:?}) - X-Span-ID: {:?}", body, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Creates list of users with given input array /// Creates list of users with given input array
async fn create_users_with_list_input( async fn create_users_with_list_input(
&self, &self,
@ -459,7 +430,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("create_users_with_list_input({:?}) - X-Span-ID: {:?}", body, context.get().0.clone()); info!("create_users_with_list_input({:?}) - X-Span-ID: {:?}", body, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Logs user into the system /// Logs user into the system
async fn login_user( async fn login_user(
&self, &self,
@ -470,7 +440,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("login_user(\"{}\", \"{}\") - X-Span-ID: {:?}", username, password, context.get().0.clone()); info!("login_user(\"{}\", \"{}\") - X-Span-ID: {:?}", username, password, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Logs out current logged in user session /// Logs out current logged in user session
async fn logout_user( async fn logout_user(
&self, &self,
@ -479,7 +448,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("logout_user() - X-Span-ID: {:?}", context.get().0.clone()); info!("logout_user() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Delete user /// Delete user
async fn delete_user( async fn delete_user(
&self, &self,
@ -489,7 +457,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("delete_user(\"{}\") - X-Span-ID: {:?}", username, context.get().0.clone()); info!("delete_user(\"{}\") - X-Span-ID: {:?}", username, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Get user by user name /// Get user by user name
async fn get_user_by_name( async fn get_user_by_name(
&self, &self,
@ -499,7 +466,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("get_user_by_name(\"{}\") - X-Span-ID: {:?}", username, context.get().0.clone()); info!("get_user_by_name(\"{}\") - X-Span-ID: {:?}", username, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Updated user /// Updated user
async fn update_user( async fn update_user(
&self, &self,
@ -510,5 +476,4 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("update_user(\"{}\", {:?}) - X-Span-ID: {:?}", username, body, context.get().0.clone()); info!("update_user(\"{}\", {:?}) - X-Span-ID: {:?}", username, body, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
} }

View File

@ -464,7 +464,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -486,7 +485,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<models::Client>(body) let body = serde_json::from_str::<models::Client>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(TestSpecialTagsResponse::SuccessfulOperation Ok(TestSpecialTagsResponse::SuccessfulOperation
(body) (body)
) )
@ -508,7 +506,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn call123example( async fn call123example(
&self, &self,
context: &C) -> Result<Call123exampleResponse, ApiError> context: &C) -> Result<Call123exampleResponse, ApiError>
@ -542,7 +539,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -575,7 +571,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn fake_outer_boolean_serialize( async fn fake_outer_boolean_serialize(
&self, &self,
param_body: Option<models::OuterBoolean>, param_body: Option<models::OuterBoolean>,
@ -623,7 +618,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -645,7 +639,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<bool>(body) let body = serde_json::from_str::<bool>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(FakeOuterBooleanSerializeResponse::OutputBoolean Ok(FakeOuterBooleanSerializeResponse::OutputBoolean
(body) (body)
) )
@ -667,7 +660,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn fake_outer_composite_serialize( async fn fake_outer_composite_serialize(
&self, &self,
param_body: Option<models::OuterComposite>, param_body: Option<models::OuterComposite>,
@ -715,7 +707,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -737,7 +728,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<models::OuterComposite>(body) let body = serde_json::from_str::<models::OuterComposite>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(FakeOuterCompositeSerializeResponse::OutputComposite Ok(FakeOuterCompositeSerializeResponse::OutputComposite
(body) (body)
) )
@ -759,7 +749,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn fake_outer_number_serialize( async fn fake_outer_number_serialize(
&self, &self,
param_body: Option<models::OuterNumber>, param_body: Option<models::OuterNumber>,
@ -807,7 +796,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -829,7 +817,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<f64>(body) let body = serde_json::from_str::<f64>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(FakeOuterNumberSerializeResponse::OutputNumber Ok(FakeOuterNumberSerializeResponse::OutputNumber
(body) (body)
) )
@ -851,7 +838,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn fake_outer_string_serialize( async fn fake_outer_string_serialize(
&self, &self,
param_body: Option<models::OuterString>, param_body: Option<models::OuterString>,
@ -899,7 +885,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -921,7 +906,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<String>(body) let body = serde_json::from_str::<String>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(FakeOuterStringSerializeResponse::OutputString Ok(FakeOuterStringSerializeResponse::OutputString
(body) (body)
) )
@ -943,7 +927,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn fake_response_with_numerical_description( async fn fake_response_with_numerical_description(
&self, &self,
context: &C) -> Result<FakeResponseWithNumericalDescriptionResponse, ApiError> context: &C) -> Result<FakeResponseWithNumericalDescriptionResponse, ApiError>
@ -977,7 +960,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1010,7 +992,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn test_body_with_query_params( async fn test_body_with_query_params(
&self, &self,
param_query: String, param_query: String,
@ -1059,7 +1040,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1092,7 +1072,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn test_client_model( async fn test_client_model(
&self, &self,
param_body: models::Client, param_body: models::Client,
@ -1138,7 +1117,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1160,7 +1138,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<models::Client>(body) let body = serde_json::from_str::<models::Client>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(TestClientModelResponse::SuccessfulOperation Ok(TestClientModelResponse::SuccessfulOperation
(body) (body)
) )
@ -1182,7 +1159,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn test_endpoint_parameters( async fn test_endpoint_parameters(
&self, &self,
param_number: f64, param_number: f64,
@ -1319,7 +1295,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1375,7 +1350,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn test_enum_parameters( async fn test_enum_parameters(
&self, &self,
param_enum_header_string_array: Option<&Vec<models::TestEnumParametersEnumHeaderStringArrayParameterInner>>, param_enum_header_string_array: Option<&Vec<models::TestEnumParametersEnumHeaderStringArrayParameterInner>>,
@ -1451,7 +1425,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1524,7 +1497,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn test_inline_additional_properties( async fn test_inline_additional_properties(
&self, &self,
param_param: std::collections::HashMap<String, String>, param_param: std::collections::HashMap<String, String>,
@ -1570,7 +1542,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1603,7 +1574,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn test_json_form_data( async fn test_json_form_data(
&self, &self,
param_param: String, param_param: String,
@ -1660,7 +1630,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1693,7 +1662,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn hyphen_param( async fn hyphen_param(
&self, &self,
param_hyphen_param: String, param_hyphen_param: String,
@ -1729,7 +1697,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1762,7 +1729,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn test_classname( async fn test_classname(
&self, &self,
param_body: models::Client, param_body: models::Client,
@ -1811,7 +1777,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1841,7 +1806,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<models::Client>(body) let body = serde_json::from_str::<models::Client>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(TestClassnameResponse::SuccessfulOperation Ok(TestClassnameResponse::SuccessfulOperation
(body) (body)
) )
@ -1863,7 +1827,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn add_pet( async fn add_pet(
&self, &self,
param_body: models::Pet, param_body: models::Pet,
@ -1909,7 +1872,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1960,7 +1922,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn find_pets_by_status( async fn find_pets_by_status(
&self, &self,
param_status: &Vec<models::FindPetsByStatusStatusParameterInner>, param_status: &Vec<models::FindPetsByStatusStatusParameterInner>,
@ -1997,7 +1958,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2039,7 +1999,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_xml_rs::from_str::<Vec<models::Pet>>(body) let body = serde_xml_rs::from_str::<Vec<models::Pet>>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(FindPetsByStatusResponse::SuccessfulOperation Ok(FindPetsByStatusResponse::SuccessfulOperation
(body) (body)
) )
@ -2066,7 +2025,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn find_pets_by_tags( async fn find_pets_by_tags(
&self, &self,
param_tags: &Vec<String>, param_tags: &Vec<String>,
@ -2103,7 +2061,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2145,7 +2102,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_xml_rs::from_str::<Vec<models::Pet>>(body) let body = serde_xml_rs::from_str::<Vec<models::Pet>>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(FindPetsByTagsResponse::SuccessfulOperation Ok(FindPetsByTagsResponse::SuccessfulOperation
(body) (body)
) )
@ -2172,7 +2128,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn update_pet( async fn update_pet(
&self, &self,
param_body: models::Pet, param_body: models::Pet,
@ -2218,7 +2173,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2279,7 +2233,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn delete_pet( async fn delete_pet(
&self, &self,
param_pet_id: i64, param_pet_id: i64,
@ -2316,7 +2269,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2385,7 +2337,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn get_pet_by_id( async fn get_pet_by_id(
&self, &self,
param_pet_id: i64, param_pet_id: i64,
@ -2421,7 +2372,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2453,7 +2403,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_xml_rs::from_str::<models::Pet>(body) let body = serde_xml_rs::from_str::<models::Pet>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(GetPetByIdResponse::SuccessfulOperation Ok(GetPetByIdResponse::SuccessfulOperation
(body) (body)
) )
@ -2485,7 +2434,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn update_pet_with_form( async fn update_pet_with_form(
&self, &self,
param_pet_id: i64, param_pet_id: i64,
@ -2548,7 +2496,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2599,7 +2546,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn upload_file( async fn upload_file(
&self, &self,
param_pet_id: i64, param_pet_id: i64,
@ -2693,8 +2639,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {multipart_header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {multipart_header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2734,7 +2678,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<models::ApiResponse>(body) let body = serde_json::from_str::<models::ApiResponse>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(UploadFileResponse::SuccessfulOperation Ok(UploadFileResponse::SuccessfulOperation
(body) (body)
) )
@ -2756,7 +2699,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn get_inventory( async fn get_inventory(
&self, &self,
context: &C) -> Result<GetInventoryResponse, ApiError> context: &C) -> Result<GetInventoryResponse, ApiError>
@ -2790,7 +2732,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2820,7 +2761,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<std::collections::HashMap<String, i32>>(body) let body = serde_json::from_str::<std::collections::HashMap<String, i32>>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(GetInventoryResponse::SuccessfulOperation Ok(GetInventoryResponse::SuccessfulOperation
(body) (body)
) )
@ -2842,7 +2782,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn place_order( async fn place_order(
&self, &self,
param_body: models::Order, param_body: models::Order,
@ -2888,7 +2827,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -2912,7 +2850,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_xml_rs::from_str::<models::Order>(body) let body = serde_xml_rs::from_str::<models::Order>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(PlaceOrderResponse::SuccessfulOperation Ok(PlaceOrderResponse::SuccessfulOperation
(body) (body)
) )
@ -2939,7 +2876,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn delete_order( async fn delete_order(
&self, &self,
param_order_id: String, param_order_id: String,
@ -2975,7 +2911,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -3013,7 +2948,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn get_order_by_id( async fn get_order_by_id(
&self, &self,
param_order_id: i64, param_order_id: i64,
@ -3049,7 +2983,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -3073,7 +3006,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_xml_rs::from_str::<models::Order>(body) let body = serde_xml_rs::from_str::<models::Order>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(GetOrderByIdResponse::SuccessfulOperation Ok(GetOrderByIdResponse::SuccessfulOperation
(body) (body)
) )
@ -3105,7 +3037,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn create_user( async fn create_user(
&self, &self,
param_body: models::User, param_body: models::User,
@ -3151,7 +3082,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -3184,7 +3114,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn create_users_with_array_input( async fn create_users_with_array_input(
&self, &self,
param_body: &Vec<models::User>, param_body: &Vec<models::User>,
@ -3230,7 +3159,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -3263,7 +3191,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn create_users_with_list_input( async fn create_users_with_list_input(
&self, &self,
param_body: &Vec<models::User>, param_body: &Vec<models::User>,
@ -3309,7 +3236,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -3342,7 +3268,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn login_user( async fn login_user(
&self, &self,
param_username: String, param_username: String,
@ -3382,7 +3307,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -3434,7 +3358,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_xml_rs::from_str::<String>(body) let body = serde_xml_rs::from_str::<String>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(LoginUserResponse::SuccessfulOperation Ok(LoginUserResponse::SuccessfulOperation
{ {
body, body,
@ -3465,7 +3388,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn logout_user( async fn logout_user(
&self, &self,
context: &C) -> Result<LogoutUserResponse, ApiError> context: &C) -> Result<LogoutUserResponse, ApiError>
@ -3499,7 +3421,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -3532,7 +3453,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn delete_user( async fn delete_user(
&self, &self,
param_username: String, param_username: String,
@ -3568,7 +3488,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -3606,7 +3525,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn get_user_by_name( async fn get_user_by_name(
&self, &self,
param_username: String, param_username: String,
@ -3642,7 +3560,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -3666,7 +3583,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_xml_rs::from_str::<models::User>(body) let body = serde_xml_rs::from_str::<models::User>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(GetUserByNameResponse::SuccessfulOperation Ok(GetUserByNameResponse::SuccessfulOperation
(body) (body)
) )
@ -3698,7 +3614,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn update_user( async fn update_user(
&self, &self,
param_username: String, param_username: String,
@ -3746,7 +3661,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -3784,5 +3698,4 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
} }

View File

@ -26,60 +26,51 @@ pub enum TestSpecialTagsResponse {
SuccessfulOperation SuccessfulOperation
(models::Client) (models::Client)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Call123exampleResponse { pub enum Call123exampleResponse {
/// success /// success
Success Success
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum FakeOuterBooleanSerializeResponse { pub enum FakeOuterBooleanSerializeResponse {
/// Output boolean /// Output boolean
OutputBoolean OutputBoolean
(bool) (bool)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum FakeOuterCompositeSerializeResponse { pub enum FakeOuterCompositeSerializeResponse {
/// Output composite /// Output composite
OutputComposite OutputComposite
(models::OuterComposite) (models::OuterComposite)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum FakeOuterNumberSerializeResponse { pub enum FakeOuterNumberSerializeResponse {
/// Output number /// Output number
OutputNumber OutputNumber
(f64) (f64)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum FakeOuterStringSerializeResponse { pub enum FakeOuterStringSerializeResponse {
/// Output string /// Output string
OutputString OutputString
(String) (String)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum FakeResponseWithNumericalDescriptionResponse { pub enum FakeResponseWithNumericalDescriptionResponse {
/// 1234 /// 1234
Status200 Status200
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum TestBodyWithQueryParamsResponse { pub enum TestBodyWithQueryParamsResponse {
/// Success /// Success
Success Success
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum TestClientModelResponse { pub enum TestClientModelResponse {
/// successful operation /// successful operation
SuccessfulOperation SuccessfulOperation
(models::Client) (models::Client)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use] #[must_use]
pub enum TestEndpointParametersResponse { pub enum TestEndpointParametersResponse {
@ -89,7 +80,6 @@ pub enum TestEndpointParametersResponse {
/// User not found /// User not found
UserNotFound UserNotFound
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use] #[must_use]
pub enum TestEnumParametersResponse { pub enum TestEnumParametersResponse {
@ -99,38 +89,32 @@ pub enum TestEnumParametersResponse {
/// Not found /// Not found
NotFound NotFound
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum TestInlineAdditionalPropertiesResponse { pub enum TestInlineAdditionalPropertiesResponse {
/// successful operation /// successful operation
SuccessfulOperation SuccessfulOperation
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum TestJsonFormDataResponse { pub enum TestJsonFormDataResponse {
/// successful operation /// successful operation
SuccessfulOperation SuccessfulOperation
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum HyphenParamResponse { pub enum HyphenParamResponse {
/// Success /// Success
Success Success
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum TestClassnameResponse { pub enum TestClassnameResponse {
/// successful operation /// successful operation
SuccessfulOperation SuccessfulOperation
(models::Client) (models::Client)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum AddPetResponse { pub enum AddPetResponse {
/// Invalid input /// Invalid input
InvalidInput InvalidInput
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use] #[must_use]
pub enum FindPetsByStatusResponse { pub enum FindPetsByStatusResponse {
@ -141,7 +125,6 @@ pub enum FindPetsByStatusResponse {
/// Invalid status value /// Invalid status value
InvalidStatusValue InvalidStatusValue
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use] #[must_use]
pub enum FindPetsByTagsResponse { pub enum FindPetsByTagsResponse {
@ -152,7 +135,6 @@ pub enum FindPetsByTagsResponse {
/// Invalid tag value /// Invalid tag value
InvalidTagValue InvalidTagValue
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use] #[must_use]
pub enum UpdatePetResponse { pub enum UpdatePetResponse {
@ -165,13 +147,11 @@ pub enum UpdatePetResponse {
/// Validation exception /// Validation exception
ValidationException ValidationException
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum DeletePetResponse { pub enum DeletePetResponse {
/// Invalid pet value /// Invalid pet value
InvalidPetValue InvalidPetValue
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use] #[must_use]
pub enum GetPetByIdResponse { pub enum GetPetByIdResponse {
@ -185,27 +165,23 @@ pub enum GetPetByIdResponse {
/// Pet not found /// Pet not found
PetNotFound PetNotFound
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum UpdatePetWithFormResponse { pub enum UpdatePetWithFormResponse {
/// Invalid input /// Invalid input
InvalidInput InvalidInput
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum UploadFileResponse { pub enum UploadFileResponse {
/// successful operation /// successful operation
SuccessfulOperation SuccessfulOperation
(models::ApiResponse) (models::ApiResponse)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum GetInventoryResponse { pub enum GetInventoryResponse {
/// successful operation /// successful operation
SuccessfulOperation SuccessfulOperation
(std::collections::HashMap<String, i32>) (std::collections::HashMap<String, i32>)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use] #[must_use]
pub enum PlaceOrderResponse { pub enum PlaceOrderResponse {
@ -216,7 +192,6 @@ pub enum PlaceOrderResponse {
/// Invalid Order /// Invalid Order
InvalidOrder InvalidOrder
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use] #[must_use]
pub enum DeleteOrderResponse { pub enum DeleteOrderResponse {
@ -226,7 +201,6 @@ pub enum DeleteOrderResponse {
/// Order not found /// Order not found
OrderNotFound OrderNotFound
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use] #[must_use]
pub enum GetOrderByIdResponse { pub enum GetOrderByIdResponse {
@ -240,25 +214,21 @@ pub enum GetOrderByIdResponse {
/// Order not found /// Order not found
OrderNotFound OrderNotFound
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum CreateUserResponse { pub enum CreateUserResponse {
/// successful operation /// successful operation
SuccessfulOperation SuccessfulOperation
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum CreateUsersWithArrayInputResponse { pub enum CreateUsersWithArrayInputResponse {
/// successful operation /// successful operation
SuccessfulOperation SuccessfulOperation
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum CreateUsersWithListInputResponse { pub enum CreateUsersWithListInputResponse {
/// successful operation /// successful operation
SuccessfulOperation SuccessfulOperation
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use] #[must_use]
pub enum LoginUserResponse { pub enum LoginUserResponse {
@ -280,13 +250,11 @@ pub enum LoginUserResponse {
/// Invalid username/password supplied /// Invalid username/password supplied
InvalidUsername InvalidUsername
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum LogoutUserResponse { pub enum LogoutUserResponse {
/// successful operation /// successful operation
SuccessfulOperation SuccessfulOperation
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use] #[must_use]
pub enum DeleteUserResponse { pub enum DeleteUserResponse {
@ -296,7 +264,6 @@ pub enum DeleteUserResponse {
/// User not found /// User not found
UserNotFound UserNotFound
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use] #[must_use]
pub enum GetUserByNameResponse { pub enum GetUserByNameResponse {
@ -310,7 +277,6 @@ pub enum GetUserByNameResponse {
/// User not found /// User not found
UserNotFound UserNotFound
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use] #[must_use]
pub enum UpdateUserResponse { pub enum UpdateUserResponse {
@ -320,7 +286,6 @@ pub enum UpdateUserResponse {
/// User not found /// User not found
UserNotFound UserNotFound
} }
/// API /// API
#[async_trait] #[async_trait]
#[allow(clippy::too_many_arguments, clippy::ptr_arg)] #[allow(clippy::too_many_arguments, clippy::ptr_arg)]

View File

@ -159,7 +159,6 @@ mod paths {
} }
} }
pub struct MakeService<T, C> where pub struct MakeService<T, C> where
T: Api<C> + Clone + Send + 'static, T: Api<C> + Clone + Send + 'static,
C: Has<XSpanIdString> + Has<Option<Authorization>> + Send + Sync + 'static C: Has<XSpanIdString> + Has<Option<Authorization>> + Send + Sync + 'static
@ -211,7 +210,6 @@ impl<T, C, Target> hyper::service::Service<Target> for MakeService<T, C> where
future::ok(service) future::ok(service)
} }
} }
fn method_not_allowed() -> Result<Response<Body>, crate::ServiceError> { fn method_not_allowed() -> Result<Response<Body>, crate::ServiceError> {
Ok( Ok(
Response::builder().status(StatusCode::METHOD_NOT_ALLOWED) Response::builder().status(StatusCode::METHOD_NOT_ALLOWED)
@ -292,7 +290,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
let path = paths::GLOBAL_REGEX_SET.matches(uri.path()); let path = paths::GLOBAL_REGEX_SET.matches(uri.path());
match method { match method {
// TestSpecialTags - PATCH /another-fake/dummy // TestSpecialTags - PATCH /another-fake/dummy
hyper::Method::PATCH if path.matched(paths::ID_ANOTHER_FAKE_DUMMY) => { hyper::Method::PATCH if path.matched(paths::ID_ANOTHER_FAKE_DUMMY) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -324,8 +321,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.body(Body::from("Missing required body parameter body")) .body(Body::from("Missing required body parameter body"))
.expect("Unable to create Bad Request response for missing body parameter body")), .expect("Unable to create Bad Request response for missing body parameter body")),
}; };
let result = api_impl.test_special_tags( let result = api_impl.test_special_tags(
param_body, param_body,
&context &context
@ -355,7 +350,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -374,7 +368,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// Call123example - GET /fake/operation-with-numeric-id // Call123example - GET /fake/operation-with-numeric-id
hyper::Method::GET if path.matched(paths::ID_FAKE_OPERATION_WITH_NUMERIC_ID) => { hyper::Method::GET if path.matched(paths::ID_FAKE_OPERATION_WITH_NUMERIC_ID) => {
let result = api_impl.call123example( let result = api_impl.call123example(
@ -391,7 +384,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Call123exampleResponse::Success Call123exampleResponse::Success
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -404,7 +396,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// FakeOuterBooleanSerialize - POST /fake/outer/boolean // FakeOuterBooleanSerialize - POST /fake/outer/boolean
hyper::Method::POST if path.matched(paths::ID_FAKE_OUTER_BOOLEAN) => { hyper::Method::POST if path.matched(paths::ID_FAKE_OUTER_BOOLEAN) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -426,8 +417,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
} else { } else {
None None
}; };
let result = api_impl.fake_outer_boolean_serialize( let result = api_impl.fake_outer_boolean_serialize(
param_body, param_body,
&context &context
@ -457,7 +446,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -476,7 +464,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// FakeOuterCompositeSerialize - POST /fake/outer/composite // FakeOuterCompositeSerialize - POST /fake/outer/composite
hyper::Method::POST if path.matched(paths::ID_FAKE_OUTER_COMPOSITE) => { hyper::Method::POST if path.matched(paths::ID_FAKE_OUTER_COMPOSITE) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -498,8 +485,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
} else { } else {
None None
}; };
let result = api_impl.fake_outer_composite_serialize( let result = api_impl.fake_outer_composite_serialize(
param_body, param_body,
&context &context
@ -529,7 +514,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -548,7 +532,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// FakeOuterNumberSerialize - POST /fake/outer/number // FakeOuterNumberSerialize - POST /fake/outer/number
hyper::Method::POST if path.matched(paths::ID_FAKE_OUTER_NUMBER) => { hyper::Method::POST if path.matched(paths::ID_FAKE_OUTER_NUMBER) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -570,8 +553,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
} else { } else {
None None
}; };
let result = api_impl.fake_outer_number_serialize( let result = api_impl.fake_outer_number_serialize(
param_body, param_body,
&context &context
@ -601,7 +582,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -620,7 +600,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// FakeOuterStringSerialize - POST /fake/outer/string // FakeOuterStringSerialize - POST /fake/outer/string
hyper::Method::POST if path.matched(paths::ID_FAKE_OUTER_STRING) => { hyper::Method::POST if path.matched(paths::ID_FAKE_OUTER_STRING) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -642,8 +621,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
} else { } else {
None None
}; };
let result = api_impl.fake_outer_string_serialize( let result = api_impl.fake_outer_string_serialize(
param_body, param_body,
&context &context
@ -673,7 +650,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -692,7 +668,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// FakeResponseWithNumericalDescription - GET /fake/response-with-numerical-description // FakeResponseWithNumericalDescription - GET /fake/response-with-numerical-description
hyper::Method::GET if path.matched(paths::ID_FAKE_RESPONSE_WITH_NUMERICAL_DESCRIPTION) => { hyper::Method::GET if path.matched(paths::ID_FAKE_RESPONSE_WITH_NUMERICAL_DESCRIPTION) => {
let result = api_impl.fake_response_with_numerical_description( let result = api_impl.fake_response_with_numerical_description(
@ -709,7 +684,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
FakeResponseWithNumericalDescriptionResponse::Status200 FakeResponseWithNumericalDescriptionResponse::Status200
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -722,7 +696,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// TestBodyWithQueryParams - PUT /fake/body-with-query-params // TestBodyWithQueryParams - PUT /fake/body-with-query-params
hyper::Method::PUT if path.matched(paths::ID_FAKE_BODY_WITH_QUERY_PARAMS) => { 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) // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
@ -781,8 +754,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.body(Body::from("Missing required body parameter body")) .body(Body::from("Missing required body parameter body"))
.expect("Unable to create Bad Request response for missing body parameter body")), .expect("Unable to create Bad Request response for missing body parameter body")),
}; };
let result = api_impl.test_body_with_query_params( let result = api_impl.test_body_with_query_params(
param_query, param_query,
param_body, param_body,
@ -805,7 +776,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
TestBodyWithQueryParamsResponse::Success TestBodyWithQueryParamsResponse::Success
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -824,7 +794,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// TestClientModel - PATCH /fake // TestClientModel - PATCH /fake
hyper::Method::PATCH if path.matched(paths::ID_FAKE) => { hyper::Method::PATCH if path.matched(paths::ID_FAKE) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -856,8 +825,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.body(Body::from("Missing required body parameter body")) .body(Body::from("Missing required body parameter body"))
.expect("Unable to create Bad Request response for missing body parameter body")), .expect("Unable to create Bad Request response for missing body parameter body")),
}; };
let result = api_impl.test_client_model( let result = api_impl.test_client_model(
param_body, param_body,
&context &context
@ -887,7 +854,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -906,7 +872,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// TestEndpointParameters - POST /fake // TestEndpointParameters - POST /fake
hyper::Method::POST if path.matched(paths::ID_FAKE) => { hyper::Method::POST if path.matched(paths::ID_FAKE) => {
{ {
@ -954,8 +919,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Some("password_example".to_string()); Some("password_example".to_string());
let param_callback = let param_callback =
Some("callback_example".to_string()); Some("callback_example".to_string());
let result = api_impl.test_endpoint_parameters( let result = api_impl.test_endpoint_parameters(
param_number, param_number,
param_double, param_double,
@ -984,12 +947,10 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
TestEndpointParametersResponse::InvalidUsernameSupplied TestEndpointParametersResponse::InvalidUsernameSupplied
=> { => {
*response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode");
}, },
TestEndpointParametersResponse::UserNotFound TestEndpointParametersResponse::UserNotFound
=> { => {
*response.status_mut() = StatusCode::from_u16(404).expect("Unable to turn 404 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(404).expect("Unable to turn 404 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1008,7 +969,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// TestEnumParameters - GET /fake // TestEnumParameters - GET /fake
hyper::Method::GET if path.matched(paths::ID_FAKE) => { hyper::Method::GET if path.matched(paths::ID_FAKE) => {
// Header parameters // Header parameters
@ -1120,8 +1080,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// Form parameters // Form parameters
let param_enum_form_string = let param_enum_form_string =
None; None;
let result = api_impl.test_enum_parameters( let result = api_impl.test_enum_parameters(
param_enum_header_string_array.as_ref(), param_enum_header_string_array.as_ref(),
param_enum_header_string, param_enum_header_string,
@ -1143,12 +1101,10 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
TestEnumParametersResponse::InvalidRequest TestEnumParametersResponse::InvalidRequest
=> { => {
*response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode");
}, },
TestEnumParametersResponse::NotFound TestEnumParametersResponse::NotFound
=> { => {
*response.status_mut() = StatusCode::from_u16(404).expect("Unable to turn 404 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(404).expect("Unable to turn 404 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1167,7 +1123,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// TestInlineAdditionalProperties - POST /fake/inline-additionalProperties // TestInlineAdditionalProperties - POST /fake/inline-additionalProperties
hyper::Method::POST if path.matched(paths::ID_FAKE_INLINE_ADDITIONALPROPERTIES) => { hyper::Method::POST if path.matched(paths::ID_FAKE_INLINE_ADDITIONALPROPERTIES) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -1199,8 +1154,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.body(Body::from("Missing required body parameter param")) .body(Body::from("Missing required body parameter param"))
.expect("Unable to create Bad Request response for missing body parameter param")), .expect("Unable to create Bad Request response for missing body parameter param")),
}; };
let result = api_impl.test_inline_additional_properties( let result = api_impl.test_inline_additional_properties(
param_param, param_param,
&context &context
@ -1222,7 +1175,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
TestInlineAdditionalPropertiesResponse::SuccessfulOperation TestInlineAdditionalPropertiesResponse::SuccessfulOperation
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1241,7 +1193,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// TestJsonFormData - GET /fake/jsonFormData // TestJsonFormData - GET /fake/jsonFormData
hyper::Method::GET if path.matched(paths::ID_FAKE_JSONFORMDATA) => { hyper::Method::GET if path.matched(paths::ID_FAKE_JSONFORMDATA) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -1255,8 +1206,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
"param_example".to_string(); "param_example".to_string();
let param_param2 = let param_param2 =
"param2_example".to_string(); "param2_example".to_string();
let result = api_impl.test_json_form_data( let result = api_impl.test_json_form_data(
param_param, param_param,
param_param2, param_param2,
@ -1273,7 +1222,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
TestJsonFormDataResponse::SuccessfulOperation TestJsonFormDataResponse::SuccessfulOperation
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1292,7 +1240,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// HyphenParam - GET /fake/hyphenParam/{hyphen-param} // HyphenParam - GET /fake/hyphenParam/{hyphen-param}
hyper::Method::GET if path.matched(paths::ID_FAKE_HYPHENPARAM_HYPHEN_PARAM) => { hyper::Method::GET if path.matched(paths::ID_FAKE_HYPHENPARAM_HYPHEN_PARAM) => {
// Path parameters // Path parameters
@ -1333,7 +1280,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
HyphenParamResponse::Success HyphenParamResponse::Success
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1346,7 +1292,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// TestClassname - PATCH /fake_classname_test // TestClassname - PATCH /fake_classname_test
hyper::Method::PATCH if path.matched(paths::ID_FAKE_CLASSNAME_TEST) => { hyper::Method::PATCH if path.matched(paths::ID_FAKE_CLASSNAME_TEST) => {
{ {
@ -1388,8 +1333,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.body(Body::from("Missing required body parameter body")) .body(Body::from("Missing required body parameter body"))
.expect("Unable to create Bad Request response for missing body parameter body")), .expect("Unable to create Bad Request response for missing body parameter body")),
}; };
let result = api_impl.test_classname( let result = api_impl.test_classname(
param_body, param_body,
&context &context
@ -1419,7 +1362,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -1438,7 +1380,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// AddPet - POST /pet // AddPet - POST /pet
hyper::Method::POST if path.matched(paths::ID_PET) => { hyper::Method::POST if path.matched(paths::ID_PET) => {
{ {
@ -1500,8 +1441,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.body(Body::from("Missing required body parameter body")) .body(Body::from("Missing required body parameter body"))
.expect("Unable to create Bad Request response for missing body parameter body")), .expect("Unable to create Bad Request response for missing body parameter body")),
}; };
let result = api_impl.add_pet( let result = api_impl.add_pet(
param_body, param_body,
&context &context
@ -1523,7 +1462,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
AddPetResponse::InvalidInput AddPetResponse::InvalidInput
=> { => {
*response.status_mut() = StatusCode::from_u16(405).expect("Unable to turn 405 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(405).expect("Unable to turn 405 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1542,7 +1480,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// FindPetsByStatus - GET /pet/findByStatus // FindPetsByStatus - GET /pet/findByStatus
hyper::Method::GET if path.matched(paths::ID_PET_FINDBYSTATUS) => { hyper::Method::GET if path.matched(paths::ID_PET_FINDBYSTATUS) => {
{ {
@ -1604,12 +1541,10 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// XML Body // XML Body
let body = serde_xml_rs::to_string(&body).expect("impossible to fail to serialize"); let body = serde_xml_rs::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
FindPetsByStatusResponse::InvalidStatusValue FindPetsByStatusResponse::InvalidStatusValue
=> { => {
*response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1622,7 +1557,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// FindPetsByTags - GET /pet/findByTags // FindPetsByTags - GET /pet/findByTags
hyper::Method::GET if path.matched(paths::ID_PET_FINDBYTAGS) => { hyper::Method::GET if path.matched(paths::ID_PET_FINDBYTAGS) => {
{ {
@ -1684,12 +1618,10 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// XML Body // XML Body
let body = serde_xml_rs::to_string(&body).expect("impossible to fail to serialize"); let body = serde_xml_rs::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
FindPetsByTagsResponse::InvalidTagValue FindPetsByTagsResponse::InvalidTagValue
=> { => {
*response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1702,7 +1634,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// UpdatePet - PUT /pet // UpdatePet - PUT /pet
hyper::Method::PUT if path.matched(paths::ID_PET) => { hyper::Method::PUT if path.matched(paths::ID_PET) => {
{ {
@ -1764,8 +1695,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.body(Body::from("Missing required body parameter body")) .body(Body::from("Missing required body parameter body"))
.expect("Unable to create Bad Request response for missing body parameter body")), .expect("Unable to create Bad Request response for missing body parameter body")),
}; };
let result = api_impl.update_pet( let result = api_impl.update_pet(
param_body, param_body,
&context &context
@ -1787,17 +1716,14 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
UpdatePetResponse::InvalidIDSupplied UpdatePetResponse::InvalidIDSupplied
=> { => {
*response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode");
}, },
UpdatePetResponse::PetNotFound UpdatePetResponse::PetNotFound
=> { => {
*response.status_mut() = StatusCode::from_u16(404).expect("Unable to turn 404 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(404).expect("Unable to turn 404 into a StatusCode");
}, },
UpdatePetResponse::ValidationException UpdatePetResponse::ValidationException
=> { => {
*response.status_mut() = StatusCode::from_u16(405).expect("Unable to turn 405 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(405).expect("Unable to turn 405 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1816,7 +1742,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// DeletePet - DELETE /pet/{petId} // DeletePet - DELETE /pet/{petId}
hyper::Method::DELETE if path.matched(paths::ID_PET_PETID) => { hyper::Method::DELETE if path.matched(paths::ID_PET_PETID) => {
{ {
@ -1908,7 +1833,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
DeletePetResponse::InvalidPetValue DeletePetResponse::InvalidPetValue
=> { => {
*response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -1921,7 +1845,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// GetPetById - GET /pet/{petId} // GetPetById - GET /pet/{petId}
hyper::Method::GET if path.matched(paths::ID_PET_PETID) => { hyper::Method::GET if path.matched(paths::ID_PET_PETID) => {
{ {
@ -1980,17 +1903,14 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// XML Body // XML Body
let body = serde_xml_rs::to_string(&body).expect("impossible to fail to serialize"); let body = serde_xml_rs::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
GetPetByIdResponse::InvalidIDSupplied GetPetByIdResponse::InvalidIDSupplied
=> { => {
*response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode");
}, },
GetPetByIdResponse::PetNotFound GetPetByIdResponse::PetNotFound
=> { => {
*response.status_mut() = StatusCode::from_u16(404).expect("Unable to turn 404 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(404).expect("Unable to turn 404 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -2003,7 +1923,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// UpdatePetWithForm - POST /pet/{petId} // UpdatePetWithForm - POST /pet/{petId}
hyper::Method::POST if path.matched(paths::ID_PET_PETID) => { hyper::Method::POST if path.matched(paths::ID_PET_PETID) => {
{ {
@ -2070,8 +1989,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Some("name_example".to_string()); Some("name_example".to_string());
let param_status = let param_status =
Some("status_example".to_string()); Some("status_example".to_string());
let result = api_impl.update_pet_with_form( let result = api_impl.update_pet_with_form(
param_pet_id, param_pet_id,
param_name, param_name,
@ -2089,7 +2006,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
UpdatePetWithFormResponse::InvalidInput UpdatePetWithFormResponse::InvalidInput
=> { => {
*response.status_mut() = StatusCode::from_u16(405).expect("Unable to turn 405 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(405).expect("Unable to turn 405 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -2108,7 +2024,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// UploadFile - POST /pet/{petId}/uploadImage // UploadFile - POST /pet/{petId}/uploadImage
hyper::Method::POST if path.matched(paths::ID_PET_PETID_UPLOADIMAGE) => { hyper::Method::POST if path.matched(paths::ID_PET_PETID_UPLOADIMAGE) => {
{ {
@ -2268,8 +2183,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
None None
} }
}; };
let result = api_impl.upload_file( let result = api_impl.upload_file(
param_pet_id, param_pet_id,
param_additional_metadata, param_additional_metadata,
@ -2295,7 +2208,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -2314,7 +2226,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// GetInventory - GET /store/inventory // GetInventory - GET /store/inventory
hyper::Method::GET if path.matched(paths::ID_STORE_INVENTORY) => { hyper::Method::GET if path.matched(paths::ID_STORE_INVENTORY) => {
{ {
@ -2349,7 +2260,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -2362,7 +2272,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// PlaceOrder - POST /store/order // PlaceOrder - POST /store/order
hyper::Method::POST if path.matched(paths::ID_STORE_ORDER) => { hyper::Method::POST if path.matched(paths::ID_STORE_ORDER) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -2394,8 +2303,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.body(Body::from("Missing required body parameter body")) .body(Body::from("Missing required body parameter body"))
.expect("Unable to create Bad Request response for missing body parameter body")), .expect("Unable to create Bad Request response for missing body parameter body")),
}; };
let result = api_impl.place_order( let result = api_impl.place_order(
param_body, param_body,
&context &context
@ -2425,12 +2332,10 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// XML Body // XML Body
let body = serde_xml_rs::to_string(&body).expect("impossible to fail to serialize"); let body = serde_xml_rs::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
PlaceOrderResponse::InvalidOrder PlaceOrderResponse::InvalidOrder
=> { => {
*response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -2449,7 +2354,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// DeleteOrder - DELETE /store/order/{order_id} // DeleteOrder - DELETE /store/order/{order_id}
hyper::Method::DELETE if path.matched(paths::ID_STORE_ORDER_ORDER_ID) => { hyper::Method::DELETE if path.matched(paths::ID_STORE_ORDER_ORDER_ID) => {
// Path parameters // Path parameters
@ -2490,12 +2394,10 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
DeleteOrderResponse::InvalidIDSupplied DeleteOrderResponse::InvalidIDSupplied
=> { => {
*response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode");
}, },
DeleteOrderResponse::OrderNotFound DeleteOrderResponse::OrderNotFound
=> { => {
*response.status_mut() = StatusCode::from_u16(404).expect("Unable to turn 404 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(404).expect("Unable to turn 404 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -2508,7 +2410,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// GetOrderById - GET /store/order/{order_id} // GetOrderById - GET /store/order/{order_id}
hyper::Method::GET if path.matched(paths::ID_STORE_ORDER_ORDER_ID) => { hyper::Method::GET if path.matched(paths::ID_STORE_ORDER_ORDER_ID) => {
// Path parameters // Path parameters
@ -2557,17 +2458,14 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// XML Body // XML Body
let body = serde_xml_rs::to_string(&body).expect("impossible to fail to serialize"); let body = serde_xml_rs::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
GetOrderByIdResponse::InvalidIDSupplied GetOrderByIdResponse::InvalidIDSupplied
=> { => {
*response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode");
}, },
GetOrderByIdResponse::OrderNotFound GetOrderByIdResponse::OrderNotFound
=> { => {
*response.status_mut() = StatusCode::from_u16(404).expect("Unable to turn 404 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(404).expect("Unable to turn 404 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -2580,7 +2478,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// CreateUser - POST /user // CreateUser - POST /user
hyper::Method::POST if path.matched(paths::ID_USER) => { hyper::Method::POST if path.matched(paths::ID_USER) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -2612,8 +2509,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.body(Body::from("Missing required body parameter body")) .body(Body::from("Missing required body parameter body"))
.expect("Unable to create Bad Request response for missing body parameter body")), .expect("Unable to create Bad Request response for missing body parameter body")),
}; };
let result = api_impl.create_user( let result = api_impl.create_user(
param_body, param_body,
&context &context
@ -2635,7 +2530,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
CreateUserResponse::SuccessfulOperation CreateUserResponse::SuccessfulOperation
=> { => {
*response.status_mut() = StatusCode::from_u16(0).expect("Unable to turn 0 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(0).expect("Unable to turn 0 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -2654,7 +2548,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// CreateUsersWithArrayInput - POST /user/createWithArray // CreateUsersWithArrayInput - POST /user/createWithArray
hyper::Method::POST if path.matched(paths::ID_USER_CREATEWITHARRAY) => { hyper::Method::POST if path.matched(paths::ID_USER_CREATEWITHARRAY) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -2686,8 +2579,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.body(Body::from("Missing required body parameter body")) .body(Body::from("Missing required body parameter body"))
.expect("Unable to create Bad Request response for missing body parameter body")), .expect("Unable to create Bad Request response for missing body parameter body")),
}; };
let result = api_impl.create_users_with_array_input( let result = api_impl.create_users_with_array_input(
param_body.as_ref(), param_body.as_ref(),
&context &context
@ -2709,7 +2600,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
CreateUsersWithArrayInputResponse::SuccessfulOperation CreateUsersWithArrayInputResponse::SuccessfulOperation
=> { => {
*response.status_mut() = StatusCode::from_u16(0).expect("Unable to turn 0 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(0).expect("Unable to turn 0 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -2728,7 +2618,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// CreateUsersWithListInput - POST /user/createWithList // CreateUsersWithListInput - POST /user/createWithList
hyper::Method::POST if path.matched(paths::ID_USER_CREATEWITHLIST) => { hyper::Method::POST if path.matched(paths::ID_USER_CREATEWITHLIST) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -2760,8 +2649,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.body(Body::from("Missing required body parameter body")) .body(Body::from("Missing required body parameter body"))
.expect("Unable to create Bad Request response for missing body parameter body")), .expect("Unable to create Bad Request response for missing body parameter body")),
}; };
let result = api_impl.create_users_with_list_input( let result = api_impl.create_users_with_list_input(
param_body.as_ref(), param_body.as_ref(),
&context &context
@ -2783,7 +2670,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
CreateUsersWithListInputResponse::SuccessfulOperation CreateUsersWithListInputResponse::SuccessfulOperation
=> { => {
*response.status_mut() = StatusCode::from_u16(0).expect("Unable to turn 0 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(0).expect("Unable to turn 0 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -2802,7 +2688,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// LoginUser - GET /user/login // LoginUser - GET /user/login
hyper::Method::GET if path.matched(paths::ID_USER_LOGIN) => { 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) // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response)
@ -2918,12 +2803,10 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// XML Body // XML Body
let body = serde_xml_rs::to_string(&body).expect("impossible to fail to serialize"); let body = serde_xml_rs::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
LoginUserResponse::InvalidUsername LoginUserResponse::InvalidUsername
=> { => {
*response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -2936,7 +2819,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// LogoutUser - GET /user/logout // LogoutUser - GET /user/logout
hyper::Method::GET if path.matched(paths::ID_USER_LOGOUT) => { hyper::Method::GET if path.matched(paths::ID_USER_LOGOUT) => {
let result = api_impl.logout_user( let result = api_impl.logout_user(
@ -2953,7 +2835,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
LogoutUserResponse::SuccessfulOperation LogoutUserResponse::SuccessfulOperation
=> { => {
*response.status_mut() = StatusCode::from_u16(0).expect("Unable to turn 0 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(0).expect("Unable to turn 0 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -2966,7 +2847,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// DeleteUser - DELETE /user/{username} // DeleteUser - DELETE /user/{username}
hyper::Method::DELETE if path.matched(paths::ID_USER_USERNAME) => { hyper::Method::DELETE if path.matched(paths::ID_USER_USERNAME) => {
// Path parameters // Path parameters
@ -3007,12 +2887,10 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
DeleteUserResponse::InvalidUsernameSupplied DeleteUserResponse::InvalidUsernameSupplied
=> { => {
*response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode");
}, },
DeleteUserResponse::UserNotFound DeleteUserResponse::UserNotFound
=> { => {
*response.status_mut() = StatusCode::from_u16(404).expect("Unable to turn 404 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(404).expect("Unable to turn 404 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -3025,7 +2903,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// GetUserByName - GET /user/{username} // GetUserByName - GET /user/{username}
hyper::Method::GET if path.matched(paths::ID_USER_USERNAME) => { hyper::Method::GET if path.matched(paths::ID_USER_USERNAME) => {
// Path parameters // Path parameters
@ -3074,17 +2951,14 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// XML Body // XML Body
let body = serde_xml_rs::to_string(&body).expect("impossible to fail to serialize"); let body = serde_xml_rs::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
GetUserByNameResponse::InvalidUsernameSupplied GetUserByNameResponse::InvalidUsernameSupplied
=> { => {
*response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode");
}, },
GetUserByNameResponse::UserNotFound GetUserByNameResponse::UserNotFound
=> { => {
*response.status_mut() = StatusCode::from_u16(404).expect("Unable to turn 404 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(404).expect("Unable to turn 404 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -3097,7 +2971,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// UpdateUser - PUT /user/{username} // UpdateUser - PUT /user/{username}
hyper::Method::PUT if path.matched(paths::ID_USER_USERNAME) => { hyper::Method::PUT if path.matched(paths::ID_USER_USERNAME) => {
// Path parameters // Path parameters
@ -3152,8 +3025,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.body(Body::from("Missing required body parameter body")) .body(Body::from("Missing required body parameter body"))
.expect("Unable to create Bad Request response for missing body parameter body")), .expect("Unable to create Bad Request response for missing body parameter body")),
}; };
let result = api_impl.update_user( let result = api_impl.update_user(
param_username, param_username,
param_body, param_body,
@ -3176,12 +3047,10 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
UpdateUserResponse::InvalidUserSupplied UpdateUserResponse::InvalidUserSupplied
=> { => {
*response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode");
}, },
UpdateUserResponse::UserNotFound UpdateUserResponse::UserNotFound
=> { => {
*response.status_mut() = StatusCode::from_u16(404).expect("Unable to turn 404 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(404).expect("Unable to turn 404 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -3200,7 +3069,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
_ if path.matched(paths::ID_ANOTHER_FAKE_DUMMY) => method_not_allowed(), _ if path.matched(paths::ID_ANOTHER_FAKE_DUMMY) => method_not_allowed(),
_ if path.matched(paths::ID_FAKE) => method_not_allowed(), _ if path.matched(paths::ID_FAKE) => method_not_allowed(),
_ if path.matched(paths::ID_FAKE_BODY_WITH_QUERY_PARAMS) => method_not_allowed(), _ if path.matched(paths::ID_FAKE_BODY_WITH_QUERY_PARAMS) => method_not_allowed(),
@ -3240,7 +3108,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
)) ))
} }
} }
/// Request parser for `Api`. /// Request parser for `Api`.
pub struct ApiRequestParser; pub struct ApiRequestParser;
impl<T> RequestParser<T> for ApiRequestParser { impl<T> RequestParser<T> for ApiRequestParser {

View File

@ -118,5 +118,4 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("ping_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("ping_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
} }

View File

@ -415,7 +415,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -466,5 +465,4 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
} }

View File

@ -25,7 +25,6 @@ pub enum PingGetResponse {
/// OK /// OK
OK OK
} }
/// API /// API
#[async_trait] #[async_trait]
#[allow(clippy::too_many_arguments, clippy::ptr_arg)] #[allow(clippy::too_many_arguments, clippy::ptr_arg)]

View File

@ -41,7 +41,6 @@ mod paths {
pub(crate) static ID_PING: usize = 0; pub(crate) static ID_PING: usize = 0;
} }
pub struct MakeService<T, C> where pub struct MakeService<T, C> where
T: Api<C> + Clone + Send + 'static, T: Api<C> + Clone + Send + 'static,
C: Has<XSpanIdString> + Has<Option<Authorization>> + Send + Sync + 'static C: Has<XSpanIdString> + Has<Option<Authorization>> + Send + Sync + 'static
@ -80,7 +79,6 @@ impl<T, C, Target> hyper::service::Service<Target> for MakeService<T, C> where
future::ok(service) future::ok(service)
} }
} }
fn method_not_allowed() -> Result<Response<Body>, crate::ServiceError> { fn method_not_allowed() -> Result<Response<Body>, crate::ServiceError> {
Ok( Ok(
Response::builder().status(StatusCode::METHOD_NOT_ALLOWED) Response::builder().status(StatusCode::METHOD_NOT_ALLOWED)
@ -147,7 +145,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
let path = paths::GLOBAL_REGEX_SET.matches(uri.path()); let path = paths::GLOBAL_REGEX_SET.matches(uri.path());
match method { match method {
// PingGet - GET /ping // PingGet - GET /ping
hyper::Method::GET if path.matched(paths::ID_PING) => { hyper::Method::GET if path.matched(paths::ID_PING) => {
{ {
@ -174,7 +171,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
PingGetResponse::OK PingGetResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(201).expect("Unable to turn 201 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(201).expect("Unable to turn 201 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -187,7 +183,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
_ if path.matched(paths::ID_PING) => method_not_allowed(), _ if path.matched(paths::ID_PING) => method_not_allowed(),
_ => Ok(Response::builder().status(StatusCode::NOT_FOUND) _ => Ok(Response::builder().status(StatusCode::NOT_FOUND)
.body(Body::empty()) .body(Body::empty())
@ -200,7 +195,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
)) ))
} }
} }
/// Request parser for `Api`. /// Request parser for `Api`.
pub struct ApiRequestParser; pub struct ApiRequestParser;
impl<T> RequestParser<T> for ApiRequestParser { impl<T> RequestParser<T> for ApiRequestParser {

View File

@ -126,7 +126,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("all_of_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("all_of_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// A dummy endpoint to make the spec valid. /// A dummy endpoint to make the spec valid.
async fn dummy_get( async fn dummy_get(
&self, &self,
@ -135,7 +134,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("dummy_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("dummy_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn dummy_put( async fn dummy_put(
&self, &self,
nested_response: models::DummyPutRequest, nested_response: models::DummyPutRequest,
@ -144,7 +142,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("dummy_put({:?}) - X-Span-ID: {:?}", nested_response, context.get().0.clone()); info!("dummy_put({:?}) - X-Span-ID: {:?}", nested_response, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Get a file /// Get a file
async fn file_response_get( async fn file_response_get(
&self, &self,
@ -153,7 +150,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("file_response_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("file_response_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn get_structured_yaml( async fn get_structured_yaml(
&self, &self,
context: &C) -> Result<GetStructuredYamlResponse, ApiError> context: &C) -> Result<GetStructuredYamlResponse, ApiError>
@ -161,7 +157,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("get_structured_yaml() - X-Span-ID: {:?}", context.get().0.clone()); info!("get_structured_yaml() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Test HTML handling /// Test HTML handling
async fn html_post( async fn html_post(
&self, &self,
@ -171,7 +166,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("html_post(\"{}\") - X-Span-ID: {:?}", body, context.get().0.clone()); info!("html_post(\"{}\") - X-Span-ID: {:?}", body, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
async fn post_yaml( async fn post_yaml(
&self, &self,
value: String, value: String,
@ -180,7 +174,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("post_yaml(\"{}\") - X-Span-ID: {:?}", value, context.get().0.clone()); info!("post_yaml(\"{}\") - X-Span-ID: {:?}", value, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Get an arbitrary JSON blob. /// Get an arbitrary JSON blob.
async fn raw_json_get( async fn raw_json_get(
&self, &self,
@ -189,7 +182,6 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("raw_json_get() - X-Span-ID: {:?}", context.get().0.clone()); info!("raw_json_get() - X-Span-ID: {:?}", context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
/// Send an arbitrary JSON blob /// Send an arbitrary JSON blob
async fn solo_object_post( async fn solo_object_post(
&self, &self,
@ -199,5 +191,4 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString> + Send + Sync
info!("solo_object_post({:?}) - X-Span-ID: {:?}", value, context.get().0.clone()); info!("solo_object_post({:?}) - X-Span-ID: {:?}", value, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }
} }

View File

@ -423,7 +423,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -445,7 +444,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<models::AllOfObject>(body) let body = serde_json::from_str::<models::AllOfObject>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(AllOfGetResponse::OK Ok(AllOfGetResponse::OK
(body) (body)
) )
@ -467,7 +465,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn dummy_get( async fn dummy_get(
&self, &self,
context: &C) -> Result<DummyGetResponse, ApiError> context: &C) -> Result<DummyGetResponse, ApiError>
@ -501,7 +498,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -534,7 +530,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn dummy_put( async fn dummy_put(
&self, &self,
param_nested_response: models::DummyPutRequest, param_nested_response: models::DummyPutRequest,
@ -580,7 +575,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -613,7 +607,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn file_response_get( async fn file_response_get(
&self, &self,
context: &C) -> Result<FileResponseGetResponse, ApiError> context: &C) -> Result<FileResponseGetResponse, ApiError>
@ -647,7 +640,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -669,7 +661,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<swagger::ByteArray>(body) let body = serde_json::from_str::<swagger::ByteArray>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(FileResponseGetResponse::Success Ok(FileResponseGetResponse::Success
(body) (body)
) )
@ -691,7 +682,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn get_structured_yaml( async fn get_structured_yaml(
&self, &self,
context: &C) -> Result<GetStructuredYamlResponse, ApiError> context: &C) -> Result<GetStructuredYamlResponse, ApiError>
@ -725,7 +715,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -746,7 +735,6 @@ impl<S, C> Api<C> for Client<S, C> where
.map_err(|e| ApiError(format!("Response was not valid UTF8: {e}")))?; .map_err(|e| ApiError(format!("Response was not valid UTF8: {e}")))?;
let body = body.to_string(); let body = body.to_string();
Ok(GetStructuredYamlResponse::OK Ok(GetStructuredYamlResponse::OK
(body) (body)
) )
@ -768,7 +756,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn html_post( async fn html_post(
&self, &self,
param_body: String, param_body: String,
@ -814,7 +801,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -835,7 +821,6 @@ impl<S, C> Api<C> for Client<S, C> where
.map_err(|e| ApiError(format!("Response was not valid UTF8: {e}")))?; .map_err(|e| ApiError(format!("Response was not valid UTF8: {e}")))?;
let body = body.to_string(); let body = body.to_string();
Ok(HtmlPostResponse::Success Ok(HtmlPostResponse::Success
(body) (body)
) )
@ -857,7 +842,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn post_yaml( async fn post_yaml(
&self, &self,
param_value: String, param_value: String,
@ -903,7 +887,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -936,7 +919,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn raw_json_get( async fn raw_json_get(
&self, &self,
context: &C) -> Result<RawJsonGetResponse, ApiError> context: &C) -> Result<RawJsonGetResponse, ApiError>
@ -970,7 +952,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(req) => req, Ok(req) => req,
Err(e) => return Err(ApiError(format!("Unable to create request: {e}"))) Err(e) => return Err(ApiError(format!("Unable to create request: {e}")))
}; };
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -992,7 +973,6 @@ impl<S, C> Api<C> for Client<S, C> where
let body = serde_json::from_str::<serde_json::Value>(body) let body = serde_json::from_str::<serde_json::Value>(body)
.map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?; .map_err(|e| ApiError(format!("Response body did not match the schema: {e}")))?;
Ok(RawJsonGetResponse::Success Ok(RawJsonGetResponse::Success
(body) (body)
) )
@ -1014,7 +994,6 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
async fn solo_object_post( async fn solo_object_post(
&self, &self,
param_value: serde_json::Value, param_value: serde_json::Value,
@ -1060,7 +1039,6 @@ impl<S, C> Api<C> for Client<S, C> where
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}"))) Err(e) => return Err(ApiError(format!("Unable to create header: {header} - {e}")))
}); });
let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str()); let header = HeaderValue::from_str(Has::<XSpanIdString>::get(context).0.as_str());
request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header {
Ok(h) => h, Ok(h) => h,
@ -1093,5 +1071,4 @@ impl<S, C> Api<C> for Client<S, C> where
} }
} }
} }
} }

View File

@ -26,59 +26,50 @@ pub enum AllOfGetResponse {
OK OK
(models::AllOfObject) (models::AllOfObject)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum DummyGetResponse { pub enum DummyGetResponse {
/// Success /// Success
Success Success
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum DummyPutResponse { pub enum DummyPutResponse {
/// Success /// Success
Success Success
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum FileResponseGetResponse { pub enum FileResponseGetResponse {
/// Success /// Success
Success Success
(swagger::ByteArray) (swagger::ByteArray)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum GetStructuredYamlResponse { pub enum GetStructuredYamlResponse {
/// OK /// OK
OK OK
(String) (String)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum HtmlPostResponse { pub enum HtmlPostResponse {
/// Success /// Success
Success Success
(String) (String)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum PostYamlResponse { pub enum PostYamlResponse {
/// OK /// OK
OK OK
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum RawJsonGetResponse { pub enum RawJsonGetResponse {
/// Success /// Success
Success Success
(serde_json::Value) (serde_json::Value)
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum SoloObjectPostResponse { pub enum SoloObjectPostResponse {
/// OK /// OK
OK OK
} }
/// API /// API
#[async_trait] #[async_trait]
#[allow(clippy::too_many_arguments, clippy::ptr_arg)] #[allow(clippy::too_many_arguments, clippy::ptr_arg)]

View File

@ -63,7 +63,6 @@ mod paths {
pub(crate) static ID_SOLO_OBJECT: usize = 7; pub(crate) static ID_SOLO_OBJECT: usize = 7;
} }
pub struct MakeService<T, C> where pub struct MakeService<T, C> where
T: Api<C> + Clone + Send + 'static, T: Api<C> + Clone + Send + 'static,
C: Has<XSpanIdString> + Send + Sync + 'static C: Has<XSpanIdString> + Send + Sync + 'static
@ -102,7 +101,6 @@ impl<T, C, Target> hyper::service::Service<Target> for MakeService<T, C> where
future::ok(service) future::ok(service)
} }
} }
fn method_not_allowed() -> Result<Response<Body>, crate::ServiceError> { fn method_not_allowed() -> Result<Response<Body>, crate::ServiceError> {
Ok( Ok(
Response::builder().status(StatusCode::METHOD_NOT_ALLOWED) Response::builder().status(StatusCode::METHOD_NOT_ALLOWED)
@ -169,7 +167,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
let path = paths::GLOBAL_REGEX_SET.matches(uri.path()); let path = paths::GLOBAL_REGEX_SET.matches(uri.path());
match method { match method {
// AllOfGet - GET /allOf // AllOfGet - GET /allOf
hyper::Method::GET if path.matched(paths::ID_ALLOF) => { hyper::Method::GET if path.matched(paths::ID_ALLOF) => {
let result = api_impl.all_of_get( let result = api_impl.all_of_get(
@ -194,7 +191,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -207,7 +203,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// DummyGet - GET /dummy // DummyGet - GET /dummy
hyper::Method::GET if path.matched(paths::ID_DUMMY) => { hyper::Method::GET if path.matched(paths::ID_DUMMY) => {
let result = api_impl.dummy_get( let result = api_impl.dummy_get(
@ -224,7 +219,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
DummyGetResponse::Success DummyGetResponse::Success
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -237,7 +231,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// DummyPut - PUT /dummy // DummyPut - PUT /dummy
hyper::Method::PUT if path.matched(paths::ID_DUMMY) => { hyper::Method::PUT if path.matched(paths::ID_DUMMY) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -269,8 +262,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.body(Body::from("Missing required body parameter nested_response")) .body(Body::from("Missing required body parameter nested_response"))
.expect("Unable to create Bad Request response for missing body parameter nested_response")), .expect("Unable to create Bad Request response for missing body parameter nested_response")),
}; };
let result = api_impl.dummy_put( let result = api_impl.dummy_put(
param_nested_response, param_nested_response,
&context &context
@ -292,7 +283,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
DummyPutResponse::Success DummyPutResponse::Success
=> { => {
*response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -311,7 +301,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// FileResponseGet - GET /file_response // FileResponseGet - GET /file_response
hyper::Method::GET if path.matched(paths::ID_FILE_RESPONSE) => { hyper::Method::GET if path.matched(paths::ID_FILE_RESPONSE) => {
let result = api_impl.file_response_get( let result = api_impl.file_response_get(
@ -336,7 +325,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -349,7 +337,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// GetStructuredYaml - GET /get-structured-yaml // GetStructuredYaml - GET /get-structured-yaml
hyper::Method::GET if path.matched(paths::ID_GET_STRUCTURED_YAML) => { hyper::Method::GET if path.matched(paths::ID_GET_STRUCTURED_YAML) => {
let result = api_impl.get_structured_yaml( let result = api_impl.get_structured_yaml(
@ -374,7 +361,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// Plain text Body // Plain text Body
let body = body; let body = body;
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -387,7 +373,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// HtmlPost - POST /html // HtmlPost - POST /html
hyper::Method::POST if path.matched(paths::ID_HTML) => { hyper::Method::POST if path.matched(paths::ID_HTML) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -414,8 +399,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.body(Body::from("Missing required body parameter body")) .body(Body::from("Missing required body parameter body"))
.expect("Unable to create Bad Request response for missing body parameter body")), .expect("Unable to create Bad Request response for missing body parameter body")),
}; };
let result = api_impl.html_post( let result = api_impl.html_post(
param_body, param_body,
&context &context
@ -439,7 +422,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// Plain text Body // Plain text Body
let body = body; let body = body;
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -458,7 +440,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// PostYaml - POST /post-yaml // PostYaml - POST /post-yaml
hyper::Method::POST if path.matched(paths::ID_POST_YAML) => { hyper::Method::POST if path.matched(paths::ID_POST_YAML) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -485,8 +466,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.body(Body::from("Missing required body parameter value")) .body(Body::from("Missing required body parameter value"))
.expect("Unable to create Bad Request response for missing body parameter value")), .expect("Unable to create Bad Request response for missing body parameter value")),
}; };
let result = api_impl.post_yaml( let result = api_impl.post_yaml(
param_value, param_value,
&context &context
@ -502,7 +481,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
PostYamlResponse::OK PostYamlResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(204).expect("Unable to turn 204 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(204).expect("Unable to turn 204 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -521,7 +499,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
// RawJsonGet - GET /raw_json // RawJsonGet - GET /raw_json
hyper::Method::GET if path.matched(paths::ID_RAW_JSON) => { hyper::Method::GET if path.matched(paths::ID_RAW_JSON) => {
let result = api_impl.raw_json_get( let result = api_impl.raw_json_get(
@ -546,7 +523,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
// JSON Body // JSON Body
let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); let body = serde_json::to_string(&body).expect("impossible to fail to serialize");
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
}, },
}, },
Err(_) => { Err(_) => {
@ -559,7 +535,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Ok(response) Ok(response)
}, },
// SoloObjectPost - POST /solo-object // SoloObjectPost - POST /solo-object
hyper::Method::POST if path.matched(paths::ID_SOLO_OBJECT) => { hyper::Method::POST if path.matched(paths::ID_SOLO_OBJECT) => {
// Handle body parameters (note that non-required body parameters will ignore garbage // Handle body parameters (note that non-required body parameters will ignore garbage
@ -591,8 +566,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.body(Body::from("Missing required body parameter value")) .body(Body::from("Missing required body parameter value"))
.expect("Unable to create Bad Request response for missing body parameter value")), .expect("Unable to create Bad Request response for missing body parameter value")),
}; };
let result = api_impl.solo_object_post( let result = api_impl.solo_object_post(
param_value, param_value,
&context &context
@ -614,7 +587,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
SoloObjectPostResponse::OK SoloObjectPostResponse::OK
=> { => {
*response.status_mut() = StatusCode::from_u16(204).expect("Unable to turn 204 into a StatusCode"); *response.status_mut() = StatusCode::from_u16(204).expect("Unable to turn 204 into a StatusCode");
}, },
}, },
Err(_) => { Err(_) => {
@ -633,7 +605,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
.expect("Unable to create Bad Request response due to unable to read body")), .expect("Unable to create Bad Request response due to unable to read body")),
} }
}, },
_ if path.matched(paths::ID_ALLOF) => method_not_allowed(), _ if path.matched(paths::ID_ALLOF) => method_not_allowed(),
_ if path.matched(paths::ID_DUMMY) => method_not_allowed(), _ if path.matched(paths::ID_DUMMY) => method_not_allowed(),
_ if path.matched(paths::ID_FILE_RESPONSE) => method_not_allowed(), _ if path.matched(paths::ID_FILE_RESPONSE) => method_not_allowed(),
@ -653,7 +624,6 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
)) ))
} }
} }
/// Request parser for `Api`. /// Request parser for `Api`.
pub struct ApiRequestParser; pub struct ApiRequestParser;
impl<T> RequestParser<T> for ApiRequestParser { impl<T> RequestParser<T> for ApiRequestParser {