-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$ref should accept $id references #55
Comments
I'm interested in tackling this, either in a PR or in an external vscode extension (probably both, as i'll want to have the flexibility of my own extension for other resolver logic for external references, and then i'll upstream relevant features). some links: |
Hi @forivall, thanks for the interest, you are very welcome, a PR would be great! We currently resolve the $refs in a step called
To run and debug this, see here for instructions. You can find some ref related tests her. I'm happy to help. I've started looking into it but realized it's not a trivial change and we might have to restructure the way we do the resolving. |
As a workaround, my JSON Schema CLI tool supports performing bundling without making use of identifiers to at least make schemas work with Visual Studio Code: https://github.com/Intelligence-AI/jsonschema/blob/main/docs/bundle.markdown. |
As part of JSONSchema Draft 6, $ref can point to a definition defined with an
$id
(or justid
, spec seems vague if its$id
orid
in v6) -- it would be wonderful if we could get support for that here.For instance, in definitions we will be able to use
{"references": { "$id": "#test", ... }}
and in our core properties, refer to it via{"properties": {"$ref": "#test", ...}}
Thanks!
The text was updated successfully, but these errors were encountered: