[Rust-Axum] [Breaking Changes] Prevent Operation response with internal Error (#20047)

* [Rust-Axum] Fix: prevent Operation returns Internal Server Error

* Update
This commit is contained in:
Linh Tran Tuan 2024-11-07 19:39:51 +09:00 committed by GitHub
parent 86758747c2
commit cfef948c11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
20 changed files with 141 additions and 144 deletions

View File

@ -72,7 +72,7 @@ pub trait {{classnamePascalCase}} {
{{#x-consumes-multipart-related}} {{#x-consumes-multipart-related}}
body: axum::body::Body, body: axum::body::Body,
{{/x-consumes-multipart-related}} {{/x-consumes-multipart-related}}
) -> Result<{{{operationId}}}Response, String>; ) -> Result<{{{operationId}}}Response, ()>;
{{/vendorExtensions}} {{/vendorExtensions}}
{{^-last}} {{^-last}}

View File

@ -48,7 +48,7 @@ pub trait Payments {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
path_params: models::GetPaymentMethodByIdPathParams, path_params: models::GetPaymentMethodByIdPathParams,
) -> Result<GetPaymentMethodByIdResponse, String>; ) -> Result<GetPaymentMethodByIdResponse, ()>;
/// Get payment methods. /// Get payment methods.
/// ///
@ -58,7 +58,7 @@ pub trait Payments {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<GetPaymentMethodsResponse, String>; ) -> Result<GetPaymentMethodsResponse, ()>;
/// Make a payment. /// Make a payment.
/// ///
@ -70,5 +70,5 @@ pub trait Payments {
cookies: CookieJar, cookies: CookieJar,
token_in_cookie: Option<String>, token_in_cookie: Option<String>,
body: Option<models::Payment>, body: Option<models::Payment>,
) -> Result<PostMakePaymentResponse, String>; ) -> Result<PostMakePaymentResponse, ()>;
} }

View File

@ -42,7 +42,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: axum::body::Body, body: axum::body::Body,
) -> Result<MultipartRelatedRequestPostResponse, String>; ) -> Result<MultipartRelatedRequestPostResponse, ()>;
/// MultipartRequestPost - POST /multipart_request /// MultipartRequestPost - POST /multipart_request
async fn multipart_request_post( async fn multipart_request_post(
@ -51,7 +51,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: Multipart, body: Multipart,
) -> Result<MultipartRequestPostResponse, String>; ) -> Result<MultipartRequestPostResponse, ()>;
/// MultipleIdenticalMimeTypesPost - POST /multiple-identical-mime-types /// MultipleIdenticalMimeTypesPost - POST /multiple-identical-mime-types
async fn multiple_identical_mime_types_post( async fn multiple_identical_mime_types_post(
@ -60,5 +60,5 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: axum::body::Body, body: axum::body::Body,
) -> Result<MultipleIdenticalMimeTypesPostResponse, String>; ) -> Result<MultipleIdenticalMimeTypesPostResponse, ()>;
} }

View File

