-
-
Notifications
You must be signed in to change notification settings - Fork 318
Rework the section regarding $id and $ref #104
Comments
It definitely supports id+ref generally, but what that seems likely to be trying to say at the minute is the "location independent" references which aare indeed not supported yet (and are a pain to implement. But some day I guess it will have to happen). |
@Julian would json-schema-org/json-schema-spec#729 make this any easier or harder? IIRC the problem was doing the pre-scan to find all of the Although it would arguably make it less confusing: instead of being this weird well... some |
I think #729 is a positive change (for the reasons you mentioned, so you've got my vote), but yeah doesn't help the key issue which is having to do two passes (or, having to do one, ahead of time pass to collect them, followed by a lazy lookup once you've collected those kinds of refs). The only thing I think that'd help that is having a designated section for location-independent refs so that you don't need 2 passes and can just know to always look there, but I think I remember you saying there are reasons that the way things are now is needed or convenient for authors, so yeah definitely not saying I have all the answers on that one. |
We now have more clarity in the spec on why you would want to use The section referenced by this bug should now talk about |
The example of how to use
$id
with$ref
is not how we would like people to do things.https://json-schema.org/understanding-json-schema/structuring.html#using-id-with-ref
We should rework this to show the intended general use case, where you reference another file by it's
$id
, including relative URI resolutions.It's possibly worth noting that you can use an
$id
in a subschema, but it's not advised because it makes things more complex.Additionally, is the statement about no support for this true in terms of the python library?
@Julian ?
The text was updated successfully, but these errors were encountered: