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


##########
apisix/discovery/nacos/init.lua:
##########
@@ -54,6 +56,25 @@ local function get_key(namespace_id, group_name, 
service_name)
     return namespace_id .. '.' .. group_name .. '.' .. service_name
 end
 
+
+local function metadata_contains(host_metadata, route_metadata)

Review Comment:
   host_metadata and node.metadata are mixed, it is recommended to unify them 
as node_metadata



##########
apisix/discovery/nacos/init.lua:
##########
@@ -54,6 +56,25 @@ local function get_key(namespace_id, group_name, 
service_name)
     return namespace_id .. '.' .. group_name .. '.' .. service_name
 end
 
+
+local function metadata_contains(host_metadata, route_metadata)
+    if not host_metadata or not next(host_metadata) then
+        return false
+    end
+
+    for k, v in pairs(route_metadata) do
+        if type(v) ~= "string" then

Review Comment:
   Can we handle these checks at schema level?



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