feat: 接入新版本openapi文档, 页面渲染兼容性待调试

This commit is contained in:
2026-01-07 23:31:48 +08:00
parent 65802c5e86
commit 2ad85fd950
7 changed files with 192 additions and 202 deletions

View File

@@ -19,13 +19,22 @@ type testCommon struct {
}
type testForm struct {
Meta `json:"-" method:"get" path:"test" rate-limit:"1/5/60"`
Meta `json:"-" method:"get" path:"test" rate-limit:"1/5/60" tag:"测试,验证" summary:"本地调试"`
testCommon
Name string `json:"name"`
}
func TestNewServer(t *testing.T) {
s := NewServer(9087, WithRateLimitInstance(rate_limit.MemoryClient))
s := NewServer(9087, WithRateLimitInstance(rate_limit.MemoryClient), WithDocConfig(&DocConfig{
Enable: true,
UiTheme: "ydoc-lucky-ui",
BaseUri: "",
Flag: "test-server",
ServerList: nil,
Info: nil,
SecuritySchemes: nil,
CommonParameter: nil,
}))
s.AddCommonParamRule("UserID", func(ctx *gin.Context) (any, error) {
return uint(123456), nil
})