This is an automated email from the ASF dual-hosted git repository.

bzp2010 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 0c794a049 feat: relax resource name length restriction to 256 (#11822)
0c794a049 is described below

commit 0c794a04998729ea732a6054ad3a973cb87eabc7
Author: Christos Sotiriou <[email protected]>
AuthorDate: Mon Oct 27 10:41:39 2025 +0200

    feat: relax resource name length restriction to 256 (#11822)
---
 apisix/schema_def.lua | 2 +-
 t/admin/services.t    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/apisix/schema_def.lua b/apisix/schema_def.lua
index c13b6bcb1..53b5476db 100644
--- a/apisix/schema_def.lua
+++ b/apisix/schema_def.lua
@@ -101,7 +101,7 @@ local labels_def = {
 
 local rule_name_def = {
     type = "string",
-    maxLength = 100,
+    maxLength = 256,
     minLength = 1,
 }
 
diff --git a/t/admin/services.t b/t/admin/services.t
index 77613195c..b7dc9e060 100644
--- a/t/admin/services.t
+++ b/t/admin/services.t
@@ -1224,7 +1224,7 @@ qr/\{"error_msg":"the property is forbidden:.*"\}/
         content_by_lua_block {
             local t = require("lib.test_admin").test
             local code, body = t('/apisix/admin/services/1', ngx.HTTP_PUT,
-                require("toolkit.json").encode({name = ("1"):rep(101)}))
+                require("toolkit.json").encode({name = ("1"):rep(257)}))
 
             ngx.status = code
             ngx.print(body)
@@ -1234,7 +1234,7 @@ qr/\{"error_msg":"the property is forbidden:.*"\}/
 GET /t
 --- error_code: 400
 --- response_body
-{"error_msg":"invalid configuration: property \"name\" validation failed: 
string too long, expected at most 100, got 101"}
+{"error_msg":"invalid configuration: property \"name\" validation failed: 
string too long, expected at most 256, got 257"}
 
 
 

Reply via email to