forked from loafle/openapi-generator-original
[Rust Server] Convert Rust comment to Mustache (#19595)
* [Rust Server] Convert Rust comment to Mustache The comment about auth types supported by the generator shouldn't be included in the generated code as it's confusing when the API doesn't support the same auth types. As such, we convert it from a Rust comment to a Mustache comment * Update samples
This commit is contained in:
parent
0b084cd75d
commit
cf5d17bbfe
@ -95,7 +95,7 @@
|
|||||||
{{#hasAuthMethods}}
|
{{#hasAuthMethods}}
|
||||||
#[allow(clippy::collapsible_match)]
|
#[allow(clippy::collapsible_match)]
|
||||||
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
||||||
// Currently only authentication with Basic and Bearer are supported
|
{{! Currently only authentication with Basic and Bearer are supported }}
|
||||||
#[allow(clippy::single_match, clippy::match_single_binding)]
|
#[allow(clippy::single_match, clippy::match_single_binding)]
|
||||||
match auth_data {
|
match auth_data {
|
||||||
{{#authMethods}}
|
{{#authMethods}}
|
||||||
|
@ -1191,7 +1191,6 @@ impl<S, C> Api<C> for Client<S, C> where
|
|||||||
|
|
||||||
#[allow(clippy::collapsible_match)]
|
#[allow(clippy::collapsible_match)]
|
||||||
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
||||||
// Currently only authentication with Basic and Bearer are supported
|
|
||||||
#[allow(clippy::single_match, clippy::match_single_binding)]
|
#[allow(clippy::single_match, clippy::match_single_binding)]
|
||||||
match auth_data {
|
match auth_data {
|
||||||
AuthData::Bearer(bearer_header) => {
|
AuthData::Bearer(bearer_header) => {
|
||||||
@ -1519,7 +1518,6 @@ impl<S, C> Api<C> for Client<S, C> where
|
|||||||
|
|
||||||
#[allow(clippy::collapsible_match)]
|
#[allow(clippy::collapsible_match)]
|
||||||
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
||||||
// Currently only authentication with Basic and Bearer are supported
|
|
||||||
#[allow(clippy::single_match, clippy::match_single_binding)]
|
#[allow(clippy::single_match, clippy::match_single_binding)]
|
||||||
match auth_data {
|
match auth_data {
|
||||||
AuthData::Bearer(bearer_header) => {
|
AuthData::Bearer(bearer_header) => {
|
||||||
|
@ -1272,7 +1272,6 @@ impl<S, C> Api<C> for Client<S, C> where
|
|||||||
|
|
||||||
#[allow(clippy::collapsible_match)]
|
#[allow(clippy::collapsible_match)]
|
||||||
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
||||||
// Currently only authentication with Basic and Bearer are supported
|
|
||||||
#[allow(clippy::single_match, clippy::match_single_binding)]
|
#[allow(clippy::single_match, clippy::match_single_binding)]
|
||||||
match auth_data {
|
match auth_data {
|
||||||
AuthData::Basic(basic_header) => {
|
AuthData::Basic(basic_header) => {
|
||||||
@ -1759,7 +1758,6 @@ impl<S, C> Api<C> for Client<S, C> where
|
|||||||
|
|
||||||
#[allow(clippy::collapsible_match)]
|
#[allow(clippy::collapsible_match)]
|
||||||
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
||||||
// Currently only authentication with Basic and Bearer are supported
|
|
||||||
#[allow(clippy::single_match, clippy::match_single_binding)]
|
#[allow(clippy::single_match, clippy::match_single_binding)]
|
||||||
match auth_data {
|
match auth_data {
|
||||||
_ => {}
|
_ => {}
|
||||||
@ -1859,7 +1857,6 @@ impl<S, C> Api<C> for Client<S, C> where
|
|||||||
|
|
||||||
#[allow(clippy::collapsible_match)]
|
#[allow(clippy::collapsible_match)]
|
||||||
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
||||||
// Currently only authentication with Basic and Bearer are supported
|
|
||||||
#[allow(clippy::single_match, clippy::match_single_binding)]
|
#[allow(clippy::single_match, clippy::match_single_binding)]
|
||||||
match auth_data {
|
match auth_data {
|
||||||
AuthData::Bearer(bearer_header) => {
|
AuthData::Bearer(bearer_header) => {
|
||||||
@ -1949,7 +1946,6 @@ impl<S, C> Api<C> for Client<S, C> where
|
|||||||
|
|
||||||
#[allow(clippy::collapsible_match)]
|
#[allow(clippy::collapsible_match)]
|
||||||
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
||||||
// Currently only authentication with Basic and Bearer are supported
|
|
||||||
#[allow(clippy::single_match, clippy::match_single_binding)]
|
#[allow(clippy::single_match, clippy::match_single_binding)]
|
||||||
match auth_data {
|
match auth_data {
|
||||||
AuthData::Bearer(bearer_header) => {
|
AuthData::Bearer(bearer_header) => {
|
||||||
@ -2057,7 +2053,6 @@ impl<S, C> Api<C> for Client<S, C> where
|
|||||||
|
|
||||||
#[allow(clippy::collapsible_match)]
|
#[allow(clippy::collapsible_match)]
|
||||||
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
||||||
// Currently only authentication with Basic and Bearer are supported
|
|
||||||
#[allow(clippy::single_match, clippy::match_single_binding)]
|
#[allow(clippy::single_match, clippy::match_single_binding)]
|
||||||
match auth_data {
|
match auth_data {
|
||||||
AuthData::Bearer(bearer_header) => {
|
AuthData::Bearer(bearer_header) => {
|
||||||
@ -2174,7 +2169,6 @@ impl<S, C> Api<C> for Client<S, C> where
|
|||||||
|
|
||||||
#[allow(clippy::collapsible_match)]
|
#[allow(clippy::collapsible_match)]
|
||||||
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
||||||
// Currently only authentication with Basic and Bearer are supported
|
|
||||||
#[allow(clippy::single_match, clippy::match_single_binding)]
|
#[allow(clippy::single_match, clippy::match_single_binding)]
|
||||||
match auth_data {
|
match auth_data {
|
||||||
AuthData::Bearer(bearer_header) => {
|
AuthData::Bearer(bearer_header) => {
|
||||||
@ -2274,7 +2268,6 @@ impl<S, C> Api<C> for Client<S, C> where
|
|||||||
|
|
||||||
#[allow(clippy::collapsible_match)]
|
#[allow(clippy::collapsible_match)]
|
||||||
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
||||||
// Currently only authentication with Basic and Bearer are supported
|
|
||||||
#[allow(clippy::single_match, clippy::match_single_binding)]
|
#[allow(clippy::single_match, clippy::match_single_binding)]
|
||||||
match auth_data {
|
match auth_data {
|
||||||
AuthData::Bearer(bearer_header) => {
|
AuthData::Bearer(bearer_header) => {
|
||||||
@ -2381,7 +2374,6 @@ impl<S, C> Api<C> for Client<S, C> where
|
|||||||
|
|
||||||
#[allow(clippy::collapsible_match)]
|
#[allow(clippy::collapsible_match)]
|
||||||
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
||||||
// Currently only authentication with Basic and Bearer are supported
|
|
||||||
#[allow(clippy::single_match, clippy::match_single_binding)]
|
#[allow(clippy::single_match, clippy::match_single_binding)]
|
||||||
match auth_data {
|
match auth_data {
|
||||||
_ => {}
|
_ => {}
|
||||||
@ -2500,7 +2492,6 @@ impl<S, C> Api<C> for Client<S, C> where
|
|||||||
|
|
||||||
#[allow(clippy::collapsible_match)]
|
#[allow(clippy::collapsible_match)]
|
||||||
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
||||||
// Currently only authentication with Basic and Bearer are supported
|
|
||||||
#[allow(clippy::single_match, clippy::match_single_binding)]
|
#[allow(clippy::single_match, clippy::match_single_binding)]
|
||||||
match auth_data {
|
match auth_data {
|
||||||
AuthData::Bearer(bearer_header) => {
|
AuthData::Bearer(bearer_header) => {
|
||||||
@ -2648,7 +2639,6 @@ impl<S, C> Api<C> for Client<S, C> where
|
|||||||
|
|
||||||
#[allow(clippy::collapsible_match)]
|
#[allow(clippy::collapsible_match)]
|
||||||
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
||||||
// Currently only authentication with Basic and Bearer are supported
|
|
||||||
#[allow(clippy::single_match, clippy::match_single_binding)]
|
#[allow(clippy::single_match, clippy::match_single_binding)]
|
||||||
match auth_data {
|
match auth_data {
|
||||||
AuthData::Bearer(bearer_header) => {
|
AuthData::Bearer(bearer_header) => {
|
||||||
@ -2746,7 +2736,6 @@ impl<S, C> Api<C> for Client<S, C> where
|
|||||||
|
|
||||||
#[allow(clippy::collapsible_match)]
|
#[allow(clippy::collapsible_match)]
|
||||||
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
||||||
// Currently only authentication with Basic and Bearer are supported
|
|
||||||
#[allow(clippy::single_match, clippy::match_single_binding)]
|
#[allow(clippy::single_match, clippy::match_single_binding)]
|
||||||
match auth_data {
|
match auth_data {
|
||||||
_ => {}
|
_ => {}
|
||||||
|
@ -421,7 +421,6 @@ impl<S, C> Api<C> for Client<S, C> where
|
|||||||
|
|
||||||
#[allow(clippy::collapsible_match)]
|
#[allow(clippy::collapsible_match)]
|
||||||
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
if let Some(auth_data) = Has::<Option<AuthData>>::get(context).as_ref() {
|
||||||
// Currently only authentication with Basic and Bearer are supported
|
|
||||||
#[allow(clippy::single_match, clippy::match_single_binding)]
|
#[allow(clippy::single_match, clippy::match_single_binding)]
|
||||||
match auth_data {
|
match auth_data {
|
||||||
AuthData::Bearer(bearer_header) => {
|
AuthData::Bearer(bearer_header) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user