@@ -702,6 +702,22 @@ instance (KnownSymbol sym, ToCapture (Capture sym a), HasDocs api)
702702 symP = Proxy :: Proxy sym
703703
704704
705+-- | @"books" :> 'CaptureAll' "isbn" Text@ will appear as
706+-- @/books/:isbn@ in the docs.
707+instance (KnownSymbol sym, ToCapture (CaptureAll sym a), HasDocs sublayout)
708+ => HasDocs (CaptureAll sym a :> sublayout) where
709+
710+ docsFor Proxy (endpoint, action) =
711+ docsFor sublayoutP (endpoint', action')
712+
713+ where sublayoutP = Proxy :: Proxy sublayout
714+ captureP = Proxy :: Proxy (CaptureAll sym a)
715+
716+ action' = over captures (|> toCapture captureP) action
717+ endpoint' = over path (\p -> p ++ [":" ++ symbolVal symP]) endpoint
718+ symP = Proxy :: Proxy sym
719+
720+
705721instance OVERLAPPABLE_
706722 (ToSample a, AllMimeRender (ct ': cts) a, KnownNat status
707723 , ReflectMethod method)