express-openapi-validator
express-openapi-validator copied to clipboard
Feature Request: Error on additional properties
In the OpenAPI spec, for object types, I add additionalProperties: false.
With this project, using the removeAdditional for both validateRequests and validateResponses, I can have all additional properties removed.
I noticed and tested that unknown query parameters will cause an error to be returned instead of a silent removal.
A similar project https://github.com/kogosoftwarellc/open-api/tree/main/packages/openapi-response-validator, will return an error when an additional property is found.
I would like to request that this project add a configuration option to both validateRequests and validateResponses so that an additional property will cause an error to be returned instead of a silent removal. This is to match the current behavior of allowUnknownQueryParameters and the other similar project.