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

bug: JSON schema verification should be performed on the original data submitted by the user #955

Closed
nic-chen opened this issue Dec 2, 2020 · 2 comments · Fixed by #986
Assignees
Labels
backend bug Something isn't working help wanted Extra attention is needed
Milestone

Comments

@nic-chen
Copy link
Member

nic-chen commented Dec 2, 2020

Bug report

Describe the bug

JSON schema verification should be performed on the original data submitted by the user, not the data after binding structures

The usual practice in Go is to bind the request body to a structure for subsequent processing of the request body.

This will cause a problem, that is, if there is no corresponding value in the request body for the fields defined in the structure,
the bound object will automatically be assigned a value of zero.

At this time, there may be problems with json schema verification.

@nic-chen nic-chen added the bug Something isn't working label Dec 2, 2020
@moonming
Copy link
Member

moonming commented Dec 3, 2020

Don't understand what the bug is.
@nic-chen please add more details

@nic-chen
Copy link
Member Author

nic-chen commented Dec 3, 2020

Don't understand what the bug is.
@nic-chen please add more details

updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug Something isn't working help wanted Extra attention is needed
Projects
None yet
3 participants