Skip to content

Commit 8a6c708

Browse files
authored
[Java] Cleanup documentation (#15300)
* [Java] fix documentation of API authorization in README files fix hierarchy level + add internal links + align wording across generators * [Java] fix anchor links in documentation
1 parent f9937e7 commit 8a6c708

99 files changed

Lines changed: 527 additions & 347 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

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

200+
<a id="documentation-for-authorization"></a>
200201
## Documentation for Authorization
201202

202-
{{^authMethods}}All endpoints do not require authorization.
203-
{{/authMethods}}Authentication schemes defined for the API:
204-
{{#authMethods}}### {{name}}
203+
{{^authMethods}}Endpoints do not require authorization.{{/authMethods}}
204+
{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}}
205+
{{#authMethods}}
206+
<a id="{{name}}"></a>
207+
### {{name}}
205208

206209
{{#isApiKey}}
207210

modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/README.mustache

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

161+
<a id="documentation-for-authorization"></a>
161162
## Documentation for Authorization
162163

163-
{{^authMethods}}All endpoints do not require authorization.
164-
{{/authMethods}}Authentication schemes defined for the API:
165-
{{#authMethods}}### {{name}}
164+
{{^authMethods}}Endpoints do not require authorization.{{/authMethods}}
165+
{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}}
166+
{{#authMethods}}
167+
<a id="{{name}}"></a>
168+
### {{name}}
166169

167170
{{#isApiKey}}
168171

modules/openapi-generator/src/main/resources/Java/libraries/native/README.mustache

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

142+
<a id="documentation-for-authorization"></a>
142143
## Documentation for Authorization
143144

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

148151
{{#isApiKey}}
149152

modules/openapi-generator/src/main/resources/Java/libraries/native/api_doc.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ public class Example {
266266
{{/responses.0}}
267267
{{#vendorExtensions.x-group-parameters}}{{#hasParams}}
268268

269-
<a name="API{{operationId}}Request"></a>
269+
<a id="API{{operationId}}Request"></a>
270270
## API{{operationId}}Request
271271
### Properties
272272
{{#allParams}}{{#-last}}

modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/README.mustache

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

158+
<a id="documentation-for-authorization"></a>
158159
## Documentation for Authorization
159160

160-
{{^authMethods}}All endpoints do not require authorization.
161-
{{/authMethods}}Authentication schemes defined for the API:
162-
{{#authMethods}}### {{name}}
161+
{{^authMethods}}Endpoints do not require authorization.{{/authMethods}}
162+
{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}}
163+
{{#authMethods}}
164+
<a id="{{name}}"></a>
165+
### {{name}}
163166

164167
{{#isApiKey}}- **Type**: API key
165168
- **API key parameter name**: {{keyParamName}}

modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_doc.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ All URIs are relative to *{{basePath}}*
1010

1111
{{#operations}}
1212
{{#operation}}
13-
<a name="{{operationId}}"></a>
13+
<a id="{{operationId}}"></a>
1414
# **{{operationId}}**{{^vendorExtensions.x-group-parameters}}
1515
> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}
1616
> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}}.{{paramName}}({{paramName}}){{/optionalParams}}.execute();{{/vendorExtensions.x-group-parameters}}

modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api_doc.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ All URIs are relative to *{{basePath}}*
1010

1111
{{#operations}}
1212
{{#operation}}
13-
<a name="{{operationId}}"></a>
13+
<a id="{{operationId}}"></a>
1414
# **{{operationId}}**
1515
> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})
1616

modules/openapi-generator/src/main/resources/java-micronaut/client/doc/api_doc.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ More information can be found inside [Inversion of Control guide section](https:
3838

3939
{{#operations}}
4040
{{#operation}}
41-
<a name="{{operationId}}"></a>
41+
<a id="{{operationId}}"></a>
4242
# **{{operationId}}**
4343
```java
4444
{{#returnType}}Mono<{{{returnType}}}>{{/returnType}}{{^returnType}}Mono<Void>{{/returnType}} {{classname}}.{{nickname}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}})

modules/openapi-generator/src/main/resources/java-micronaut/client/doc/auth.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Authorization methods
22
{{#authMethods}}
3-
<a name="name"></a>
3+
<a id="name"></a>
44
# {{name}}
55
{{!
66
basic auth

modules/openapi-generator/src/main/resources/java-micronaut/server/doc/controller_doc.mustache

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

1616
{{#operations}}
1717
{{#operation}}
18-
<a name="{{operationId}}"></a>
18+
<a id="{{operationId}}"></a>
1919
# **{{operationId}}**
2020
```java
2121
{{#returnType}}Mono<{{{returnType}}}>{{/returnType}}{{^returnType}}Mono<Object>{{/returnType}} {{classname}}.{{nickname}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}})

0 commit comments

Comments
 (0)