You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MemberShouldReferenceResource: This member appears to reference the following resources without being included in a `@references` trait: [`my.service#Message`]
We can clearly see that CreateMessageOutput is referencing Message, but the member which the validator is complaining about appears in the identifiers section not the properties section of the resource. It appears the validator does not consider the resource's identifiers in its checks. I would expect this to be completely a valid structure since correct code is generated and the correct type is deduced for CreateMessageOutput.id from this model code. This seems like a false positive and it is extremely clunky to have this code below which references Message twice to get this warning to disappear:
@references([
{
// Needed for ID reference
resource: Message
}
])
structure CreateMessageOutput for Message {
$id
$message
}
The text was updated successfully, but these errors were encountered:
In the case of a simple model like below
Smithy validators report this warning:
We can clearly see that
CreateMessageOutput
is referencingMessage
, but the member which the validator is complaining about appears in theidentifiers
section not theproperties
section of the resource. It appears the validator does not consider the resource's identifiers in its checks. I would expect this to be completely a valid structure since correct code is generated and the correct type is deduced forCreateMessageOutput.id
from this model code. This seems like a false positive and it is extremely clunky to have this code below which referencesMessage
twice to get this warning to disappear:The text was updated successfully, but these errors were encountered: