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
scrooge-generator: Make Field class annotation flag always consistent; make sure we don't miss custom validations
Problem:
--------
Scrooge AST `Field.hasValidationAnnotation` can be set independently of
`Field.fieldAnnotations`, creating instances in inconsistent state.
Further, it will miss custom annotations unless we enforce that custom
annotations also must have the `validation.` prefix.
Solution:
---------
Make `Field.hasValidationAnnotation` a computed field that is always
consistent with the value in `Field.fieldAnnotations`. Enforce that custom
annotations must start with the `validation.` prefix.
JIRA Issues: CSL-12123
Differential Revision: https://phabricator.twitter.biz/D912077
0 commit comments