cancel
Showing results for 
Search instead for 
Did you mean: 

A problem with relative path in Swagger Compliance Assertion

SOLVED
Highlighted
New Contributor

A problem with relative path in Swagger Compliance Assertion

Hello,

When I run SoapUI tests for my project I keep on receiving the following errors in Swagger Compliance Assertion:

Swagger Compliance check failed: [Unable to load RELATIVE ref: ./extdef/PaidOrderNotification.yaml path: .]

And of course I have this file with the path mentioned in error logs.
Though, I've decided to google the problem and found out that deleting ./ from my swagger file in the following line - $ref: './extdef/PaidOrderNotification.yaml' solves the problem.

But not once and for all.


There's a case like this:
GetProductsPricesResponse:
type: array
items:
$ref: "./extdef/Price.yaml"

Seems like when the type is array the workaround mentioned above doesn't work. It works only if you 'hardcode' the Price object in yaml document without using a reference path but using it as a definition, which is not good for me, cause if I do it with every case like that within my default yaml file, it's gonna be enormous and will be hard to read.

I'll attach my yaml files if it would help.

Your help in this always appreciated  

1 ACCEPTED SOLUTION

Accepted Solutions
New Contributor

Re: A problem with relative path in Swagger Compliance Assertion

Seems like it is a known issue RIA-7658 as a support team said.

And the only workaround at the moment is to use a full path instead of a relative path for references

View solution in original post

2 REPLIES 2
New Contributor

Re: A problem with relative path in Swagger Compliance Assertion

Seems like it is a known issue RIA-7658 as a support team said.

And the only workaround at the moment is to use a full path instead of a relative path for references

View solution in original post

Moderator

Re: A problem with relative path in Swagger Compliance Assertion

Thanks for sharing this with the Community, @Ploskodonka!

 


Olga Terentieva
SmartBear Assistant Community Manager