-
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
Correct the Resource shape properties Type entry #1415
Conversation
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/
The AWS docs are wrong; see smithy-lang/smithy#1415 And tweak the typedef's
docs/source-2.0/spec/json-ast.rst
Outdated
@@ -496,7 +496,7 @@ shapes defined in JSON support the same properties as the Smithy IDL. | |||
- Map<String, :ref:`AST shape reference <ast-shape-reference>`> | |||
- 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>`> |
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 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>`>
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.
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)
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)
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:
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.