amr renamed allMimeRender
This commit is contained in:
parent
0daa8d27a5
commit
8087fae18b
2 changed files with 2 additions and 3 deletions
|
@ -12,7 +12,6 @@ import Data.String.Conversions
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
import GHC.Generics
|
import GHC.Generics
|
||||||
import Servant.API
|
import Servant.API
|
||||||
import Servant.API.ContentTypes
|
|
||||||
import Servant.Docs
|
import Servant.Docs
|
||||||
|
|
||||||
-- * Example
|
-- * Example
|
||||||
|
|
|
@ -455,7 +455,7 @@ sampleByteString
|
||||||
-> Proxy a
|
-> Proxy a
|
||||||
-> [(M.MediaType, ByteString)]
|
-> [(M.MediaType, ByteString)]
|
||||||
sampleByteString ctypes@Proxy Proxy =
|
sampleByteString ctypes@Proxy Proxy =
|
||||||
maybe [] (amr ctypes) (toSample :: Maybe a)
|
maybe [] (allMimeRender ctypes) (toSample :: Maybe a)
|
||||||
|
|
||||||
-- | Synthesise a list of sample values of a particular type, encoded in the
|
-- | Synthesise a list of sample values of a particular type, encoded in the
|
||||||
-- specified media types.
|
-- specified media types.
|
||||||
|
@ -466,7 +466,7 @@ sampleByteStrings
|
||||||
-> [(Text, M.MediaType, ByteString)]
|
-> [(Text, M.MediaType, ByteString)]
|
||||||
sampleByteStrings ctypes@Proxy Proxy =
|
sampleByteStrings ctypes@Proxy Proxy =
|
||||||
let samples = toSamples :: [(Text, a)]
|
let samples = toSamples :: [(Text, a)]
|
||||||
enc (t, s) = uncurry (t,,) <$> amr ctypes s
|
enc (t, s) = uncurry (t,,) <$> allMimeRender ctypes s
|
||||||
in concatMap enc samples
|
in concatMap enc samples
|
||||||
|
|
||||||
-- | Generate a list of 'MediaType' values describing the content types
|
-- | Generate a list of 'MediaType' values describing the content types
|
||||||
|
|
Loading…
Add table
Reference in a new issue