Forum Discussion
Hi Frank,
As far as I understand, you can apply these assertions only for responses. There is no way to use them for requests. Take a look at the description of Swagger Compliance Assertion: https://github.com/readyapi/readyapi-swagger-assertion-plugin
- frankkDLL8 years agoOccasional Contributor
Hi Tanya,
Thanks for the response. This is a little confusing as the description of the Swagger assertion states "Asserts that the request and response messages are compliant with a swagger definition"
It's quite a normal expectation that the request body for operations like PUT, PATCH, POST could be validated for compliance. Sames goes for other operations, query parameters, headers etc.
Using Service-V for API sandboxing should facilitate that we can act like the API provide and easily validate requests and give appropriate responses as defined in the swagger definitions without having to script all the validations by hand.
Any recommendations on the best way to achieve?
Kind regards,
Frank
- TanyaYatskovska8 years agoSmartBear Alumni (Retired)
Hi Frank,
I've double-checked this behavior with our Team. At the moment, assertions work only with responses. I suggest that you create a feature request to implement the same functionality for requests here:
https://community.smartbear.com/t5/Ready-API-Feature-Requests/idb-p/ReadyAPIFeatureRequests
Our Product Owner regularly monitors submitted ideas and choose the ones with the highest ratings to implement.
- frankkDLL8 years agoOccasional Contributor
Hi Tanya,
OK thanks, i've created the request:
Rgds,
Frank