You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are currently in the process of providing a set of common/shared schemas through JAR dependencies and relying on the ability of resolving $ref pointers to these on the classpath.
With a reference such as $ref: "/sdk/openapi/common.yaml#/some/schema" running under platforms utilising / as the path separator all is OK and the files are correctly resolved and read.
When running under platforms utilising \ as the path separator (i.e. Windows), the location to ClasspathHelper.loadFileFromClasspath receives the file to retrieve from the classpath as \sdk\openapi\common.yaml and fails to perform the look-up.
We are currently in the process of providing a set of common/shared schemas through JAR dependencies and relying on the ability of resolving
$ref
pointers to these on the classpath.With a reference such as
$ref: "/sdk/openapi/common.yaml#/some/schema"
running under platforms utilising/
as the path separator all is OK and the files are correctly resolved and read.When running under platforms utilising
\
as the path separator (i.e. Windows), the location toClasspathHelper.loadFileFromClasspath
receives the file to retrieve from the classpath as\sdk\openapi\common.yaml
and fails to perform the look-up.Tracing through the code the issue seems to begin within ExternalRefParser.processRefToExternalSchema where the parsing into a
Path
converts the separators into\
.When the code ultimately ends up hitting RefUtils.readExternalRef, the incorrect path is used to attempt to retrieve it from the classpath.
My understanding of the classpath is that it expects
/
separated paths, as per e.g. the JavaDoc for ClassLoader.getResource():The text was updated successfully, but these errors were encountered: