nic-6443 commented on code in PR #13312:
URL: https://github.com/apache/apisix/pull/13312#discussion_r3154244968


##########
apisix/plugin.lua:
##########
@@ -921,7 +982,89 @@ local function check_single_plugin_schema(name, 
plugin_conf, schema_type, skip_d
     end
 
     if plugin_obj.check_schema then
-        local ok, err = plugin_obj.check_schema(plugin_conf, schema_type)
+        local ok, err
+
+        if secret.has_secret_ref(plugin_conf) then
+            -- Strip secret ref fields recursively so they bypass all schema
+            -- constraints (enum, pattern, minLength, maxLength, etc.).
+            -- We deep-copy both conf and schema, remove secret-ref leaves from
+            -- the conf copy, and remove the corresponding property definitions
+            -- and required entries from the schema copy.
+            local conf_copy = core.table.deepcopy(plugin_conf)

Review Comment:
   This has been refactored in the latest commit. The stripping logic now lives 
in `core.schema.check()` — `check_single_plugin_schema` and 
`stream_check_schema` always call `plugin_obj.check_schema()` normally. All 
custom validation is preserved.



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