-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add public-api related content #6218
Conversation
docs/zh/latest/plugin-develop.md
Outdated
@@ -326,8 +326,7 @@ function _M.api() | |||
end | |||
``` | |||
|
|||
注意注册的接口会暴露到外网。 | |||
你可能需要使用 [interceptors](plugin-interceptors.md) 来保护它。 | |||
注意,注册的接口将不会默认暴露,您需要使用[public-api 插件](plugins/public-api.md)来暴露它。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注意,注册的接口将不会默认暴露,您需要使用[public-api 插件](plugins/public-api.md)来暴露它。 | |
注意,注册的接口将不会默认暴露,需要使用[public-api 插件](plugins/public-api.md)来暴露它。 |
the use of honorifics for personal pronouns is not required in documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, Other personal pronouns in the md file of this PR design have also been removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @shuaijinchao
docs/zh/latest/plugins/prometheus.md
Outdated
|
||
``` | ||
plugin_attr: | ||
prometheus: | ||
enable_export_server: false | ||
``` | ||
|
||
同时,您还需要使用 [public-api](public-api.md) 插件来暴露它。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同时,您还需要使用 [public-api](public-api.md) 插件来暴露它。 | |
同时,需要使用 [public-api](public-api.md) 插件来暴露它。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
docs/en/latest/plugins/public-api.md
Outdated
The `public-api` plugin is used to enhance the plugin public API access control. | ||
When current users develop custom plugins, they can register some public APIs for fixed functionality, such as the `/apisix/plugin/jwt/sign` API in `jwt-auth`. These APIs can only apply limited plugins for access control (currently only `ip-restriction`) by way of plugin interceptors. | ||
|
||
With the `public-api` plugin, we put the all public API into general HTTP API router, which is consistent with the normal route registered by the user and can apply any plugin. The public API added in the user plugin is no longer open by default by APISIX, but the user manually configures the route for it, and the user can configure any uri and plugin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the `public-api` plugin, we put the all public API into general HTTP API router, which is consistent with the normal route registered by the user and can apply any plugin. The public API added in the user plugin is no longer open by default by APISIX, but the user manually configures the route for it, and the user can configure any uri and plugin. | |
With the `public-api` plugin, we put all public API into the general HTTP API router, which is consistent with the normal route registered by the user and can apply any plugin. The public API added in the user plugin is no longer open by default by APISIX, but the user manually configures the route for it, and the user can configure any uri and plugin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -40,7 +40,7 @@ title: node-status | |||
|
|||
## 插件接口 | |||
|
|||
插件增加接口 `/apisix/status`,可通过 [interceptors](../plugin-interceptors.md) 保护该接口。 | |||
插件增加接口 `/apisix/status`,需要通过 [public-api](public-api.md) 插件来暴露它。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's update the link to point to English version like
apisix/docs/zh/latest/plugins/kafka-logger.md
Line 183 in 48e8a1e
| log_format | object | 可选 | {"host": "$host", "@timestamp": "$time_iso8601", "client_ip": "$remote_addr"} | | 以 JSON 格式的键值对来声明日志格式。对于值部分,仅支持字符串。如果是以 `$` 开头,则表明是要获取 [APISIX 变量](../../../en/latest/apisix-variable.md) 或 [Nginx 内置变量](http://nginx.org/en/docs/varindex.html)。特别的,**该设置是全局生效的**,意味着指定 log_format 后,将对所有绑定 http-logger 的 Route 或 Service 生效。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @spacewander.
As currently used, it renders properly on our official website (when no language-specific localization documents are returned to English), and if we modify it directly, it will cause confusion on the official website, i.e. some multilingual documents will be all linked back to the English version.
It seems like we can't have it both ways, but I think it's more important to make sure the content on the official website is always available in the right way than to use the md file to read it directly.
Currently there is no Chinese documentation for the public-api
plugin, if you think it is really necessary to change it, I will do so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about using English only in this PR? After it gets merged, @guoqqqi and @Baoyuantop could help to translate 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bzp2010 @juzhiyuan
We already do this in other loggers. Although someone else can translate it later, but we should not invent another way to handle it, and merge a PR which will create known broken links.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spacewander updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What this PR does / why we need it:
Add public-api related documents, and remove obsolete content regarding plugin interceptors and plugin development.
Pre-submission checklist: