fix type conversion of const bool

`prop: {const: True}` should be converted to bool and not to integer.

Change-Id: Ic3775a36c138d451dbad7615bc0e446528d8b0be
Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
This commit is contained in:
Artem Goncharov
2025-05-23 15:57:25 +02:00
parent 43bb841c49
commit 138b6b164a

View File

@@ -301,6 +301,9 @@ class JsonSchemaParser:
if isinstance(const, str):
obj = ConstraintString(**schema)
return obj
if isinstance(const, bool):
obj = PrimitiveBoolean(**schema)
return obj
if isinstance(const, int):
obj = ConstraintInteger(**schema)
return obj