cancel
Showing results for 
Search instead for 
Did you mean: 

Swagger compliance assertion

New Contributor

Swagger compliance assertion

Hi, I'm trying to add a Swagger compliance assertion to my test step (using SoapUI 5.5.0) but there is no such assertion on the list. Is there any plugin I need to install before seeing it? I already install the swagger import/export extension (and I'm able to import swagger definitions), but the assertion is not yet there.

7 REPLIES 7
Highlighted
Community Hero

Re: Swagger compliance assertion

Then where did you find "Swagger compliance assertion"?


Regards,
Rao.
Highlighted
New Contributor

Re: Swagger compliance assertion

 


@nmrao wrote:
Then where did you find "Swagger compliance assertion"?

 

Here it says it's available in SoapUI: https://support.smartbear.com/readyapi/docs/testing/assertions/reference/compliance/swagger.html

 

Also, in the comparison between SoapUI OS and Pro it says the feature is available in both: https://www.soapui.org/professional/soapui-pro/compare-os-to-pro.html

Highlighted
Community Hero

Re: Swagger compliance assertion

What edition are you using?

It is not specific type of assertion, IMO.
If you look the first url which you posted, the screen shot shows on Assertion and there isn't any thing called Swagger Compliance Assertion.

Any ways, what are you trying to achieve?


Regards,
Rao.
Highlighted
New Contributor

Re: Swagger compliance assertion

I'm using SoapUI 5.5.0 (the free version).

 

@nmrao, regardless of the screenshot, the Swagger Compliance Assertion is listed among the supported assertions for SoapUI. Also, there are several threads in the forum regarding this type of assertion. I didn't ask the question to initiate a debate on whether it's a specific type of assertion or not, I did it to understand if that assertion is available (as per the documentation says) and how to access it.

 

What I'm trying to achieve is to evaluate that a REST response matches the structure and types specified in the swagger without adding individual JSON-path-match assertions.

Highlighted
Community Hero

Re: Swagger compliance assertion

You mean schema compliance?


Regards,
Rao.
Highlighted
New Contributor

Re: Swagger compliance assertion

I mean validating the response agains the swagger specification. According to the link I posted in my earlier comments, it should be possible:

 

  1. In the Swagger URL field, specify the file name or URL of the desired OpenAPI or Swagger specification.

    If the definition's URL requires authentication, you will be prompted to enter credentials.

     
  2. If you enable the Strict Mode option, the assertion will fail if the definition does not contain the appropriate response. If you disable this option, the assertion passes if the response code is not specified in the definition.

But I cannot find any of those options

Highlighted
Community Hero

Re: Swagger compliance assertion

You may contact support team and get it clarified and also let us know.


Regards,
Rao.