-
Notifications
You must be signed in to change notification settings - Fork 221
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
Add documentationIdentifier value to aws.api#service trait #1863
Conversation
Add documentationIdentifier value to aws.api#service trait. This value is used to implement linking between service and sdk documentation for AWS services.
documentationIdentifier seems like it could be made shorter - docId? |
* @param target the ShapeId targeted by the trait. | ||
* @return Returns the builder. | ||
*/ | ||
public Builder target(ShapeId target) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will always be overwritten
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not if I build the object without passing a ShapeId
to the builder, such as serviceTrait.toBuilder().build()
. I can make it private though (:
smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/ServiceTrait.java
Outdated
Show resolved
Hide resolved
.. _service-doc-id: | ||
|
||
``docId`` | ||
=========================== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Header line should match the length of the header string.
.. _service-doc-id: | ||
|
||
``docId`` | ||
=========================== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Header line should match the length of the header string.
* @return Returns the documentation identifier value for the service name. | ||
*/ | ||
public String getDocId(Model model) { | ||
return getDocId().orElse(buildDefaultDocId(model)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: This should use orElseGet
with a Supplier that returns the value currently place. Otherwise, the buildDefaultDocId
method is called even when getDocId()
has a value.
Add docId property to aws.api#service trait. This value is used to implement linking between service and sdk documentation for AWS services.
Add docId property to aws.api#service trait. This value is used to implement linking between service and sdk documentation for AWS services.
Description of changes: Add documentationIdentifier value to aws.api#service trait. This value is used to implement linking between service and sdk documentation for AWS services.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.