krakenjs / swaggerize-express

Design-driven apis with swagger 2.0 and express.
Other
355 stars 81 forks source link

Converting ValidationError stack trace into JSON payload #96

Closed rkarodia closed 8 years ago

rkarodia commented 8 years ago

I have an API which requires a JSON response body containing error information. I receive a ValidationError stack trace from enjoi when required parameters (defined in swagger) are not present. Is it possible to map this stack trace to a JSON model?

rkarodia commented 8 years ago

Apologies, I'm new to Node. I should be able to do this with ExpressJS Error handling.