Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 1 KB

README.md

File metadata and controls

48 lines (35 loc) · 1 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 --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:
  -d, --dist <dist>            Output directory
  -h, --help                   output usage information

Example

See example.

License

MIT