分析 swagger
的 api.json
并在本地生成或更新 definitions
对应的 Model class
In your project, package.json
{
"dependencies": {
"swagger-toolkit": "git+ssh://git@github.com:SublimeCT/swagger-toolkit.git",
}
}
To install
yarn
In command line
./node_modules/.bin/swagger-toolkit --help
In javascript / typescript file
import { ConfigOptions, SwaggerTool } from 'swagger-toolkit'
const config = new ConfigOptions({
site: 'http://api.lynee.cn',
docJSONPath,
})
const tool = new SwaggerTool('', null, null, config)
await tool.run()
In this project
yarn test # use mocha
yarn test-command # just use command