REST Request validation in Virt Server
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
REST Request validation in Virt Server
Hi There,
Just wondering what is the best method for applying compliance assertions to an inbound REST requests to a virt? On the incoming settings section, it gives the ability to add assertions but the assertions I am after are disabled (e.g. JSON Schema Compliance, Swagger Compliance Assertion). Is there anyway to enable these?
Also the placeholder comment "use assertions for response validation" is a little misleading for a newbie.
Rgds,
Frank
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Tanya Yatskovskaya
SmartBear Community and Education Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Tanya Yatskovskaya
SmartBear Community and Education Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Tanya,
OK thanks, i've created the request:
Rgds,
Frank
