From e83640c836a76a67ef7f6328b3eb9035e389487b Mon Sep 17 00:00:00 2001 From: Tiffany Marrel Date: Sat, 20 May 2023 14:09:39 +0200 Subject: [PATCH] [perl] fix use of isBasic condition (#15524) --- .../src/main/resources/perl/README.mustache | 12 ++++++++---- .../src/main/resources/perl/api_doc.mustache | 2 +- samples/client/petstore/perl/README.md | 4 ++-- samples/client/petstore/perl/docs/FakeApi.md | 2 -- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/perl/README.mustache b/modules/openapi-generator/src/main/resources/perl/README.mustache index c108a187f35..b736b11bc07 100644 --- a/modules/openapi-generator/src/main/resources/perl/README.mustache +++ b/modules/openapi-generator/src/main/resources/perl/README.mustache @@ -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}}} diff --git a/modules/openapi-generator/src/main/resources/perl/api_doc.mustache b/modules/openapi-generator/src/main/resources/perl/api_doc.mustache index 19b18950a23..68d489816a7 100644 --- a/modules/openapi-generator/src/main/resources/perl/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/perl/api_doc.mustache @@ -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}} diff --git a/samples/client/petstore/perl/README.md b/samples/client/petstore/perl/README.md index 22ef72b8f6e..ec789548c08 100644 --- a/samples/client/petstore/perl/README.md +++ b/samples/client/petstore/perl/README.md @@ -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 diff --git a/samples/client/petstore/perl/docs/FakeApi.md b/samples/client/petstore/perl/docs/FakeApi.md index e028d69b6c3..5021dcc228d 100644 --- a/samples/client/petstore/perl/docs/FakeApi.md +++ b/samples/client/petstore/perl/docs/FakeApi.md @@ -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',