Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (36 sloc) 1.06 KB

@squelette/ts-gen npm version

A type definition generator from Open API 3.0 spec.

About package

This packages generates TypeScript interface from.

  • Schema components
  • Error object (for each status codes)
  • Request bodies
  • Query Parameters
  • Response objects
  • Path Parameters

Install

$ yarn add @squelette/ts-gen

How to use

$ ts-gen generate swagger.yml --namespace PetStore --dist types

CLI Options

Usage: ts-gen [options] [command]

Generate type definitions from swagger specs

Options:
  -V, --version              output the version number
  -h, --help                 output usage information

Commands:
  generate [options] <file>

  Options:
  -n, --namespace <namespace>  Root namepace
  -d, --dist <dist>            Output directory
  -h, --help                   output usage information

Example

See example.

License

MIT

You can’t perform that action at this time.