Forum Discussion

Ploskodonka's avatar
Ploskodonka
New Contributor
5 years ago
Solved

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  

  • 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

2 Replies

  • Ploskodonka's avatar
    Ploskodonka
    New Contributor

    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