Skip to content

Commit

Permalink
2023.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
kings1990 committed Nov 30, 2023
1 parent 71dc3bb commit 0344bea
Show file tree
Hide file tree
Showing 14 changed files with 154 additions and 132 deletions.
8 changes: 4 additions & 4 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default defineUserConfig({
href: "/img/fastRequest.svg",
},
],
["script", { src: "//at.alicdn.com/t/c/font_2601581_sern1eshb.js" }],
["script", { src: "//at.alicdn.com/t/c/font_2601581_144d8yxi3ht.js" }],
["script", { src: "/js/baidu.js" }],
// ["script", { src: "https://cdn.wwads.cn/js/makemoney.js" }],
],
Expand Down Expand Up @@ -64,9 +64,9 @@ export default defineUserConfig({
},
},
}),
sitemapPlugin({
hostname: "https://api-buddy.cn",
}),
sitemapPlugin({
hostname: "https://api-buddy.cn",
}),
],

pagePatterns: ["**/*.md", "!*.snippet.md", "!.vuepress", "!node_modules"],
Expand Down
2 changes: 1 addition & 1 deletion docs/.vuepress/public/baidu_verify_codeva-OWrPlOc2wg.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10ffbdc05854598c3624fb8df88be459
10ffbdc05854598c3624fb8df88be459
20 changes: 10 additions & 10 deletions docs/.vuepress/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default hopeTheme(

darkmode: "enable",

iconAssets: "//at.alicdn.com/t/c/font_2601581_dhvis4jtn7m.css",
iconAssets: "//at.alicdn.com/t/c/font_2601581_144d8yxi3ht.css",

locales: {
"/": {
Expand Down Expand Up @@ -55,33 +55,33 @@ export default hopeTheme(
notice: [
{
path: "/",
title: "将在2023.2.2推出",
title: "将在2023.2.3推出",
content:
'<ul><li>Markdown文档模板配置</li><li>JSON5 支持</li></ul><div class="addthis_inline_follow_toolbox_qssu"></div>',
'<ul><li>API同步至Postman</li><li>Environment重构</li></ul><div class="addthis_inline_follow_toolbox_qssu"></div>',
actions: [
{
text: "了解详情→",
link: "/guide/history.html#_2023-2-2",
link: "/guide/history.html#_2023-2-3",
type: "primary",
},
],
showOnce: false,
key: "2023.2.2",
key: "2023.2.3",
},
{
path: "/en",
title: "Coming in <b>2023.2.2</b>",
title: "Coming in <b>2023.2.3</b>",
content:
'<ul><li>Markdown doc template config</li><li>JSON5 support</li></ul><div class="addthis_inline_follow_toolbox"></div>',
'<ul><li>Sync API to Postman</li><li>Environment refactoring</li></ul><div class="addthis_inline_follow_toolbox"></div>',
actions: [
{
text: "Learn more→",
link: "/en/guide/history.html#_2023-2-2",
link: "/en/guide/history.html#_2023-2-3",
type: "primary",
},
],
showOnce: true,
key: "2023.2.2",
key: "2023.2.3",
},
],
},
Expand All @@ -107,5 +107,5 @@ export default hopeTheme(
},
},
},
{ custom: true }
{ custom: true },
);
2 changes: 1 addition & 1 deletion docs/en/guide/features/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The icon in the document corresponds to the button icon in the plugin
- [<ColorIcon icon="saveGroup" /> Save API group](./apiGroup.md)
- [<ColorIcon icon="saveTemp" /> Temporary request](./tempRequest.md)
- [<ColorIcon icon="regenerate" /> Re generate](./regenerate.md)
- [<ColorIcon icon="postmanSync" /> Postman sync](./postmanSync.md)
- [<ColorIcon icon="postmanNew" /> Postman sync](./postmanSync.md)
- [<ColorIcon icon="clearNew" /> Clear](./clear.md)
- [<ColorIcon icon="import" /> cURL import](./curlImport.md)
- [<ColorIcon icon="curl1" /> cURL copy](./copyCurl.md)
Expand Down
68 changes: 33 additions & 35 deletions docs/en/guide/features/markdownDocTemplateConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Provides a custom format for local markdown and [Online API](./apiDocSync.md) do
### Content variable

| Key | Parameter type | Description |
|:-----------------------|:------------------------------|:-------------------------------------------------------------------------------------------------------------------|
| :--------------------- | :---------------------------- | :----------------------------------------------------------------------------------------------------------------- |
| url | String | Final url |
| originUrl | String | Origin url, contains the name of the original path variable |
| namingPolicy | String | API namingPolicy, fixed value[1.byMethodName:by java method name 2.byDoc:by JavaDoc or Swagger method description] |
Expand All @@ -34,7 +34,7 @@ Provides a custom format for local markdown and [Online API](./apiDocSync.md) do
### Syntax variables

