List content type with response examples

This commit is contained in:
Ivan Lazar Miljenovic 2017-09-22 14:11:28 +10:00
parent 7fb6b707bc
commit 81184df3d4
2 changed files with 2 additions and 1 deletions

View file

@ -6,6 +6,7 @@
* Add a markdown header for the Headers an endpoint is sensitive to.
* Document the HTTP Method the parameters of an endpoint belong to
(rather than assuming `GET` for all of them).
* Content type of sample response body is also displayed.
0.11
----

View file

@ -674,7 +674,7 @@ markdown api = unlines $
[] -> ["- No response body\n"]
[("", t, r)] -> "- Response body as below." : contentStr t r
xs ->
concatMap (\(ctx, t, r) -> ("- " <> T.unpack ctx) : contentStr t r) xs
concatMap (\(ctx, t, r) -> ("- " <> T.unpack ctx <> " (`" <> cs (show t) <> "`)") : contentStr t r) xs
-- * Instances