Copilot commented on code in PR #13219:
URL: https://github.com/apache/apisix/pull/13219#discussion_r3081049972
##
docs/en/latest/plugins/request-validation.md:
##
@@ -30,6 +30,9 @@ description: The request-validation Plugin validates requests
before forwarding
https://docs.api7.ai/hub/request-validation"; />
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
Review Comment:
In MDX, ESM `import` statements must be placed before any other content
(including JSX/HTML like `...`). Keeping imports after the
`` block can break MDX compilation/build. Move the `import Tabs` /
`import TabItem` lines to the very top of the document (typically right after
frontmatter, before any markup).
##
docs/en/latest/plugins/request-validation.md:
##
@@ -71,6 +74,17 @@ The following example demonstrates how to validate request
headers against a def
Create a Route with `request-validation` Plugin as follows:
+
Review Comment:
The `groupId` values (`\"api\"` and elsewhere `\"k8s-api\"`) are very
generic. Docusaurus persists tab selection by `groupId` across the whole site,
so generic IDs can cause unrelated pages to affect each other's selected tab.
Use page-/plugin-specific group IDs (e.g., `request-validation-api` and
`request-validation-k8s-api`) to avoid cross-page collisions.
##
docs/zh/latest/plugins/request-validation.md:
##
@@ -71,6 +74,17 @@ admin_key=$(yq '.deployment.admin.admin_key[0].key'
conf/config.yaml | sed 's/"/
使用 `request-validation` 插件创建路由,如下所示:
+
Review Comment:
This same Admin API / ADC / Ingress Controller tab block is repeated
multiple times in the document (and similarly for the nested K8s tabs). To
reduce duplication and the chance of sections drifting out of sync, consider
extracting a small MDX component (or using an include/partial supported by your
docs toolchain) that renders the common tab scaffolding and only varies the
per-section content.
--
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]