Improve member not targeting a property error message to better hint at fix #1501
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:
When a resource properties block is present in a resource shape, all members of instance operations must be an identifier, property, or somehow marked as
@notProperty
. Implicit identifier bindings are formed through indirect requirements (name, target shape match, required) but the modeler may miss any of them -- likely the@required
trait, especially when using target elision syntax. The validator for properties uses the identifier binding index as a filter, however this binding index won't see an intended ID as such if it's missing the @required trait as clearly as the modeler does and leads to an error message that may be confusing in isolation. This change attempts to orient a modeler correctly to more correctly understand what possible mistakes were made.Note: given the scenario mentioned, core validation will also produce another error at the same time:
Whether the intend for the member to be an identifier or property, or neither at all is ambiguous. Elision syntax makes it clear to the modeler, but the validator has no visibility there. A further improvement might be to suppress the property error if the identifier error is observed.
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.