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
While using the library it is not able to locate the schema file for email because it needs to search by extension.
Currently I am getting around that by passing a custom canRead function to file dereferencing option. The custom canRead function appends .schema to the file.url property
However I was wondering if there was a better way to achieve it.
The text was updated successfully, but these errors were encountered:
JSON Schema $Ref Parser expects the $ref to be a valid relative URI (per the spec), so it should be the full file name, including the extension (i.e. "$ref": "email.schema").
That said, if you specifically don't want to include the file extension due to compatibility with other tooling, then your canRead workaround is probably the best option. You're essentially overriding the default resolution algorithm to resolve to a different file path, which is a valid use-case.
Hi
This is not an issue but more about how to use the library.
My question is similar to #22
I am trying to parse a RAML file
here when a schema is referencing another schema using
$ref
it so happens that the externally referenced file extension is not provided. ExampleWhile using the library it is not able to locate the schema file for
email
because it needs to search by extension.Currently I am getting around that by passing a custom
canRead
function tofile
dereferencing option. The customcanRead
function appends.schema
to thefile.url
propertyHowever I was wondering if there was a better way to achieve it.
The text was updated successfully, but these errors were encountered: