parent
a3339f11bf
commit
641431d5b2
2 changed files with 5 additions and 4 deletions
|
@ -27,6 +27,7 @@ import Control.Lens (makeLenses, over, traversed, (%~),
|
|||
import qualified Control.Monad.Omega as Omega
|
||||
import Data.ByteString.Conversion (ToByteString, toByteString)
|
||||
import Data.ByteString.Lazy.Char8 (ByteString)
|
||||
import qualified Data.ByteString.Char8 as BSC
|
||||
import qualified Data.CaseInsensitive as CI
|
||||
import Data.Hashable (Hashable)
|
||||
import Data.HashMap.Strict (HashMap)
|
||||
|
@ -522,7 +523,7 @@ markdown api = unlines $
|
|||
responseStr (action ^. response) ++
|
||||
[]
|
||||
|
||||
where str = "## " ++ show (endpoint^.method)
|
||||
where str = "## " ++ BSC.unpack (endpoint^.method)
|
||||
++ " " ++ showPath (endpoint^.path)
|
||||
|
||||
introsStr :: [DocIntro] -> [String]
|
||||
|
|
|
@ -73,9 +73,9 @@ spec = describe "Servant.Docs" $ do
|
|||
it "mentions status codes" $ do
|
||||
md `shouldContain` "Status code 200"
|
||||
|
||||
it "mentions methods" $ do
|
||||
md `shouldContain` "POST"
|
||||
md `shouldContain` "GET"
|
||||
it "has methods as section headers" $ do
|
||||
md `shouldContain` "## POST"
|
||||
md `shouldContain` "## GET"
|
||||
|
||||
it "mentions headers" $ do
|
||||
md `shouldContain` "- This endpoint is sensitive to the value of the **X-Test** HTTP header."
|
||||
|
|
Loading…
Reference in a new issue