git.iko.soy/typeable/servant
on master help sign in
List content type with response examples
81184dfIvan Lazar Miljenovic
servant-docs/CHANGELOG.md+1
@@ -6,6 +6,7 @@
6* Add a markdown header for the Headers an endpoint is sensitive to.
6* Add a markdown header for the Headers an endpoint is sensitive to.
7* Document the HTTP Method the parameters of an endpoint belong to
7* Document the HTTP Method the parameters of an endpoint belong to
8 (rather than assuming `GET` for all of them).
8 (rather than assuming `GET` for all of them).
9+* Content type of sample response body is also displayed.
9
10
100.11
110.11
11----
12----
servant-docs/src/Servant/Docs/Internal.hs+1−1
@@ -674,7 +674,7 @@ markdown api = unlines $
674 [] -> ["- No response body\n"]
674 [] -> ["- No response body\n"]
675 [("", t, r)] -> "- Response body as below." : contentStr t r
675 [("", t, r)] -> "- Response body as below." : contentStr t r
676 xs ->
676 xs ->
677− concatMap (\(ctx, t, r) -> ("- " <> T.unpack ctx) : contentStr t r) xs
677+ concatMap (\(ctx, t, r) -> ("- " <> T.unpack ctx <> " (`" <> cs (show t) <> "`)") : contentStr t r) xs
678
678
679-- * Instances
679-- * Instances
680
680