swagger-parser icon indicating copy to clipboard operation
swagger-parser copied to clipboard

Swagger parser v3 unable to load reference file from classpath

Open remcosiemonsma opened this issue 3 years ago • 1 comments

Hi,

We need to upgrade our swagger parser, but when we upgrade our tests start to fail since files which reside in our dependency cannot be loaded and we end up with the following error: "Unable to load RELATIVE ref: ./dependency_Parents.schema.json path: C:\Users\<private>\checkout\swagger-classpath-issue\local\target\classes"

I have created a minimal project which shows the issue occuring and can be found here: https://github.com/remcosiemonsma/swagger-classpath-issue

If you run the test in the local/src/test/java folder you will notice 1 working and 1 failing test, and the only difference is that in the failing case we try to reference a file from the dependency project instead of from the local project.

It seems this behavior broke in version 2.0.29.

Thanks for your support.

remcosiemonsma avatar Feb 25 '22 10:02 remcosiemonsma

We're seeing the same issue in our projects.

2.0.27 = Works 2.0.28 = Breaks

icha024 avatar Mar 14 '22 12:03 icha024

As the issue is outdated and problem does not appear anymore, I am closing this

micryc avatar Apr 10 '24 20:04 micryc