You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The request validator mistakenly makes a requestBody property required, even if it is marked as readonly. This is achievable by using inheritance with allOf.
Describe the bug
The request validator mistakenly makes a requestBody property required, even if it is marked as
readonly
. This is achievable by using inheritance withallOf
.To Reproduce
Given the spec:
With
validateRequests: true
in the middleware configuration, and by posting a request to the path with this request body:Will result in a validation error with the following message:
request/body must have required property 'id'
Actual behavior
A validation error will be thrown, indicating the id field marked as
readonly
is required in the request body.Expected behavior
The request should be considered valid and no errors should be thrown.
Examples and context
Refer to the snippet above.
The text was updated successfully, but these errors were encountered: