warlock icon indicating copy to clipboard operation
warlock copied to clipboard

Add support for nested schemata

Open janw opened this issue 5 years ago • 2 comments

janw avatar Dec 13 '19 21:12 janw

I don't believe #60 solves the problem, at least as I understand it.

I think support for nested schemata should do the following:

  • Whenever a $type: { "$ref" : "path/to/ref" } is found, a new class should be generated similarly to auto generators like NJsonSchema for C#, instead of using a dictionary. Only creating the class at the root schema only really solves the problem at the root, when the whole structure could be full of referenced schemas.
  • Potentially, the ability to output all classes as dataclasses, or something like that. As mentioned by #67

If I get a chance, I'll see if I can write a PR for this functionality. Let me know if my points above seem valid in the context of warlock.

hexthedev avatar Jul 25 '22 19:07 hexthedev

Hello,

Has there been progress on the seconds point: adding the ability to output all classes as dataclasses.

This would be extremely helpful for my workflow. Are there any suggestions on how to do this?

nanaeaubry avatar Aug 16 '22 20:08 nanaeaubry