From eb52553e45f3a5e200b3a32277a5053c00dd3f91 Mon Sep 17 00:00:00 2001 From: Artem Seleznev Date: Thu, 21 Aug 2025 11:47:55 +0300 Subject: [PATCH] Update spec.go Signed-off-by: Artem Seleznev --- spec.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec.go b/spec.go index 01900d6..433a4c4 100644 --- a/spec.go +++ b/spec.go @@ -203,6 +203,9 @@ func (d *Document) Expanded(options ...*spec.ExpandOptions) (*Document, error) { // BasePath the base path for the API specified by this spec func (d *Document) BasePath() string { + if d.spec == nil { + return "" + } return d.spec.BasePath }