
Security News
Node.js Drops Bug Bounty Rewards After Funding Dries Up
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.
Generate the front-end code by parsing the interface document
这是一个通过 swagger 的 url 自动化生成代码的项目。
因为使用 umi 途中需要写很多重复的 service 文件和 mock 文件,故建立此项目来自动化这些重复的工作。
安装
npm i milady
使用
import milady from 'milady';
const config = {
swaggerUrl: '', //必填,用于获取数据
plugins: [
{
outPath: '', //输出目录路径
handelData: params => {
return [{ fileName: 'api.ts', fileStr: params }];
}, //传入swagger数据,返回集合fileName是生成的文件名,fileStr是生成的文件内容
},
], //可选的,用于自定义输出文件
};
milady(config); //传入配置参数,调用milady方法生成文件
安装
npm i milady -D
使用:
milady [swaggerUrl]生成文件.miladyrc.js文件进行高级设置,配置文件如下:exports.default = {
swaggerUrl: '', //推荐的,优先加载命令行的url,命令行没有再加载配置的url
plugins: [
{
outPath: '', //输出目录路径
handelData: params => {
return [{ fileName: 'api.ts', fileStr: params }];
}, //传入swagger数据,返回集合fileName是生成的文件名,fileStr是生成的文件内容
},
], //可选的
};
当命令和配置文件 swaggerUrl 冲突时使用命令的 swaggerUrl
FAQs
Generate the front-end code by parsing the interface document
We found that milady demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.