This is an automated email from the ASF dual-hosted git repository. young pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git
The following commit(s) were added to refs/heads/master by this push: new fde2c5f04 fix(consumers): username supports hyphen (#3150) fde2c5f04 is described below commit fde2c5f0477cb8ca61501be00d2aee063e5763c1 Author: YYYoung <isk...@outlook.com> AuthorDate: Thu Jul 24 17:33:45 2025 +0800 fix(consumers): username supports hyphen (#3150) --- src/types/schema/apisix/consumers.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/types/schema/apisix/consumers.ts b/src/types/schema/apisix/consumers.ts index c026c8698..c6f8e261d 100644 --- a/src/types/schema/apisix/consumers.ts +++ b/src/types/schema/apisix/consumers.ts @@ -24,7 +24,8 @@ const Consumer = z username: z .string() .min(1) - .regex(/^[a-zA-Z0-9_]+$/), + // ref: https://github.com/apache/apisix/blob/a2482df74d712228a1a6644662d74d2f51a3f5e6/apisix/schema_def.lua#L713 + .regex(/^[a-zA-Z0-9_-]+$/), plugins: APISIXPlugins.Plugins.optional(), group_id: z.string().optional(), })