From 86b699d2c3a3c8e32f6c494dd605011af7c84307 Mon Sep 17 00:00:00 2001 From: Artem Seleznev Date: Thu, 21 Aug 2025 11:40:20 +0300 Subject: [PATCH] Update context.go Signed-off-by: Artem Seleznev --- middleware/context.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/middleware/context.go b/middleware/context.go index ecff9e3d..f53ddd3e 100644 --- a/middleware/context.go +++ b/middleware/context.go @@ -307,6 +307,9 @@ type contentTypeValue struct { // BasePath returns the base path for this API func (c *Context) BasePath() string { + if c.spec != nil { + return "" + } return c.spec.BasePath() }