forked from loafle/openapi-generator-original
[perl] fix use of isBasic condition (#15524)
This commit is contained in:
parent
7eeb7f6ed2
commit
e83640c836
@ -266,11 +266,11 @@ use Data::Dumper;
|
|||||||
my $api_instance = {{moduleName}}::{{classname}}->new(
|
my $api_instance = {{moduleName}}::{{classname}}->new(
|
||||||
{{#hasAuthMethods}}
|
{{#hasAuthMethods}}
|
||||||
{{#authMethods}}
|
{{#authMethods}}
|
||||||
{{#isBasic}}
|
{{#isBasicBasic}}
|
||||||
# Configure HTTP basic authorization: {{{name}}}
|
# Configure HTTP basic authorization: {{{name}}}
|
||||||
username => 'YOUR_USERNAME',
|
username => 'YOUR_USERNAME',
|
||||||
password => 'YOUR_PASSWORD',
|
password => 'YOUR_PASSWORD',
|
||||||
{{/isBasic}}
|
{{/isBasicBasic}}
|
||||||
{{#isApiKey}}
|
{{#isApiKey}}
|
||||||
# Configure API key authorization: {{{name}}}
|
# Configure API key authorization: {{{name}}}
|
||||||
api_key => {'{{{keyParamName}}}' => 'YOUR_API_KEY'},
|
api_key => {'{{{keyParamName}}}' => 'YOUR_API_KEY'},
|
||||||
@ -321,8 +321,12 @@ Class | Method | HTTP request | Description
|
|||||||
- **API key parameter name**: {{{keyParamName}}}
|
- **API key parameter name**: {{{keyParamName}}}
|
||||||
- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}
|
- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}
|
||||||
{{/isApiKey}}
|
{{/isApiKey}}
|
||||||
{{#isBasic}}- **Type**: HTTP basic authentication
|
{{#isBasicBasic}}- **Type**: HTTP basic authentication
|
||||||
{{/isBasic}}
|
{{/isBasicBasic}}
|
||||||
|
{{#isBasicBearer}}- **Type**: HTTP Bearer Token authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}
|
||||||
|
{{/isBasicBearer}}
|
||||||
|
{{#isHttpSignature}}- **Type**: HTTP signature authentication
|
||||||
|
{{/isHttpSignature}}
|
||||||
{{#isOAuth}}- **Type**: OAuth
|
{{#isOAuth}}- **Type**: OAuth
|
||||||
- **Flow**: {{{flow}}}
|
- **Flow**: {{{flow}}}
|
||||||
- **Authorization URL**: {{{authorizationUrl}}}
|
- **Authorization URL**: {{{authorizationUrl}}}
|
||||||
|
@ -28,8 +28,8 @@ use Data::Dumper;
|
|||||||
use {{moduleName}}::{{classname}};
|
use {{moduleName}}::{{classname}};
|
||||||
my $api_instance = {{moduleName}}::{{classname}}->new(
|
my $api_instance = {{moduleName}}::{{classname}}->new(
|
||||||
{{#hasAuthMethods}}{{#authMethods}}{{#isBasic}}
|
{{#hasAuthMethods}}{{#authMethods}}{{#isBasic}}
|
||||||
# Configure HTTP basic authorization: {{{name}}}
|
|
||||||
{{#isBasicBasic}}
|
{{#isBasicBasic}}
|
||||||
|
# Configure HTTP basic authorization: {{{name}}}
|
||||||
username => 'YOUR_USERNAME',
|
username => 'YOUR_USERNAME',
|
||||||
password => 'YOUR_PASSWORD',
|
password => 'YOUR_PASSWORD',
|
||||||
{{/isBasicBasic}}
|
{{/isBasicBasic}}
|
||||||
|
@ -508,9 +508,9 @@ Authentication schemes defined for the API:
|
|||||||
|
|
||||||
## bearer_test
|
## bearer_test
|
||||||
|
|
||||||
- **Type**: HTTP basic authentication
|
- **Type**: HTTP Bearer Token authentication (JWT)
|
||||||
|
|
||||||
## http_signature_test
|
## http_signature_test
|
||||||
|
|
||||||
- **Type**: HTTP basic authentication
|
- **Type**: HTTP signature authentication
|
||||||
|
|
||||||
|
@ -79,7 +79,6 @@ use Data::Dumper;
|
|||||||
use WWW::OpenAPIClient::FakeApi;
|
use WWW::OpenAPIClient::FakeApi;
|
||||||
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
|
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;
|
use WWW::OpenAPIClient::FakeApi;
|
||||||
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
|
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
|
||||||
|
|
||||||
# Configure HTTP basic authorization: bearer_test
|
|
||||||
# Configure bearer access token for authorization: bearer_test
|
# Configure bearer access token for authorization: bearer_test
|
||||||
access_token => 'YOUR_BEARER_TOKEN',
|
access_token => 'YOUR_BEARER_TOKEN',
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user