@@ -9,9 +9,11 @@ module Data.Swagger.Schema.Internal where
99
1010import Control.Lens
1111import Data.Aeson
12+import Data.Int
1213import Data.Monoid
1314import Data.Proxy
1415import qualified Data.Text as Text
16+import Data.Word
1517import GHC.Generics
1618
1719import Data.Swagger.Internal
@@ -40,7 +42,17 @@ instance ToSchema Bool where
4042instance ToSchema Integer where
4143 toSchema _ = mempty { _schemaType = SchemaInteger }
4244
43−instance ToSchema Int where toSchema = toSchemaBoundedIntegral
45+instance ToSchema Int where toSchema = toSchemaBoundedIntegral
46+instance ToSchema Int8 where toSchema = toSchemaBoundedIntegral
47+instance ToSchema Int16 where toSchema = toSchemaBoundedIntegral
48+instance ToSchema Int32 where toSchema = toSchemaBoundedIntegral
49+instance ToSchema Int64 where toSchema = toSchemaBoundedIntegral
50+
51+instance ToSchema Word where toSchema = toSchemaBoundedIntegral
52+instance ToSchema Word8 where toSchema = toSchemaBoundedIntegral
53+instance ToSchema Word16 where toSchema = toSchemaBoundedIntegral
54+instance ToSchema Word32 where toSchema = toSchemaBoundedIntegral
55+instance ToSchema Word64 where toSchema = toSchemaBoundedIntegral
4456
4557instance ToSchema Double where
4658 toSchema _ = mempty { _schemaType = SchemaNumber }