Skip to content

Commit be651e7

Browse files
authored
[powershell] cleanup documentation (#15355)
* [powershell] fix documentation of API authorization in README files fix hierarchy level + add internal links + align wording across generators * [powershell] fix anchor links in documentation
1 parent 2b19d5f commit be651e7

10 files changed

Lines changed: 60 additions & 62 deletions

File tree

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

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ This PowerShell module is automatically generated by the [OpenAPI Generator](htt
1616
For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
1717
{{/infoUrl}}
1818

19-
<a name="frameworks-supported"></a>
19+
<a id="frameworks-supported"></a>
2020
## Frameworks supported
2121
- PowerShell {{{powershellVersion}}} or later
2222

23-
<a name="dependencies"></a>
23+
<a id="dependencies"></a>
2424
## Dependencies
2525

26-
<a name="installation"></a>
26+
<a id="installation"></a>
2727
## Installation
2828

2929
{{#powershellGalleryUrl}}
@@ -46,7 +46,7 @@ To uninstall the module, simply run:
4646
Remove-Module -FullyQualifiedName @{ModuleName = "{{{packageName}}}"; ModuleVersion = "{{{packageVersion}}}"}
4747
```
4848

49-
<a name="tests"></a>
49+
<a id="tests"></a>
5050
## Tests
5151

5252
To install and run `Pester`, please execute the following commands in the terminal:
@@ -78,18 +78,13 @@ Class | Method | HTTP request | Description
7878
No model defined in this package
7979
{{/modelPackage}}
8080

81+
<a id="documentation-for-authorization"></a>
8182
## Documentation for Authorization
8283

83-
{{^authMethods}}
84-
All endpoints do not require authorization.
85-
{{/authMethods}}
86-
{{#authMethods}}
87-
{{#last}}
88-
Authentication schemes defined for the API:
89-
{{/last}}
90-
{{/authMethods}}
84+
{{^authMethods}}Endpoints do not require authorization.{{/authMethods}}
85+
{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}}
9186
{{#authMethods}}
92-
87+
<a id="{{name}}"></a>
9388
### {{name}}
9489

9590
{{#isApiKey}}- **Type**: API key

modules/openapi-generator/src/main/resources/powershell/api_doc.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Method | HTTP request | Description
1010

1111
{{#operations}}
1212
{{#operation}}
13-
<a name="{{{vendorExtensions.x-powershell-method-name-lowercase}}}"></a>
13+
<a id="{{{vendorExtensions.x-powershell-method-name-lowercase}}}"></a>
1414
# **{{{vendorExtensions.x-powershell-method-name}}}**
1515
> {{{returnType}}}{{^returnType}}void{{/returnType}} {{{vendorExtensions.x-powershell-method-name}}}<br>
1616
{{#allParams}}

samples/client/petstore/powershell/README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ This PowerShell module is automatically generated by the [OpenAPI Generator](htt
88
- SDK version: 0.1.2
99
- Build package: org.openapitools.codegen.languages.PowerShellClientCodegen
1010

11-
<a name="frameworks-supported"></a>
11+
<a id="frameworks-supported"></a>
1212
## Frameworks supported
1313
- PowerShell 5.0 or later
1414

15-
<a name="dependencies"></a>
15+
<a id="dependencies"></a>
1616
## Dependencies
1717

18-
<a name="installation"></a>
18+
<a id="installation"></a>
1919
## Installation
2020

2121
To install from PowerShell Gallery (https://www.powershellgallery.com/packages/PSPetstore)
@@ -36,7 +36,7 @@ To uninstall the module, simply run:
3636
Remove-Module -FullyQualifiedName @{ModuleName = "PSPetstore"; ModuleVersion = "0.1.2"}
3737
```
3838

39-
<a name="tests"></a>
39+
<a id="tests"></a>
4040
## Tests
4141

4242
To install and run `Pester`, please execute the following commands in the terminal:
@@ -174,9 +174,12 @@ Class | Method | HTTP request | Description
174174
- [PSPetstore/Model.Zebra](docs/Zebra.md)
175175

176176

177+
<a id="documentation-for-authorization"></a>
177178
## Documentation for Authorization
178179

179180

181+
Authentication schemes defined for the API:
182+
<a id="petstore_auth"></a>
180183
### petstore_auth
181184

182185

@@ -187,35 +190,35 @@ Class | Method | HTTP request | Description
187190
- write:pets: modify pets in your account
188191
- read:pets: read your pets
189192

190-
193+
<a id="api_key"></a>
191194
### api_key
192195

193196
- **Type**: API key
194197

195198
- **API key parameter name**: api_key
196199
- **Location**: HTTP header
197200

198-
201+
<a id="api_key_query"></a>
199202
### api_key_query
200203

201204
- **Type**: API key
202205

203206
- **API key parameter name**: api_key_query
204207
- **Location**: URL query string
205208

206-
209+
<a id="http_basic_test"></a>
207210
### http_basic_test
208211

209212

210213
- **Type**: HTTP basic authentication
211214

212-
215+
<a id="bearer_test"></a>
213216
### bearer_test
214217

215218

216219
- **Type**: HTTP basic authentication
217220

218-
221+
<a id="http_signature_test"></a>
219222
### http_signature_test
220223

221224

samples/client/petstore/powershell/docs/PSAnotherFakeApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Method | HTTP request | Description
77
[**Invoke-PS123TestSpecialTags**](PSAnotherFakeApi.md#Invoke-PS123TestSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
88

99

10-
<a name="Invoke-PS123TestSpecialTags"></a>
10+
<a id="Invoke-PS123TestSpecialTags"></a>
1111
# **Invoke-PS123TestSpecialTags**
1212
> Client Invoke-PS123TestSpecialTags<br>
1313
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-Client] <PSCustomObject><br>

samples/client/petstore/powershell/docs/PSDefaultApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Method | HTTP request | Description
77
[**Invoke-PSFooGet**](PSDefaultApi.md#Invoke-PSFooGet) | **GET** /foo |
88

99

10-
<a name="Invoke-PSFooGet"></a>
10+
<a id="Invoke-PSFooGet"></a>
1111
# **Invoke-PSFooGet**
1212
> FooGetDefaultResponse Invoke-PSFooGet<br>
1313

samples/client/petstore/powershell/docs/PSFakeApi.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Method | HTTP request | Description
2121
[**Test-PSQueryParameterCollectionFormat**](PSFakeApi.md#Test-PSQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters |
2222

2323

24-
<a name="Invoke-PSFakeHealthGet"></a>
24+
<a id="Invoke-PSFakeHealthGet"></a>
2525
# **Invoke-PSFakeHealthGet**
2626
> HealthCheckResult Invoke-PSFakeHealthGet<br>
2727
@@ -57,7 +57,7 @@ No authorization required
5757

5858
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
5959

60-
<a name="Invoke-PSFakeOuterBooleanSerialize"></a>
60+
<a id="Invoke-PSFakeOuterBooleanSerialize"></a>
6161
# **Invoke-PSFakeOuterBooleanSerialize**
6262
> Boolean Invoke-PSFakeOuterBooleanSerialize<br>
6363
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-Body] <System.Nullable[Boolean]><br>
@@ -99,7 +99,7 @@ No authorization required
9999

100100
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
101101

102-
<a name="Invoke-PSFakeOuterCompositeSerialize"></a>
102+
<a id="Invoke-PSFakeOuterCompositeSerialize"></a>
103103
# **Invoke-PSFakeOuterCompositeSerialize**
104104
> OuterComposite Invoke-PSFakeOuterCompositeSerialize<br>
105105
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-OuterComposite] <PSCustomObject><br>
@@ -141,7 +141,7 @@ No authorization required
141141

142142
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
143143

144-
<a name="Invoke-PSFakeOuterNumberSerialize"></a>
144+
<a id="Invoke-PSFakeOuterNumberSerialize"></a>
145145
# **Invoke-PSFakeOuterNumberSerialize**
146146
> Decimal Invoke-PSFakeOuterNumberSerialize<br>
147147
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-Body] <System.Nullable[Decimal]><br>
@@ -183,7 +183,7 @@ No authorization required
183183

184184
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
185185

186-
<a name="Invoke-PSFakeOuterStringSerialize"></a>
186+
<a id="Invoke-PSFakeOuterStringSerialize"></a>
187187
# **Invoke-PSFakeOuterStringSerialize**
188188
> String Invoke-PSFakeOuterStringSerialize<br>
189189
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-Body] <String><br>
@@ -225,7 +225,7 @@ No authorization required
225225

226226
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
227227

228-
<a name="Get-PSArrayOfEnums"></a>
228+
<a id="Get-PSArrayOfEnums"></a>
229229
# **Get-PSArrayOfEnums**
230230
> OuterEnum[] Get-PSArrayOfEnums<br>
231231
@@ -261,7 +261,7 @@ No authorization required
261261

262262
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
263263

264-
<a name="Test-PSBodyWithFileSchema"></a>
264+
<a id="Test-PSBodyWithFileSchema"></a>
265265
# **Test-PSBodyWithFileSchema**
266266
> void Test-PSBodyWithFileSchema<br>
267267
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-FileSchemaTestClass] <PSCustomObject><br>
@@ -304,7 +304,7 @@ No authorization required
304304

305305
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
306306

307-
<a name="Test-PSBodyWithQueryParams"></a>
307+
<a id="Test-PSBodyWithQueryParams"></a>
308308
# **Test-PSBodyWithQueryParams**
309309
> void Test-PSBodyWithQueryParams<br>
310310
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-Query] <String><br>
@@ -347,7 +347,7 @@ No authorization required
347347

348348
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
349349

350-
<a name="Test-PSClientModel"></a>
350+
<a id="Test-PSClientModel"></a>
351351
# **Test-PSClientModel**
352352
> Client Test-PSClientModel<br>
353353
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-Client] <PSCustomObject><br>
@@ -390,7 +390,7 @@ No authorization required
390390

391391
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
392392

393-
<a name="Test-PSEndpointParameters"></a>
393+
<a id="Test-PSEndpointParameters"></a>
394394
# **Test-PSEndpointParameters**
395395
> void Test-PSEndpointParameters<br>
396396
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-Number] <Decimal><br>
@@ -478,7 +478,7 @@ void (empty response body)
478478

479479
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
480480

481-
<a name="Test-PSEnumParameters"></a>
481+
<a id="Test-PSEnumParameters"></a>
482482
# **Test-PSEnumParameters**
483483
> void Test-PSEnumParameters<br>
484484
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-EnumHeaderStringArray] <String[]><br>
@@ -542,7 +542,7 @@ No authorization required
542542

543543
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
544544

545-
<a name="Test-PSGroupParameters"></a>
545+
<a id="Test-PSGroupParameters"></a>
546546
# **Test-PSGroupParameters**
547547
> void Test-PSGroupParameters<br>
548548
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-RequiredStringGroup] <Int32><br>
@@ -606,7 +606,7 @@ void (empty response body)
606606

