json-schema-to-typescript compiles files from JSONSchema to TypeScript in distinct phases:
TODO use an external validation library
Normalizes input schemas so the parser can make more assumptions about schemas' properties and values.
Resolves referenced schemas (in the file, on the local filesystem, or over the network).
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.