@ -282,7 +282,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
query_params: models::AnyOfGetQueryParams, query_params: models::AnyOfGetQueryParams,
) -> Result<AnyOfGetResponse, String>; ) -> Result<AnyOfGetResponse, ()>;
/// CallbackWithHeaderPost - POST /callback-with-header /// CallbackWithHeaderPost - POST /callback-with-header
async fn callback_with_header_post( async fn callback_with_header_post(
@ -291,7 +291,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
query_params: models::CallbackWithHeaderPostQueryParams, query_params: models::CallbackWithHeaderPostQueryParams,
) -> Result<CallbackWithHeaderPostResponse, String>; ) -> Result<CallbackWithHeaderPostResponse, ()>;
/// ComplexQueryParamGet - GET /complex-query-param /// ComplexQueryParamGet - GET /complex-query-param
async fn complex_query_param_get( async fn complex_query_param_get(
@ -300,7 +300,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
query_params: models::ComplexQueryParamGetQueryParams, query_params: models::ComplexQueryParamGetQueryParams,
) -> Result<ComplexQueryParamGetResponse, String>; ) -> Result<ComplexQueryParamGetResponse, ()>;
/// EnumInPathPathParamGet - GET /enum_in_path/{path_param} /// EnumInPathPathParamGet - GET /enum_in_path/{path_param}
async fn enum_in_path_path_param_get( async fn enum_in_path_path_param_get(
@ -309,7 +309,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
path_params: models::EnumInPathPathParamGetPathParams, path_params: models::EnumInPathPathParamGetPathParams,
) -> Result<EnumInPathPathParamGetResponse, String>; ) -> Result<EnumInPathPathParamGetResponse, ()>;
/// Test a Form Post. /// Test a Form Post.
/// ///
@ -320,7 +320,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: models::FormTestRequest, body: models::FormTestRequest,
) -> Result<FormTestResponse, String>; ) -> Result<FormTestResponse, ()>;
/// GetWithBooleanParameter - GET /get-with-bool /// GetWithBooleanParameter - GET /get-with-bool
async fn get_with_boolean_parameter( async fn get_with_boolean_parameter(
@ -329,7 +329,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
query_params: models::GetWithBooleanParameterQueryParams, query_params: models::GetWithBooleanParameterQueryParams,
) -> Result<GetWithBooleanParameterResponse, String>; ) -> Result<GetWithBooleanParameterResponse, ()>;
/// JsonComplexQueryParamGet - GET /json-complex-query-param /// JsonComplexQueryParamGet - GET /json-complex-query-param
async fn json_complex_query_param_get( async fn json_complex_query_param_get(
@ -338,7 +338,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
query_params: models::JsonComplexQueryParamGetQueryParams, query_params: models::JsonComplexQueryParamGetQueryParams,
) -> Result<JsonComplexQueryParamGetResponse, String>; ) -> Result<JsonComplexQueryParamGetResponse, ()>;
/// MandatoryRequestHeaderGet - GET /mandatory-request-header /// MandatoryRequestHeaderGet - GET /mandatory-request-header
async fn mandatory_request_header_get( async fn mandatory_request_header_get(
@ -347,7 +347,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
header_params: models::MandatoryRequestHeaderGetHeaderParams, header_params: models::MandatoryRequestHeaderGetHeaderParams,
) -> Result<MandatoryRequestHeaderGetResponse, String>; ) -> Result<MandatoryRequestHeaderGetResponse, ()>;
/// MergePatchJsonGet - GET /merge-patch-json /// MergePatchJsonGet - GET /merge-patch-json
async fn merge_patch_json_get( async fn merge_patch_json_get(
@ -355,7 +355,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<MergePatchJsonGetResponse, String>; ) -> Result<MergePatchJsonGetResponse, ()>;
/// Get some stuff.. /// Get some stuff..
/// ///
@ -365,7 +365,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<MultigetGetResponse, String>; ) -> Result<MultigetGetResponse, ()>;
/// MultipleAuthSchemeGet - GET /multiple_auth_scheme /// MultipleAuthSchemeGet - GET /multiple_auth_scheme
async fn multiple_auth_scheme_get( async fn multiple_auth_scheme_get(
@ -373,7 +373,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<MultipleAuthSchemeGetResponse, String>; ) -> Result<MultipleAuthSchemeGetResponse, ()>;
/// 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}
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(
@ -382,10 +382,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
path_params: models::MultiplePathParamsWithVeryLongPathToTestFormattingPathParamAPathParamBGetPathParams, path_params: models::MultiplePathParamsWithVeryLongPathToTestFormattingPathParamAPathParamBGetPathParams,
) -> Result< ) -> Result<MultiplePathParamsWithVeryLongPathToTestFormattingPathParamAPathParamBGetResponse, ()>;
MultiplePathParamsWithVeryLongPathToTestFormattingPathParamAPathParamBGetResponse,
String,
>;
/// OneOfGet - GET /one-of /// OneOfGet - GET /one-of
async fn one_of_get( async fn one_of_get(
@ -393,7 +390,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<OneOfGetResponse, String>; ) -> Result<OneOfGetResponse, ()>;
/// OverrideServerGet - GET /override-server /// OverrideServerGet - GET /override-server
async fn override_server_get( async fn override_server_get(
@ -401,7 +398,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<OverrideServerGetResponse, String>; ) -> Result<OverrideServerGetResponse, ()>;
/// Get some stuff with parameters.. /// Get some stuff with parameters..
/// ///
@ -412,7 +409,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
query_params: models::ParamgetGetQueryParams, query_params: models::ParamgetGetQueryParams,
) -> Result<ParamgetGetResponse, String>; ) -> Result<ParamgetGetResponse, ()>;
/// ReadonlyAuthSchemeGet - GET /readonly_auth_scheme /// ReadonlyAuthSchemeGet - GET /readonly_auth_scheme
async fn readonly_auth_scheme_get( async fn readonly_auth_scheme_get(
@ -420,7 +417,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<ReadonlyAuthSchemeGetResponse, String>; ) -> Result<ReadonlyAuthSchemeGetResponse, ()>;
/// RegisterCallbackPost - POST /register-callback /// RegisterCallbackPost - POST /register-callback
async fn register_callback_post( async fn register_callback_post(
@ -429,7 +426,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
query_params: models::RegisterCallbackPostQueryParams, query_params: models::RegisterCallbackPostQueryParams,
) -> Result<RegisterCallbackPostResponse, String>; ) -> Result<RegisterCallbackPostResponse, ()>;
/// RequiredOctetStreamPut - PUT /required_octet_stream /// RequiredOctetStreamPut - PUT /required_octet_stream
async fn required_octet_stream_put( async fn required_octet_stream_put(
@ -438,7 +435,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: Bytes, body: Bytes,
) -> Result<RequiredOctetStreamPutResponse, String>; ) -> Result<RequiredOctetStreamPutResponse, ()>;
/// ResponsesWithHeadersGet - GET /responses_with_headers /// ResponsesWithHeadersGet - GET /responses_with_headers
async fn responses_with_headers_get( async fn responses_with_headers_get(
@ -446,7 +443,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<ResponsesWithHeadersGetResponse, String>; ) -> Result<ResponsesWithHeadersGetResponse, ()>;
/// Rfc7807Get - GET /rfc7807 /// Rfc7807Get - GET /rfc7807
async fn rfc7807_get( async fn rfc7807_get(
@ -454,7 +451,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Rfc7807GetResponse, String>; ) -> Result<Rfc7807GetResponse, ()>;
/// TwoFirstLetterHeaders - POST /operation-two-first-letter-headers /// TwoFirstLetterHeaders - POST /operation-two-first-letter-headers
async fn two_first_letter_headers( async fn two_first_letter_headers(
@ -463,7 +460,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
header_params: models::TwoFirstLetterHeadersHeaderParams, header_params: models::TwoFirstLetterHeadersHeaderParams,
) -> Result<TwoFirstLetterHeadersResponse, String>; ) -> Result<TwoFirstLetterHeadersResponse, ()>;
/// UntypedPropertyGet - GET /untyped_property /// UntypedPropertyGet - GET /untyped_property
async fn untyped_property_get( async fn untyped_property_get(
@ -472,7 +469,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: Option<models::ObjectUntypedProps>, body: Option<models::ObjectUntypedProps>,
) -> Result<UntypedPropertyGetResponse, String>; ) -> Result<UntypedPropertyGetResponse, ()>;
/// UuidGet - GET /uuid /// UuidGet - GET /uuid
async fn uuid_get( async fn uuid_get(
@ -480,7 +477,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<UuidGetResponse, String>; ) -> Result<UuidGetResponse, ()>;
/// XmlExtraPost - POST /xml_extra /// XmlExtraPost - POST /xml_extra
async fn xml_extra_post( async fn xml_extra_post(
@ -489,7 +486,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: Bytes, body: Bytes,
) -> Result<XmlExtraPostResponse, String>; ) -> Result<XmlExtraPostResponse, ()>;
/// XmlOtherPost - POST /xml_other /// XmlOtherPost - POST /xml_other
async fn xml_other_post( async fn xml_other_post(
@ -498,7 +495,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: Bytes, body: Bytes,
) -> Result<XmlOtherPostResponse, String>; ) -> Result<XmlOtherPostResponse, ()>;
/// XmlOtherPut - PUT /xml_other /// XmlOtherPut - PUT /xml_other
async fn xml_other_put( async fn xml_other_put(
@ -507,7 +504,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: Bytes, body: Bytes,
) -> Result<XmlOtherPutResponse, String>; ) -> Result<XmlOtherPutResponse, ()>;
/// 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..
/// ///
@ -518,7 +515,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: Bytes, body: Bytes,
) -> Result<XmlPostResponse, String>; ) -> Result<XmlPostResponse, ()>;
/// XmlPut - PUT /xml /// XmlPut - PUT /xml
async fn xml_put( async fn xml_put(
@ -527,5 +524,5 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: Bytes, body: Bytes,
) -> Result<XmlPutResponse, String>; ) -> Result<XmlPutResponse, ()>;
} }

