Skip to content

Commit 4bbf6a8

Browse files
committed
type validator error msg formatting fix
1 parent 0105f28 commit 4bbf6a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

openapi_schema_validator/_validators.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ def type(validator, data_type, instance, schema):
9191
return
9292

9393
if not validator.is_type(instance, data_type):
94-
yield ValidationError("%r is not of type %s" % (instance, data_type))
94+
data_repr = repr(data_type)
95+
yield ValidationError("%r is not of type %s" % (instance, data_repr))
9596

9697

9798
def format(validator, format, instance, schema):

0 commit comments

Comments
 (0)