Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
kings1990 committed Mar 30, 2024
1 parent 281ee6d commit 1b8083b
Show file tree
Hide file tree
Showing 19 changed files with 83 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default defineUserConfig({
],
[
"script",
{ src: "//at.alicdn.com/t/c/font_2601581_qwqvhwcqtsl.js", async: true },
{ src: "//at.alicdn.com/t/c/font_2601581_j5ywre6kshm.js", async: true },
],
// ["script", { src: "/js/baidu.js" ,"async":true}],
["script", { src: "/js/gtag.js", async: true }],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.vuepress/public/img/toolwindowNew.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.vuepress/public/img/toolwindowNew_en.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/.vuepress/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export const enSidebar = sidebar({
"navigateCurrentMethod",
"saveRequest",
"tempRequest",
"apifox",
"postmanSync",
"regenerate",
"curlImport",
"copyCurl",
Expand Down Expand Up @@ -123,6 +125,8 @@ export const zhSidebar = sidebar({
"navigateCurrentMethod",
"saveRequest",
"tempRequest",
"apifox",
"postmanSync",
"regenerate",
"curlImport",
"copyCurl",
Expand Down
2 changes: 1 addition & 1 deletion docs/.vuepress/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default hopeTheme(

darkmode: "enable",

iconAssets: "//at.alicdn.com/t/c/font_2601581_d17fm4nxa97.css",
iconAssets: "//at.alicdn.com/t/c/font_2601581_j5ywre6kshm.css",

locales: {
"/": {
Expand Down
3 changes: 2 additions & 1 deletion docs/en/guide/features/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ The icon in the document corresponds to the button icon in the plugin
- [<ColorIcon icon="save" /> Save request](./saveRequest.md)
- [<ColorIcon icon="saveGroup" /> Save API group](./apiGroup.md)
- [<ColorIcon icon="saveTemp" /> Temporary request](./tempRequest.md)
- [<ColorIcon icon="postmanNew" /> Postman sync](./postmanSync.md)
- [<ColorIcon icon="apifox" /> Apifox integration](./apifox.md)
- [<ColorIcon icon="postmanNew" /> Postman integration](./postmanSync.md)
- [<ColorIcon icon="apiParamGroupNew" /> API group toggle](./apiGroup.md)
- [<ColorIcon icon="locate" /> Navigate to current method](./navigateCurrentMethod.md)
- [<ColorIcon icon="storeData" /> Navigate current method stored data](./navigateCurrentMethodJson.md)
Expand Down
37 changes: 37 additions & 0 deletions docs/en/guide/features/apifox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Apifox integration

Version required: <Badge text="2024.1.4+" />

![apifoxIntegration](/img/2024.1.4/apifoxIntegration_en.png)

## 1. API access token configuration

![apifoxGenerateApikey](/img/features/apifoxGenerateApikey_en.png)

Setting path: `Avatar -> Account Setting-> API Access Token`

::: tip Expiration
Note that after the validity period of the Api key, the plugin's Apifox synchronization function will no longer work,
so it is recommended to check `no Expriation` when creating the Api Access token.
:::

## 2. Mapping project

![apifoxConfigProject](/img/features/apifoxConfigProject_en.png)

After we have correctly set the Api access token, we need to make a mapping association between the IDEA project
and the Apifox project. Click to refresh the project. When the project is loaded, click on the team option and
check the target project.

## 3. Environment sync
![apifoxSyncEnvironment](/img/features/apifoxSyncEnvironment_en.png)

Environment sync function will synchronize all domain names, variables, and global parameters of the project to Apifox
as service parameters, variables, and global parameters. It is recommended to execute this step before **API sync**


## 4. API sync
![apifoxSyncApi](/img/features/apifoxSyncApi_en.png)

To synchronize the API, you need to save the API first. It can be triggered manually or automatically.
For automatic triggering, you need to check the `Sync after save` option in the Apifox sync setting.
5 changes: 3 additions & 2 deletions docs/guide/features/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ icon: featuresNew
- [<ColorIcon icon="save" /> 保存请求](./saveRequest.md)
- [<ColorIcon icon="saveGroup" /> API 分组保存](./apiGroup.md)
- [<ColorIcon icon="saveTemp" /> 临时请求](./tempRequest.md)
- [<ColorIcon icon="postmanNew" /> Postman同步](./postmanSync.md)
- [<ColorIcon icon="apifox" /> Apifox 集成](./apifox.md)
- [<ColorIcon icon="postmanNew" /> Postman 集成](./postmanSync.md)
- [<ColorIcon icon="apiParamGroupNew" /> API 分组切换](./apiGroup.md)
- [<ColorIcon icon="locate" /> 当前方法定位](./navigateCurrentMethod.md)
- [<ColorIcon icon="storeData" /> 导航当前方法存储数据](./navigateCurrentMethodJson.md)
Expand All @@ -33,7 +34,7 @@ icon: featuresNew
- [<ColorIcon icon="historyNew" /> 历史请求预览](./historyRequest.md)
- [<ColorIcon icon="github" /> <ColorIcon icon="gitee" /> <ColorIcon icon="gitlab" /> API 文档同步](./apiDocSync.md)
- [<ColorIcon icon="markdown" /> API 文档分享](./shareApiDoc.md)
- [<ColorIcon icon="settings" /> Markdown文档模板配置](./markdownDocTemplateConfig.md)
- [<ColorIcon icon="settings" /> Markdown 文档模板配置](./markdownDocTemplateConfig.md)
- [<ColorIcon icon="rcd-refresh" /> 项目配置刷新](./projectConfigRefresh.md)
- [<ColorIcon icon="analyseNew" /> 年度报告](./annualReport.md)
- [<ColorIcon icon="customToolbar" /> 自定义工具栏](./customToolbar.md)
Expand Down
32 changes: 32 additions & 0 deletions docs/guide/features/apifox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Apifox 集成

版本要求: <Badge text="2024.1.4+" />

![apifoxIntegration](/img/2024.1.4/apifoxIntegration.png)

## 1. 配置 API access token

![apifoxGenerateApikey](/img/features/apifoxGenerateApikey.png)

参考 Apifox 官方文档 [Apifox 开放 API](https://apifox.com/help/openapi), 获取 API access token 的功能路径:`头像-账号设置- API 访问令牌`

::: tip 有效期
需要注意的是,过了 Api access token的有效期,插件关于 Apifox 同步的功能将全部失效,所以建议在创建 Api access token 的时候设置为`无限期`
:::

## 2. 映射项目

![apifoxConfigProject](/img/features/apifoxConfigProject.png)

当我们正确设置好 Api access token 之后,需要对 IDEA 项目与 Apifox 的项目进行一个映射关联,点击刷新项目,当项目加载完毕以后,点开团队选项,勾选对应的项目即可。


## 3. 同步 Environment
![apifoxSyncEnvironment](/img/features/apifoxSyncEnvironment.png)

同步 Environment 会将项目的不同环境的域名、变量、全局参数全部同步至 Apifox,作为 Apifox 的服务参数、变量以及全局参数。这一步建议放在 API 同步之前**先执行**

## 4. 同步 API
![apifoxSyncApi](/img/features/apifoxSyncApi.png)

同步 API 需要先将 API 进行保存,可以手动触发,也可以自动触发,自动触发需要在 Apifox 同步设置中勾选`保存 API 后同步 Apifox`选项。
2 changes: 1 addition & 1 deletion docs/guide/features/postmanSync.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Postman 同步
# Postman 集成

版本要求: <Badge text="2023.2.3" />

Expand Down
2 changes: 2 additions & 0 deletions docs/guide/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ icon: changelog
<MyCarousel :imgList="['/img/2024.1.4/apifoxIntegration.png','/img/2024.1.4/apifoxConfig.png']" />

Apifox集成,支持同步 API、环境变量、域名信息等。只要配置一个 `API key`,并设定项目映射关系即可进行同步。

更多信息请点击 [Apifox 集成](/guide/features/apifox.md)
:::

::: hint AI支持优化 <Badge vertical="top" text="Important feature" color="orange"/>
Expand Down

0 comments on commit 1b8083b

Please sign in to comment.