View File

@ -26,5 +26,5 @@ pub trait InfoRepo {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
path_params: models::GetRepoInfoPathParams, path_params: models::GetRepoInfoPathParams,
) -> Result<GetRepoInfoResponse, String>; ) -> Result<GetRepoInfoResponse, ()>;
} }

View File

@ -26,5 +26,5 @@ pub trait Repo {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: models::ObjectParam, body: models::ObjectParam,
) -> Result<CreateRepoResponse, String>; ) -> Result<CreateRepoResponse, ()>;
} }

View File

@ -313,7 +313,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op10GetResponse, String>; ) -> Result<Op10GetResponse, ()>;
/// Op11Get - GET /op11 /// Op11Get - GET /op11
async fn op11_get( async fn op11_get(
@ -321,7 +321,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op11GetResponse, String>; ) -> Result<Op11GetResponse, ()>;
/// Op12Get - GET /op12 /// Op12Get - GET /op12
async fn op12_get( async fn op12_get(
@ -329,7 +329,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op12GetResponse, String>; ) -> Result<Op12GetResponse, ()>;
/// Op13Get - GET /op13 /// Op13Get - GET /op13
async fn op13_get( async fn op13_get(
@ -337,7 +337,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op13GetResponse, String>; ) -> Result<Op13GetResponse, ()>;
/// Op14Get - GET /op14 /// Op14Get - GET /op14
async fn op14_get( async fn op14_get(
@ -345,7 +345,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op14GetResponse, String>; ) -> Result<Op14GetResponse, ()>;
/// Op15Get - GET /op15 /// Op15Get - GET /op15
async fn op15_get( async fn op15_get(
@ -353,7 +353,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op15GetResponse, String>; ) -> Result<Op15GetResponse, ()>;
/// Op16Get - GET /op16 /// Op16Get - GET /op16
async fn op16_get( async fn op16_get(
@ -361,7 +361,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op16GetResponse, String>; ) -> Result<Op16GetResponse, ()>;
/// Op17Get - GET /op17 /// Op17Get - GET /op17
async fn op17_get( async fn op17_get(
@ -369,7 +369,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op17GetResponse, String>; ) -> Result<Op17GetResponse, ()>;
/// Op18Get - GET /op18 /// Op18Get - GET /op18
async fn op18_get( async fn op18_get(
@ -377,7 +377,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op18GetResponse, String>; ) -> Result<Op18GetResponse, ()>;
/// Op19Get - GET /op19 /// Op19Get - GET /op19
async fn op19_get( async fn op19_get(
@ -385,7 +385,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op19GetResponse, String>; ) -> Result<Op19GetResponse, ()>;
/// Op1Get - GET /op1 /// Op1Get - GET /op1
async fn op1_get( async fn op1_get(
@ -393,7 +393,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op1GetResponse, String>; ) -> Result<Op1GetResponse, ()>;
/// Op20Get - GET /op20 /// Op20Get - GET /op20
async fn op20_get( async fn op20_get(
@ -401,7 +401,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op20GetResponse, String>; ) -> Result<Op20GetResponse, ()>;
/// Op21Get - GET /op21 /// Op21Get - GET /op21
async fn op21_get( async fn op21_get(
@ -409,7 +409,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op21GetResponse, String>; ) -> Result<Op21GetResponse, ()>;
/// Op22Get - GET /op22 /// Op22Get - GET /op22
async fn op22_get( async fn op22_get(
@ -417,7 +417,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op22GetResponse, String>; ) -> Result<Op22GetResponse, ()>;
/// Op23Get - GET /op23 /// Op23Get - GET /op23
async fn op23_get( async fn op23_get(
@ -425,7 +425,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op23GetResponse, String>; ) -> Result<Op23GetResponse, ()>;
/// Op24Get - GET /op24 /// Op24Get - GET /op24
async fn op24_get( async fn op24_get(
@ -433,7 +433,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op24GetResponse, String>; ) -> Result<Op24GetResponse, ()>;
/// Op25Get - GET /op25 /// Op25Get - GET /op25
async fn op25_get( async fn op25_get(
@ -441,7 +441,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op25GetResponse, String>; ) -> Result<Op25GetResponse, ()>;
/// Op26Get - GET /op26 /// Op26Get - GET /op26
async fn op26_get( async fn op26_get(
@ -449,7 +449,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op26GetResponse, String>; ) -> Result<Op26GetResponse, ()>;
/// Op27Get - GET /op27 /// Op27Get - GET /op27
async fn op27_get( async fn op27_get(
@ -457,7 +457,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op27GetResponse, String>; ) -> Result<Op27GetResponse, ()>;
/// Op28Get - GET /op28 /// Op28Get - GET /op28
async fn op28_get( async fn op28_get(
@ -465,7 +465,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op28GetResponse, String>; ) -> Result<Op28GetResponse, ()>;
/// Op29Get - GET /op29 /// Op29Get - GET /op29
async fn op29_get( async fn op29_get(
@ -473,7 +473,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op29GetResponse, String>; ) -> Result<Op29GetResponse, ()>;
/// Op2Get - GET /op2 /// Op2Get - GET /op2
async fn op2_get( async fn op2_get(
@ -481,7 +481,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op2GetResponse, String>; ) -> Result<Op2GetResponse, ()>;
/// Op30Get - GET /op30 /// Op30Get - GET /op30
async fn op30_get( async fn op30_get(
@ -489,7 +489,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op30GetResponse, String>; ) -> Result<Op30GetResponse, ()>;
/// Op31Get - GET /op31 /// Op31Get - GET /op31
async fn op31_get( async fn op31_get(
@ -497,7 +497,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op31GetResponse, String>; ) -> Result<Op31GetResponse, ()>;
/// Op32Get - GET /op32 /// Op32Get - GET /op32
async fn op32_get( async fn op32_get(
@ -505,7 +505,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op32GetResponse, String>; ) -> Result<Op32GetResponse, ()>;
/// Op33Get - GET /op33 /// Op33Get - GET /op33
async fn op33_get( async fn op33_get(
@ -513,7 +513,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op33GetResponse, String>; ) -> Result<Op33GetResponse, ()>;
/// Op34Get - GET /op34 /// Op34Get - GET /op34
async fn op34_get( async fn op34_get(
@ -521,7 +521,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op34GetResponse, String>; ) -> Result<Op34GetResponse, ()>;
/// Op35Get - GET /op35 /// Op35Get - GET /op35
async fn op35_get( async fn op35_get(
@ -529,7 +529,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op35GetResponse, String>; ) -> Result<Op35GetResponse, ()>;
/// Op36Get - GET /op36 /// Op36Get - GET /op36
async fn op36_get( async fn op36_get(
@ -537,7 +537,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op36GetResponse, String>; ) -> Result<Op36GetResponse, ()>;
/// Op37Get - GET /op37 /// Op37Get - GET /op37
async fn op37_get( async fn op37_get(
@ -545,7 +545,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op37GetResponse, String>; ) -> Result<Op37GetResponse, ()>;
/// Op3Get - GET /op3 /// Op3Get - GET /op3
async fn op3_get( async fn op3_get(
@ -553,7 +553,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op3GetResponse, String>; ) -> Result<Op3GetResponse, ()>;
/// Op4Get - GET /op4 /// Op4Get - GET /op4
async fn op4_get( async fn op4_get(
@ -561,7 +561,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op4GetResponse, String>; ) -> Result<Op4GetResponse, ()>;
/// Op5Get - GET /op5 /// Op5Get - GET /op5
async fn op5_get( async fn op5_get(
@ -569,7 +569,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op5GetResponse, String>; ) -> Result<Op5GetResponse, ()>;
/// Op6Get - GET /op6 /// Op6Get - GET /op6
async fn op6_get( async fn op6_get(
@ -577,7 +577,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op6GetResponse, String>; ) -> Result<Op6GetResponse, ()>;
/// Op7Get - GET /op7 /// Op7Get - GET /op7
async fn op7_get( async fn op7_get(
@ -585,7 +585,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op7GetResponse, String>; ) -> Result<Op7GetResponse, ()>;
/// Op8Get - GET /op8 /// Op8Get - GET /op8
async fn op8_get( async fn op8_get(
@ -593,7 +593,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op8GetResponse, String>; ) -> Result<Op8GetResponse, ()>;
/// Op9Get - GET /op9 /// Op9Get - GET /op9
async fn op9_get( async fn op9_get(
@ -601,5 +601,5 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Op9GetResponse, String>; ) -> Result<Op9GetResponse, ()>;
} }

View File

@ -28,5 +28,5 @@ pub trait AnotherFake {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: models::Client, body: models::Client,
) -> Result<TestSpecialTagsResponse, String>; ) -> Result<TestSpecialTagsResponse, ()>;
} }

View File

@ -125,7 +125,7 @@ pub trait Fake {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<Call123exampleResponse, String>; ) -> Result<Call123exampleResponse, ()>;
/// FakeOuterBooleanSerialize - POST /v2/fake/outer/boolean /// FakeOuterBooleanSerialize - POST /v2/fake/outer/boolean
async fn fake_outer_boolean_serialize( async fn fake_outer_boolean_serialize(
@ -134,7 +134,7 @@ pub trait Fake {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: Option<models::OuterBoolean>, body: Option<models::OuterBoolean>,
) -> Result<FakeOuterBooleanSerializeResponse, String>; ) -> Result<FakeOuterBooleanSerializeResponse, ()>;
/// FakeOuterCompositeSerialize - POST /v2/fake/outer/composite /// FakeOuterCompositeSerialize - POST /v2/fake/outer/composite
async fn fake_outer_composite_serialize( async fn fake_outer_composite_serialize(
@ -143,7 +143,7 @@ pub trait Fake {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: Option<models::OuterComposite>, body: Option<models::OuterComposite>,
) -> Result<FakeOuterCompositeSerializeResponse, String>; ) -> Result<FakeOuterCompositeSerializeResponse, ()>;
/// FakeOuterNumberSerialize - POST /v2/fake/outer/number /// FakeOuterNumberSerialize - POST /v2/fake/outer/number
async fn fake_outer_number_serialize( async fn fake_outer_number_serialize(
@ -152,7 +152,7 @@ pub trait Fake {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: Option<models::OuterNumber>, body: Option<models::OuterNumber>,
) -> Result<FakeOuterNumberSerializeResponse, String>; ) -> Result<FakeOuterNumberSerializeResponse, ()>;
/// FakeOuterStringSerialize - POST /v2/fake/outer/string /// FakeOuterStringSerialize - POST /v2/fake/outer/string
async fn fake_outer_string_serialize( async fn fake_outer_string_serialize(
@ -161,7 +161,7 @@ pub trait Fake {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: Option<models::OuterString>, body: Option<models::OuterString>,
) -> Result<FakeOuterStringSerializeResponse, String>; ) -> Result<FakeOuterStringSerializeResponse, ()>;
/// FakeResponseWithNumericalDescription - GET /v2/fake/response-with-numerical-description /// FakeResponseWithNumericalDescription - GET /v2/fake/response-with-numerical-description
async fn fake_response_with_numerical_description( async fn fake_response_with_numerical_description(
@ -169,7 +169,7 @@ pub trait Fake {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<FakeResponseWithNumericalDescriptionResponse, String>; ) -> Result<FakeResponseWithNumericalDescriptionResponse, ()>;
/// HyphenParam - GET /v2/fake/hyphenParam/{hyphen-param} /// HyphenParam - GET /v2/fake/hyphenParam/{hyphen-param}
async fn hyphen_param( async fn hyphen_param(
@ -178,7 +178,7 @@ pub trait Fake {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
path_params: models::HyphenParamPathParams, path_params: models::HyphenParamPathParams,
) -> Result<HyphenParamResponse, String>; ) -> Result<HyphenParamResponse, ()>;
/// TestBodyWithQueryParams - PUT /v2/fake/body-with-query-params /// TestBodyWithQueryParams - PUT /v2/fake/body-with-query-params
async fn test_body_with_query_params( async fn test_body_with_query_params(
@ -188,7 +188,7 @@ pub trait Fake {
cookies: CookieJar, cookies: CookieJar,
query_params: models::TestBodyWithQueryParamsQueryParams, query_params: models::TestBodyWithQueryParamsQueryParams,
body: models::User, body: models::User,
) -> Result<TestBodyWithQueryParamsResponse, String>; ) -> Result<TestBodyWithQueryParamsResponse, ()>;
/// To test \"client\" model. /// To test \"client\" model.
/// ///
@ -199,7 +199,7 @@ pub trait Fake {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: models::Client, body: models::Client,
) -> Result<TestClientModelResponse, String>; ) -> Result<TestClientModelResponse, ()>;
/// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트. /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트.
/// ///
@ -210,7 +210,7 @@ pub trait Fake {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: models::TestEndpointParametersRequest, body: models::TestEndpointParametersRequest,
) -> Result<TestEndpointParametersResponse, String>; ) -> Result<TestEndpointParametersResponse, ()>;
/// To test enum parameters. /// To test enum parameters.
/// ///
@ -223,7 +223,7 @@ pub trait Fake {
header_params: models::TestEnumParametersHeaderParams, header_params: models::TestEnumParametersHeaderParams,
query_params: models::TestEnumParametersQueryParams, query_params: models::TestEnumParametersQueryParams,
body: Option<models::TestEnumParametersRequest>, body: Option<models::TestEnumParametersRequest>,
) -> Result<TestEnumParametersResponse, String>; ) -> Result<TestEnumParametersResponse, ()>;
/// test inline additionalProperties. /// test inline additionalProperties.
/// ///
@ -234,7 +234,7 @@ pub trait Fake {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: std::collections::HashMap<String, String>, body: std::collections::HashMap<String, String>,
) -> Result<TestInlineAdditionalPropertiesResponse, String>; ) -> Result<TestInlineAdditionalPropertiesResponse, ()>;
/// test json serialization of form data. /// test json serialization of form data.
/// ///
@ -245,5 +245,5 @@ pub trait Fake {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: models::TestJsonFormDataRequest, body: models::TestJsonFormDataRequest,
) -> Result<TestJsonFormDataResponse, String>; ) -> Result<TestJsonFormDataResponse, ()>;
} }

View File

@ -28,5 +28,5 @@ pub trait FakeClassnameTags123 {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: models::Client, body: models::Client,
) -> Result<TestClassnameResponse, String>; ) -> Result<TestClassnameResponse, ()>;
} }

View File

@ -96,7 +96,7 @@ pub trait Pet {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: models::Pet, body: models::Pet,
) -> Result<AddPetResponse, String>; ) -> Result<AddPetResponse, ()>;
/// Deletes a pet. /// Deletes a pet.
/// ///
@ -108,7 +108,7 @@ pub trait Pet {
cookies: CookieJar, cookies: CookieJar,
header_params: models::DeletePetHeaderParams, header_params: models::DeletePetHeaderParams,
path_params: models::DeletePetPathParams, path_params: models::DeletePetPathParams,
) -> Result<DeletePetResponse, String>; ) -> Result<DeletePetResponse, ()>;
/// Finds Pets by status. /// Finds Pets by status.
/// ///
@ -119,7 +119,7 @@ pub trait Pet {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
query_params: models::FindPetsByStatusQueryParams, query_params: models::FindPetsByStatusQueryParams,
) -> Result<FindPetsByStatusResponse, String>; ) -> Result<FindPetsByStatusResponse, ()>;
/// Finds Pets by tags. /// Finds Pets by tags.
/// ///
@ -130,7 +130,7 @@ pub trait Pet {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
query_params: models::FindPetsByTagsQueryParams, query_params: models::FindPetsByTagsQueryParams,
) -> Result<FindPetsByTagsResponse, String>; ) -> Result<FindPetsByTagsResponse, ()>;
/// Find pet by ID. /// Find pet by ID.
/// ///
@ -142,7 +142,7 @@ pub trait Pet {
cookies: CookieJar, cookies: CookieJar,
token_in_header: Option<String>, token_in_header: Option<String>,
path_params: models::GetPetByIdPathParams, path_params: models::GetPetByIdPathParams,
) -> Result<GetPetByIdResponse, String>; ) -> Result<GetPetByIdResponse, ()>;
/// Update an existing pet. /// Update an existing pet.
/// ///
@ -153,7 +153,7 @@ pub trait Pet {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: models::Pet, body: models::Pet,
) -> Result<UpdatePetResponse, String>; ) -> Result<UpdatePetResponse, ()>;
/// Updates a pet in the store with form data. /// Updates a pet in the store with form data.
/// ///
@ -165,7 +165,7 @@ pub trait Pet {
cookies: CookieJar, cookies: CookieJar,
path_params: models::UpdatePetWithFormPathParams, path_params: models::UpdatePetWithFormPathParams,
body: Option<models::UpdatePetWithFormRequest>, body: Option<models::UpdatePetWithFormRequest>,
) -> Result<UpdatePetWithFormResponse, String>; ) -> Result<UpdatePetWithFormResponse, ()>;
/// uploads an image. /// uploads an image.
/// ///
@ -177,5 +177,5 @@ pub trait Pet {
cookies: CookieJar, cookies: CookieJar,
path_params: models::UploadFilePathParams, path_params: models::UploadFilePathParams,
body: Multipart, body: Multipart,
) -> Result<UploadFileResponse, String>; ) -> Result<UploadFileResponse, ()>;
} }

View File

@ -60,7 +60,7 @@ pub trait Store {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
path_params: models::DeleteOrderPathParams, path_params: models::DeleteOrderPathParams,
) -> Result<DeleteOrderResponse, String>; ) -> Result<DeleteOrderResponse, ()>;
/// Returns pet inventories by status. /// Returns pet inventories by status.
/// ///
@ -71,7 +71,7 @@ pub trait Store {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
token_in_header: Option<String>, token_in_header: Option<String>,
) -> Result<GetInventoryResponse, String>; ) -> Result<GetInventoryResponse, ()>;
/// Find purchase order by ID. /// Find purchase order by ID.
/// ///
@ -82,7 +82,7 @@ pub trait Store {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
path_params: models::GetOrderByIdPathParams, path_params: models::GetOrderByIdPathParams,
) -> Result<GetOrderByIdResponse, String>; ) -> Result<GetOrderByIdResponse, ()>;
/// Place an order for a pet. /// Place an order for a pet.
/// ///
@ -93,5 +93,5 @@ pub trait Store {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: models::Order, body: models::Order,
) -> Result<PlaceOrderResponse, String>; ) -> Result<PlaceOrderResponse, ()>;
} }

View File

@ -98,7 +98,7 @@ pub trait User {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: models::User, body: models::User,
) -> Result<CreateUserResponse, String>; ) -> Result<CreateUserResponse, ()>;
/// Creates list of users with given input array. /// Creates list of users with given input array.
/// ///
@ -109,7 +109,7 @@ pub trait User {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: Vec<models::User>, body: Vec<models::User>,
) -> Result<CreateUsersWithArrayInputResponse, String>; ) -> Result<CreateUsersWithArrayInputResponse, ()>;
/// Creates list of users with given input array. /// Creates list of users with given input array.
/// ///
@ -120,7 +120,7 @@ pub trait User {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: Vec<models::User>, body: Vec<models::User>,
) -> Result<CreateUsersWithListInputResponse, String>; ) -> Result<CreateUsersWithListInputResponse, ()>;
/// Delete user. /// Delete user.
/// ///
@ -131,7 +131,7 @@ pub trait User {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
path_params: models::DeleteUserPathParams, path_params: models::DeleteUserPathParams,
) -> Result<DeleteUserResponse, String>; ) -> Result<DeleteUserResponse, ()>;
/// Get user by user name. /// Get user by user name.
/// ///
@ -142,7 +142,7 @@ pub trait User {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
path_params: models::GetUserByNamePathParams, path_params: models::GetUserByNamePathParams,
) -> Result<GetUserByNameResponse, String>; ) -> Result<GetUserByNameResponse, ()>;
/// Logs user into the system. /// Logs user into the system.
/// ///
@ -153,7 +153,7 @@ pub trait User {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
query_params: models::LoginUserQueryParams, query_params: models::LoginUserQueryParams,
) -> Result<LoginUserResponse, String>; ) -> Result<LoginUserResponse, ()>;
/// Logs out current logged in user session. /// Logs out current logged in user session.
/// ///
@ -163,7 +163,7 @@ pub trait User {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<LogoutUserResponse, String>; ) -> Result<LogoutUserResponse, ()>;
/// Updated user. /// Updated user.
/// ///
@ -175,5 +175,5 @@ pub trait User {
cookies: CookieJar, cookies: CookieJar,
path_params: models::UpdateUserPathParams, path_params: models::UpdateUserPathParams,
body: models::User, body: models::User,
) -> Result<UpdateUserResponse, String>; ) -> Result<UpdateUserResponse, ()>;
} }

View File

@ -100,7 +100,7 @@ pub trait Pet {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: models::Pet, body: models::Pet,
) -> Result<AddPetResponse, String>; ) -> Result<AddPetResponse, ()>;
/// Deletes a pet. /// Deletes a pet.
/// ///
@ -112,7 +112,7 @@ pub trait Pet {
cookies: CookieJar, cookies: CookieJar,
header_params: models::DeletePetHeaderParams, header_params: models::DeletePetHeaderParams,
path_params: models::DeletePetPathParams, path_params: models::DeletePetPathParams,
) -> Result<DeletePetResponse, String>; ) -> Result<DeletePetResponse, ()>;
/// Finds Pets by status. /// Finds Pets by status.
/// ///
@ -123,7 +123,7 @@ pub trait Pet {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
query_params: models::FindPetsByStatusQueryParams, query_params: models::FindPetsByStatusQueryParams,
) -> Result<FindPetsByStatusResponse, String>; ) -> Result<FindPetsByStatusResponse, ()>;
/// Finds Pets by tags. /// Finds Pets by tags.
/// ///
@ -134,7 +134,7 @@ pub trait Pet {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
query_params: models::FindPetsByTagsQueryParams, query_params: models::FindPetsByTagsQueryParams,
) -> Result<FindPetsByTagsResponse, String>; ) -> Result<FindPetsByTagsResponse, ()>;
/// Find pet by ID. /// Find pet by ID.
/// ///
@ -146,7 +146,7 @@ pub trait Pet {
cookies: CookieJar, cookies: CookieJar,
token_in_header: Option<String>, token_in_header: Option<String>,
path_params: models::GetPetByIdPathParams, path_params: models::GetPetByIdPathParams,
) -> Result<GetPetByIdResponse, String>; ) -> Result<GetPetByIdResponse, ()>;
/// Update an existing pet. /// Update an existing pet.
/// ///
@ -157,7 +157,7 @@ pub trait Pet {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: models::Pet, body: models::Pet,
) -> Result<UpdatePetResponse, String>; ) -> Result<UpdatePetResponse, ()>;
/// Updates a pet in the store with form data. /// Updates a pet in the store with form data.
/// ///
@ -169,7 +169,7 @@ pub trait Pet {
cookies: CookieJar, cookies: CookieJar,
path_params: models::UpdatePetWithFormPathParams, path_params: models::UpdatePetWithFormPathParams,
body: Option<models::UpdatePetWithFormRequest>, body: Option<models::UpdatePetWithFormRequest>,
) -> Result<UpdatePetWithFormResponse, String>; ) -> Result<UpdatePetWithFormResponse, ()>;
/// uploads an image. /// uploads an image.
/// ///
@ -181,5 +181,5 @@ pub trait Pet {
cookies: CookieJar, cookies: CookieJar,
path_params: models::UploadFilePathParams, path_params: models::UploadFilePathParams,
body: Multipart, body: Multipart,
) -> Result<UploadFileResponse, String>; ) -> Result<UploadFileResponse, ()>;
} }

