Support recursive schemas
See original GitHub issueHi there! Just wondering if it’s presently possible to have a recursive schema – a schema that references itself.
const RecursiveSchema = new SimpleSchema({
field: { type: String },
children: { type: Array },
'children.$': { type: RecursiveSchema }
});
Obviously, this won’t work (the JavaScript won’t even allow it). I was just wondering if anyone had a way to do something like this.
Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8
Top Results From Across the Web
Support for recursive schemas #96 - metosin/malli - GitHub
Does it have support for recursive schemas? I was trying to generate malli schemas from json-schemas (#54)
Read more >Recursive schema extension — jschon 0.10.0 documentation
Recursive schema extension . The following script implements the recursive schema extension example, described in the JSON Schema 2020-12 core specification.
Read more >JSON Schema - Recursive Schema Definition - Stack Overflow
Yes, your schema will work. The "$ref": "#" points back to the root of the schema document. However, the "type": "object" is useless:...
Read more >Combining schemas - Ajv JSON schema validator
References can be recursive (and mutually recursive) to implement the schemas for different data structures (such as linked lists, trees, graphs, etc.). You...
Read more >How to create recursive schema - JSON Forms community
I'm trying to create recursive schema, but it does not work. Does jsonform support recursive schemas? If yes do i have mistake in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah i know thats why i mentioned it, it’s just pretty grim code, but it’s probably what i’ll end up doing. I was trying to think of a way to do it in simple-schema but i think i’d take me a while to get a handle on exactly how it all works.
I reopened this as a feature request. If anyone wants it badly enough, please submit a pull request