bzp2010 commented on code in PR #12256: URL: https://github.com/apache/apisix/pull/12256#discussion_r2113440703
########## apisix/admin/standalone.lua: ########## @@ -235,6 +240,36 @@ function _M.run() end +local schema_patch +do + local resource_schema = { Review Comment: Does `plugin_metadata` require a patch? 🤔 ########## apisix/schema_def.lua: ########## @@ -729,7 +729,18 @@ _M.credential = { type = "object", properties = { -- metadata - id = id_schema, + id = { + oneOf = { + id_schema, + -- id: "${consumer_name}/credentials/${credential_id}" from standalone mode + { + type = "string", + minLength = 15, + maxLength = 128, + pattern = [[^[a-zA-Z0-9]+/credentials/[a-zA-Z0-9]+$]], + } + } Review Comment: If this is standalone-specific, it should be overridden when standalone is enabled, rather than using oneOf. oneOf is ambiguous at some point and is not conducive to various downstream components using its type. -- 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