swagger-vue
v1.0.3
Published
Swagger to JS & Vue & Axios Codegen
Downloads
782
Readme
swagger-vue
Swagger to JS & Vue & Axios Codegen
Installation
npm install swagger-vue
Example
const swaggerGen = require('swagger-vue')
const jsonData = require('../api-docs.json')
const fs = require('fs')
const path = require('path')
let opt = {
swagger: jsonData,
moduleName: 'api',
className: 'api'
}
const codeResult = swaggerGen(opt)
fs.writeFileSync(path.join(__dirname, '../dist/api.js'), codeResult)