完成一版响应数据生成
This commit is contained in:
parent
0744c5cd5b
commit
db59339887
@ -327,8 +327,8 @@ func generateResponseDefinitions(swaggerInfo *define.Swagger, uri string, parent
|
|||||||
}
|
}
|
||||||
parentPathArr := strings.Split(parentPath, ".")
|
parentPathArr := strings.Split(parentPath, ".")
|
||||||
checkPath := parentPath
|
checkPath := parentPath
|
||||||
if len(parentPathArr) >= 2 {
|
if len(parentPathArr) >= 3 {
|
||||||
checkPath = strings.Join([]string{parentPathArr[0], parentPathArr[1]}, ".")
|
checkPath = strings.Join([]string{parentPathArr[0], parentPathArr[1], parentPathArr[2]}, ".")
|
||||||
}
|
}
|
||||||
subPathArr := strings.Split(subPath, ".")
|
subPathArr := strings.Split(subPath, ".")
|
||||||
if _, exist := swaggerInfo.Definitions[checkPath]; !exist && len(parentPath) > 0 {
|
if _, exist := swaggerInfo.Definitions[checkPath]; !exist && len(parentPath) > 0 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user