-
Notifications
You must be signed in to change notification settings - Fork 55
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
0.22.2 fails to validate *bool false (!) #158
Comments
same error happens when number-typed fields have 0 value. |
Same error for me with required int64. |
#152 I assume, there should be a hotfix ASAP |
You can use the old version for that. - in: body
name: body
required: true you set |
Sorry, that the same if I told you, that you can fork this repo for your purposes) This package is used in go-swagger package, which generates API components based on swagger spec and frequently used in microservices. In go-swagger, Currently, this issue brokes "required" mechanism at all, cause pointer to 0 is now invalid. So your modification doesn't allow to use null values of primitive types as required parameters. For example, we have The same applies to boolean pointers (which is totally strange), which means all |
Ok. I agree that. Let's revert. |
Correct. But required means a value must be present and can be either I agree this better be reverted. |
fixed by reverting this commit in v0.22.3 |
With the swagger spec:
It apparently expects a
true
for the required fields (not quite sure). With 0.22.1 it would accept this request:With 0.22.2 the validation fails:
I strongly suspect this change to
values.go
/Required()
is the culprit: 348543cThe text was updated successfully, but these errors were encountered: