-
Notifications
You must be signed in to change notification settings - Fork 34
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
Validating request payload client side #51
Comments
I don't think it is doing the validations on the client side for requests or responses, though it certainly could. I would tend to agree that this would be really useful, but would probably be a good thing to have configurable (so you could run it in dev/test/staging but maybe not prod). |
So, I'm looking at these two files:
Looks like that is exactly logic that is needed to make these validations. But it is in Do you think it is a valid point to extract this logic somewhere else and re-use it here and in |
Yeah, we've talked about stuff like that a bit. A good home for it might actually be: https://github.com/brandur/json_schema |
Those links are no longer valid, I found this in committee: I don't see a huge perf benefit of blocking requests before they reach the server if they don't meet the json schema requirement. Maybe some sort of a debug or lint mode would be interesting. This issue has been open for 5 years with no movement, let's close it. If there's a very compelling future reason then we can open a new issue or re-open this one. |
I can't see if it is possible. For sure in default generated client wrong request payloads actually reach the server.
Since client already has the whole schema, it should be possible to verify request payload to fallback faster.
Probably one wouldn't want to run this validation in production (to not waste resources on checking schema on both sides: client and server).
Another question: Does client validate responses from server?
The text was updated successfully, but these errors were encountered: