1.0.3 • Published 11 months ago

gendts v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

gendts

a cli to generate ts type from openapi,use openapi-typescript

install

npm install gendts -g

usage

bash

usage: gendts [command] [options]

commands
  init                         create config.json
  help                         display help info

argv
  --help                       display help info
  --version                    display version
  --type, -t                   (config.type) type of get openapi.json file. "fs" | "http"
  --source, -s                 (config.source) readFile path or request url
  --outputFileName, -o         (config.outputFileName) output file name. default: "./output/type.d.ts"
  --config, -c                 use config.json instead of argv

node

import gen from 'gendts'

const option = {
    type:"fs",
    source:"./input/openapi.json",
    outputFileName:"./output/type.d.ts"
}

gen(option)
1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago