Skip to content

Commit c364773

Browse files
Artem Seleznevfredbi
authored andcommitted
Update context.go
Signed-off-by: Artem Seleznev <seleznyov.artyom@gmail.com>
1 parent 0628cdf commit c364773

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

middleware/context.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,9 @@ type contentTypeValue struct {
307307

308308
// BasePath returns the base path for this API
309309
func (c *Context) BasePath() string {
310+
if c.spec != nil {
311+
return ""
312+
}
310313
return c.spec.BasePath()
311314
}
312315

0 commit comments

Comments
 (0)