apigee-127 / swagger-tools

A Node.js and browser module that provides tooling around Swagger.
MIT License
701 stars 373 forks source link

validation: response body matches request body #585

Open mbana opened 6 years ago

mbana commented 6 years ago

I would like to do additional validation; I want to assert that certain fields in the response matches certain fields in the request. Is this possible, if so, please link to an example.

Thanks.

whitlockjc commented 6 years ago

Couldn't you just add your own middleware after swagger-validator to do this? As of right now, custom validation isn't possible within swagger-tools itself but since it's all just middleware, doing this is still very possible.