Skip to content
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

ActiveModel validations? #81

Open
jaydanielian opened this issue Feb 24, 2018 · 2 comments
Open

ActiveModel validations? #81

jaydanielian opened this issue Feb 24, 2018 · 2 comments
Labels

Comments

@jaydanielian
Copy link

Would be great to have some way to return ActiveModel standard .errors responses when the type checking fails. Plug in to a .valid? call and return the errors collection with fields that were in breach of contract definition.

Would also love to stitch swagger spec output from this as well.

Any thoughts on these ideas? I love the concept of this lib.

@nesaulov
Copy link
Owner

Hey @jaydanielian, thanks for the issue.
As of ActiveModel validations, I don't think that a serializer should keep that logic inside, it's just not its responsibility.
And concerning a documentation output, that's a good idea, I don't think it should depend on swagger or anything, just generating a documentation from a schema will do, I guess. We should give it a thought.

@nulldef
Copy link
Collaborator

nulldef commented Mar 22, 2018

Maybe suggestion about documentation should be in separate issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants