-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scrooge: support validations on nested fields that are struct, union,…
… and exception Problem The nested validations was not working as expected. The expected behavior when passing `invalidNestedRequest` to `methodPerEndPointClient.validateNestedRequest` is to throw `TApplicationException` but we get nothing instead. This was because we look for validation annotations on nestedStructs themselves instead of inspecting deeper in the struct. Solution Run validation checks recursively so that If nested fields are passed and their fields are defined with validations annotations, we validate the nestedRequest and return the expected violations. JIRA Issues: CSL-12029 Differential Revision: https://phabricator.twitter.biz/D911262
- Loading branch information
Showing
5 changed files
with
86 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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