From 55e9f66cae3766374d442fabf864c648e336a066 Mon Sep 17 00:00:00 2001 From: Tiffany Marrel Date: Tue, 9 May 2023 08:22:41 +0200 Subject: [PATCH] [JavaScript] fix documentation of API authorization in README files (#15346) align wording across generators --- .../main/resources/Javascript-Apollo/README.mustache | 7 ++----- .../src/main/resources/Javascript/README.mustache | 7 ++----- samples/client/petstore/javascript-apollo/README.md | 12 +----------- samples/client/petstore/javascript-es6/README.md | 12 +----------- .../client/petstore/javascript-promise-es6/README.md | 12 +----------- 5 files changed, 7 insertions(+), 43 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Javascript-Apollo/README.mustache b/modules/openapi-generator/src/main/resources/Javascript-Apollo/README.mustache index 0ac4e62d2f5..a3365eff364 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Apollo/README.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript-Apollo/README.mustache @@ -191,12 +191,9 @@ Class | Method | HTTP request | Description ## Documentation for Authorization -{{^authMethods}} -All endpoints do not require authorization. -{{/authMethods}} +{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} +{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} {{#authMethods}} -{{#last}} Authentication schemes defined for the API:{{/last}} - ### {{name}} {{#isApiKey}} diff --git a/modules/openapi-generator/src/main/resources/Javascript/README.mustache b/modules/openapi-generator/src/main/resources/Javascript/README.mustache index 0ac4e62d2f5..a3365eff364 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/README.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/README.mustache @@ -191,12 +191,9 @@ Class | Method | HTTP request | Description ## Documentation for Authorization -{{^authMethods}} -All endpoints do not require authorization. -{{/authMethods}} +{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} +{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} {{#authMethods}} -{{#last}} Authentication schemes defined for the API:{{/last}} - ### {{name}} {{#isApiKey}} diff --git a/samples/client/petstore/javascript-apollo/README.md b/samples/client/petstore/javascript-apollo/README.md index e7354779cfd..a3729118721 100644 --- a/samples/client/petstore/javascript-apollo/README.md +++ b/samples/client/petstore/javascript-apollo/README.md @@ -223,7 +223,7 @@ Class | Method | HTTP request | Description ## Documentation for Authorization - +Authentication schemes defined for the API: ### petstore_auth @@ -234,8 +234,6 @@ Class | Method | HTTP request | Description - write:pets: modify pets in your account - read:pets: read your pets - - ### api_key @@ -243,8 +241,6 @@ Class | Method | HTTP request | Description - **API key parameter name**: api_key - **Location**: HTTP header - - ### api_key_query @@ -252,20 +248,14 @@ Class | Method | HTTP request | Description - **API key parameter name**: api_key_query - **Location**: URL query string - - ### http_basic_test - **Type**: HTTP basic authentication - - ### bearer_test - **Type**: Bearer authentication (JWT) - - ### http_signature_test diff --git a/samples/client/petstore/javascript-es6/README.md b/samples/client/petstore/javascript-es6/README.md index e7354779cfd..a3729118721 100644 --- a/samples/client/petstore/javascript-es6/README.md +++ b/samples/client/petstore/javascript-es6/README.md @@ -223,7 +223,7 @@ Class | Method | HTTP request | Description ## Documentation for Authorization - +Authentication schemes defined for the API: ### petstore_auth @@ -234,8 +234,6 @@ Class | Method | HTTP request | Description - write:pets: modify pets in your account - read:pets: read your pets - - ### api_key @@ -243,8 +241,6 @@ Class | Method | HTTP request | Description - **API key parameter name**: api_key - **Location**: HTTP header - - ### api_key_query @@ -252,20 +248,14 @@ Class | Method | HTTP request | Description - **API key parameter name**: api_key_query - **Location**: URL query string - - ### http_basic_test - **Type**: HTTP basic authentication - - ### bearer_test - **Type**: Bearer authentication (JWT) - - ### http_signature_test diff --git a/samples/client/petstore/javascript-promise-es6/README.md b/samples/client/petstore/javascript-promise-es6/README.md index 3592d05eb36..f8203982082 100644 --- a/samples/client/petstore/javascript-promise-es6/README.md +++ b/samples/client/petstore/javascript-promise-es6/README.md @@ -221,7 +221,7 @@ Class | Method | HTTP request | Description ## Documentation for Authorization - +Authentication schemes defined for the API: ### petstore_auth @@ -232,8 +232,6 @@ Class | Method | HTTP request | Description - write:pets: modify pets in your account - read:pets: read your pets - - ### api_key @@ -241,8 +239,6 @@ Class | Method | HTTP request | Description - **API key parameter name**: api_key - **Location**: HTTP header - - ### api_key_query @@ -250,20 +246,14 @@ Class | Method | HTTP request | Description - **API key parameter name**: api_key_query - **Location**: URL query string - - ### http_basic_test - **Type**: HTTP basic authentication - - ### bearer_test - **Type**: Bearer authentication (JWT) - - ### http_signature_test