All Projects → xiag-ag → typescript-to-json-schema

xiag-ag / typescript-to-json-schema

Licence: other
Generate JSON schema from your Typescript sources

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to typescript-to-json-schema

Vue Json Ui Editor
Edit JSON in UI form with JSON Schema and Vue.js
Stars: ✭ 392 (+625.93%)
Mutual labels:  schema, json-schema
Schema Registry
Confluent Schema Registry for Kafka
Stars: ✭ 1,647 (+2950%)
Mutual labels:  schema, json-schema
Plank
A tool for generating immutable model objects
Stars: ✭ 449 (+731.48%)
Mutual labels:  schema, json-schema
fform
Flexibile and extendable form builder with constructor
Stars: ✭ 26 (-51.85%)
Mutual labels:  schema, json-schema
another-json-schema
Another JSON Schema validator, simple & flexible & intuitive.
Stars: ✭ 48 (-11.11%)
Mutual labels:  schema, json-schema
Jsonschema
An implementation of the JSON Schema specification for Python
Stars: ✭ 3,474 (+6333.33%)
Mutual labels:  schema, json-schema
Autocomplete Json
Atom autocomplete for JSON files
Stars: ✭ 60 (+11.11%)
Mutual labels:  schema, json-schema
element-schema-form
A schema-based element-ui form component for Vue2.x.
Stars: ✭ 31 (-42.59%)
Mutual labels:  schema, json-schema
Vue Form Json Schema
Create forms using JSON schema. Bring your components!
Stars: ✭ 253 (+368.52%)
Mutual labels:  schema, json-schema
Newtonsoft.json.schema
Json.NET Schema is a powerful, complete and easy to use JSON Schema framework for .NET
Stars: ✭ 167 (+209.26%)
Mutual labels:  schema, json-schema
schema-shot
Framework-agnostic snapshot testing using "schema by example" for highly dynamic data
Stars: ✭ 34 (-37.04%)
Mutual labels:  schema, json-schema
openapi4j
OpenAPI 3 parser, JSON schema and request validator.
Stars: ✭ 92 (+70.37%)
Mutual labels:  schema, json-schema
ty
Here is a schema checker which can return well typed results. Tell your friends!
Stars: ✭ 21 (-61.11%)
Mutual labels:  schema, json-schema
Json Schema To Ts
Infer TS types from JSON schemas 📝
Stars: ✭ 261 (+383.33%)
Mutual labels:  schema, json-schema
sf-java-ui
Json Schema Form java based library allow developers to define schema and form using field annotations
Stars: ✭ 23 (-57.41%)
Mutual labels:  schema, json-schema
Schm
Composable schemas for JavaScript and Node.js
Stars: ✭ 498 (+822.22%)
Mutual labels:  schema, json-schema
Typedload
Python library to load dynamically typed data into statically typed data structures
Stars: ✭ 120 (+122.22%)
Mutual labels:  schema, json-schema
magnet
A JSON/BSON schema generator
Stars: ✭ 16 (-70.37%)
Mutual labels:  schema, json-schema
joyce
Joyce is a highly scalable event-driven Cloud Native Data Hub.
Stars: ✭ 37 (-31.48%)
Mutual labels:  schema, json-schema
jsonresume-theme-caffeine
Caffeine theme for the JSON Resume project
Stars: ✭ 78 (+44.44%)
Mutual labels:  json-schema

typescript-to-json-schema

npm version Build Status Coverage Status License: MIT

Inspired by YousefED/typescript-json-schema. Here's the differences list:

  • this implementation does not use typeChecker.getTypeAtLocation() (so probably it keeps correct type aliases)
  • the following features are not supported yet:
    • class types
    • conditional types
  • processing AST and formatting JSON schema have been split into two independent steps
  • not exported types, interfaces, enums are not exposed in the definitions section in the JSON schema

Usage

npm install typescript-to-json-schema
./node_modules/.bin/typescript-to-json-schema \
    --path 'my/project/**.*.ts' \
    --type 'My.Type.Full.Name' \
    --expose 'export' \
    --topRef 'yes' \
    --jsDoc 'extended'

Current state

  • interface types
  • enum types
  • union, tuple, type[] types
  • string, boolean, number types
  • "value", 123, true, false, null, undefined literals
  • type aliases
  • generics
  • typeof
  • keyof

Debug

npm run debug -- test/programs/type-alias-single/main.ts --aliasRefs true MyString

And connect via the debugger protocol.

AST Explorer is amazing for developers of this tool!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].