Merge pull request #813 from ivan-m/response-content-type
List content type with response examples
This commit is contained in:
commit
4a6edd7864
2 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
||||||
* Add a markdown header for the Headers an endpoint is sensitive to.
|
* Add a markdown header for the Headers an endpoint is sensitive to.
|
||||||
* Document the HTTP Method the parameters of an endpoint belong to
|
* Document the HTTP Method the parameters of an endpoint belong to
|
||||||
(rather than assuming `GET` for all of them).
|
(rather than assuming `GET` for all of them).
|
||||||
|
* Content type of sample response body is also displayed.
|
||||||
|
|
||||||
0.11
|
0.11
|
||||||
----
|
----
|
||||||
|
|
|
@ -674,7 +674,7 @@ markdown api = unlines $
|
||||||
[] -> ["- No response body\n"]
|
[] -> ["- No response body\n"]
|
||||||
[("", t, r)] -> "- Response body as below." : contentStr t r
|
[("", t, r)] -> "- Response body as below." : contentStr t r
|
||||||
xs ->
|
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
|
-- * Instances
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue