Skip to content

Commit 76fd2a2

Browse files
authored
[Scala] cleanup documentation (#15304)
* [Scala] fix documentation of API authorization in README files fix hierarchy level + add internal links + align wording across generators * [Scala] fix anchor links in documentation
1 parent 1443dd9 commit 76fd2a2

5 files changed

Lines changed: 25 additions & 9 deletions

File tree

modules/openapi-generator/src/main/resources/scala-akka-client/README.mustache

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,14 @@ Class | Method | HTTP request | Description
136136
{{#models}}{{#model}} - [{{classname}}]({{modelDocPath}}{{classname}}.md)
137137
{{/model}}{{/models}}
138138

139+
<a id="documentation-for-authorization"></a>
139140
## Documentation for Authorization
140141

141-
{{^authMethods}}All endpoints do not require authorization.
142-
{{/authMethods}}Authentication schemes defined for the API:
143-
{{#authMethods}}### {{name}}
142+
{{^authMethods}}Endpoints do not require authorization.{{/authMethods}}
143+
{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}}
144+
{{#authMethods}}
145+
<a id="{{name}}"></a>
146+
### {{name}}
144147

145148
{{#isApiKey}}- **Type**: API key
146149
- **API key parameter name**: {{keyParamName}}

modules/openapi-generator/src/main/resources/scala-httpclient/README.mustache

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,14 @@ Class | Method | HTTP request | Description
8181
{{#models}}{{#model}} - [{{classname}}]({{modelDocPath}}{{classname}}.md)
8282
{{/model}}{{/models}}
8383

84+
<a id="documentation-for-authorization"></a>
8485
## Documentation for Authorization
8586

86-
{{^authMethods}}All endpoints do not require authorization.
87-
{{/authMethods}}Authentication schemes defined for the API:
88-
{{#authMethods}}### {{name}}
87+
{{^authMethods}}Endpoints do not require authorization.{{/authMethods}}
88+
{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}}
89+
{{#authMethods}}
90+
<a id="{{name}}"></a>
91+
### {{name}}
8992

9093
{{#isApiKey}}- **Type**: API key
9194
- **API key parameter name**: {{keyParamName}}

modules/openapi-generator/src/main/resources/scala-sttp/README.mustache

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,14 @@ Class | Method | HTTP request | Description
7979
{{#models}}{{#model}} - [{{classname}}]({{modelDocPath}}{{classname}}.md)
8080
{{/model}}{{/models}}
8181

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

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

8891
{{#isApiKey}}- **Type**: API key
8992
- **API key parameter name**: {{keyParamName}}

samples/client/petstore/scala-akka/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,19 @@ Class | Method | HTTP request | Description
144144
- [User](docs/User.md)
145145

146146

147+
<a id="documentation-for-authorization"></a>
147148
## Documentation for Authorization
148149

150+
149151
Authentication schemes defined for the API:
152+
<a id="api_key"></a>
150153
### api_key
151154

152155
- **Type**: API key
153156
- **API key parameter name**: api_key
154157
- **Location**: HTTP header
155158

159+
<a id="auth_cookie"></a>
156160
### auth_cookie
157161

158162
- **Type**: API key

samples/client/petstore/scala-sttp/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,12 @@ Class | Method | HTTP request | Description
9898
- [User](User.md)
9999

100100

101+
<a id="documentation-for-authorization"></a>
101102
## Documentation for Authorization
102103

104+
103105
Authentication schemes defined for the API:
106+
<a id="api_key"></a>
104107
### api_key
105108

106109
- **Type**: API key

0 commit comments

Comments
 (0)