diff --git a/modules/core/src/main/scala/dev/guardrail/Common.scala b/modules/core/src/main/scala/dev/guardrail/Common.scala index 5a41f877a5..c7d120d801 100644 --- a/modules/core/src/main/scala/dev/guardrail/Common.scala +++ b/modules/core/src/main/scala/dev/guardrail/Common.scala @@ -49,6 +49,7 @@ object Common { server .downField("url", _.getUrl) .unwrapTracker + .filterNot(_.contains("{")) .map { x => val uri = new URI(x.iterateWhileM[Id](_.stripSuffix("/"))(_.endsWith("/"))) @SuppressWarnings(Array("org.wartremover.warts.Null")) @@ -64,6 +65,7 @@ object Common { basePath = swagger .downField("servers", _.getServers) .cotraverse(_.downField("url", _.getUrl)) + .filterNot(_.unwrapTracker.exists(_.contains("{"))) .headOption .flatMap(_.unwrapTracker) .flatMap(url => Option(new URI(url).getPath))