Skip to content

Commit

Permalink
docs(README): 格式化代码块, 增加相关链接
Browse files Browse the repository at this point in the history
  • Loading branch information
lexmin0412 committed Oct 18, 2024
1 parent 3ca41f3 commit f28319f
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,22 @@ const result = fs.readFileSync(path.resolve(__dirname, './openapiv3.json')).toSt

// 初始化
const instance = new ApifoxOpenApi({
// Apifox 访问令牌
accessToken: 'APS-XXXX',
// Apifox 开放 API 版本
apiVersion: '2024-03-28',
// Apifox 项目 ID
projectId: '9999999'
// Apifox 访问令牌
accessToken: 'APS-XXXX',
// Apifox 开放 API 版本
apiVersion: '2024-03-28',
// Apifox 项目 ID
projectId: '9999999'
})

// 调用 API
instance.importOpenApi(result).then((res)=>{
console.log('导入成功', res)
console.log('导入成功', res)
}).catch((err)=>{
console.error('导入失败', err)
console.error('导入失败', err)
})
```

## 参考文档

- [Apifox 开放 API](https://apifox-openapi.apifox.cn/doc-4296592)

0 comments on commit f28319f

Please sign in to comment.