-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
References through other references being produced #24
Comments
This was referenced Aug 2, 2016
I have a workaround, which is to run it through |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry if this is a bit confusing to understand, but I have a complicated schema with many (circular) references, and I'm using the
bundle()
method then passing the results to z-schema which can't understand it.My main schema (minus a lot of irrelevant detail) is:
model.yaml
Then the following are referenced:
any.yaml
list.yaml
section.yaml
text.yaml
The
bundle()
method of this library returns:When using z-schema to parse (any) JSON it errors with:
The (first) problem is that the reference at
#/properties/body2/properties/content/items/oneOf/0/properties/items/items/oneOf/0
("$ref": "#/properties/body/items/properties/content/items/oneOf/0"
) goes through another$ref
. According to https://github.com/json-schema/json-schema/wiki/$ref-traps#references-through-other-references this should still be resolvable (so the bug could be in z-schema not understanding it), but thebundle()
method could have produced"$ref": "#/properties/body2/properties/content/items/oneOf/0"
which would avoid the problem.I hit this problem yesterday and reordering some properties (hence reordering some
$ref
s) fixed it a couple of times, but I can't find a way around the latest instance.The text was updated successfully, but these errors were encountered: