This is an automated email from the ASF dual-hosted git repository.

wenming pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new bc71c0afe docs: fix code blocks in admin-api.md (#11796)
bc71c0afe is described below

commit bc71c0afedb60c18d8a8681f8936dd5ecab640bd
Author: 徐瑞东 <[email protected]>
AuthorDate: Thu Dec 5 17:20:48 2024 +0800

    docs: fix code blocks in admin-api.md (#11796)
---
 docs/en/latest/admin-api.md              | 32 ++++++++++++++++----------------
 docs/en/latest/terminology/credential.md |  6 +++---
 docs/zh/latest/admin-api.md              | 32 ++++++++++++++++----------------
 docs/zh/latest/terminology/credential.md |  6 +++---
 4 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/docs/en/latest/admin-api.md b/docs/en/latest/admin-api.md
index c7a236da7..e32b08a32 100644
--- a/docs/en/latest/admin-api.md
+++ b/docs/en/latest/admin-api.md
@@ -913,25 +913,25 @@ Prerequisite: Consumer `jack` has been created.
 
 Create the `key-auth` Credential for consumer `jack`:
 
-    ```shell
-    curl 
http://127.0.0.1:9180/apisix/admin/consumers/jack/credentials/auth-one  \
-    -H "X-API-KEY: $admin_key" -X PUT -i -d '
-    {
-        "plugins": {
-            "key-auth": {
-                "key": "auth-one"
-            }
+```shell
+curl http://127.0.0.1:9180/apisix/admin/consumers/jack/credentials/auth-one  \
+-H "X-API-KEY: $admin_key" -X PUT -i -d '
+{
+    "plugins": {
+        "key-auth": {
+            "key": "auth-one"
         }
-    }'
-    ```
+    }
+}'
+```
 
-    ```
-    HTTP/1.1 200 OK
-    Date: Thu, 26 Dec 2019 08:17:49 GMT
-    ...
+```
+HTTP/1.1 200 OK
+Date: Thu, 26 Dec 2019 08:17:49 GMT
+...
 
-    
{"key":"\/apisix\/consumers\/jack\/credentials\/auth-one","value":{"update_time":1666260780,"plugins":{"key-auth":{"key":"auth-one"}},"create_time":1666260780}}
-    ```
+{"key":"\/apisix\/consumers\/jack\/credentials\/auth-one","value":{"update_time":1666260780,"plugins":{"key-auth":{"key":"auth-one"}},"create_time":1666260780}}
+```
 
 ## Upstream
 
diff --git a/docs/en/latest/terminology/credential.md 
b/docs/en/latest/terminology/credential.md
index 560d4314a..21b263f38 100644
--- a/docs/en/latest/terminology/credential.md
+++ b/docs/en/latest/terminology/credential.md
@@ -123,14 +123,14 @@ admin_key=$(yq '.deployment.admin.admin_key[0].key' 
conf/config.yaml | sed 's/"/
 
 4. Test.
 
-Test the request with the `auth-one` and `auth-two` keys, and they both 
respond correctly.
+    Test the request with the `auth-one` and `auth-two` keys, and they both 
respond correctly.
 
     ```shell
     curl http://127.0.0.1:9080/hello -H 'apikey: auth-one' -I
     curl http://127.0.0.1:9080/hello -H 'apikey: auth-two' -I
     ```
 
-Enable the `limit-count` plugin for the Consumer.
+    Enable the `limit-count` plugin for the Consumer.
 
     ```shell
     curl http://127.0.0.1:9180/apisix/admin/consumers \
@@ -148,4 +148,4 @@ Enable the `limit-count` plugin for the Consumer.
     }'
     ```
 
-Requesting the route more than 3 times in a row with each of the two keys, the 
test returns `503` and the request is restricted.
+    Requesting the route more than 3 times in a row with each of the two keys, 
the test returns `503` and the request is restricted.
diff --git a/docs/zh/latest/admin-api.md b/docs/zh/latest/admin-api.md
index f5cd5b144..455b02ea0 100644
--- a/docs/zh/latest/admin-api.md
+++ b/docs/zh/latest/admin-api.md
@@ -926,25 +926,25 @@ Credential 对象 JSON 配置示例:
 
 创建 Credential,并启用认证插件 `key-auth`:
 
-    ```shell
-    curl 
http://127.0.0.1:9180/apisix/admin/consumers/jack/credentials/auth-one  \
-    -H "X-API-KEY: $admin_key" -X PUT -i -d '
-    {
-        "plugins": {
-            "key-auth": {
-                "key": "auth-one"
-            }
+```shell
+curl http://127.0.0.1:9180/apisix/admin/consumers/jack/credentials/auth-one  \
+-H "X-API-KEY: $admin_key" -X PUT -i -d '
+{
+    "plugins": {
+        "key-auth": {
+            "key": "auth-one"
         }
-    }'
-    ```
+    }
+}'
+```
 
-    ```
-    HTTP/1.1 200 OK
-    Date: Thu, 26 Dec 2019 08:17:49 GMT
-    ...
+```
+HTTP/1.1 200 OK
+Date: Thu, 26 Dec 2019 08:17:49 GMT
+...
 
-    
{"key":"\/apisix\/consumers\/jack\/credentials\/auth-one","value":{"update_time":1666260780,"plugins":{"key-auth":{"key":"auth-one"}},"create_time":1666260780}}
-    ```
+{"key":"\/apisix\/consumers\/jack\/credentials\/auth-one","value":{"update_time":1666260780,"plugins":{"key-auth":{"key":"auth-one"}},"create_time":1666260780}}
+```
 
 ## Upstream
 
diff --git a/docs/zh/latest/terminology/credential.md 
b/docs/zh/latest/terminology/credential.md
index 4d1836202..48ba4ff18 100644
--- a/docs/zh/latest/terminology/credential.md
+++ b/docs/zh/latest/terminology/credential.md
@@ -124,14 +124,14 @@ admin_key=$(yq '.deployment.admin.admin_key[0].key' 
conf/config.yaml | sed 's/"/
 
 4. 测试插件
 
-分别使用 `auth-one` 和 `auth-two` 两个 key 来测试请求,都响应正常。
+    分别使用 `auth-one` 和 `auth-two` 两个 key 来测试请求,都响应正常。
 
     ```shell
     curl http://127.0.0.1:9080/hello -H 'apikey: auth-one' -I
     curl http://127.0.0.1:9080/hello -H 'apikey: auth-two' -I
     ```
 
-为该 Consumer 启用 `limit-count` 插件。
+    为该 Consumer 启用 `limit-count` 插件。
 
     ```shell
     curl http://127.0.0.1:9180/apisix/admin/consumers \
@@ -149,4 +149,4 @@ admin_key=$(yq '.deployment.admin.admin_key[0].key' 
conf/config.yaml | sed 's/"/
     }'
     ```
 
-分别使用这两个 key 连续 3 次以上请求该路由,测试返回 `503`,请求被限制。
+    分别使用这两个 key 连续 3 次以上请求该路由,测试返回 `503`,请求被限制。

Reply via email to