@@ -102,11 +102,11 @@
102-- > -- API specification
102-- > -- API specification
103-- > type TestApi =
103-- > type TestApi =
104-- > -- GET /hello/:name?capital={true, false} returns a Greet as JSON
104-- > -- GET /hello/:name?capital={true, false} returns a Greet as JSON
105−-- > "hello" :> MatrixParam "lang" String :> Capture "name" Text :> QueryParam "capital" Bool :> Get Greet
105+-- > "hello" :> MatrixParam "lang" String :> Capture "name" Text :> QueryParam "capital" Bool :> Get '[JSON] Greet
107-- > -- POST /greet with a Greet as JSON in the request body,
107-- > -- POST /greet with a Greet as JSON in the request body,
108-- > -- returns a Greet as JSON
108-- > -- returns a Greet as JSON
109−-- > :<|> "greet" :> ReqBody Greet :> Post Greet
109+-- > :<|> "greet" :> ReqBody '[JSON] Greet :> Post '[JSON] Greet
111-- > -- DELETE /greet/:greetid
111-- > -- DELETE /greet/:greetid
112-- > :<|> "greet" :> Capture "greetid" Text :> Delete
112-- > :<|> "greet" :> Capture "greetid" Text :> Delete
@@ -154,7 +154,7 @@ module Servant.Docs
154 , module Data.Monoid
154 , module Data.Monoid
157−import Control.Lens hiding (Action)
157+import Control.Lens
158import Data.Aeson
158import Data.Aeson
159import Data.Aeson.Encode.Pretty (encodePretty)
159import Data.Aeson.Encode.Pretty (encodePretty)
160import Data.Ord(comparing)
160import Data.Ord(comparing)
@@ -641,7 +641,7 @@ instance HasDocs Delete where
641 action' = action & response.respBody .~ []
641 action' = action & response.respBody .~ []
642 & response.respStatus .~ 204
642 & response.respStatus .~ 204
644−instance ToSample a => HasDocs (Get a) where
644+instance ToSample a => HasDocs (Get cts a) where
645 docsFor Proxy (endpoint, action) =
645 docsFor Proxy (endpoint, action) =
646 single endpoint' action'
646 single endpoint' action'
@@ -658,7 +658,7 @@ instance (KnownSymbol sym, HasDocs sublayout)
658 action' = over headers (|> headername) action
658 action' = over headers (|> headername) action
659 headername = pack $ symbolVal (Proxy :: Proxy sym)
659 headername = pack $ symbolVal (Proxy :: Proxy sym)
661−instance ToSample a => HasDocs (Post a) where
661+instance ToSample a => HasDocs (Post cts a) where
662 docsFor Proxy (endpoint, action) =
662 docsFor Proxy (endpoint, action) =
663 single endpoint' action'
663 single endpoint' action'
@@ -669,7 +669,7 @@ instance ToSample a => HasDocs (Post a) where
670 p = Proxy :: Proxy a
670 p = Proxy :: Proxy a
672−instance ToSample a => HasDocs (Put a) where
672+instance ToSample a => HasDocs (Put cts a) where
673 docsFor Proxy (endpoint, action) =
673 docsFor Proxy (endpoint, action) =
674 single endpoint' action'
674 single endpoint' action'
@@ -761,7 +761,7 @@ instance HasDocs Raw where
761 single endpoint action
761 single endpoint action
763instance (ToSample a, HasDocs sublayout)
763instance (ToSample a, HasDocs sublayout)
764− => HasDocs (ReqBody a :> sublayout) where
764+ => HasDocs (ReqBody cts a :> sublayout) where
766 docsFor Proxy (endpoint, action) =
766 docsFor Proxy (endpoint, action) =
767 docsFor sublayoutP (endpoint, action')
767 docsFor sublayoutP (endpoint, action')