UNPKG

swagger-codegen-typescript-koa2

Version:

Generate TypeScript Koa2 server skeleton codes from swagger spec.

24 lines (19 loc) 466 B
#!/usr/bin/env node const swgen = require('./lib'); function help() { console.log('swagger-codegen-typescript-koa2.js <swagger> <output>') } function main() { const filepath = process.argv[2]; if (filepath == null) { console.log('input filepath required'); return help(); } const outpath = process.argv[3]; if (filepath == null) { console.log('output filepath required'); return help(); } swgen.main(filepath, outpath); } main();