fix: update import path

This commit is contained in:
2025-08-24 09:31:20 +08:00
parent 37a980afc3
commit 259b89656a
12 changed files with 36 additions and 35 deletions

View File

@ -10,9 +10,10 @@ package api_doc
import (
"encoding/json"
"fmt"
"git.zhangdeman.cn/gateway/api-doc/define"
"reflect"
"testing"
"git.zhangdeman.cn/zhangdeman/api-doc/define"
)
type Meta struct {
@ -69,22 +70,22 @@ func Test_parser_Openapi3(t *testing.T) {
var ug *UserGet
var uh *UserHead
g := NewOpenapiDoc(nil, []*define.ServerItem{
&define.ServerItem{
{
Url: "http://127.0.0.1/v1",
Description: "v1接口",
Variables: map[string]*define.ServerItemVariable{
"test": &define.ServerItemVariable{
"test": {
Default: "123456",
Description: "1111",
Enum: nil,
},
},
},
&define.ServerItem{
},
},
{
Url: "http://127.0.0.1/v2",
Description: "v2接口",
Variables: nil,
},
},
})
g.AddApiFromInAndOut("", reflect.TypeOf(f), reflect.TypeOf(o))
g.AddApiFromInAndOut("", reflect.TypeOf(fd), reflect.TypeOf(o))