git.iko.soy/typeable/openapi3
on master help sign in
trace wtf
commit8a4e66cbf3f1bf486811551c35a9e567e549b67d authorAleksey Uymanov <s9gf4ult@gmail.com> dateThu 5 Aug 2021, 16:47 (5 years ago) parentbb1c64f
1 file changed+2−1
src/Data/OpenApi/Internal/Schema/Validation.hs+2−1
src/Data/OpenApi/Internal/Schema/Validation.hs+2−1
@@ -25,6 +25,7 @@ module Data.OpenApi.Internal.Schema.Validation where
2525
2626import Prelude ()
2727import Prelude.Compat
28+import Debug.Trace
2829
2930import Control.Applicative
3031import Control.Lens hiding (allOf)
@@ -472,7 +473,7 @@ validateSchemaType val = withSchema $ \sch ->
472473 res <- forM variants $ \var ->
473474 (True <$ validateWithSchemaRef var val) <|> (return False)
474475 case length $ filter id res of
475− 0 -> invalid $ "Value not valid under any of 'oneOf' schemas: " ++ show val
476+ 0 -> traceShow (val, variants) $ invalid $ "Value not valid under any of 'oneOf' schemas: " ++ show val
476477 1 -> valid
477478 _ -> invalid $ "Value matches more than one of 'oneOf' schemas: " ++ show val
478479 (view allOf -> Just variants) -> do