This repository has been archived by the owner on May 12, 2018. It is now read-only.
Make id
optional for dereferencing
#59
Labels
id
optional for dereferencing
#59
id
is really troublesome.This is a good summary of how it works:
https://spacetelescope.github.io/understanding-json-schema/structuring.html#the-id-property
Why I don't like ID:
That is not what most people expect, and it makes dereferencing pretty confusing.
It makes dereferencing slower since we need to walk the schema and resolve a
$ref
against anyid
s that we find.If you are working locally you probably want to load your schemas from the filesystem. ID will hijack the URL and force you to load schemas from production.
The dereferencer becomes tied to JSONSchema instead of being a generic reusable tool for JSON Reference.
Proposal:
Make using
id
for reference resolution optional.There is an open proposal to make id informational only in the official spec which would be great. Until then it would be nice to allow toggling the behavior.
Here is another proposal to remove it entirely, with support from the author of the Draft4 validation spec.
The text was updated successfully, but these errors were encountered: