-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
The current one sucks. Check this out:
$ cat schema.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://example.com/my-schema",
"properties": {
"foo": {
"$anchor": "test"
},
"bar": {
"$anchor": "test"
}
}
}
$ jsonschema inspect schema.json
error: Schema identifier already exists: https://example.com/my-schema#test
We should at the very least print the locations that result in the collision?
Might involve improving the exceptions getting thrown from this at Core while framing: https://github.com/sourcemeta/core/blob/d15c45c2dabb7418584dc5f23b22301e30ae4172/src/core/jsonschema/frame.cc#L4.
Maybe we need to have a different kind of exception for duplicated URI entries that take the current URI and the last location where the same URI was known to be registered at. With that information, we can construct a nice error message here
oleiadeoleiade
Metadata
Metadata
Assignees
Labels
No labels