Skip to content

Commit

Permalink
fix: ChildAPI子项目修改prefix且prefix不能为空
Browse files Browse the repository at this point in the history
  • Loading branch information
xurui committed Sep 26, 2024
1 parent 200c2ed commit 2817063
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ func (h *handler) handleHandlers(handlers []any, middlewares []Middleware, prefi
if h.openapiSetMap[docsPath+val.docsPath] != nil {
log.Fatal("the childAPI docsPath repeats")
}
if val.prefix == "" {
log.Fatal("childAPI must have prefix")
}
if _, ok := h.childPrefixMap[prefix+val.prefix]; ok {
log.Fatal("the childAPI prefix repeats")
}
Expand Down

0 comments on commit 2817063

Please sign in to comment.