swagger.json 自动生成axios 示例,实现自动化生成,并支持前后对比,节省前端写api代码的时间
npm install axios-swagger-helper

#### What is axios-swagger-helper?
1. Automatically export from swagger.json(OPEN API 3)
2. The example of file:
- dir
- api file (auto generate)
- custom config(config.js)
- global types(Vue):
#### INSTALL
`` sh`
yarn global add axios-swagger-helpernpm install -g axios-swagger-helper
use single project
` sh`
yarn add -D axios-swagger-helpernpm install -D axios-swagger-helper
`
package.json json`
{
"scripts":{
"api":"api-cli get https://example.com/swagger/v1/swagger.json -d ./api"
}
}
#### USAGE
` sh``Global
api-cli get {url} -d {output_dir}
#### Devlopment
- git clone https://github.com/minskiter/openapijs.git # clone this repo
- yarn # install dependencies
- yarn dev # debug
#### Issues
> Template:
>
> [Swagger Docs Url]: http://localhost:5000/swagger/v1/swagger.json
>
> Problem:
> something decode fail...
> [image]
#### CHANGE LOG
> [2021-3-20] v0.0.44
>
> 1. UploadProgress Callback Function
> 2. DownloadProgress Callback Function
>
> [2021-3-6] v0.0.42
>
> 1. Import userModel
> 2. Format parameter type {userModel.*}
>
> [2021-3-5] v0.0.41
>
> 1. Add model classes file
> 2. Rename axios.js config.js
> 3. Add import models resolve
> 4. [Update Warning] Model.js will change the old parameters, please use the class instead