Skip to content

Consider removing marshmallow mixin from pony entities #4

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

Open
xakiy opened this issue Feb 11, 2020 · 0 comments
Open

Consider removing marshmallow mixin from pony entities #4

xakiy opened this issue Feb 11, 2020 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@xakiy
Copy link
Owner

xakiy commented Feb 11, 2020

Consider removing marshmallow mixin from pony entities, and instead use pony own argument selector e.g. to_dict(exclude={'attr1', 'attr2']) or to_dict(only=['attr3', 'attr4']).

Currently we sanitize user input using marshmallow schema via mixin to pony entity. It need not be actually, because we can incorporate simple schema inside pony model. Thus making entity definition also contains json schema and validate user input by utilizing built-in before_insert method.

@xakiy xakiy added the enhancement New feature or request label Feb 11, 2020
@xakiy xakiy added this to the Version 1.0.0 milestone Feb 11, 2020
@xakiy xakiy changed the title Consider removing mixin from entities, and use pony own to_dict(exclude={'attr1', 'attr2']) or to_dict(only=['attr3', 'attr4']) Consider removing marshmallow mixin from pony entities, and instead use pony own argument selector e.g. to_dict(exclude={'attr1', 'attr2']) or to_dict(only=['attr3', 'attr4']) Feb 11, 2020
@xakiy xakiy changed the title Consider removing marshmallow mixin from pony entities, and instead use pony own argument selector e.g. to_dict(exclude={'attr1', 'attr2']) or to_dict(only=['attr3', 'attr4']) Consider removing marshmallow mixin from pony entities Feb 11, 2020
@xakiy xakiy modified the milestones: Version 1.0.0, Version 2.0.0 Mar 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant