kayx23 commented on code in PR #11951:
URL: https://github.com/apache/apisix/pull/11951#discussion_r1947423025


##########
docs/en/latest/plugins/public-api.md:
##########
@@ -26,189 +26,78 @@ description: The public-api is used for exposing an API 
endpoint through a gener
 #
 -->
 
-## Description
-
-The `public-api` is used for exposing an API endpoint through a general HTTP 
API router.
-
-When you are using custom Plugins, you can use the `public-api` Plugin to 
define a fixed, public API for a particular functionality. For example, you can 
create a public API endpoint `/apisix/batch-requests` for grouping multiple API 
requests in one request using the [batch-requests](./batch-requests.md) Plugin.
+<head>
+  <link rel="canonical" href="https://docs.api7.ai/hub/public-api"; />
+</head>
 
-:::note
-
-The public API added in a custom Plugin is not exposed by default and the user 
should manually configure a Route and enable the `public-api` Plugin on it.
+## Description
 
-:::
+The `public-api` Plugin exposes an internal API endpoint, making it publicly 
accessible. One of the primary use cases of this Plugin is to expose internal 
endpoints created by other Plugins.
 
 ## Attributes
 
-| Name | Type   | Required | Default | Description                             
                                                                                
                                     |
-|------|--------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| uri  | string | False    | ""      | URI of the public API. When setting up 
a Route, use this attribute to configure the original public API URI. |
+| Name    | Type      | Required | Default | Valid Values | Description |
+|---------|-----------|----------|---------|--------------|-------------|
+| uri     | string    | False    | -       | -            | Internal endpoint 
to expose. If not configured, expose the Route URI. |

Review Comment:
   no need to put `-` for nil values



##########
docs/en/latest/plugins/public-api.md:
##########
@@ -4,7 +4,7 @@ keywords:
   - Apache APISIX
   - API Gateway
   - Public API
-description: The public-api is used for exposing an API endpoint through a 
general HTTP API router.
+description: The `public-api` plugin exposes an internal API endpoint, making 
it publicly accessible. One of the primary use cases of this plugin is to 
expose internal endpoints created by other plugins.

Review Comment:
   remove ticks



##########
docs/zh/latest/plugins/public-api.md:
##########
@@ -4,7 +4,7 @@ keywords:
   - APISIX
   - API 网关
   - Public API
-description: 本文介绍了 public-api 的相关操作,你可以使用 public-api 插件保护你需要暴露的 API 的端点。
+description: `public-api` 插件公开了一个内部 API 端点,使其可被公开访问。该插件的主要用途之一是公开由其他插件创建的内部端点。

Review Comment:
   ditto, let's see if it resolves this error
   
   <img width="1045" alt="image" 
src="https://github.com/user-attachments/assets/84dfdc22-d544-4fc2-bcc1-f470ca243993";
 />
   



##########
docs/zh/latest/plugins/public-api.md:
##########
@@ -26,202 +26,78 @@ description: 本文介绍了 public-api 的相关操作,你可以使用 public
 #
 -->
 
-## 描述
-
-`public-api` 插件可用于通过创建路由的方式暴露用户自定义的 API。
-
-你可以通过在路由中添加 `public-api` 插件,来保护**自定义插件为了实现特定功能**而暴露的 API。例如,你可以使用 
[batch-requests](./batch-requests.md) 插件创建一个公共 API 端点 `/apisix/batch-requests` 
用于在一个请求中组合多个 API 请求。
+<head>
+  <link rel="canonical" href="https://docs.api7.ai/hub/public-api"; />
+</head>
 
-:::note 注意
-
-默认情况下,在自定义插件中添加的公共 API 不对外暴露的,你需要手动配置一个路由并启用 `public-api` 插件。
+## 描述
 
-:::
+`public-api` 插件公开了一个内部 API 端点,使其可被公开访问。该插件的主要用途之一是公开由其他插件创建的内部端点。
 
 ## 属性
 
-| 名称  | 类型   | 必选项    | 默认值   | 描述                                             
           |
-|------|--------|----------|---------|------------------------------------------------------------|
-| uri  | string | 否       | ""      | 公共 API 的 URI。在设置路由时,使用此属性来配置初始的公共 API 
URI。 |
+| 名称  | 类型   | 必选项 | 默认值 | 有效值 | 描述 |
+|------|--------|-------|-------|------|------|
+| uri  | string | 否    | -  | -  | 内部端点的 URI。如果未配置,则暴露路由的 URI。|

Review Comment:
   remove dashes for empty values



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to