see typescript https://github.com/minskiter/auto-openapi
-
Automatically export from swagger.json(OPEN API 3)
-
The example of file:
yarn global add axios-swagger-helper
# npm install -g axios-swagger-helper
use single project
yarn add -D axios-swagger-helper
# npm install -D axios-swagger-helper
package.json
{
"scripts":{
"api":"api-cli get https://example.com/swagger/v1/swagger.json -d ./api"
}
}
# Global
api-cli get {url} -d {output_dir}
- git clone https://github.com/minskiter/openapijs.git # clone this repo
- yarn # install dependencies
- yarn dev # debug
Template:
Problem: something decode fail... [image]
[2021-3-20] v0.0.44
- UploadProgress Callback Function
- DownloadProgress Callback Function
[2021-3-6] v0.0.42
- Import userModel
- Format parameter type {userModel.*}
[2021-3-5] v0.0.41
- Add model classes file
- Rename axios.js config.js
- Add import models resolve
- [Update Warning] Model.js will change the old parameters, please use the class instead