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
Working off of the example provided, I was expecting the validation to cover requestBody in the OpenAPI 3.0 schema. As a user of APIs I often make typos or misunderstand the documentation, being able to be alerted by the API would be nice.
A similar interface to the allowUnknownQueryParameters (see #133) would be ideal:
Thanks, @rowanc1. You're correct, this can be accomplished with additionalProperties: false.
I also agree that we should get this into the README. Would you be willing to add an example to the FAQ section of the README?
Documentation to point users towards the Open API 3.0 spec to set
`additionalProperties` to false for validation of the body component
of the request.
See cdimascio#146
Awesome library, thanks for putting it together!
Working off of the example provided, I was expecting the validation to cover
requestBody
in the OpenAPI 3.0 schema. As a user of APIs I often make typos or misunderstand the documentation, being able to be alerted by the API would be nice.A similar interface to the
allowUnknownQueryParameters
(see #133) would be ideal:Right now adding a value to the JSON body of a request of the
POST /v1/pets
example results in:I would expect this to error using the same validations as if it were in the query parameters. I would be curious about your thoughts on this.
The text was updated successfully, but these errors were encountered: