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
The problem starts in the constructor when LocalSchemaLoader is executed. This class uses js-yaml that loads the yaml and convert it to a JSON, but it does not resolve the internal references.
So when SwaggerParser.validate try to do a dereference cannot find the files, because the relative paths are being resolved with the path of the execution program and not the path of the principal yaml file parsed partially in the constructor.
The text was updated successfully, but these errors were encountered:
When an OpenAPI document contains a relative schema reference pointing to another file, causes
validate()
function failure.This is a simple schema example to reproduce:
The problem starts in the constructor when LocalSchemaLoader is executed. This class uses
js-yaml
that loads the yaml and convert it to a JSON, but it does not resolve the internal references.So when
SwaggerParser.validate
try to do a dereference cannot find the files, because the relative paths are being resolved with the path of the execution program and not the path of the principal yaml file parsed partially in the constructor.The text was updated successfully, but these errors were encountered: