0.1.1 • Published 7 months ago
@johnsonhuang4396/api-smasher v0.1.1
Api Smasher
Convert Swagger documentation to TypeScript API files (Support custom template)
Install
npm i @johnsonhuang4396/api-smasherHow 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