-
Notifications
You must be signed in to change notification settings - Fork 387
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
RangeError
for circular references to oneOf
containing definition with the $ref
#547
Comments
I looked at the issues earlier but somehow missed #523 which looks very similar. |
Dup of #523 |
I disagree with closing this as a duplicate:
Having said that, the minimal schema given here is confusing to think about. Unlike the other issue, this one passes validation, but it still seems invalid because I can't see how to construct a finite valid object according to the schema: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have been trying to generate Typescript types from the Amazon State Language JSON Schema which leads to the following error:
As far as I can tell this is a circular reference where the referenced definition itself is a
oneOf
which in turn contains the definition with the$ref
.Removing all unnecessary layers and definitions leaves the following schema.
Reduced schema
Reduced schema without
oneOf
in referenced typeThe moment the referenced definition is an object, no longer a
oneOf
, the circular reference gets resolved correctly.I'd be happy to take a look myself but would appreciate a few suggestions on where to look, possible routes.
The text was updated successfully, but these errors were encountered: