-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
One TS file from multiple schemas #2487
Comments
Yes, you can use Quicktype to generate TypeScript interfaces and enums for your JSON schemas. Quicktype supports resolving Here's how you can do it:
Quicktype will then generate a single TypeScript file containing interfaces and enums for each schema, including the referenced enums from |
Thanks, this unfortunately will explode out of proportion with the number of schemas I am dealing with. Is there no way to automaticaly include all schemas in a directory (recursively)? |
Furthermore - what version of quicktype are you using @SaintPepsi ? I am getting:
|
@codan84 It seems that you don't need the |
I have a directory with multiple schemas, some of them $ref others:
Both
draft
andnew-draft
reference theenums/some-enum.json
.Is there a way I can convert this to 1 typescript file with interfaces/enums declared for each?
The text was updated successfully, but these errors were encountered: