feat: 接入新版本openapi文档, 页面渲染兼容性待调试
This commit is contained in:
@@ -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
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user