Skip to content

Correct the Resource shape properties Type entry#1415

Merged
kstich merged 3 commits intosmithy-lang:mainfrom
pcolby:main
Nov 14, 2022
Merged

Correct the Resource shape properties Type entry#1415
kstich merged 3 commits intosmithy-lang:mainfrom
pcolby:main

Conversation

@pcolby
Copy link
Copy Markdown
Contributor

@pcolby pcolby commented Sep 19, 2022

Issue #, if available:

Description of changes:

Prior to this change, the docs incorrectly lists the (JSON AST) Resource shape Type as "AST shape reference", but as per the Description column, and the Model docs for Resource Properties, as well as the Introducing Smithy IDL 2.0 blog post, this Type should be a map of strings to shape ID.

ie the following blue-highlighted cell is incorrect:

image

This PR changes it to Map<String, shape ID>, which matches the Model description and AWS blog post examples.

There's also two other very minor grammar corrections including (dropping two instances of of).

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Cheers.

Prior to this change, the docs incorrectly list the Type as
"AST shape reference", but as per the Description column, and the
Model (not AST) docs, as well as the Introducing Smithy IDL 2.0
blog post, this Type should be a map of strings to shape ID.

See:
* https://awslabs.github.io/smithy/2.0/spec/service-types.html#resource
* https://awslabs.github.io/smithy/2.0/spec/json-ast.html#resource-shape
* https://aws.amazon.com/blogs/developer/introducing-smithy-idl-2-0/
@pcolby pcolby requested a review from a team as a code owner September 19, 2022 23:59
pcolby added a commit to pcolby/smithy-qt that referenced this pull request Sep 20, 2022
The AWS docs are wrong; see
smithy-lang/smithy#1415

And tweak the typedef's
- Defines identifier names and shape IDs used to identify the resource.
* - :ref:`properties <resource-properties>`
- :ref:`AST shape reference <ast-shape-reference>`
- Map<String, :ref:`shape ID <shape-id>`>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be a map of AST shape references instead like identifiers, as can be seen here.

Map<String, :ref:`AST shape reference <ast-shape-reference>`>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks @kstich, seeing that example helps, since the use of ref-to-id indirection is not present in the IDL (its an AST-specific concept). I'll update the PR accordingly :)

It should be a map of AST shape references, as per
#1415 (comment)
pcolby added a commit to pcolby/smithy-qt that referenced this pull request Nov 12, 2022
ie use a map of strings to shape-references, rather than a map of
strings to shape IDs, as per
smithy-lang/smithy#1415 (comment)
@pcolby pcolby requested a review from kstich November 12, 2022 13:02
@kstich kstich merged commit c6ed7ae into smithy-lang:main Nov 14, 2022
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.

3 participants