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

Deserialize json when not include required field only gives error when the field is specified as null #914

Open
williamwyc opened this issue Feb 1, 2024 · 0 comments

Comments

@williamwyc
Copy link

I was looking into the change in this PR #861 , and I found that, it only throws error when you specify a required field in json with value null.
Let's say I have a DTO with field A as required, if i send json {"A":null}, it throws error as expected, but if I send json {}, which does not include our required field A, it does not throw error.
Should we throw error for both cases since the field is required?

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

No branches or pull requests

1 participant