
Security News
vlt 1.5.0 Adds Agent Skills Management
vlt 1.5.0 links skills from JavaScript dependencies to coding agents, with lockfile versioning and Socket data to filter out known malicious packages.
openapi-generate-config
Advanced tools
根据 swagger api-doc 自动生成 typescript 类型文件、请求函数
再也不必自己定义请求类型 请求方法
安装插件
# Yarn
yarn add openapi-generate-config --dev
# Npm
npm install openapi-generate-config --save-dev
生成、读取文件
npx openapi-make
如果项目根目录没有配置文件,执行命令后会会生成一个generateTypeBySwagger.json的文件,内容如下:
{
"doc": "请参考README.md,https://github.com/leesama/openapi-generate-config#readme",
// 根据数组配置生成文件
"generateConfig": [
{
// 目录名
"dirName": "B",
// 请求url的前缀
"urlPrefix": "/api",
// 当后端返回值中数据字段不为data时,指定其字段名,用于工具泛型推导data的类型
"dataMapping": "result",
"swaggerUrl": "https://petstore.swagger.io/v2/swagger.json"
},
{
"dirName": "A",
"swaggerUrl": "https://petstore.swagger.io/v2/swagger.json"
}
]
}
https://greasyfork.org/zh-CN/scripts/426942-swagger-umi-request-generate
可直接复制请求函数名
FAQs
run openapi-typescript by config
The npm package openapi-generate-config receives a total of 0 weekly downloads. As such, openapi-generate-config popularity was classified as not popular.
We found that openapi-generate-config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Security News
vlt 1.5.0 links skills from JavaScript dependencies to coding agents, with lockfile versioning and Socket data to filter out known malicious packages.

Security News
Rust 1.100 will add opt-in dependency cooldowns to Cargo, giving security scanners and maintainers time to catch malicious crate releases.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.