From 42fc048dfc57c2a1d41be84dcb1c50e100a63e8a Mon Sep 17 00:00:00 2001 From: Phil Freeman Date: Wed, 31 Dec 2014 17:19:35 -0800 Subject: [PATCH] Add missing slash character in generated docs. --- src/Servant/Docs.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Servant/Docs.hs b/src/Servant/Docs.hs index a3bcf5ee..3c132ee7 100644 --- a/src/Servant/Docs.hs +++ b/src/Servant/Docs.hs @@ -175,7 +175,7 @@ instance Show Endpoint where -- POST /foo -- @ defEndpoint :: Endpoint -defEndpoint = Endpoint "/" DocGET +defEndpoint = Endpoint "" DocGET instance Hashable Endpoint @@ -577,7 +577,7 @@ instance (KnownSymbol path, HasDocs sublayout) => HasDocs (path :> sublayout) wh docsFor sublayoutP (endpoint', action) where sublayoutP = Proxy :: Proxy sublayout - endpoint' = endpoint & path <>~ symbolVal pa + endpoint' = endpoint & path <>~ '/' : symbolVal pa pa = Proxy :: Proxy path {-