SpringMVC: Give user better control over "valid" requests

Issue #55 resolved
Sven Döring created an issue

Quote James Navin on the SwaggerValidationInterceptor:

I wonder if we could do better here. Perhaps we could look at the message level - if it is ERROR then we fail the request here, if it is WARN or below we log the message and let the request through.

That would give users control over this behavior via the message level mechanism (e.g. it may be desired to fail the request if it isnt in the spec). You could set the level to WARN by default when you construct the validator (see the Pact adapter for an example), and mention in the README that users can enable ERROR if they want it to fail.

Comments (2)

  1. Log in to comment