kogosoftwarellc / open-api

A Monorepo of various packages to power OpenAPI in node
MIT License
895 stars 237 forks source link

openapi-response-validator: add ajv options #866

Open sshahar1 opened 1 year ago

sshahar1 commented 1 year ago

This PR allow pass extra options to Ajv validator for example to allow using a discriminator. It is equivalent to the requests PR https://github.com/kogosoftwarellc/open-api/pull/709

jsdevel commented 1 year ago

@sshahar1 plz add some tests

sshahar1 commented 1 year ago

@sshahar1 plz add some tests

Hi @jsdevel From what I see all the tests in the repo are data-driven and not based on this class, I also saw that the original PR didn't have tests. Is it okay that I add a new technique here?

jsdevel commented 1 year ago

@sshahar1 you should be able to add a new test pretty easily. i'd like to see this solid and not regress.

sshahar1 commented 1 year ago

@sshahar1 you should be able to add a new test pretty easily. i'd like to see this solid and not regress.

Okay, I'll update my PR. Thanks

sshahar1 commented 1 year ago

@jsdevel Hi, I figured out the test driven use cases and added 2 tests