soulbird commented on code in PR #8604:
URL: https://github.com/apache/apisix/pull/8604#discussion_r1090098940
##########
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:
Understood. So we need to keep both endpoint_addr and endpoint_addrs, where
endpoint_addrs is only specified as array type, is that right?
--
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]