Skip to content

Commit

Permalink
[perl] fix use of isBasic condition (#15524)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiffmaelite committed May 20, 2023
1 parent 7eeb7f6 commit e83640c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'},
Expand Down Expand Up @@ -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}}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
4 changes: 2 additions & 2 deletions samples/client/petstore/perl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

2 changes: 0 additions & 2 deletions samples/client/petstore/perl/docs/FakeApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

);

Expand Down Expand Up @@ -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',

Expand Down

0 comments on commit e83640c

Please sign in to comment.