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
When a $ref is pointing to a file that needs to go outside of the current directory: ../../models/etc/etc Spectral throws the following validation exception: ERROR invalid-ref ENOENT: no such file or direcotry...
The issue I notice is that the default resolver uses the path to the application as a base, but even when using a custom resolver only the ref itself can be accessed, and not the path of the file.
There should be a way to tell the custom resolver to use the contract file's path as a basepath so that refs with relative paths that go outside of the current directory work properly.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When a $ref is pointing to a file that needs to go outside of the current directory: ../../models/etc/etc Spectral throws the following validation exception: ERROR invalid-ref ENOENT: no such file or direcotry...
The issue I notice is that the default resolver uses the path to the application as a base, but even when using a custom resolver only the ref itself can be accessed, and not the path of the file.
There should be a way to tell the custom resolver to use the contract file's path as a basepath so that refs with relative paths that go outside of the current directory work properly.
Beta Was this translation helpful? Give feedback.
All reactions