Socket
Book a DemoInstallSign in
Socket

dtsgenerator-fork

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dtsgenerator-fork

TypeScript d.ts file generator for JSON Schema file

0.9.7
latest
Source
npmnpm
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

dtsgenerator

TypeScript d.ts file generator from JSON Schema file or Swagger spec file.

nodejs version npm version build status coverage status Greenkeeper badge npm download count MIT license

Table of Contents

Install

npm install -g dtsgenerator

Usage

$ dtsgen --help

  Usage: dtsgen [options] <file ... | file patterns using node-glob>


  Options:

    -V, --version                      output the version number
    --url <url>                        input json schema from the url.
    --stdin                            read stdin with other files or urls.
    -o, --out <file>                   output d.ts filename.
    -p, --prefix <type prefix>         set the prefix of interface name. default is nothing.
    -H, --header <type header string>  set the string of type 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

Development

Debug

Output debug message by debug library.

$ DEBUG=dtsgen dtsgen schema/news.json

ChangeLog

v0.9.7 (2017-12-12)

  • Support the integer enum type by #263. Thank you @heapx :*+1:

v0.9.6 (2017-09-28)

  • Bug fix about unresoled $refs by #253. Thank you @skuligowski :+1:

v0.9.5 (2017-07-24)

  • Bug fix about tuple type support by #244. Thank you @laurelnaiad :+1:

v0.9.4 (2017-07-22)

  • Support tuple type of #239, #241. Thank you @laurelnaiad :+1:

v0.9.2 (2017-06-19)

  • Fix the bug about allOf property of #226. Thank you @dawidgarus @philliphoff :+1:

v0.9.1 (2017-01-27)

  • Improve message in error log. Thank you @gasi :+1:

v0.9.0 (2016-12-15)

  • Add yaml format support! Thank you @jdthorpe :+1:

v0.8.2 (2016-11-7)

  • Remove gulp scripts

v0.8.1 (2016-10-24)

v0.8.0 (2016-10-16)

  • Add to support null type for TypeScript 2.0
  • Add some input parameters

v0.7.2 (2016-9-19)

  • Update dependencies library

v0.7.1 (2016-7-5)

  • Fix crash bug #67

v0.7.0 (2016-7-3)

  • Update with some braking change

v0.6.1 (2016-4-28)

  • Minor update from v0.6.0

v0.6.0 (2016-4-14)

  • First stable version of dtsgenerator

License

dtsgenerator is licensed under the MIT license.

Copyright © 2016, Hiroki Horiuchi

Keywords

TypeScript

FAQs

Package last updated on 22 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.