TypeScript d.ts file generator for JSON Schema file
npm install dtsgenerator-forkTypeScript d.ts file generator from JSON Schema file or Swagger spec file.







- Install
- Usage
- Development
- ChangeLog
- License
npm install -g dtsgenerator
- Releases
``
$ dtsgen --help
Usage: dtsgen [options]
Options:
-V, --version output the version number
--url
--stdin read stdin with other files or urls.
-o, --out
-p, --prefix
-H, --header
-t, --target [version] set target TypeScript version. select from v2 or v1. default is v2.
-h, --help output usage information
Examples:
$ dtsgen --help
$ dtsgen --out types.d.ts schema/*/.schema.json
$ cat schema1.json | dtsgen --target v1
$ dtsgen -o swaggerSchema.d.ts --url https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v2.0/schema.json
$ dtsgen -o petstore.d.ts --url https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v2.0/yaml/petstore.yaml
`
Output debug message by debug library.
$ DEBUG=dtsgen dtsgen schema/news.json
- The home of JSON Schema
- JSON Schema wiki for discussions on the next version of the draft
- Swagger Specification
- Support the integer enum type by #263. Thank you @heapx :*+1:
- Bug fix about unresoled $refs by #253. Thank you @skuligowski :+1:
- Bug fix about tuple type support by #244. Thank you @laurelnaiad :+1:
- Support tuple type of #239, #241. Thank you @laurelnaiad :+1:
- Fix the bug about allOf property of #226. Thank you @dawidgarus @philliphoff :+1:
- Improve message in error log. Thank you @gasi :+1:
- Add yaml format support! Thank you @jdthorpe :+1:
- Remove gulp scripts
- Add to support null type for TypeScript 2.0
- Add some input parameters
- Update dependencies library
- Fix crash bug #67
- Update with some braking change
- Minor update from v0.6.0
- First stable version of dtsgenerator
dtsgenerator` is licensed under the MIT license.
Copyright © 2016, Hiroki Horiuchi