packages feed

servant-docs 0.8 → 0.8.1

raw patch · 3 files changed

+19/−1 lines, 3 files

Files

servant-docs.cabal view
@@ -1,5 +1,5 @@ name:                servant-docs-version:             0.8+version:             0.8.1 synopsis:            generate API docs for your servant webservice description:   Library for generating API docs from a servant API definition.
src/Servant/Docs/Internal.hs view
@@ -702,6 +702,22 @@           symP = Proxy :: Proxy sym  +-- | @"books" :> 'CaptureAll' "isbn" Text@ will appear as+-- @/books/:isbn@ in the docs.+instance (KnownSymbol sym, ToCapture (CaptureAll sym a), HasDocs sublayout)+      => HasDocs (CaptureAll sym a :> sublayout) where++  docsFor Proxy (endpoint, action) =+    docsFor sublayoutP (endpoint', action')++    where sublayoutP = Proxy :: Proxy sublayout+          captureP = Proxy :: Proxy (CaptureAll sym a)++          action' = over captures (|> toCapture captureP) action+          endpoint' = over path (\p -> p ++ [":" ++ symbolVal symP]) endpoint+          symP = Proxy :: Proxy sym++ instance OVERLAPPABLE_         (ToSample a, AllMimeRender (ct ': cts) a, KnownNat status         , ReflectMethod method)
test/Servant/DocsSpec.hs view
@@ -34,6 +34,8 @@   toParam = error "unused" instance ToCapture (Capture "foo" Int) where   toCapture = error "unused"+instance ToCapture (CaptureAll "foo" Int) where+  toCapture = error "unused"  -- * specs