json-schema-to-typescript compiles files from JSONSchema to TypeScript in distinct phases:
TODO use an external validation library
Resolves referenced schemas (in the file, on the local filesystem, or over the network).
Adds links back from each node in a schema to its parent (available via the Parent
symbol on each node), for convenience.
Normalizes input schemas so the parser can make more assumptions about schemas' properties and values.
Parses JSONSchema to an intermediate representation for easy code generation.
Optimizes the IR to produce concise and readable TypeScript in step (6).
Converts the intermediate respresentation to TypeScript code.
Formats the code so it is properly indented, etc.