bcherny/json-schema-to-typescript

Add setting to validate input schema before proceeding with compile

Open

#48 opened on Sep 29, 2016

View on GitHub
 (3 comments) (2 reactions) (0 assignees)TypeScript (449 forks)github user discovery
enhancementhelp wanted

Repository metrics

Stars
 (3,302 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

As a user I sometimes have invalid JSON schema and I would like a debugging option to tell me my schema is invalid so I don't waste time looking for issues in how JSON Schema is compiled to TS interface definition. As well, I want to be confident my JSON schema is valid before filing an issue.

A rough WIP is here: https://github.com/darcyparker/json-schema-to-typescript/tree/validateJSONSchema

An additional nice to have feature would be to log warnings about cases of not-expressible to typescript and suggest using decorators as mentioned here: https://github.com/bcherny/json-schema-to-typescript/issues/8

Contributor guide