Name: ts-json-schema-generator
Owner: Vega
Description: Generate JSON schema from your Typescript sources
Forked from: xiag-ag/typescript-to-json-schema
Created: 2017-06-02 05:09:01.0
Updated: 2017-12-27 12:17:45.0
Pushed: 2017-12-30 23:26:02.0
Homepage: null
Size: 331
Language: TypeScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Extended version of https://github.com/xiag-ag/typescript-to-json-schema.
Inspired by YousefED/typescript-json-schema
. Here's the differences list:
typeChecker.getTypeAtLocation()
(so probably it keeps correct type aliases)class
typesdefinitions
section in the JSON schemainstall --save ts-json-schema-generator
de_modules/.bin/ts-json-schema-generator \
--path 'my/project/**.*.ts' \
--type 'My.Type.Full.Name' \
--expose 'export' \
--topRef 'yes' \
--jsDoc 'extended'
interface
typesenum
typesunion
, tuple
, type[]
typesstring
, boolean
, number
types"value"
, 123
, true
, false
, null
literalstypeof
@nullable
annotations@hide
annotations for enum values and object propertiesnpm 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!