Skip to content

JSON Schema vs TypeScript Interface

Jan Rembold edited this page Jan 31, 2018 · 4 revisions

JSON Schema vs TypeScript Interface

Why do we need a schema definition?

  • Describe the component templates' data structure for easy backend implementation or automated validation on APIs
  • Validate the demo/scaffolding data structures

Technical impacts

Development Runtime

  • Validate scaffolding data structures
  • Auto-Completion for scaffolding data structures

Challenge: Load schema/interface together with hbs gulp task

Distribution Styleguide (Indexr)

  • Display the schema/interfaces pretty printed on each components overview

Challenge: Convert schema/interface to prettified/highlighted markup

Proof-of-concept

TypeScript Interface

JSON Schema

Clone this wiki locally