UNPKG

swagger-json-schema-request

Version:

通过Yapi JSON Schema生成接口Axios或Taro接口

9 lines (7 loc) 293 B
import path from 'path'; import SwaggerJsonSchemaRequest from './../lib/index'; const source = path.join(__dirname, './test.json'); const apiPath = path.join(__dirname, './../api/'); new SwaggerJsonSchemaRequest(source, 'axios', { host: 'https://test/api', }).generateFile(apiPath)