on master help sign in
amr renamed allMimeRender
8087faeThomas Sutton
example/greet.hs−1
@@ -12,7 +12,6 @@ import Data.String.Conversions
12import Data.Text (Text)
12import Data.Text (Text)
13import GHC.Generics
13import GHC.Generics
14import Servant.API
14import Servant.API
15−import Servant.API.ContentTypes
16import Servant.Docs
15import Servant.Docs
17
16
18-- * Example
17-- * Example
src/Servant/Docs.hs+2−2
@@ -455,7 +455,7 @@ sampleByteString
455 -> Proxy a
455 -> Proxy a
456 -> [(M.MediaType, ByteString)]
456 -> [(M.MediaType, ByteString)]
457sampleByteString ctypes@Proxy Proxy =
457sampleByteString ctypes@Proxy Proxy =
458− maybe [] (amr ctypes) (toSample :: Maybe a)
458+ maybe [] (allMimeRender ctypes) (toSample :: Maybe a)
459
459
460-- | Synthesise a list of sample values of a particular type, encoded in the
460-- | Synthesise a list of sample values of a particular type, encoded in the
461-- specified media types.
461-- specified media types.
@@ -466,7 +466,7 @@ sampleByteStrings
466 -> [(Text, M.MediaType, ByteString)]
466 -> [(Text, M.MediaType, ByteString)]
467sampleByteStrings ctypes@Proxy Proxy =
467sampleByteStrings ctypes@Proxy Proxy =
468 let samples = toSamples :: [(Text, a)]
468 let samples = toSamples :: [(Text, a)]
469− enc (t, s) = uncurry (t,,) <$> amr ctypes s
469+ enc (t, s) = uncurry (t,,) <$> allMimeRender ctypes s
470 in concatMap enc samples
470 in concatMap enc samples
471
471
472-- | Generate a list of 'MediaType' values describing the content types
472-- | Generate a list of 'MediaType' values describing the content types