Correct the Resource shape properties Type entry#1415
Merged
kstich merged 3 commits intosmithy-lang:mainfrom Nov 14, 2022
pcolby:main
Merged
Correct the Resource shape properties Type entry#1415kstich merged 3 commits intosmithy-lang:mainfrom pcolby:main
kstich merged 3 commits intosmithy-lang:mainfrom
pcolby:main
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/
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
AndrewFossAWS
approved these changes
Nov 9, 2022
kstich
requested changes
Nov 10, 2022
docs/source-2.0/spec/json-ast.rst
Outdated
| - 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>`> |
Contributor
There was a problem hiding this comment.
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>`>
Contributor
Author
There was a problem hiding this comment.
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)
kstich
approved these changes
Nov 14, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.