View File

@ -60,7 +60,7 @@ pub trait Store {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
path_params: models::DeleteOrderPathParams, path_params: models::DeleteOrderPathParams,
) -> Result<DeleteOrderResponse, String>; ) -> Result<DeleteOrderResponse, ()>;
/// Returns pet inventories by status. /// Returns pet inventories by status.
/// ///
@ -71,7 +71,7 @@ pub trait Store {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
token_in_header: Option<String>, token_in_header: Option<String>,
) -> Result<GetInventoryResponse, String>; ) -> Result<GetInventoryResponse, ()>;
/// Find purchase order by ID. /// Find purchase order by ID.
/// ///
@ -82,7 +82,7 @@ pub trait Store {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
path_params: models::GetOrderByIdPathParams, path_params: models::GetOrderByIdPathParams,
) -> Result<GetOrderByIdResponse, String>; ) -> Result<GetOrderByIdResponse, ()>;
/// Place an order for a pet. /// Place an order for a pet.
/// ///
@ -93,5 +93,5 @@ pub trait Store {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: models::Order, body: models::Order,
) -> Result<PlaceOrderResponse, String>; ) -> Result<PlaceOrderResponse, ()>;
} }

View File

@ -100,7 +100,7 @@ pub trait User {
cookies: CookieJar, cookies: CookieJar,
token_in_header: Option<String>, token_in_header: Option<String>,
body: models::User, body: models::User,
) -> Result<CreateUserResponse, String>; ) -> Result<CreateUserResponse, ()>;
/// Creates list of users with given input array. /// Creates list of users with given input array.
/// ///
@ -112,7 +112,7 @@ pub trait User {
cookies: CookieJar, cookies: CookieJar,
token_in_header: Option<String>, token_in_header: Option<String>,
body: Vec<models::User>, body: Vec<models::User>,
) -> Result<CreateUsersWithArrayInputResponse, String>; ) -> Result<CreateUsersWithArrayInputResponse, ()>;
/// Creates list of users with given input array. /// Creates list of users with given input array.
/// ///
@ -124,7 +124,7 @@ pub trait User {
cookies: CookieJar, cookies: CookieJar,
token_in_header: Option<String>, token_in_header: Option<String>,
body: Vec<models::User>, body: Vec<models::User>,
) -> Result<CreateUsersWithListInputResponse, String>; ) -> Result<CreateUsersWithListInputResponse, ()>;
/// Delete user. /// Delete user.
/// ///
@ -136,7 +136,7 @@ pub trait User {
cookies: CookieJar, cookies: CookieJar,
token_in_header: Option<String>, token_in_header: Option<String>,
path_params: models::DeleteUserPathParams, path_params: models::DeleteUserPathParams,
) -> Result<DeleteUserResponse, String>; ) -> Result<DeleteUserResponse, ()>;
/// Get user by user name. /// Get user by user name.
/// ///
@ -147,7 +147,7 @@ pub trait User {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
path_params: models::GetUserByNamePathParams, path_params: models::GetUserByNamePathParams,
) -> Result<GetUserByNameResponse, String>; ) -> Result<GetUserByNameResponse, ()>;
/// Logs user into the system. /// Logs user into the system.
/// ///
@ -158,7 +158,7 @@ pub trait User {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
query_params: models::LoginUserQueryParams, query_params: models::LoginUserQueryParams,
) -> Result<LoginUserResponse, String>; ) -> Result<LoginUserResponse, ()>;
/// Logs out current logged in user session. /// Logs out current logged in user session.
/// ///
@ -169,7 +169,7 @@ pub trait User {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
token_in_header: Option<String>, token_in_header: Option<String>,
) -> Result<LogoutUserResponse, String>; ) -> Result<LogoutUserResponse, ()>;
/// Updated user. /// Updated user.
/// ///
@ -182,5 +182,5 @@ pub trait User {
token_in_header: Option<String>, token_in_header: Option<String>,
path_params: models::UpdateUserPathParams, path_params: models::UpdateUserPathParams,
body: models::User, body: models::User,
) -> Result<UpdateUserResponse, String>; ) -> Result<UpdateUserResponse, ()>;
} }

