@@ -109,6 +109,7 @@ module Servant.Docs
110import Control.Lens hiding (Action)
110import Control.Lens hiding (Action)
111import Data.Aeson
111import Data.Aeson
112+import Data.Aeson.Encode.Pretty (encodePretty)
112import Data.ByteString.Lazy.Char8 (ByteString)
113import Data.ByteString.Lazy.Char8 (ByteString)
113import Data.Hashable
114import Data.Hashable
114import Data.HashMap.Strict (HashMap)
115import Data.HashMap.Strict (HashMap)
@@ -333,7 +334,7 @@ instance ToSample () where
333 toSample = Just ()
334 toSample = Just ()
335sampleByteString :: forall a . ToSample a => Proxy a -> Maybe ByteString
336sampleByteString :: forall a . ToSample a => Proxy a -> Maybe ByteString
336−sampleByteString Proxy = fmap encode (toSample :: Maybe a)
337+sampleByteString Proxy = fmap encodePretty (toSample :: Maybe a)
338-- | The class that helps us automatically get documentation
339-- | The class that helps us automatically get documentation
339-- for GET parameters.
340-- for GET parameters.
@@ -605,4 +606,4 @@ toHtml md =
605 "</pre>" ++
606 "</pre>" ++
606 "</body>" ++
607 "</body>" ++
607 "</html>"
608 "</html>"