feat: 修复响应数据文档生成的BUG
This commit is contained in:
@@ -40,6 +40,12 @@ func TestGenerate_AddApiDoc(t *testing.T) {
|
||||
TagList: []string{"test"},
|
||||
Desc: "测试接口",
|
||||
}, Category{}, Product{})
|
||||
instance.AddApiDoc(define.UriConfig{
|
||||
Path: "/a/b/c",
|
||||
RequestMethod: http.MethodPost,
|
||||
TagList: []string{"test"},
|
||||
Desc: "测试接口",
|
||||
}, Category{}, Product{})
|
||||
// 输出 JSON
|
||||
data, _ := json.MarshalIndent(instance.doc, "", " ")
|
||||
fmt.Println(string(data))
|
||||
|
||||
Reference in New Issue
Block a user