You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/04/07 03:22:17 UTC

[GitHub] [apisix] juzhiyuan commented on a diff in pull request #6775: docs: update "Transformation" Plugins

juzhiyuan commented on code in PR #6775:
URL: https://github.com/apache/apisix/pull/6775#discussion_r844596038


##########
docs/en/latest/plugins/proxy-rewrite.md:
##########
@@ -66,27 +72,23 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f1
 }'
 ```
 
-## Test Plugin
+## Example usage

Review Comment:
   Hi, will you also update all other plugins' structures like this?



##########
docs/en/latest/plugins/mocking.md:
##########
@@ -1,5 +1,11 @@
 ---
 title: mocking
+keywords:
+  - APISIX
+  - Plugin
+  - Mocking
+  - mocking

Review Comment:
   Hi, do we need to maintain two same words? 



##########
docs/en/latest/plugins/grpc-transcode.md:
##########
@@ -104,31 +129,26 @@ print(resp.status_code)
 print(resp.text)
 ```
 
-Create proto:
+This script will take in a `.pb` file and the `id` to create, encodes the content of the proto to `base64`, and calls the Admin API with this encoded content.
+
+To run the script:
 
 ```bash
 chmod +x ./upload_pb.pb
-./upload_pb.py proto.pb 1
-# 200
-# {"node":{"value":{"create_time":1643879753,"update_time":1643883085,"content":"CmgKEnByb3RvL2ltcG9ydC5wcm90bxIDcGtnIhoKBFVzZXISEgoEbmFtZRgBIAEoCVIEbmFtZSIeCghSZXNwb25zZRISCgRib2R5GAEgASgJUgRib2R5QglaBy4vcHJvdG9iBnByb3RvMwq9AQoPcHJvdG8vc3JjLnByb3RvEgpoZWxsb3dvcmxkGhJwcm90by9pbXBvcnQucHJvdG8iPAoHUmVxdWVzdBIdCgR1c2VyGAEgASgLMgkucGtnLlVzZXJSBHVzZXISEgoEYm9keRgCIAEoCVIEYm9keTI5CgpUZXN0SW1wb3J0EisKA1J1bhITLmhlbGxvd29ybGQuUmVxdWVzdBoNLnBrZy5SZXNwb25zZSIAQglaBy4vcHJvdG9iBnByb3RvMw=="},"key":"\/apisix\/proto\/1"},"action":"set"}
 ```
 
-## Attribute List
-
-| Name      | Type                                                                           | Requirement | Default | Valid | Description                      |
-| --------- | ------------------------------------------------------------------------------ | ----------- | ------- | ----- | -------------------------------- |
-| proto_id  | string/integer                                                                 | required    |         |       | `.proto` content id.             |
-| service   | string                                                                         | required    |         |       | the grpc service name.           |
-| method    | string                                                                         | required    |         |       | the method name of grpc service. |
-| deadline  | number                                                                         | optional    | 0       |       | deadline for grpc, ms            |
-| pb_option | array[string([pb_option_def](#use-pb_option-option-of-grpc-transcode-plugin))] | optional    |         |       | protobuf options                 |
+```
+./upload_pb.py proto.pb 1
+```
 
-## How To Enable
+Response:
 
-Here's an example, to enable the grpc-transcode plugin to specified route:
+```
+# 200
+# {"node":{"value":{"create_time":1643879753,"update_time":1643883085,"content":"CmgKEnByb3RvL2ltcG9ydC5wcm90bxIDcGtnIhoKBFVzZXISEgoEbmFtZRgBIAEoCVIEbmFtZSIeCghSZXNwb25zZRISCgRib2R5GAEgASgJUgRib2R5QglaBy4vcHJvdG9iBnByb3RvMwq9AQoPcHJvdG8vc3JjLnByb3RvEgpoZWxsb3dvcmxkGhJwcm90by9pbXBvcnQucHJvdG8iPAoHUmVxdWVzdBIdCgR1c2VyGAEgASgLMgkucGtnLlVzZXJSBHVzZXISEgoEYm9keRgCIAEoCVIEYm9keTI5CgpUZXN0SW1wb3J0EisKA1J1bhITLmhlbGxvd29ybGQuUmVxdWVzdBoNLnBrZy5SZXNwb25zZSIAQglaBy4vcHJvdG9iBnByb3RvMw=="},"key":"\/apisix\/proto\/1"},"action":"set"}

Review Comment:
   Do we need to format this?



##########
docs/en/latest/plugins/fault-injection.md:
##########
@@ -298,99 +156,64 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f1
 }'
 ```
 
-Test plugin:
+## Example usage

Review Comment:
   Example or Example usage?



##########
docs/en/latest/plugins/fault-injection.md:
##########
@@ -53,13 +69,13 @@ The `vars` is a list of expression which is from the `lua-resty-expr`, which can
 ]
 ```
 
-This means that the relationship between the first two expressions is `and`, and the relationship between the first two expressions and the third expression is `or`.
+This means that the relationship between the first two expressions is AND, and the relationship between them and the third expression is OR.
 
-## How To Enable
+:::
 
-### Enable the plugin
+## Enabling the Plugin

Review Comment:
   This title is a little long for me, we could have a shorter version?



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org