git.iko.soy/typeable/servant
on master help sign in
Changed to adding a Headers header

As per request by @phadej

commita2c6ef773dc19a88763288bd292c24fd3155ed24 authorIvan Lazar Miljenovic <Ivan.Miljenovic@gmail.com> dateMon 31 Jul 2017, 10:56 (9 years ago) parent7221368
1 file changed+7−2
servant-docs/src/Servant/Docs/Internal.hs+7−2
servant-docs/src/Servant/Docs/Internal.hs+7−2
@@ -525,10 +525,10 @@ markdown api = unlines $
525525 printEndpoint endpoint action =
526526 str :
527527 "" :
528− headersStr (action ^. headers) ++
529528 notesStr (action ^. notes) ++
530529 authStr (action ^. authInfo) ++
531530 capturesStr (action ^. captures) ++
531+ headersStr (action ^. headers) ++
532532 paramsStr (action ^. params) ++
533533 rqbodyStr (action ^. rqtypes) (action ^. rqbody) ++
534534 responseStr (action ^. response) ++
@@ -588,7 +588,12 @@ markdown api = unlines $
588588
589589 headersStr :: [Text] -> [String]
590590 headersStr [] = []
591− headersStr l = [""] ++ map headerStr l ++ [""]
591+ headersStr l =
592+ "#### Headers:" :
593+ "" :
594+ map headerStr l ++
595+ "" :
596+ []
592597
593598 where headerStr hname = "- This endpoint is sensitive to the value of the **"
594599 ++ unpack hname ++ "** HTTP header."