What is the history?

We are the developers behind Fusio which is an open source API management system. We wanted to build an SDK generator for different languages, which builds an SDK based on the available schema. During this we have experienced the limitations of JSON Schema for code generators. Because of this we have started to develop TypeSchema. A JSON format which can be easily transformed into code and also other specification formats. This means we can also reuse any TypeSchema at an OpenAPI specification.

What is the difference to JSON Schema?

TypeSchema is not designed to validate JSON data. This means our goal is not to introduce many keywords to be able to validate all possible JSON data. Instead we focusing on describing data in an elegant and simple way.

For code generators it is difficult to work with JSON Schema since it is designed to validate JSON data. In JSON Schema you dont need to provide any keywords i.e. {} is a valid JSON Schema which basically allows every value and the defined keywords are applied based on the actual data. This means you can interpret a schema only if you have also the actual data. A code generator on the other hand needs to determine a concrete type of a schema without the actual data. Also JSON Schema has many keywords which contain logic like dependencies, not, if/then/else which are basically not needed for code generators and really complicates building them. We have also explained some pitfalls in our migration document.