Hilzu / express-openapi-validate

Express middleware to validate requests based on an OpenAPI 3 document
Apache License 2.0
75 stars 12 forks source link

Does not handle additionalProperties #44

Open jukeblimp32 opened 5 years ago

jukeblimp32 commented 5 years ago

I've been using your library to validate requests, and it's been working great except for when it comes to additionalProperties.

The two methods I've tried of getting this to work are: 1) Specify in the the request object that: required: -additionalProperties 2) Specify in the referenced object within additionalProperties that each field is required.

With the first method, I always get failed validation because it is looking for an "additionalProperties" key. On the second method, if I don't include one of the fields that's required in the additionalProperties, I do not get a validation error.