From 87732995b337bd3846baba31d19909df50d42402 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sun, 10 Oct 2021 01:40:44 +0200 Subject: [PATCH] [openapi] Allow subdir serving by using relative URLs Signed-off-by: Knut Ahlers --- swagger.go | 2 +- swagger.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/swagger.go b/swagger.go index 98bf764..3b580ce 100644 --- a/swagger.go +++ b/swagger.go @@ -22,7 +22,7 @@ var ( Version: "v1", }, Servers: []*spec.Server{ - {URL: "/", Description: "Current bot instance"}, + {URL: "./", Description: "Current bot instance"}, }, Paths: make(spec.Paths), Components: &spec.Components{ diff --git a/swagger.html b/swagger.html index af43b52..ba91d5d 100644 --- a/swagger.html +++ b/swagger.html @@ -14,7 +14,7 @@ // Begin Swagger UI call region const ui = SwaggerUIBundle({ - urls: [{ name: 'Bot-API specification', url: '/openapi.json' }], + urls: [{ name: 'Bot-API specification', url: 'openapi.json' }], "dom_id": "#swagger-ui", deepLinking: true, presets: [