Skip to content

Property validation of mutable objects which use composition after instantiation #6

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

Closed
wol-soft opened this issue Jun 19, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@wol-soft
Copy link
Owner

Problem

Objects which inherit properties from compositions validate correctly during object instantiation. If the object is generated with setters the setters don't perform validations according to the composition rules.

Expected behaviour

  • Simple validations on properties inherited from compositions (eg. string length checks) are performed when calling a setter
  • If the model, as a result of the changed internal state, violates the composition rule (eg. an allOf composition is violated as the string property now doesn't match the length constraint and thus at least one of the composition elements fails) an exception will be thrown.
@wol-soft wol-soft added the bug Something isn't working label Jun 19, 2020
@wol-soft
Copy link
Owner Author

Fixed with version 0.19.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant