@@ -22,7 +22,7 @@
22-- Validate JSON values with Swagger Schema.
22-- Validate JSON values with Swagger Schema.
23module Data.Swagger.Internal.Schema.Validation where
23module Data.Swagger.Internal.Schema.Validation where
25−import Prelude ()
25+import Prelude ()
26import Prelude.Compat
26import Prelude.Compat
28import Control.Applicative
28import Control.Applicative
@@ -502,7 +502,7 @@ validateParamSchemaType value = withSchema $ \sch ->
502 bad -> invalid $ "expected JSON value of type " ++ showType bad
502 bad -> invalid $ "expected JSON value of type " ++ showType bad
504showType :: (Maybe (SwaggerType t), Value) -> String
504showType :: (Maybe (SwaggerType t), Value) -> String
505−showType (Just type_, _) = show type_
505+showType (Just ty, _) = show ty
506showType (Nothing, Null) = "SwaggerNull"
506showType (Nothing, Null) = "SwaggerNull"
507showType (Nothing, Bool _) = "SwaggerBoolean"
507showType (Nothing, Bool _) = "SwaggerBoolean"
508showType (Nothing, Number _) = "SwaggerNumber"
508showType (Nothing, Number _) = "SwaggerNumber"