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
Say I use dereference without base url would lead to this error: Error parsingSyntaxError: Invalid $ref pointer "meta". Pointers must begin with "#/"
Which is not a very helpful Error message, since belive my $ref to be correct following this guide: https://swagger.io/docs/specification/using-ref/
Also mentioned in #42
I also tested it with these, which either threw a path error or just wrote the ref element without inserting the content:
Say I use a dereference with a base url (following #20): jsonschema = await parser.dereference('./json_schemes/','./json_schemes/standard_message_schema.json', {});
Would lead to this Error:
Error: Error opening file "C:\Medieninformaitk\Medieninformatik\BA\Code\ConChat\json_schemes\"
EISDIR: illegal operation on a directory, read
at fs.readFile (C:\Medieninformaitk\Medieninformatik\BA\Code\ConChat\node_modules\json-schema-ref-parser\lib\resolvers\file.js:51:20)
at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:37:12)
If I understand this error correctly, then $RefParser trys to read a folder, which of course doesnt work. But that is not the behavior I expected. I expected the Parser to resolve refs like above, relative to the folder I give as a base url.
Hello,
My Schemas look like this:
Schema1:
Schema2: (meta)
Say I use dereference without base url would lead to this error:
Error parsingSyntaxError: Invalid $ref pointer "meta". Pointers must begin with "#/"
Which is not a very helpful Error message, since belive my $ref to be correct following this guide:
https://swagger.io/docs/specification/using-ref/
Also mentioned in #42
I also tested it with these, which either threw a path error or just wrote the ref element without inserting the content:
Say I use a dereference with a base url (following #20):
jsonschema = await parser.dereference('./json_schemes/','./json_schemes/standard_message_schema.json', {});
Would lead to this Error:
If I understand this error correctly, then $RefParser trys to read a folder, which of course doesnt work. But that is not the behavior I expected. I expected the Parser to resolve refs like above, relative to the folder I give as a base url.
Or to generalize my problem:
I want to parse a folder full of json schemas so I can validate them against a json object in js.
Can I do that here?
(Coming from https://stackoverflow.com/questions/56851739/how-to-load-a-json-folder-into-javascript )
The text was updated successfully, but these errors were encountered: