Forum Discussion
- JHuntCommunity Hero
Thanks.
According to this...
https://support.smartbear.com/readyapi/docs/testing/assertions/reference/compliance/swagger.html
... the assertion only works by looking at the content-type defined for the response, but yours specifies it at the API level rather than the response level.
That might be the problem. I couldn't say for sure. Since I don't have ReadyAPI, I would recommend again that you ask on the SoapUI Pro forum.
If it turns out that really is all the support that ReadyAPI has for OpenAPI, that seems pretty disappointing. Maybe there's another tool that's better suited for this specific type of test on your API. Aren't SmartBear supposed to be driving OpenAPI adoption? Anyway, I came across Dredd when I was looking online.
- jcsreddyOccasional Contributor
Thank you very much for your input.
- JHuntCommunity Hero
In a sense, an OpenAPI specification is comparable to a WSDL - it is a machine-readable file that describes how an API will behave. This assertion is about checking that your API behaves as described by its OpenAPI specification, not about whether it complies with OpenAPI as a standard (whatever that would mean).
It sounds like your API returned a response with a Content-Type header of "application/json; charset=UTF-8", but that was not what was described among the possible response Content-Types in the spec.
If you still think the assertion should pass, you will need to give the spec and the response. And probably ask it on the SoapUI Pro forum (us Open Source users have very limited features for Swagger/OpenAPI).
- jcsreddyOccasional Contributor
Hi,
Thanks for your response.
I am attaching the request and response, and my objective is to ensure that 'Swagger Compliance Assertion' is passed.
Thanks,
Chandra.