Skip to content

Commit ef35e6d

Browse files
authored
[rust] fix documentation of API authorization in README files (#15352)
fix hierarchy level + align wording across generators
1 parent 76fd2a2 commit ef35e6d

8 files changed

Lines changed: 16 additions & 13 deletions

File tree

modules/openapi-generator/src/main/resources/rust-server/README.mustache

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ Method | HTTP request | Description
118118
{{/model}}{{/models}}
119119

120120
## Documentation For Authorization
121-
{{^authMethods}} Endpoints do not require authorization.
122-
{{/authMethods}}{{#authMethods}}{{#last}} Authentication schemes defined for the API:{{/last}}{{/authMethods}}
121+
{{^authMethods}}Endpoints do not require authorization.{{/authMethods}}
122+
{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}}
123123
{{#authMethods}}
124-
## {{{name}}}
124+
### {{{name}}}
125125
{{#isApiKey}}- **Type**: API key
126126

127127
Example

samples/server/petstore/rust-server/output/multipart-v3/README.md

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

111111

112112
## Documentation For Authorization
113-
Endpoints do not require authorization.
113+
Endpoints do not require authorization.
114114

115115

116116
## Author

samples/server/petstore/rust-server/output/no-example-v3/README.md

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

104104

105105
## Documentation For Authorization
106-
Endpoints do not require authorization.
106+
Endpoints do not require authorization.
107107

108108

109109
## Author

samples/server/petstore/rust-server/output/openapi-v3/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ Method | HTTP request | Description
184184

185185
## Documentation For Authorization
186186

187-
## authScheme
187+
Authentication schemes defined for the API:
188+
### authScheme
188189
- **Type**: OAuth
189190
- **Flow**: accessCode
190191
- **Authorization URL**: http://example.org

samples/server/petstore/rust-server/output/ops-v3/README.md

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

176176

177177
## Documentation For Authorization
178-
Endpoints do not require authorization.
178+
Endpoints do not require authorization.
179179

180180

181181
## Author

samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ Method | HTTP request | Description
202202

203203
## Documentation For Authorization
204204

205-
## petstore_auth
205+
Authentication schemes defined for the API:
206+
### petstore_auth
206207
- **Type**: OAuth
207208
- **Flow**: implicit
208209
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
@@ -217,19 +218,19 @@ Example
217218
Or via OAuth2 module to automatically refresh tokens and perform user authentication.
218219
```
219220
```
220-
## api_key
221+
### api_key
221222
- **Type**: API key
222223

223224
Example
224225
```
225226
```
226-
## api_key_query
227+
### api_key_query
227228
- **Type**: API key
228229

229230
Example
230231
```
231232
```
232-
## http_basic_test
233+
### http_basic_test
233234
- **Type**: HTTP basic authentication
234235

235236
Example

samples/server/petstore/rust-server/output/ping-bearer-auth/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ Method | HTTP request | Description
104104

105105
## Documentation For Authorization
106106

107-
## bearerAuth
107+
Authentication schemes defined for the API:
108+
### bearerAuth
108109
- **Type**: Bearer token authentication
109110

110111
Example

samples/server/petstore/rust-server/output/rust-server-test/README.md

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

126126

127127
## Documentation For Authorization
128-
Endpoints do not require authorization.
128+
Endpoints do not require authorization.
129129

130130

131131
## Author

0 commit comments

Comments
 (0)