@@ -313,18 +313,22 @@ data RenderingOptions = RenderingOptions
313313 -- ^ How many content types to display for request body examples?
314314 , _responseExamples :: !ShowContentTypes
315315 -- ^ How many content types to display for response body examples?
316+ , _notesHeading :: !(Maybe String)
317+ -- ^ Optionally group all 'notes' together under a common heading.
316318 } deriving (Show)
317319
318320-- | Default API generation options.
319321--
320322-- All content types are shown for both 'requestExamples' and
321−-- 'responseExamples'.
323+-- 'responseExamples'; 'notesHeading' is set to 'Nothing'
324+-- (i.e. un-grouped).
322325--
323326-- @since 0.11.1
324327defRenderingOptions :: RenderingOptions
325328defRenderingOptions = RenderingOptions
326329 { _requestExamples = AllContentTypes
327330 , _responseExamples = AllContentTypes
331+ , _notesHeading = Nothing
328332 }
329333
330334-- gimme some lenses
@@ -615,23 +619,28 @@ markdownWith RenderingOptions{..} api = unlines $
615619 []
616620
617621 notesStr :: [DocNote] -> [String]
618− notesStr = concatMap noteStr
622+ notesStr = addHeading
623+ . concatMap noteStr
624+ where
625+ addHeading nts = maybe nts (\hd -> ("### " ++ hd) : "" : nts) _notesHeading
619626
620627 noteStr :: DocNote -> [String]
621628 noteStr nt =
622− ("#### " ++ nt ^. noteTitle) :
629+ (hdr ++ nt ^. noteTitle) :
623630 "" :
624631 intersperse "" (nt ^. noteBody) ++
625632 "" :
626633 []
627−
634+ where
635+ hdr | isJust _notesHeading = "#### "
636+ | otherwise = "### "
628637
629638 authStr :: [DocAuthentication] -> [String]
630639 authStr [] = []
631640 authStr auths =
632641 let authIntros = mapped %~ view authIntro $ auths
633642 clientInfos = mapped %~ view authDataRequired $ auths
634− in "#### Authentication":
643+ in "### Authentication":
635644 "":
636645 unlines authIntros :
637646 "":
@@ -643,7 +652,7 @@ markdownWith RenderingOptions{..} api = unlines $
643652 capturesStr :: [DocCapture] -> [String]
644653 capturesStr [] = []
645654 capturesStr l =
646− "#### Captures:" :
655+ "### Captures:" :
647656 "" :
648657 map captureStr l ++
649658 "" :
@@ -655,7 +664,7 @@ markdownWith RenderingOptions{..} api = unlines $
655664 headersStr :: [Text] -> [String]
656665 headersStr [] = []
657666 headersStr l =
658− "#### Headers:" :
667+ "### Headers:" :
659668 "" :
660669 map headerStr l ++
661670 "" :
@@ -667,7 +676,7 @@ markdownWith RenderingOptions{..} api = unlines $
667676 paramsStr :: HTTP.Method -> [DocQueryParam] -> [String]
668677 paramsStr _ [] = []
669678 paramsStr m l =
670− ("#### " ++ cs m ++ " Parameters:") :
679+ ("### " ++ cs m ++ " Parameters:") :
671680 "" :
672681 map (paramStr m) l ++
673682 "" :
@@ -693,7 +702,7 @@ markdownWith RenderingOptions{..} api = unlines $
693702 rqbodyStr :: [M.MediaType] -> [(Text, M.MediaType, ByteString)]-> [String]
694703 rqbodyStr [] [] = []
695704 rqbodyStr types s =
696− ["#### Request:", ""]
705+ ["### Request:", ""]
697706 <> formatTypes types
698707 <> formatBodies _requestExamples s
699708
@@ -749,7 +758,7 @@ markdownWith RenderingOptions{..} api = unlines $
749758
750759 responseStr :: Response -> [String]
751760 responseStr resp =
752− "#### Response:" :
761+ "### Response:" :
753762 "" :
754763 ("- Status code " ++ show (resp ^. respStatus)) :
755764 ("- Headers: " ++ show (resp ^. respHeaders)) :