ZenWave360/json-schema-ref-parser-jvm

Trying to read a schema from a remote URL throws an IllegalArgumentException

Closed this issue · 2 comments

I am trying to read a Schema file from a remote URL:

URI schema = URI.create("https://127.0.0.1:5500/schemas/card.json");
$RefParser parser = new $RefParser(schema).withOptions(new $RefParserOptions().withOnCircular(SKIP));
$Refs refs = parser.parse().dereference().getRefs();

When executing that code, the following error is thrown:

Exception in thread "main" java.lang.IllegalArgumentException: URI scheme is not "file"
	at java.base/java.io.File.<init>(File.java:423)
	at io.zenwave360.jsonrefparser.parser.Parser.parse(Parser.java:51)
	at io.zenwave360.jsonrefparser.$RefParser.parse($RefParser.java:88)
	at org.example.Main.main(Main.java:20)

Hi @SKreileder , thanks for this... I was offline for a couple of weeks
I will take care of this next week

This has been release as v0.8.8. Thanks for taking the time reporting it. 🙏