-
Notifications
You must be signed in to change notification settings - Fork 1
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
Marshmallow Based Event Schema Validation #40
Conversation
I really like it, plain and simple.
👍 This way we'd keep
Looks cool. I wonder if we can combine two things, though - event definition and mutator. This, however, can be done in a next step.
Sure, we can extend that in future but I'm not sure if that would be needed at all. Data is all we should care for now. |
Please see the proposal. |
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.
I like it! I have only one request
cq/aggregates.py
Outdated
result = schema.load(event_data) | ||
if result.errors: | ||
msg = "Error validatng %s.%s event. Details: %s." % (cls.get_name(), event_name, result.errors) | ||
raise SchemaValidationError(msg) |
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.
please propagate errors in a raised exception instance
@piotrekno1 exactly, thanks :) |
Coversation of the discussion started in: #21
I know that for now this looks super ugly but wanted to get your feedback on:
Repository
class.Things that needs to be changed if we agree on the points above:
schema.py
?).