fix: update import path
This commit is contained in:
@ -11,8 +11,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.zhangdeman.cn/gateway/api-doc/define"
|
"git.zhangdeman.cn/zhangdeman/api-doc/define"
|
||||||
"git.zhangdeman.cn/gateway/api-doc/enums"
|
"git.zhangdeman.cn/zhangdeman/api-doc/enums"
|
||||||
"git.zhangdeman.cn/zhangdeman/consts"
|
"git.zhangdeman.cn/zhangdeman/consts"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
// Date : 2024-04-23 22:16
|
// Date : 2024-04-23 22:16
|
||||||
package define
|
package define
|
||||||
|
|
||||||
import "git.zhangdeman.cn/gateway/api-doc/enums"
|
import "git.zhangdeman.cn/zhangdeman/api-doc/enums"
|
||||||
|
|
||||||
// OpenapiDoc openapi文档结构, 文档规范参见 : https://openapi.apifox.cn/
|
// OpenapiDoc openapi文档结构, 文档规范参见 : https://openapi.apifox.cn/
|
||||||
type OpenapiDoc struct {
|
type OpenapiDoc struct {
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
package api_doc
|
package api_doc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.zhangdeman.cn/gateway/api-doc/define"
|
"git.zhangdeman.cn/zhangdeman/api-doc/define"
|
||||||
"git.zhangdeman.cn/gateway/api-doc/enums"
|
"git.zhangdeman.cn/zhangdeman/api-doc/enums"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SetGenerateOption 设置文档生成选项
|
// SetGenerateOption 设置文档生成选项
|
||||||
|
@ -14,8 +14,8 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.zhangdeman.cn/gateway/api-doc/define"
|
"git.zhangdeman.cn/zhangdeman/api-doc/define"
|
||||||
"git.zhangdeman.cn/gateway/api-doc/enums"
|
"git.zhangdeman.cn/zhangdeman/api-doc/enums"
|
||||||
"git.zhangdeman.cn/zhangdeman/consts"
|
"git.zhangdeman.cn/zhangdeman/consts"
|
||||||
"git.zhangdeman.cn/zhangdeman/wrapper"
|
"git.zhangdeman.cn/zhangdeman/wrapper"
|
||||||
)
|
)
|
||||||
|
@ -10,7 +10,7 @@ package api_doc
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"git.zhangdeman.cn/gateway/api-doc/define"
|
"git.zhangdeman.cn/zhangdeman/api-doc/define"
|
||||||
"git.zhangdeman.cn/zhangdeman/serialize"
|
"git.zhangdeman.cn/zhangdeman/serialize"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -10,9 +10,10 @@ package api_doc
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.zhangdeman.cn/gateway/api-doc/define"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"git.zhangdeman.cn/zhangdeman/api-doc/define"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Meta struct {
|
type Meta struct {
|
||||||
@ -69,18 +70,18 @@ func Test_parser_Openapi3(t *testing.T) {
|
|||||||
var ug *UserGet
|
var ug *UserGet
|
||||||
var uh *UserHead
|
var uh *UserHead
|
||||||
g := NewOpenapiDoc(nil, []*define.ServerItem{
|
g := NewOpenapiDoc(nil, []*define.ServerItem{
|
||||||
&define.ServerItem{
|
{
|
||||||
Url: "http://127.0.0.1/v1",
|
Url: "http://127.0.0.1/v1",
|
||||||
Description: "v1接口",
|
Description: "v1接口",
|
||||||
Variables: map[string]*define.ServerItemVariable{
|
Variables: map[string]*define.ServerItemVariable{
|
||||||
"test": &define.ServerItemVariable{
|
"test": {
|
||||||
Default: "123456",
|
Default: "123456",
|
||||||
Description: "1111",
|
Description: "1111",
|
||||||
Enum: nil,
|
Enum: nil,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
&define.ServerItem{
|
{
|
||||||
Url: "http://127.0.0.1/v2",
|
Url: "http://127.0.0.1/v2",
|
||||||
Description: "v2接口",
|
Description: "v2接口",
|
||||||
Variables: nil,
|
Variables: nil,
|
||||||
|
@ -12,7 +12,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.zhangdeman.cn/gateway/api-doc/define"
|
"git.zhangdeman.cn/zhangdeman/api-doc/define"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -12,7 +12,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.zhangdeman.cn/gateway/api-doc/define"
|
"git.zhangdeman.cn/zhangdeman/api-doc/define"
|
||||||
"git.zhangdeman.cn/zhangdeman/consts"
|
"git.zhangdeman.cn/zhangdeman/consts"
|
||||||
"git.zhangdeman.cn/zhangdeman/serialize"
|
"git.zhangdeman.cn/zhangdeman/serialize"
|
||||||
)
|
)
|
||||||
|
@ -14,7 +14,7 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
apiDocDefine "git.zhangdeman.cn/gateway/api-doc/define"
|
apiDocDefine "git.zhangdeman.cn/zhangdeman/api-doc/define"
|
||||||
"git.zhangdeman.cn/zhangdeman/consts"
|
"git.zhangdeman.cn/zhangdeman/consts"
|
||||||
"git.zhangdeman.cn/zhangdeman/wrapper"
|
"git.zhangdeman.cn/zhangdeman/wrapper"
|
||||||
)
|
)
|
||||||
|
@ -11,9 +11,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.zhangdeman.cn/gateway/api-doc/define"
|
"git.zhangdeman.cn/zhangdeman/api-doc/define"
|
||||||
"git.zhangdeman.cn/gateway/api-doc/enums"
|
"git.zhangdeman.cn/zhangdeman/api-doc/enums"
|
||||||
"git.zhangdeman.cn/gateway/api-doc/util"
|
"git.zhangdeman.cn/zhangdeman/api-doc/util"
|
||||||
"git.zhangdeman.cn/zhangdeman/consts"
|
"git.zhangdeman.cn/zhangdeman/consts"
|
||||||
"git.zhangdeman.cn/zhangdeman/wrapper"
|
"git.zhangdeman.cn/zhangdeman/wrapper"
|
||||||
)
|
)
|
||||||
|
@ -13,7 +13,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.zhangdeman.cn/gateway/api-doc/define"
|
"git.zhangdeman.cn/zhangdeman/api-doc/define"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGenerate(t *testing.T) {
|
func TestGenerate(t *testing.T) {
|
||||||
|
@ -13,9 +13,9 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.zhangdeman.cn/gateway/api-doc/define"
|
"git.zhangdeman.cn/zhangdeman/api-doc/define"
|
||||||
"git.zhangdeman.cn/gateway/api-doc/enums"
|
"git.zhangdeman.cn/zhangdeman/api-doc/enums"
|
||||||
"git.zhangdeman.cn/gateway/api-doc/theme"
|
"git.zhangdeman.cn/zhangdeman/api-doc/theme"
|
||||||
"git.zhangdeman.cn/zhangdeman/consts"
|
"git.zhangdeman.cn/zhangdeman/consts"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
knife4goFiles "github.com/go-webtools/knife4go"
|
knife4goFiles "github.com/go-webtools/knife4go"
|
||||||
|
Reference in New Issue
Block a user