[perl] fix use of isBasic condition (#15524)

This commit is contained in:
Tiffany Marrel 2023-05-20 14:09:39 +02:00 committed by GitHub
parent 7eeb7f6ed2
commit e83640c836
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 9 deletions

View File

@ -266,11 +266,11 @@ use Data::Dumper;
my $api_instance = {{moduleName}}::{{classname}}->new(
{{#hasAuthMethods}}
{{#authMethods}}
{{#isBasic}}
{{#isBasicBasic}}
# Configure HTTP basic authorization: {{{name}}}
username => 'YOUR_USERNAME',
password => 'YOUR_PASSWORD',
{{/isBasic}}
{{/isBasicBasic}}
{{#isApiKey}}
# Configure API key authorization: {{{name}}}
api_key => {'{{{keyParamName}}}' => 'YOUR_API_KEY'},
@ -321,8 +321,12 @@ Class | Method | HTTP request | Description
- **API key parameter name**: {{{keyParamName}}}
- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}
{{/isApiKey}}
{{#isBasic}}- **Type**: HTTP basic authentication
{{/isBasic}}
{{#isBasicBasic}}- **Type**: HTTP basic authentication
{{/isBasicBasic}}
{{#isBasicBearer}}- **Type**: HTTP Bearer Token authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}
{{/isBasicBearer}}
{{#isHttpSignature}}- **Type**: HTTP signature authentication
{{/isHttpSignature}}
{{#isOAuth}}- **Type**: OAuth
- **Flow**: {{{flow}}}
- **Authorization URL**: {{{authorizationUrl}}}

View File

@ -28,8 +28,8 @@ use Data::Dumper;
use {{moduleName}}::{{classname}};
my $api_instance = {{moduleName}}::{{classname}}->new(
{{#hasAuthMethods}}{{#authMethods}}{{#isBasic}}
# Configure HTTP basic authorization: {{{name}}}
{{#isBasicBasic}}
# Configure HTTP basic authorization: {{{name}}}
username => 'YOUR_USERNAME',
password => 'YOUR_PASSWORD',
{{/isBasicBasic}}

View File

@ -508,9 +508,9 @@ Authentication schemes defined for the API:
## bearer_test
- **Type**: HTTP basic authentication
- **Type**: HTTP Bearer Token authentication (JWT)
## http_signature_test
- **Type**: HTTP basic authentication
- **Type**: HTTP signature authentication

View File

@ -79,7 +79,6 @@ use Data::Dumper;
use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
# Configure HTTP basic authorization: http_signature_test
);
@ -679,7 +678,6 @@ use Data::Dumper;
use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
# Configure HTTP basic authorization: bearer_test
# Configure bearer access token for authorization: bearer_test
access_token => 'YOUR_BEARER_TOKEN',