-
Notifications
You must be signed in to change notification settings - Fork 0
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
Cannot use $ref with other keywords in the same object #1
Comments
@Relequestual @theisuru This is a bit awkward. There is a clear case to be made for Probably the this could be solved more elegant by having a special structure á la:
... in JSON Schema. I also wonder how this works with arrays, where the |
I totally understand it's akward and not ideal. This is why we made changes in draft-8 to allow If documentation is a pre-step to actual JSON Schema, and only annotations are included alongside So you could do it either way, and both have trade offs. |
@Relequestual So, especially w/ respect to draft-8, I think we stick w/o the BUT: I really think the JSON Schema spec. needs something akin to the If draft-8 will allow additional keys: Can't we directly do it like that? Also: This can be explained in a yet-to-be-written |
In draft-7 JSON Schema, you cannot use
$ref
with other keywords. All other keywords in that object are ignored.For example:
https://github.com/ga4gh-schemablocks/blocks-json-schema/blob/e3d0e382cf245c544427c32b8633ab8cda70f624/src/yaml/Individual.yaml#L47-L53
In stead, wrap the object in an
allOf
, splitting the$ref
and annotations and/or other keywords into separate subschemas.The text was updated successfully, but these errors were encountered: