-
-
Notifications
You must be signed in to change notification settings - Fork 438
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
Request Validator Checks readOnly
Properties
#71
Comments
readOnly
PropertiesreadOnly
Properties
The addition of these lines before openapi3/schema.go:1112 solves it for the request, but I'm not sure how to differentiate between the request & response in this validation code. Any ideas how you would design this feature @fenollp? if properties[k].Value != nil && properties[k].Value.ReadOnly {
continue
} |
Hm well this may be the time to switch from passing around this I would also just remove the single arguments: If you're up to tackle this I'd see it in 2-3 commits: the 1st one being about this large |
I just ran into this as well. Is there any news on this issue? |
Can one of you provide a failing go-run-able snippet so I can fix this quickly? |
@fenollp I think you can find an example here: danielgtaylor/apisprout#30 |
@fenollp here's a snippet you can run:
|
Hi there, |
As reported in danielgtaylor/apisprout#30, when given a request schema with a required
readOnly
property the request validator mistakenly treats it as required. According to the spec:Basically this means that request & response can share a schema but will see different properties as required for validation purposes.
The text was updated successfully, but these errors were encountered: