Skip to content
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

Add support for nested schemata #50

Open
janw opened this issue Dec 13, 2019 · 2 comments · May be fixed by #60
Open

Add support for nested schemata #50

janw opened this issue Dec 13, 2019 · 2 comments · May be fixed by #60

Comments

@janw
Copy link
Contributor

janw commented Dec 13, 2019

No description provided.

@mike24zl mike24zl linked a pull request Jul 12, 2020 that will close this issue
@hexthedev
Copy link

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 Can JSON Created Classes be Persisted to Disk or Writing to .py Files? #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.

@nanaeaubry
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants