Skip to content

Commit a64f896

Browse files
authored
Fix javadocs links - consumer request objects (#4310)
* Fix javadocs links - consumer request objects * Use getShapeName instead of getC2jName * Use fully qualified name * Update codegen test classes
1 parent 679bee4 commit a64f896

File tree

3 files changed

+95
-50
lines changed

3 files changed

+95
-50
lines changed

codegen/src/main/java/software/amazon/awssdk/codegen/docs/OperationDocProvider.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import static software.amazon.awssdk.codegen.internal.DocumentationUtils.createLinkToServiceDocumentation;
1919
import static software.amazon.awssdk.codegen.internal.DocumentationUtils.stripHtmlTags;
2020

21+
import com.squareup.javapoet.ClassName;
2122
import java.util.Collections;
2223
import java.util.List;
2324
import java.util.stream.Collectors;
@@ -171,10 +172,13 @@ final List<Pair<String, String>> getThrows() {
171172
final void emitRequestParm(DocumentationBuilder docBuilder) {
172173
String parameterDocs = stripHtmlTags(opModel.getInput().getDocumentation());
173174

175+
String shapeName = opModel.getInputShape().getShapeName();
176+
ClassName fcqn = ClassName.get(model.getMetadata().getFullModelPackageName(), shapeName);
177+
174178
if (config.isConsumerBuilder()) {
175179
docBuilder.param(opModel.getInput().getVariableName(),
176180
"A {@link Consumer} that will call methods on {@link %s.Builder} to create a request. %s",
177-
opModel.getInputShape().getC2jName(),
181+
fcqn.toString(),
178182
parameterDocs);
179183
} else {
180184
docBuilder.param(opModel.getInput().getVariableName(), parameterDocs);

codegen/src/test/resources/software/amazon/awssdk/codegen/poet/client/test-json-async-client-interface.java

Lines changed: 46 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ default CompletableFuture<APostOperationResponse> aPostOperation(APostOperationR
115115
* </p>
116116
*
117117
* @param aPostOperationRequest
118-
* A {@link Consumer} that will call methods on {@link APostOperationRequest.Builder} to create a request.
118+
* A {@link Consumer} that will call methods on
119+
* {@link software.amazon.awssdk.services.json.model.APostOperationRequest.Builder} to create a request.
119120
* @return A Java Future containing the result of the APostOperation operation returned by the service.<br/>
120121
* The CompletableFuture returned by this method can be completed exceptionally with the following
121122
* exceptions.
@@ -179,7 +180,8 @@ default CompletableFuture<APostOperationWithOutputResponse> aPostOperationWithOu
179180
* </p>
180181
*
181182
* @param aPostOperationWithOutputRequest
182-
* A {@link Consumer} that will call methods on {@link APostOperationWithOutputRequest.Builder} to create a
183+
* A {@link Consumer} that will call methods on
184+
* {@link software.amazon.awssdk.services.json.model.APostOperationWithOutputRequest.Builder} to create a
183185
* request.
184186
* @return A Java Future containing the result of the APostOperationWithOutput operation returned by the service.<br/>
185187
* The CompletableFuture returned by this method can be completed exceptionally with the following
@@ -236,8 +238,8 @@ default CompletableFuture<BearerAuthOperationResponse> bearerAuthOperation(
236238
* </p>
237239
*
238240
* @param bearerAuthOperationRequest
239-
* A {@link Consumer} that will call methods on {@link BearerAuthOperationRequest.Builder} to create a
240-
* request.
241+
* A {@link Consumer} that will call methods on
242+
* {@link software.amazon.awssdk.services.json.model.BearerAuthOperationRequest.Builder} to create a request.
241243
* @return A Java Future containing the result of the BearerAuthOperation operation returned by the service.<br/>
242244
* The CompletableFuture returned by this method can be completed exceptionally with the following
243245
* exceptions.
@@ -290,7 +292,8 @@ default CompletableFuture<Void> eventStreamOperation(EventStreamOperationRequest
290292
* </p>
291293
*
292294
* @param eventStreamOperationRequest
293-
* A {@link Consumer} that will call methods on {@link EventStreamOperationRequest.Builder} to create a
295+
* A {@link Consumer} that will call methods on
296+
* {@link software.amazon.awssdk.services.json.model.EventStreamOperationRequest.Builder} to create a
294297
* request.
295298
* @return A Java Future containing the result of the EventStreamOperation operation returned by the service.<br/>
296299
* The CompletableFuture returned by this method can be completed exceptionally with the following
@@ -348,7 +351,8 @@ default CompletableFuture<EventStreamOperationWithOnlyInputResponse> eventStream
348351
* </p>
349352
*
350353
* @param eventStreamOperationWithOnlyInputRequest
351-
* A {@link Consumer} that will call methods on {@link EventStreamOperationWithOnlyInputRequest.Builder} to
354+
* A {@link Consumer} that will call methods on
355+
* {@link software.amazon.awssdk.services.json.model.EventStreamOperationWithOnlyInputRequest.Builder} to
352356
* create a request.
353357
* @return A Java Future containing the result of the EventStreamOperationWithOnlyInput operation returned by the
354358
* service.<br/>
@@ -408,7 +412,8 @@ default CompletableFuture<Void> eventStreamOperationWithOnlyOutput(
408412
* </p>
409413
*
410414
* @param eventStreamOperationWithOnlyOutputRequest
411-
* A {@link Consumer} that will call methods on {@link EventStreamOperationWithOnlyOutputRequest.Builder} to
415+
* A {@link Consumer} that will call methods on
416+
* {@link software.amazon.awssdk.services.json.model.EventStreamOperationWithOnlyOutputRequest.Builder} to
412417
* create a request.
413418
* @return A Java Future containing the result of the EventStreamOperationWithOnlyOutput operation returned by the
414419
* service.<br/>
@@ -466,7 +471,9 @@ default CompletableFuture<GetOperationWithChecksumResponse> getOperationWithChec
466471
* </p>
467472
*
468473
* @param getOperationWithChecksumRequest
469-
* A {@link Consumer} that will call methods on {@link ChecksumStructure.Builder} to create a request.
474+
* A {@link Consumer} that will call methods on
475+
* {@link software.amazon.awssdk.services.json.model.GetOperationWithChecksumRequest.Builder} to create a
476+
* request.
470477
* @return A Java Future containing the result of the GetOperationWithChecksum operation returned by the service.<br/>
471478
* The CompletableFuture returned by this method can be completed exceptionally with the following
472479
* exceptions.
@@ -527,7 +534,8 @@ default CompletableFuture<GetWithoutRequiredMembersResponse> getWithoutRequiredM
527534
* </p>
528535
*
529536
* @param getWithoutRequiredMembersRequest
530-
* A {@link Consumer} that will call methods on {@link GetWithoutRequiredMembersRequest.Builder} to create a
537+
* A {@link Consumer} that will call methods on
538+
* {@link software.amazon.awssdk.services.json.model.GetWithoutRequiredMembersRequest.Builder} to create a
531539
* request.
532540
* @return A Java Future containing the result of the GetWithoutRequiredMembers operation returned by the service.<br/>
533541
* The CompletableFuture returned by this method can be completed exceptionally with the following
@@ -585,8 +593,9 @@ default CompletableFuture<OperationWithChecksumRequiredResponse> operationWithCh
585593
* </p>
586594
*
587595
* @param operationWithChecksumRequiredRequest
588-
* A {@link Consumer} that will call methods on {@link OperationWithChecksumRequiredRequest.Builder} to
589-
* create a request.
596+
* A {@link Consumer} that will call methods on
597+
* {@link software.amazon.awssdk.services.json.model.OperationWithChecksumRequiredRequest.Builder} to create
598+
* a request.
590599
* @return A Java Future containing the result of the OperationWithChecksumRequired operation returned by the
591600
* service.<br/>
592601
* The CompletableFuture returned by this method can be completed exceptionally with the following
@@ -642,7 +651,8 @@ default CompletableFuture<PaginatedOperationWithResultKeyResponse> paginatedOper
642651
* </p>
643652
*
644653
* @param paginatedOperationWithResultKeyRequest
645-
* A {@link Consumer} that will call methods on {@link PaginatedOperationWithResultKeyRequest.Builder} to
654+
* A {@link Consumer} that will call methods on
655+
* {@link software.amazon.awssdk.services.json.model.PaginatedOperationWithResultKeyRequest.Builder} to
646656
* create a request.
647657
* @return A Java Future containing the result of the PaginatedOperationWithResultKey operation returned by the
648658
* service.<br/>
@@ -902,7 +912,8 @@ default PaginatedOperationWithResultKeyPublisher paginatedOperationWithResultKey
902912
* </p>
903913
*
904914
* @param paginatedOperationWithResultKeyRequest
905-
* A {@link Consumer} that will call methods on {@link PaginatedOperationWithResultKeyRequest.Builder} to
915+
* A {@link Consumer} that will call methods on
916+
* {@link software.amazon.awssdk.services.json.model.PaginatedOperationWithResultKeyRequest.Builder} to
906917
* create a request.
907918
* @return A custom publisher that can be subscribed to request a stream of response pages.<br/>
908919
* The CompletableFuture returned by this method can be completed exceptionally with the following
@@ -958,7 +969,8 @@ default CompletableFuture<PaginatedOperationWithoutResultKeyResponse> paginatedO
958969
* </p>
959970
*
960971
* @param paginatedOperationWithoutResultKeyRequest
961-
* A {@link Consumer} that will call methods on {@link PaginatedOperationWithoutResultKeyRequest.Builder} to
972+
* A {@link Consumer} that will call methods on
973+
* {@link software.amazon.awssdk.services.json.model.PaginatedOperationWithoutResultKeyRequest.Builder} to
962974
* create a request.
963975
* @return A Java Future containing the result of the PaginatedOperationWithoutResultKey operation returned by the
964976
* service.<br/>
@@ -1120,7 +1132,8 @@ default PaginatedOperationWithoutResultKeyPublisher paginatedOperationWithoutRes
11201132
* </p>
11211133
*
11221134
* @param paginatedOperationWithoutResultKeyRequest
1123-
* A {@link Consumer} that will call methods on {@link PaginatedOperationWithoutResultKeyRequest.Builder} to
1135+
* A {@link Consumer} that will call methods on
1136+
* {@link software.amazon.awssdk.services.json.model.PaginatedOperationWithoutResultKeyRequest.Builder} to
11241137
* create a request.
11251138
* @return A custom publisher that can be subscribed to request a stream of response pages.<br/>
11261139
* The CompletableFuture returned by this method can be completed exceptionally with the following
@@ -1194,7 +1207,8 @@ default <ReturnT> CompletableFuture<ReturnT> putOperationWithChecksum(
11941207
* </p>
11951208
*
11961209
* @param putOperationWithChecksumRequest
1197-
* A {@link Consumer} that will call methods on {@link ChecksumStructureWithStreaming.Builder} to create a
1210+
* A {@link Consumer} that will call methods on
1211+
* {@link software.amazon.awssdk.services.json.model.PutOperationWithChecksumRequest.Builder} to create a
11981212
* request.
11991213
* @param requestBody
12001214
* Functional interface that can be implemented to produce the request content in a non-blocking manner. The
@@ -1286,7 +1300,8 @@ default CompletableFuture<PutOperationWithChecksumResponse> putOperationWithChec
12861300
* </p>
12871301
*
12881302
* @param putOperationWithChecksumRequest
1289-
* A {@link Consumer} that will call methods on {@link ChecksumStructureWithStreaming.Builder} to create a
1303+
* A {@link Consumer} that will call methods on
1304+
* {@link software.amazon.awssdk.services.json.model.PutOperationWithChecksumRequest.Builder} to create a
12901305
* request.
12911306
* @param sourcePath
12921307
* {@link Path} to file containing data to send to the service. File will be read entirely and may be read
@@ -1364,7 +1379,8 @@ default CompletableFuture<StreamingInputOperationResponse> streamingInputOperati
13641379
* </p>
13651380
*
13661381
* @param streamingInputOperationRequest
1367-
* A {@link Consumer} that will call methods on {@link StructureWithStreamingMember.Builder} to create a
1382+
* A {@link Consumer} that will call methods on
1383+
* {@link software.amazon.awssdk.services.json.model.StreamingInputOperationRequest.Builder} to create a
13681384
* request.
13691385
* @param requestBody
13701386
* Functional interface that can be implemented to produce the request content in a non-blocking manner. The
@@ -1429,7 +1445,8 @@ default CompletableFuture<StreamingInputOperationResponse> streamingInputOperati
14291445
* </p>
14301446
*
14311447
* @param streamingInputOperationRequest
1432-
* A {@link Consumer} that will call methods on {@link StructureWithStreamingMember.Builder} to create a
1448+
* A {@link Consumer} that will call methods on
1449+
* {@link software.amazon.awssdk.services.json.model.StreamingInputOperationRequest.Builder} to create a
14331450
* request.
14341451
* @param sourcePath
14351452
* {@link Path} to file containing data to send to the service. File will be read entirely and may be read
@@ -1500,8 +1517,9 @@ default <ReturnT> CompletableFuture<ReturnT> streamingInputOutputOperation(
15001517
* </p>
15011518
*
15021519
* @param streamingInputOutputOperationRequest
1503-
* A {@link Consumer} that will call methods on {@link StructureWithStreamingMember.Builder} to create a
1504-
* request.
1520+
* A {@link Consumer} that will call methods on
1521+
* {@link software.amazon.awssdk.services.json.model.StreamingInputOutputOperationRequest.Builder} to create
1522+
* a request.
15051523
* @param requestBody
15061524
* Functional interface that can be implemented to produce the request content in a non-blocking manner. The
15071525
* size of the content is expected to be known up front. See {@link AsyncRequestBody} for specific details on
@@ -1578,8 +1596,9 @@ default CompletableFuture<StreamingInputOutputOperationResponse> streamingInputO
15781596
* </p>
15791597
*
15801598
* @param streamingInputOutputOperationRequest
1581-
* A {@link Consumer} that will call methods on {@link StructureWithStreamingMember.Builder} to create a
1582-
* request.
1599+
* A {@link Consumer} that will call methods on
1600+
* {@link software.amazon.awssdk.services.json.model.StreamingInputOutputOperationRequest.Builder} to create
1601+
* a request.
15831602
* @param sourcePath
15841603
* {@link Path} to file containing data to send to the service. File will be read entirely and may be read
15851604
* multiple times in the event of a retry. If the file does not exist or the current user does not have
@@ -1650,7 +1669,8 @@ default <ReturnT> CompletableFuture<ReturnT> streamingOutputOperation(
16501669
* </p>
16511670
*
16521671
* @param streamingOutputOperationRequest
1653-
* A {@link Consumer} that will call methods on {@link StreamingOutputOperationRequest.Builder} to create a
1672+
* A {@link Consumer} that will call methods on
1673+
* {@link software.amazon.awssdk.services.json.model.StreamingOutputOperationRequest.Builder} to create a
16541674
* request.
16551675
* @param asyncResponseTransformer
16561676
* The response transformer for processing the streaming response in a non-blocking manner. See
@@ -1715,7 +1735,8 @@ default CompletableFuture<StreamingOutputOperationResponse> streamingOutputOpera
17151735
* </p>
17161736
*
17171737
* @param streamingOutputOperationRequest
1718-
* A {@link Consumer} that will call methods on {@link StreamingOutputOperationRequest.Builder} to create a
1738+
* A {@link Consumer} that will call methods on
1739+
* {@link software.amazon.awssdk.services.json.model.StreamingOutputOperationRequest.Builder} to create a
17191740
* request.
17201741
* @param destinationPath
17211742
* {@link Path} to file that response contents will be written to. The file must not exist or this method

0 commit comments

Comments
 (0)