From a0090ad52469009fa72a288eae8cf47d58533f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Tue, 6 Jan 2026 22:08:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B0=83=E8=AF=95=E7=A4=BA=E4=BE=8B?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openapi/generate_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openapi/generate_test.go b/openapi/generate_test.go index e4b84f6..be0cbe0 100644 --- a/openapi/generate_test.go +++ b/openapi/generate_test.go @@ -19,8 +19,8 @@ import ( func TestGenerate_AddApiDoc(t *testing.T) { type Category struct { - ID int64 `json:"id" description:"分类ID" binding:"required,min=10,max=100"` - Name string `json:"name" description:"分类名称" binding:"required,min=8"` + ID int64 `json:"id" description:"分类ID" eg:"123" binding:"required,min=10,max=100"` + Name string `json:"name" description:"分类名称" eg:"baichaqinghuan" binding:"required,min=8"` } type Product struct { ID int64 `json:"id,omitempty" description:"产品ID" example:"1001" required:"true" binding:"required"`