-
Notifications
You must be signed in to change notification settings - Fork 91
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
Remove reflected values from validation message #695
Remove reflected values from validation message #695
Conversation
@@ -170,5 +153,5 @@ export const generateValidationMessage = (failure: ValidationFailure): string => | |||
suffix = "must have unique values"; |
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.
looks like we are missing tests for this case. can you add some?
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.
Added here, and to the protocol tests in smithy-lang/smithy#1622.
path: "/test", | ||
}; | ||
expect(generateValidationMessage(failure)).toEqual( | ||
"Value with repeated values at '/test' failed to satisfy constraint: Member must have unique values" |
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 reads odd. Was ok when it was Value [80, 80] with repeated values at '/test'...
. But now, probably better to say Value at 'test'...
similar to the other messages. Would have to update the protocol tests too.
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.
Ok to merge this now and update when the protocol test is updated.
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.
Ok to merge this now and update when the protocol test is updated.
* Remove reflected values from validation message
This PR updates the
generateValidationMessage
to not return the input value in the validation message.This change will be paired with updated protocol tests: smithy-lang/smithy#1622
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.