git.iko.soy/typeable/openapi3
on master help sign in
Fix the error message when using exclusiveMinimum/exclusiveMaximum (#15)
commita2d1509be93dd9bd48207b5594a1c9b55c2b809b authorKenzo Yotsuya <1560182+yotsuya@users.noreply.github.com> dateWed 3 Mar 2021, 20:42 (6 years ago) parent3317fd3
1 file changed+2−2
src/Data/OpenApi/Internal/Schema/Validation.hs+2−2
src/Data/OpenApi/Internal/Schema/Validation.hs+2−2
@@ -315,11 +315,11 @@ validateNumber n = withConfig $ \_cfg -> withSchema $ \sch -> do
315315
316316 check maximum_ $ \m ->
317317 when (if exMax then (n >= m) else (n > m)) $
318− invalid ("value " ++ show n ++ " exceeds maximum (should be " ++ if exMax then "<" else "<=" ++ show m ++ ")")
318+ invalid ("value " ++ show n ++ " exceeds maximum (should be " ++ (if exMax then "<" else "<=") ++ show m ++ ")")
319319
320320 check minimum_ $ \m ->
321321 when (if exMin then (n <= m) else (n < m)) $
322− invalid ("value " ++ show n ++ " falls below minimum (should be " ++ if exMin then ">" else ">=" ++ show m ++ ")")
322+ invalid ("value " ++ show n ++ " falls below minimum (should be " ++ (if exMin then ">" else ">=") ++ show m ++ ")")
323323
324324 check multipleOf $ \k ->
325325 when (not (isInteger (n / k))) $