2.5.7 • Published 3 years ago
api-code-builder v2.5.7
api-code-builder
English | 简体中文
build your axios code from swagger document (not support swagger v3)
and have good Intelligence in vscode
- create jsdoc in js
- create typing in ts
online experience
https://coppyc.github.io/api-code-builder/
get started
yarn add -D api-code-builder
then add npm script "build:api": "api-code-builder"
to your package.json
scripts
{
"scripts": {
"build:api": "api-code-builder"
}
}
finally, run and answer some questions, enjoy it!
yarn build:api
other ways to use
use in node or browser with npm
const apiCodeBuilder = require('api-code-builder')
const docs = { /** */ } // you need to get the swagger document by yourself
const code = apiCodeBuilder.buildApi({
paths: docs.paths,
definitions: docs.definitions,
// version: 'ts',
// customResponse: 'any',
// axiosFrom: './myAxios'
})
console.log(code)
use in browser with cdn
<script src="https://unpkg.com/api-code-builder@2.x/dist/main.umd.js"></script>
new version plan
- a adapter from swagger to axios in running time.
- output the swagger.json file as the adapter input
- only product js + .d.ts at once then only update without js
2.5.7
3 years ago
2.5.6
4 years ago
2.5.5
4 years ago
2.5.4
4 years ago
2.5.3
4 years ago
2.5.2
4 years ago
2.5.1
4 years ago
2.5.0
4 years ago
2.4.0
5 years ago
2.3.10
5 years ago
2.3.9
5 years ago
2.3.8
5 years ago
2.3.7
5 years ago
2.3.6
5 years ago
2.3.5
5 years ago
2.3.3
5 years ago
2.3.2
5 years ago
2.3.1
5 years ago
2.3.0
5 years ago
2.2.5
5 years ago
2.2.4
5 years ago
2.2.3
5 years ago
2.2.2
5 years ago
2.2.1
5 years ago
2.2.0
5 years ago
2.1.2
5 years ago
2.1.1
5 years ago
2.1.0
5 years ago
2.0.0
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
0.9.5
5 years ago
0.9.4
5 years ago
0.9.3
5 years ago
0.9.1
5 years ago
0.9.0
5 years ago