mulesoft-labs / osprey-method-handler

Middleware for validating requests and responses based on a RAML method object
Other
16 stars 16 forks source link

Use an optional user-provided ajv instance for JSON schema validation. #43

Closed boyko closed 5 years ago

boyko commented 5 years ago

Greetings and thanks for the great work! In my use case I have JSON schemas with lots of custom ajv keywords and formats. I would like to be able to validate these using ospray but I could not figure out how to load the custom formats.

This PR is an attempt to enable the user to pass her own (configured) instance of ajv to the method handler.

Thanks again for your time.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.02%) to 97.742% when pulling c0b9796680b48c62241570b7bc1768adb4e6a447 on boyko:pluggable-validator into 64800a5d91431ca94c5e57ea8aa7e284f6bee6e4 on mulesoft-labs:master.

postatum commented 5 years ago

LGTM. Moved to #49

postatum commented 5 years ago

Thank you for the PR @boyko :apple: