We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The given schema
{ "$id": "recursive.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "properties": { "label": { "anyOf": [ { "type": "integer" } ] }, "value": { "$ref": "#" } }, "title": "RecursiveType", "type": "object" }
gives the resulting JS object which is properly circular right away (object > [Circular])
object > [Circular]
<ref *1> { '$id': 'recursive.json', '$schema': 'https://json-schema.org/draft/2020-12/schema', properties: { label: { anyOf: [ { type: 'integer' } ] }, value: [Circular *1] }, title: 'RecursiveType', type: 'object' }
Change the reference to be by name instead of just #
#
{ "$id": "recursive.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "properties": { "label": { "anyOf": [ { "type": "integer" } ] }, "value": { "$ref": "recursive.json" } }, "title": "RecursiveType", "type": "object" }
This instead gives the following TS. Note that it's the same as above EXCEPT it's expanded one level too deep object > object > [Circular]
object > object > [Circular]
{ '$id': 'recursive.json', '$schema': 'https://json-schema.org/draft/2020-12/schema', properties: { label: { anyOf: [ { type: 'integer' } ] }, value: <ref *1> { '$id': 'recursive.json', '$schema': 'https://json-schema.org/draft/2020-12/schema', properties: { label: { anyOf: [ { type: 'integer' } ] }, value: [Circular *1] }, title: 'RecursiveType', type: 'object' } }, title: 'RecursiveType', type: 'object' }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What works
The given schema
gives the resulting JS object which is properly circular right away (
object > [Circular]
)What doesn't work
Change the reference to be by name instead of just
#
This instead gives the following TS. Note that it's the same as above EXCEPT it's expanded one level too deep
object > object > [Circular]
The text was updated successfully, but these errors were encountered: