Skip to content
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

Merged
merged 8 commits into from
Jul 20, 2023

Conversation

jvschneid
Copy link
Contributor

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.

Add documentationIdentifier value to aws.api#service trait.
This value is used to implement linking between service and sdk
documentation for AWS services.
@mtdowling
Copy link
Member

documentationIdentifier seems like it could be made shorter - docId?

@jvschneid jvschneid marked this pull request as ready for review July 19, 2023 12:30
@jvschneid jvschneid requested a review from a team as a code owner July 19, 2023 12:30
docs/source-1.0/spec/aws/aws-core.rst Outdated Show resolved Hide resolved
docs/source-2.0/aws/aws-core.rst Outdated Show resolved Hide resolved
* @param target the ShapeId targeted by the trait.
* @return Returns the builder.
*/
public Builder target(ShapeId target) {
Copy link
Contributor

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

Copy link
Contributor Author

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 (:

@jvschneid jvschneid merged commit 02ee935 into smithy-lang:main Jul 20, 2023
@jvschneid jvschneid deleted the update-service-trait branch July 20, 2023 16:58
.. _service-doc-id:

``docId``
===========================
Copy link
Contributor

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``
===========================
Copy link
Contributor

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));
Copy link
Contributor

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.

syall pushed a commit to Xtansia/smithy that referenced this pull request Aug 11, 2023
Add docId property to aws.api#service trait. This value is 
used to implement linking between service and sdk
documentation for AWS services.
alextwoods pushed a commit to alextwoods/smithy that referenced this pull request Sep 15, 2023
Add docId property to aws.api#service trait. This value is 
used to implement linking between service and sdk
documentation for AWS services.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants