on master help sign in
Add missing slash character in generated docs.
42fc048Phil Freeman
src/Servant/Docs.hs+2−2
@@ -175,7 +175,7 @@ instance Show Endpoint where
175-- POST /foo
175-- POST /foo
176-- @
176-- @
177defEndpoint :: Endpoint
177defEndpoint :: Endpoint
178−defEndpoint = Endpoint "/" DocGET
178+defEndpoint = Endpoint "" DocGET
179
179
180instance Hashable Endpoint
180instance Hashable Endpoint
181
181
@@ -577,7 +577,7 @@ instance (KnownSymbol path, HasDocs sublayout) => HasDocs (path :> sublayout) wh
577 docsFor sublayoutP (endpoint', action)
577 docsFor sublayoutP (endpoint', action)
578
578
579 where sublayoutP = Proxy :: Proxy sublayout
579 where sublayoutP = Proxy :: Proxy sublayout
580− endpoint' = endpoint & path <>~ symbolVal pa
580+ endpoint' = endpoint & path <>~ '/' : symbolVal pa
581 pa = Proxy :: Proxy path
581 pa = Proxy :: Proxy path
582
582
583{-
583{-