You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by st...@apache.org on 2022/10/09 09:38:24 UTC

[apisix] 01/01: fix: lint

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

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

commit 113184221b512a33373db2f42de31e6733ea8ba7
Author: starsz <st...@gmail.com>
AuthorDate: Sun Oct 9 17:38:07 2022 +0800

    fix: lint
---
 apisix/plugins/kafka-logger.lua        | 5 ++++-
 docs/en/latest/plugins/kafka-logger.md | 6 +++---
 t/plugin/kafka-logger.t                | 2 +-
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/apisix/plugins/kafka-logger.lua b/apisix/plugins/kafka-logger.lua
index 972a5f5ff..5f8972b39 100644
--- a/apisix/plugins/kafka-logger.lua
+++ b/apisix/plugins/kafka-logger.lua
@@ -72,7 +72,10 @@ local schema = {
                         type = "object",
                         description = "sasl config",
                         properties = {
-                            mechanism = { type = "string", description = "mechanism", default = "PLAIN" },
+                            mechanism = {
+                                type = "string",
+                                default = "PLAIN"
+                            },
                             user = { type = "string", description = "user" },
                             password =  { type = "string", description = "password" },
                         },
diff --git a/docs/en/latest/plugins/kafka-logger.md b/docs/en/latest/plugins/kafka-logger.md
index 714cc6d78..b065dc4e3 100644
--- a/docs/en/latest/plugins/kafka-logger.md
+++ b/docs/en/latest/plugins/kafka-logger.md
@@ -42,9 +42,9 @@ It might take some time to receive the log data. It will be automatically sent a
 | brokers.host           | string  | True     |                |                       | The host of Kafka broker, e.g, `192.168.1.1`.                                                                                                                                                                                                                                                                                                                   |
 | brokers.port           | integer | True     |                |   [0, 65535]                  |  The port of Kafka broker                                                                                                                                                                                                                                                                                                                  |
 | brokers.sasl_config    | object  | False    |                |                               |  The sasl config of Kafka broker                                                                                                                                                                                                                                                                                                                 |
-| brokers.sasl_config.mechanism  | string  | False    | "PLAIN"          | ["PLAIN"]              |     The mechaism of sasl config                                                                                                                                                                                                                                                                                                             |
-| brokers.sasl_config.user   | string  | True     |                |                          |    The user of sasl_config.If sasl_config exists, it's required.                                                                                                                                                                                                                                                                                             |
-| brokers.sasl_config.password  | string  | True   |                |                       | The password of sasl_config.If sasl_config exists, it's required.                                                                                                                                                                                                                                                                                                 |
+| brokers.sasl_config.mechanism  | string  | False    | "PLAIN"          | ["PLAIN"]           |     The mechaism of sasl config                                                                                                                                                                                                                                                                                                             |
+| brokers.sasl_config.user       | string  | True     |                  |                     |    The user of sasl_config.If sasl_config exists, it's required.                                                                                                                                                                                                                                                                                             |
+| brokers.sasl_config.password   | string  | True     |                  |                     | The password of sasl_config.If sasl_config exists, it's required.                                                                                                                                                                                                                                                                                                 |
 | kafka_topic            | string  | True     |                |                       | Target topic to push the logs for organisation.                                                                                                                                                                                                                                                                                                  |
 | producer_type          | string  | False    | async          | ["async", "sync"]     | Message sending mode of the producer.                                                                                                                                                                                                                                                                                                            |
 | required_acks          | integer | False    | 1              | [0, 1, -1]            | Number of acknowledgements the leader needs to receive for the producer to consider the request complete. This controls the durability of the sent records. The attribute follows the same configuration as the Kafka `acks` attribute. See [Apache Kafka documentation](https://kafka.apache.org/documentation/#producerconfigs_acks) for more. |
diff --git a/t/plugin/kafka-logger.t b/t/plugin/kafka-logger.t
index 4064c10b4..777e50329 100644
--- a/t/plugin/kafka-logger.t
+++ b/t/plugin/kafka-logger.t
@@ -641,7 +641,7 @@ passed
 
 
 
-=== TEST 21: hit route, failed to send data to kafka 
+=== TEST 21: hit route, failed to send data to kafka
 --- request
 GET /hello
 --- response_body