Fix the issue of generating swagger @doc "xxx" that fails, and use th… (#4816)

Co-authored-by: lxr <qiyuechuqi@an-idear.com>
This commit is contained in:
Rankgice
2025-05-02 15:06:03 +08:00
committed by GitHub
parent 7ef13116a0
commit 52078a0c14
2 changed files with 14 additions and 1 deletions

View File

@@ -69,3 +69,16 @@ func getListFromInfoOrDefault(properties map[string]string, key string, def []st
}
return resp
}
func getFirstUsableString(def ...string) string {
if len(def) == 0 {
return ""
}
for _, val := range def {
str := util.Unquote(val)
if len(str) != 0 {
return str
}
}
return ""
}