SkyeYoung commented on code in PR #12445:
URL: https://github.com/apache/apisix/pull/12445#discussion_r2281089720


##########
apisix/discovery/nacos/init.lua:
##########
@@ -319,6 +347,7 @@ local function fetch_full_registry(premature)
                 host = host.ip,
                 port = host.port,
                 weight = host.weight or default_weight,
+                metadata = host.metadata,

Review Comment:
   Are you sure `metadata` is a `table`? Please assert.



##########
apisix/schema_def.lua:
##########
@@ -488,7 +488,17 @@ local upstream_schema = {
                     description = "group name",
                     type = "string",
                 },
-            }
+                metadata = {
+                    description = "metadata for filtering service instances",
+                    type = "object",
+                    additionalProperties = {
+                        type = "array",
+                        items = {
+                            type = "string"
+                        }
+                    }

Review Comment:
   Should we ensure `uniqueItems=true`?



-- 
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-unsubscr...@apisix.apache.org

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

Reply via email to