From 3d2926871b0f25c3cfaa8bb2674b6e0e7787e8fa Mon Sep 17 00:00:00 2001 From: Ben Howes Date: Tue, 11 Dec 2018 14:49:13 +0000 Subject: [PATCH] Dont use value for determining any type otherwise Falsy values are not valid types --- openapi_core/schema/schemas/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi_core/schema/schemas/models.py b/openapi_core/schema/schemas/models.py index 50783f7..9429424 100644 --- a/openapi_core/schema/schemas/models.py +++ b/openapi_core/schema/schemas/models.py @@ -49,7 +49,7 @@ class Schema(object): } TYPE_VALIDATOR_CALLABLE_GETTER = { - SchemaType.ANY: lambda x: x, + SchemaType.ANY: lambda x: True, SchemaType.BOOLEAN: TypeValidator(bool), SchemaType.INTEGER: TypeValidator(integer_types, exclude=bool), SchemaType.NUMBER: TypeValidator(integer_types, float, exclude=bool),