Skip to content

Fix javadocs links - consumer request objects #4310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 16, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,15 @@ final void emitRequestParm(DocumentationBuilder docBuilder) {
String parameterDocs = stripHtmlTags(opModel.getInput().getDocumentation());

if (config.isConsumerBuilder()) {

String inputShapeName = opModel.getInputShape().getC2jName();
if (inputShapeName.endsWith("Input")) {
inputShapeName = inputShapeName.replaceAll("Input$", "Request");
}

docBuilder.param(opModel.getInput().getVariableName(),
"A {@link Consumer} that will call methods on {@link %s.Builder} to create a request. %s",
opModel.getInputShape().getC2jName(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we put the fully qualified name here instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call, much simpler!

Copy link
Contributor

@dagnir dagnir Aug 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I meant the FQCN of the class; so for example software.amazon.awssdk.s3.GetObject or something like that. You should be able to use something like

public ClassName getModelClass(String className) {
return ClassName.get(model.getMetadata().getFullModelPackageName(), className);
}
to do that (You'll need to get a reference to IntermediateModel)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotchu, updated to use fqcn

inputShapeName,
parameterDocs);
} else {
docBuilder.param(opModel.getInput().getVariableName(), parameterDocs);
Expand Down