@@ -241,9 +241,12 @@ validateObject o = withSchema $ \schema ->
241241
242242 validateProps = withSchema $ \schema -> do
243243 for_ (HashMap.toList o) $ \(k, v) ->
244− case HashMap.lookup k (schema ^. properties) of
245− Nothing -> check additionalProperties $ \s -> sub s $ validateWithSchema v
246− Just s -> validateWithSchemaRef s v
244+ case v of
245+ Null | not (k `elem` (schema ^. required)) -> valid -- null is fine for non-required property
246+ _ ->
247+ case HashMap.lookup k (schema ^. properties) of
248+ Nothing -> check additionalProperties $ \s -> sub s $ validateWithSchema v
249+ Just s -> validateWithSchemaRef s v
247250
248251validateEnum :: Value -> Validation (ParamSchema t) ()
249252validateEnum value = do