0.1.1 • Published 1 year ago

@johnsonhuang4396/api-smasher v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Api Smasher

npm version jsDocs.io github release NPM Unpacked Size NPM License

Convert Swagger documentation to TypeScript API files (Support custom template)

Install

npm i @johnsonhuang4396/api-smasher

How to use

import { generateApi } from '@johnsonhuang4396/api-smasher'

generateApi({
  config: 'YOUR_SWAGGER_REMOTE_URL',
  autoRun: true,
  outputDir: 'YOUR_OUTPUT_DIR',
  selectedPaths: [API_PATHS_YOU_WANT]
})

then you will find Api.ts and Model.ts file be generated at YOUR_OUTPUT_DIR

More usage ways

Find it HERE

Types

Find it HERE