From 774f27d97c304af0ec66a552fd5b0e87c827edce Mon Sep 17 00:00:00 2001 From: Marek Goc Date: Tue, 11 Apr 2023 23:38:24 +0200 Subject: [PATCH] enable disable swagger --- swagger/options.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/swagger/options.go b/swagger/options.go index 5769c4f..c04b018 100644 --- a/swagger/options.go +++ b/swagger/options.go @@ -66,6 +66,18 @@ func License(License *openapi3.License) Option { } } +func RedocEnable(enable bool) Option { + return func(swagger *Swagger) { + swagger.RedocEnable = enable + } +} + +func SwaggerEnable(enable bool) Option { + return func(swagger *Swagger) { + swagger.SwaggerEnable = enable + } +} + func SwaggerOptions(options map[string]interface{}) Option { return func(swagger *Swagger) { swagger.SwaggerOptions = options