| Key | Description |
|:----|:----------------|
| :-- | :-------------- |
| H1 | Markdown # |
| H2 | Markdown ## |
| H3 | Markdown ### |
Expand All @@ -47,15 +47,15 @@ Provides a custom format for local markdown and [Online API](./apiDocSync.md) do
### Header

| Key | Parameter type | Description |
|:--------|:---------------|:----------------|
| :------ | :------------- | :-------------- |
| enabled | Boolean | Enable flag |
| type | String | Key of Header |
| value | String | Value of Header |

### KeyValue

| Key | Parameter type | Description |
|:--------|:---------------|:-----------------------------------------------------------------|
| :------ | :------------- | :--------------------------------------------------------------- |
| enabled | Boolean | Enable flag |
| key | String | Parameter key |
| type | String | Parameter type, fixed value [Object Array String Number Boolean] |
Expand All @@ -64,98 +64,96 @@ Provides a custom format for local markdown and [Online API](./apiDocSync.md) do

## Default template

```velocity
````velocity
#if (${namingPolicy}=='byDoc')
$H1 ${methodDescription}
#else
$H1 $!{methodName}
$H3 Method description
```
$!{methodDescription}
```
#end
> URL: $!{url}
>
> Origin Url: $!{originUrl}
>
> Type: $!{methodType}
$H3 Request headers
|Header Name| Header Value|
|---------|------|
#foreach( $h in ${headerList})
|$h.type|$h.value|
#end
$H3 Parameters
$H5 Path parameters
| Parameter | Type | Value | Description |
|---------|------|------|------------|
#foreach( $node in ${pathKeyValueList})
|$node.key|$!{node.type}|$!{node.value}|$!{node.comment}|
#end
$H5 URL parameters
|Required| Parameter | Type | Value | Description |
|---------|---------|------|------|------------|
#foreach( $node in ${urlParamsKeyValueList})
|$!{node.enabled}|$!{node.key}|$!{node.type}|$!{node.value}|$!{node.comment}|
#end
$H5 Body parameters
$H6 JSON
```
${jsonParam}
```
$H6 JSON document
```
${jsonParamDocument}
```
$H5 Form URL-Encoded
|Required| Parameter | Type | Value | Description |
|---------|---------|------|------|------------|
#foreach( $node in ${urlEncodedKeyValueList})
|$!{node.enabled}|$!{node.key}|$!{node.type}|$!{node.value}|$!{node.comment}|
#end
$H5 Multipart
|Required | Parameter | Type | Value | Description |
|---------|---------|------|------|------------|
#foreach( $node in ${multipartKeyValueList})
|$!{node.enabled}|$!{node.key}|$!{node.type}|$!{node.value}|$!{node.comment}|
#end
$H3 Response
$H5 Response example
```
$!{responseExample}
```
$H5 Response document
```
$!{returnDocument}
```
```
````
15 changes: 13 additions & 2 deletions docs/en/guide/features/postmanSync.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ Version required: <Badge text="2023.2.3" />
::: tip
To improve the data synchronized to postman, it is recommended to select `sync after api save` option in the postman config of the plugin
then trigger the synchronization by save the api.

It is also recommended to use this function to synchronize the API instead of exporting
:::

## Api key

API key is used to perform manual actions using the Postman Online API. These actions include **creating collections**, **creating directories**, **creating requests**, and more.