607607
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
608608

609-
<a name="Test-PSInlineAdditionalProperties"></a>
609+
<a id="Test-PSInlineAdditionalProperties"></a>
610610
# **Test-PSInlineAdditionalProperties**
611611
> void Test-PSInlineAdditionalProperties<br>
612612
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-RequestBody] <System.Collections.Hashtable><br>
@@ -649,7 +649,7 @@ No authorization required
649649

650650
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
651651

652-
<a name="Test-PSJsonFormData"></a>
652+
<a id="Test-PSJsonFormData"></a>
653653
# **Test-PSJsonFormData**
654654
> void Test-PSJsonFormData<br>
655655
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-Param] <String><br>
@@ -695,7 +695,7 @@ No authorization required
695695

696696
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
697697

698-
<a name="Test-PSQueryParameterCollectionFormat"></a>
698+
<a id="Test-PSQueryParameterCollectionFormat"></a>
699699
# **Test-PSQueryParameterCollectionFormat**
700700
> void Test-PSQueryParameterCollectionFormat<br>
701701
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-Pipe] <String[]><br>

samples/client/petstore/powershell/docs/PSFakeClassnameTags123Api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Method | HTTP request | Description
77
[**Test-PSClassname**](PSFakeClassnameTags123Api.md#Test-PSClassname) | **PATCH** /fake_classname_test | To test class name in snake case
88

99

10-
<a name="Test-PSClassname"></a>
10+
<a id="Test-PSClassname"></a>
1111
# **Test-PSClassname**
1212
> Client Test-PSClassname<br>
1313
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-Client] <PSCustomObject><br>

