Skip to content

Latest commit

 

History

History
50 lines (38 loc) · 1.78 KB

README.md

File metadata and controls

50 lines (38 loc) · 1.78 KB

@jawilx/gen-api

npm version npm downloads bundle JSDocs License

A modern cli tool that auto generate typescript api code from swagger 2 and openapi 3

pnpm i -D @jawilx/gen-api

Usage

  1. update package.json
{
  // ...
  "scripts": {
    // ...
    "genapi:init": "gen-api init",
    "genapi": "gen-api now"
  }
}
  1. init api.config.ts
pnpm genapi:init
  1. set api.config.ts apiList swaggerUrl (How to get swaggerUrl)

  2. generate

pnpm genapi

License

MIT License © 2023-PRESENT JawilX