![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@xm-fe/create-api
Advanced tools
鲜沐科技 前端API生成工具
npm i @xm-fe/create-api -g
运行capi
命令时,会读取当前项目根目下的的 capi.config.js
文件,该文件中的配置会覆盖默认配置文件。
capi.config.js 具体配置及解释看文末
capi http://127.0.0.1:4523/export/openapi/5?version=3.0
直接使用导出的地址,无需再拼写 projectId
备注:此方法不适用于 全部导出,如需全部导出请使用 方式二
capi http://127.0.0.1:4523/export/openapi/9?version=3.0 954456
capi apifox导出的URL projectId
capi
读取项目根目录配置文件 capi.config 中的 remotePath
954456: 'SAAS',
1164722: 'summerfarm-manage',
1164725: 'pms-service',
1295278: 'summerfarm-crm',
1409074: 'tms',
1965722: 'summerfarm-wms',
2020406: 'OFC',
2437205: 'saas-manage',
2437206: 'saas-oms',
2437207: 'saas-mall',
2517920: 'summerfarm-wnc',
2546551: 'saas-pms',
2546569: 'SCP',
2546585: 'SRM',
2546600: 'bms-service',
2737704: 'summerfarm-mall'
缺少的项目 请联系我加进去
# 安装依赖
npm i
# 发布流程
# 编译
npm run build
# 本项目
npm link
# 引用调试的项目
npm link 包名
# 取消关联
npm unlink 包名
# 查看
npm ls -g
module.exports = {
remotePath: `http://127.0.0.1:4523/export/openapi/4?version=3.0`,
// 插入的模板代码
getApiCodeTpl(api) {
const pathParams = api.pathParams
.map((param) => `${param.name}${param.required ? '' : '?'}: ${param._type},`)
.join('\r\n')
return `
import net from '@/utils/net'
import { NetConfig } from '@/interface/IAxiosConfig'
/**
* ${api.summary}
*/
export function ${api.name}(
${pathParams ? pathParams : ''}
${api.queryParams ? `params?: ${api.queryParams._name},` : ''}
${api.bodyParams ? `data?: ${api.bodyParams._name},` : ''}
config?: NetConfig
): Promise<${api.resType}> {
return net(
{
url: \`${api.url}\`,
method: '${api.method}',
${api.isDownload ? `_download: true,` : ''}
${api.queryParams ? `params,` : ''}
${api.bodyParams ? ` data,` : ''}
},
config
)
}
`
}
}
FAQs
API快速导入
The npm package @xm-fe/create-api receives a total of 11 weekly downloads. As such, @xm-fe/create-api popularity was classified as not popular.
We found that @xm-fe/create-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.