Fix incorrect links for operation input / output members in docgen#2922
Fix incorrect links for operation input / output members in docgen#2922
Conversation
|
This pull request does not contain a staged changelog entry. To create one, use the Make sure that the description is appropriate for a changelog entry and that the proper feature type is used. See |
...hy-docgen/src/test/java/software/amazon/smithy/docgen/generators/OperationGeneratorTest.java
Outdated
Show resolved
Hide resolved
…rators/OperationGeneratorTest.java Co-authored-by: Kevin Stich <kevin@kstich.com>
| builder.definitionFile(getDefinitionFile(serviceShape, operation)); | ||
| builder.putProperty(OPERATION_PROPERTY, operation); | ||
| // Input and output structures should use the operation as its link_id | ||
| builder.putProperty(LINK_ID_PROPERTY, getLinkId(getShapeName(serviceShape, operation))); |
There was a problem hiding this comment.
They should have a -request-members or -response-members suffix, since those targets are getting generated already. That should probably be shortened to -input and -output but it's not critical.
There was a problem hiding this comment.
Added -request-members and -response-members suffix, it would require more changes in MemberGenerator to align with the shortened suffix
JordonPhillips
left a comment
There was a problem hiding this comment.
This is better since we're going to the right page now, but I wonder if the links still work
Background
Current Smithy Docgen generated incorrect links for operation input / output members.
For example:
The generated link for paginated trait's token would be something like:
./../shapes/PaginatedOperationInput.md#paginatedoperationinput-nexttoken. This is incorrect because we do not generate separate files for operation input / output structures.With this fix, Smithy Docgen can produce correct link:
./PaginatedOperation.md#paginatedoperation-nexttokenThis should fix issue #2921
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.