git.iko.soy/typeable/servant
on master help sign in
List content type with response examples
commit81184df3d4361053a54edbf73de2e583f43d3281 authorIvan Lazar Miljenovic <Ivan.Miljenovic@gmail.com> dateFri 22 Sep 2017, 14:11 (9 years ago) parent7fb6b70
2 files changed+2−1
servant-docs/CHANGELOG.md+1 servant-docs/src/Servant/Docs/Internal.hs+1−1
servant-docs/CHANGELOG.md+1
@@ -6,6 +6,7 @@
66* Add a markdown header for the Headers an endpoint is sensitive to.
77* Document the HTTP Method the parameters of an endpoint belong to
88 (rather than assuming `GET` for all of them).
9+* Content type of sample response body is also displayed.
910
10110.11
1112----
servant-docs/src/Servant/Docs/Internal.hs+1−1
@@ -674,7 +674,7 @@ markdown api = unlines $
674674 [] -> ["- No response body\n"]
675675 [("", t, r)] -> "- Response body as below." : contentStr t r
676676 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
678678
679679-- * Instances
680680