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

Provide decorator for validating json schema request/response payloads #507

Closed
vangheem opened this issue May 24, 2019 · 1 comment
Assignees
Milestone

Comments

@vangheem
Copy link
Member

@vangheem vangheem commented May 24, 2019

Once we have everything properly defined with json schema, provide a decorator to automatically validate request(and maybe response) payloads.

Right now, you can do something like this:

from guillotina.utils import get_schema_validator
validator = get_schema_validator('MyType')
validator.validate(await request.json())

and it works; however, let's make a decorator to able to do this automatically for what is defined on an endpoint.

@vangheem vangheem added this to the GSOC Phase 2 milestone May 24, 2019
@vangheem

This comment has been minimized.

Copy link
Member Author

@vangheem vangheem commented Aug 3, 2019

ref: #544

Closing. Will open another for response body

@vangheem vangheem closed this Aug 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.