优化type处理

This commit is contained in:
白茶清欢 2024-04-23 12:19:02 +08:00
parent 8bc001fc79
commit 015dff14d0

View File

@ -149,6 +149,7 @@ func generatePathParameterConfig(swaggerInfo *define.Swagger, pathConfig *define
}
if len(parentPath) > 0 {
generateParam.Schema["$ref"] = "#/definitions/" + strings.TrimLeft(pathConfig.Uri, "/") + ".jsonBody"
generateParam.Type = ""
}
swaggerInfo.Paths[pathConfig.Uri][pathConfig.Method].Parameters = append(swaggerInfo.Paths[pathConfig.Uri][pathConfig.Method].Parameters, generateParam)
}