View File

@ -25,5 +25,5 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<PingGetResponse, String>; ) -> Result<PingGetResponse, ()>;
} }

View File

@ -26,5 +26,5 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
header_params: models::UsersPostHeaderParams, header_params: models::UsersPostHeaderParams,
) -> Result<UsersPostResponse, String>; ) -> Result<UsersPostResponse, ()>;
} }

View File

@ -89,7 +89,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<AllOfGetResponse, String>; ) -> Result<AllOfGetResponse, ()>;
/// A dummy endpoint to make the spec valid.. /// A dummy endpoint to make the spec valid..
/// ///
@ -99,7 +99,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<DummyGetResponse, String>; ) -> Result<DummyGetResponse, ()>;
/// DummyPut - PUT /dummy /// DummyPut - PUT /dummy
async fn dummy_put( async fn dummy_put(
@ -108,7 +108,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: models::FooDummyPutRequest, body: models::FooDummyPutRequest,
) -> Result<DummyPutResponse, String>; ) -> Result<DummyPutResponse, ()>;
/// Get a file. /// Get a file.
/// ///
@ -118,7 +118,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<FileResponseGetResponse, String>; ) -> Result<FileResponseGetResponse, ()>;
/// GetStructuredYaml - GET /get-structured-yaml /// GetStructuredYaml - GET /get-structured-yaml
async fn get_structured_yaml( async fn get_structured_yaml(
@ -126,7 +126,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<GetStructuredYamlResponse, String>; ) -> Result<GetStructuredYamlResponse, ()>;
/// Test HTML handling. /// Test HTML handling.
/// ///
@ -137,7 +137,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: String, body: String,
) -> Result<HtmlPostResponse, String>; ) -> Result<HtmlPostResponse, ()>;
/// PostYaml - POST /post-yaml /// PostYaml - POST /post-yaml
async fn post_yaml( async fn post_yaml(
@ -146,7 +146,7 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: String, body: String,
) -> Result<PostYamlResponse, String>; ) -> Result<PostYamlResponse, ()>;
/// Get an arbitrary JSON blob.. /// Get an arbitrary JSON blob..
/// ///
@ -156,7 +156,7 @@ pub trait Default {
method: Method, method: Method,
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
) -> Result<RawJsonGetResponse, String>; ) -> Result<RawJsonGetResponse, ()>;
/// Send an arbitrary JSON blob. /// Send an arbitrary JSON blob.
/// ///
@ -167,5 +167,5 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: crate::types::Object, body: crate::types::Object,
) -> Result<SoloObjectPostResponse, String>; ) -> Result<SoloObjectPostResponse, ()>;
} }

View File

@ -26,5 +26,5 @@ pub trait Default {
host: Host, host: Host,
cookies: CookieJar, cookies: CookieJar,
body: models::Email, body: models::Email,
) -> Result<MailPutResponse, String>; ) -> Result<MailPutResponse, ()>;
} }