[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:
Richard Whitehouse 2024-09-18 08:22:51 +01:00 committed by GitHub
parent 0b084cd75d
commit cf5d17bbfe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 1 additions and 15 deletions

View File

@ -95,7 +95,7 @@
{{#hasAuthMethods}}
#[allow(clippy::collapsible_match)]
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)]
match auth_data {
{{#authMethods}}

View File

@ -1191,7 +1191,6 @@ impl<S, C> Api<C> for Client<S, C> where
#[allow(clippy::collapsible_match)]
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)]
match auth_data {
AuthData::Bearer(bearer_header) => {
@ -1519,7 +1518,6 @@ impl<S, C> Api<C> for Client<S, C> where
#[allow(clippy::collapsible_match)]
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)]
match auth_data {
AuthData::Bearer(bearer_header) => {

View File

@ -1272,7 +1272,6 @@ impl<S, C> Api<C> for Client<S, C> where
#[allow(clippy::collapsible_match)]
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)]
match auth_data {
AuthData::Basic(basic_header) => {
@ -1759,7 +1758,6 @@ impl<S, C> Api<C> for Client<S, C> where
#[allow(clippy::collapsible_match)]
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)]
match auth_data {
_ => {}
@ -1859,7 +1857,6 @@ impl<S, C> Api<C> for Client<S, C> where
#[allow(clippy::collapsible_match)]
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)]
match auth_data {
AuthData::Bearer(bearer_header) => {
@ -1949,7 +1946,6 @@ impl<S, C> Api<C> for Client<S, C> where
#[allow(clippy::collapsible_match)]
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)]
match auth_data {
AuthData::Bearer(bearer_header) => {
@ -2057,7 +2053,6 @@ impl<S, C> Api<C> for Client<S, C> where
#[allow(clippy::collapsible_match)]
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)]
match auth_data {
AuthData::Bearer(bearer_header) => {
@ -2174,7 +2169,6 @@ impl<S, C> Api<C> for Client<S, C> where
#[allow(clippy::collapsible_match)]
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)]
match auth_data {
AuthData::Bearer(bearer_header) => {
@ -2274,7 +2268,6 @@ impl<S, C> Api<C> for Client<S, C> where
#[allow(clippy::collapsible_match)]
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)]
match auth_data {
AuthData::Bearer(bearer_header) => {
@ -2381,7 +2374,6 @@ impl<S, C> Api<C> for Client<S, C> where
#[allow(clippy::collapsible_match)]
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)]
match auth_data {
_ => {}
@ -2500,7 +2492,6 @@ impl<S, C> Api<C> for Client<S, C> where
#[allow(clippy::collapsible_match)]
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)]
match auth_data {
AuthData::Bearer(bearer_header) => {
@ -2648,7 +2639,6 @@ impl<S, C> Api<C> for Client<S, C> where
#[allow(clippy::collapsible_match)]
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)]
match auth_data {
AuthData::Bearer(bearer_header) => {
@ -2746,7 +2736,6 @@ impl<S, C> Api<C> for Client<S, C> where
#[allow(clippy::collapsible_match)]
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)]
match auth_data {
_ => {}

View File

@ -421,7 +421,6 @@ impl<S, C> Api<C> for Client<S, C> where
#[allow(clippy::collapsible_match)]
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)]
match auth_data {
AuthData::Bearer(bearer_header) => {