@@ -17,9 +17,12 @@ import Data.Char
1717import Data.HashMap.Strict (HashMap)
1818import Data.HashSet (HashSet)
1919import Data.Int
20+import Data.IntSet (IntSet)
21+import Data.IntMap (IntMap)
2022import Data.Map (Map)
2123import Data.Monoid
2224import Data.Proxy
25+import Data.Scientific (Scientific)
2326import Data.Set (Set)
2427import qualified Data.Text as T
2528import qualified Data.Text.Lazy as TL
@@ -138,6 +141,9 @@ instance ToSchema Char where
138141 & schemaMaxLength ?~ 1
139142 & schemaMinLength ?~ 1
140143
144+instance ToSchema Scientific where
145+ toNamedSchema _ = unnamed $ mempty & schemaType .~ SchemaNumber
146+
141147instance ToSchema Double where
142148 toNamedSchema _ = unnamed $ mempty & schemaType .~ SchemaNumber
143149
@@ -163,6 +169,12 @@ instance ToSchema T.Text where
163169instance ToSchema TL.Text where
164170 toNamedSchema _ = unnamed $ toSchema (Proxy :: Proxy String)
165171
172+instance ToSchema IntSet where toNamedSchema _ = toNamedSchema (Proxy :: Proxy (Set Int))
173+
174+-- | NOTE: This schema does not account for the uniqueness of keys.
175+instance ToSchema a => ToSchema (IntMap a) where
176+ toNamedSchema _ = toNamedSchema (Proxy :: Proxy [(Int, a)])
177+
166178instance ToSchema a => ToSchema (Map String a) where
167179 toNamedSchema _ = unnamed $ mempty
168180 & schemaType .~ SchemaObject