samples/client/petstore/powershell/docs/PSPetApi.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Method | HTTP request | Description
1515
[**Invoke-PSUploadFileWithRequiredFile**](PSPetApi.md#Invoke-PSUploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
1616

1717

18-
<a name="Add-PSPet"></a>
18+
<a id="Add-PSPet"></a>
1919
# **Add-PSPet**
2020
> void Add-PSPet<br>
2121
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-Pet] <PSCustomObject><br>
@@ -77,7 +77,7 @@ void (empty response body)
7777

7878
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
7979

80-
<a name="remove-pet"></a>
80+
<a id="remove-pet"></a>
8181
# **Remove-Pet**
8282
> void Remove-Pet<br>
8383
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-PetId] <Int64><br>
@@ -128,7 +128,7 @@ void (empty response body)
128128

129129
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
130130

131-
<a name="Find-PSPetsByStatus"></a>
131+
<a id="Find-PSPetsByStatus"></a>
132132
# **Find-PSPetsByStatus**
133133
> Pet[] Find-PSPetsByStatus<br>
134134
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-Status] <String[]><br>
@@ -188,7 +188,7 @@ Name | Type | Description | Notes
188188

189189
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
190190

191-
<a name="Find-PSPetsByTags"></a>
191+
<a id="Find-PSPetsByTags"></a>
192192
# **Find-PSPetsByTags**
193193
> Pet[] Find-PSPetsByTags<br>
194194
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-Tags] <String[]><br>
@@ -248,7 +248,7 @@ Name | Type | Description | Notes
248248

249249
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
250250

251-
<a name="Get-PSPetById"></a>
251+
<a id="Get-PSPetById"></a>
252252
# **Get-PSPetById**
253253
> Pet Get-PSPetById<br>
254254
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-PetId] <Int64><br>
@@ -298,7 +298,7 @@ Name | Type | Description | Notes
298298

299299
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
300300

301-
<a name="Update-PSPet"></a>
301+
<a id="Update-PSPet"></a>
302302
# **Update-PSPet**
303303
> void Update-PSPet<br>
304304
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-Pet] <PSCustomObject><br>
@@ -360,7 +360,7 @@ void (empty response body)
360360

361361
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
362362

363-
<a name="Update-PSPetWithForm"></a>
363+
<a id="Update-PSPetWithForm"></a>
364364
# **Update-PSPetWithForm**
365365
> void Update-PSPetWithForm<br>
366366
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-PetId] <Int64><br>
@@ -414,7 +414,7 @@ void (empty response body)
414414

415415
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
416416

417-
<a name="Invoke-PSUploadFile"></a>
417+
<a id="Invoke-PSUploadFile"></a>
418418
# **Invoke-PSUploadFile**
419419
> ApiResponse Invoke-PSUploadFile<br>
420420
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-PetId] <Int64><br>
@@ -468,7 +468,7 @@ Name | Type | Description | Notes
468468

469469
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
470470

471-
<a name="Invoke-PSUploadFileWithRequiredFile"></a>
471+
<a id="Invoke-PSUploadFileWithRequiredFile"></a>
472472
# **Invoke-PSUploadFileWithRequiredFile**
473473
> ApiResponse Invoke-PSUploadFileWithRequiredFile<br>
474474
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-PetId] <Int64><br>

0 commit comments

Comments
 (0)