Open [https://postman.co/settings/me/api-keys](https://postman.co/settings/me/api-keys) and login, and then generate an API key. It is recommended to create an API key without an expiration date.
Expand All @@ -18,7 +21,6 @@ Open [https://postman.co/settings/me/api-keys](https://postman.co/settings/me/ap

The Workspace ID is the identifier for a Postman workspace. There are 2 strategies to create a workspace.


1. Create one workspace for each project.(Recommended)
2. Create one workspace to represent a company, and use different collections to represent different projects within the company.

Expand All @@ -39,21 +41,30 @@ The Workspace ID is the identifier for a Postman workspace. There are 2 strategi
![workspaceInfo](/img/2023.2.3/workspaceInfo.png)

## Initial value & Current value

Variable in Environment contains **Initial value** and **Current value**,**Initial value** is shared with your team,but **Current value** only store in your local.
Request will finally use **Current value**.

==**Restful Fast Request in fact sync the Initial value of Environment**==.

So, if the environment values are updated in the plugin and sync successfully to Postman,
when executing a request, Postman will not immediately use the synchronized values.
Instead, you will need to manually replace the values in the environment tab
Instead, you will need to manually replace the values in the environment tab
or perform a complete replacement by clicking on "Reset All".

![workspaceInfo](/img/2023.2.3/resetEnvironmentValue.png)

## Pre and Post script

Due to language differences, the plugin does not synchronize pre-request and post-request scripts.
Therefore, when using the plugin, it is recommended to write common scripts in the [project-level config](./projectValueConfig.md).
This way, after synchronizing with Postman, you only need to write pre-request and post-request scripts at the collection level in Postman.

![postmanScript](/img/2023.2.3/postmanScript.png)

## Note

1. It is recommended to check the option "Sync to Postman after saving". If not checked, you need to save manually before triggering and then click on the Sync button.
2. For teamwork, if multiple identical collections appear in the same workspace, you only need to manually replace the collection ID in the configuration with one of them.
3. For teamwork, if multiple identical folders appear in the same collection, you can use the `pmFolderId` property in the `.fastRequest/collections/ROOT/moduleName/className/directory.json` file from one of them.
4. For teamwork, if the same API exists twice in Postman, you can ensure consistency by modifying the `pmRequestId` and `pmResponseId` of one of the data. You can use [<ColorIcon icon="storeData" /> Navigate current method stored data](./navigateCurrentMethodJson.md) to locate the stored file. The best way is to use Git to manage and commit the `rapi` files to keep the underlying storage data consistent.
8 changes: 5 additions & 3 deletions docs/en/guide/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,30 @@ and some plug-in versions are rendering components under specific systems (such
:::

## 2023.2.3 <Badge text="免费试用" type="tip"/> <Badge text="developing" color="LigntPink"/>

- <Badge text="Sync API to Postman" type="tip"/>
- <Badge text="Environment refactoring" type="info"/>

::: tip Sync API to Postman
You only need to configure the token of Postman and the ID of the workspace to upload the API to Postman.Enjoy what fast request do not support.

To improve the data synchronized to postman, it is recommended to select `sync after api save` option in the postman config of the plugin
To improve the data synchronized to postman, it is recommended to select `sync after api save` option in the postman config of the plugin
then trigger the synchronization by save the api.

More details please refer [Postman sync](./features/postmanSync.md)
:::

:::info Environment refactoring
Environment contains Current value and Initial value. Initial value can be shared by submitting config fine in `.fastRequest/config/fastRequestCurrentProjectEnvironment.json`.
Environment contains Current value and Initial value. Initial value can be shared by submitting config fine in `.fastRequest/config/fastRequestCurrentProjectEnvironment.json`.

![environment](/img/2023.2.3/environment_en.png)
:::

## 2023.2.2 <Badge text="Free trial" type="tip"/> <Badge text="Newest version" color="LigntGreen"/>

- <Badge text="Markdown doc template config" type="tip"/>
- <Badge text="JSON5 support" type="tip"/>
- <Badge text="Compatible with IDEA 2023.3" type="tip"/>
- <Badge text="Compatible with IDEA 2023.3" type="tip"/>
- <Badge text="History requests list show errors" type="danger"/>

::: tip Markdown doc template config
Expand Down
3 changes: 2 additions & 1 deletion docs/en/guide/whatsnew.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,18 @@ Because developing version is still in development, the documentation of develop
[**More detail ---------------->**](./history.md)

## 2023.2.3 <Badge text="Free trial" type="tip"/> <Badge text="developing" color="LigntPink"/>

- <Badge text="Sync API to Postman" type="tip"/>
- <Badge text="Environment refactoring" type="info"/>

## 2023.2.2 <Badge text="Free trial" type="tip"/> <Badge text="Newest version" color="LigntGreen"/>

- <Badge text="Markdown doc template config" type="tip"/>
- <Badge text="JSON5 support" type="tip"/>
- <Badge text="Compatible with IDEA 2023.3" type="tip"/>
- <Badge text="History requests list show errors" type="danger"/>
- <Badge text="History requests list show errors" type="danger"/>


## 2023.2.1.1 <Badge text="Free trial" type="tip"/>

- <Badge text="Style optimization for Url textField in some themes" type="tip"/>
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/features/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ icon: featuresNew
- [<ColorIcon icon="save" /> 保存请求](./saveRequest.md)
- [<ColorIcon icon="saveGroup" /> API 分组保存](./apiGroup.md)
- [<ColorIcon icon="saveTemp" /> 临时请求](./tempRequest.md)
- [<ColorIcon icon="postmanSync" /> Postman同步](./postmanSync.md)
- [<ColorIcon icon="postmanNew" /> Postman同步](./postmanSync.md)
- [<ColorIcon icon="regenerate" /> 重新生成请求](./regenerate.md)
- [<ColorIcon icon="clearNew" /> 清除](./clear.md)
- [<ColorIcon icon="import" /> cURL 导入](./curlImport.md)
Expand Down
Loading

0 comments on commit 0344bea

Please sign in to comment.