Switch off body validation
Can I scitch off the data validation for a path, or globally?
Actually, even if I override a post, the body validation is still happaning, and I would like to override post to avoid body validation.
Not in Swagger Server, but you can do that by using Swagger Express Middleware directly.
Can I access it with my swagger object:
var swagger = require('swagger-server'),
I mean something like
swagger.middleware.validateRequest(false)
or this is not as simple?
Sorry for my dummy question, I'm a FE developer just I need to mock my backend for a while, and I choosed swagger-server but that body validation makes my mocking so difficult :(
That's a great idea! Currently, Swagger Server abstracts the middleware away, so there's no way for you to directly access it. But I like the idea of providing a way to turn middleware on/off, edit its settings, etc.