Skip to content

Commit 55e9f66

Browse files
authored
[JavaScript] fix documentation of API authorization in README files (#15346)
align wording across generators
1 parent be651e7 commit 55e9f66

5 files changed

Lines changed: 7 additions & 43 deletions

File tree

modules/openapi-generator/src/main/resources/Javascript-Apollo/README.mustache

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,9 @@ Class | Method | HTTP request | Description
191191

192192
## Documentation for Authorization
193193

194-
{{^authMethods}}
195-
All endpoints do not require authorization.
196-
{{/authMethods}}
194+
{{^authMethods}}Endpoints do not require authorization.{{/authMethods}}
195+
{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}}
197196
{{#authMethods}}
198-
{{#last}} Authentication schemes defined for the API:{{/last}}
199-
200197
### {{name}}
201198

202199
{{#isApiKey}}

modules/openapi-generator/src/main/resources/Javascript/README.mustache

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,9 @@ Class | Method | HTTP request | Description
191191

192192
## Documentation for Authorization
193193

194-
{{^authMethods}}
195-
All endpoints do not require authorization.
196-
{{/authMethods}}
194+
{{^authMethods}}Endpoints do not require authorization.{{/authMethods}}
195+
{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}}
197196
{{#authMethods}}
198-
{{#last}} Authentication schemes defined for the API:{{/last}}
199-
200197
### {{name}}
201198

202199
{{#isApiKey}}

samples/client/petstore/javascript-apollo/README.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ Class | Method | HTTP request | Description
223223
## Documentation for Authorization
224224

225225

226-
226+
Authentication schemes defined for the API:
227227
### petstore_auth
228228

229229

@@ -234,38 +234,28 @@ Class | Method | HTTP request | Description
234234
- write:pets: modify pets in your account
235235
- read:pets: read your pets
236236

237-
238-
239237
### api_key
240238

241239

242240
- **Type**: API key
243241
- **API key parameter name**: api_key
244242
- **Location**: HTTP header
245243

246-
247-
248244
### api_key_query
249245

250246

251247
- **Type**: API key
252248
- **API key parameter name**: api_key_query
253249
- **Location**: URL query string
254250

255-
256-
257251
### http_basic_test
258252

259253
- **Type**: HTTP basic authentication
260254

261-
262-
263255
### bearer_test
264256

265257
- **Type**: Bearer authentication (JWT)
266258

267-
268-
269259
### http_signature_test
270260

271261

samples/client/petstore/javascript-es6/README.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ Class | Method | HTTP request | Description
223223
## Documentation for Authorization
224224

225225

226-
226+
Authentication schemes defined for the API:
227227
### petstore_auth
228228

229229

@@ -234,38 +234,28 @@ Class | Method | HTTP request | Description
234234
- write:pets: modify pets in your account
235235
- read:pets: read your pets
236236

237-
238-
239237
### api_key
240238

241239

242240
- **Type**: API key
243241
- **API key parameter name**: api_key
244242
- **Location**: HTTP header
245243

246-
247-
248244
### api_key_query
249245

250246

251247
- **Type**: API key
252248
- **API key parameter name**: api_key_query
253249
- **Location**: URL query string
254250

255-
256-
257251
### http_basic_test
258252

259253
- **Type**: HTTP basic authentication
260254

261-
262-
263255
### bearer_test
264256

265257
- **Type**: Bearer authentication (JWT)
266258

267-
268-
269259
### http_signature_test
270260

271261

samples/client/petstore/javascript-promise-es6/README.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ Class | Method | HTTP request | Description
221221
## Documentation for Authorization
222222

223223

224-
224+
Authentication schemes defined for the API:
225225
### petstore_auth
226226

227227

@@ -232,38 +232,28 @@ Class | Method | HTTP request | Description
232232
- write:pets: modify pets in your account
233233
- read:pets: read your pets
234234

235-
236-
237235
### api_key
238236

239237

240238
- **Type**: API key
241239
- **API key parameter name**: api_key
242240
- **Location**: HTTP header
243241

244-
245-
246242
### api_key_query
247243

248244

249245
- **Type**: API key
250246
- **API key parameter name**: api_key_query
251247
- **Location**: URL query string
252248

253-
254-
255249
### http_basic_test
256250

257251
- **Type**: HTTP basic authentication
258252

259-
260-
261253
### bearer_test
262254

263255
- **Type**: Bearer authentication (JWT)
264256

265-
266-
267257
### http_signature_test
268258

269259

0 commit comments

Comments
 (0)