soulbird commented on code in PR #8604:
URL: https://github.com/apache/apisix/pull/8604#discussion_r1089842384


##########
apisix/plugins/elasticsearch-logger.lua:
##########
@@ -23,18 +23,35 @@ local plugin          = require("apisix.plugin")
 
 local ngx             = ngx
 local str_format      = core.string.format
+local math_random     = math.random
+local type            = type
 
 local plugin_name = "elasticsearch-logger"
 local batch_processor_manager = bp_manager_mod.new(plugin_name)
 
 
-local schema = {
-    type = "object",
-    properties = {
-        endpoint_addr = {
+local endpoint_schema = {
+    anyOf = {
+        {
+            -- deprecated, use "array" instead
             type = "string",
             pattern = "[^/]$",
         },
+        {
+            type = "array",
+            minItems = 1,
+            items = {
+                type = "string",
+                pattern = "[^/]$",
+            },
+        }
+    }
+}
+
+local schema = {
+    type = "object",
+    properties = {
+        endpoint_addr = endpoint_schema,

Review Comment:
   Keep endpoint_addr, add a new field endpoint_addrs to support both string 
and array better



-- 
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]

Reply via email to