From b643fa46be591979fa9a07932fb2bfc10c58c589 Mon Sep 17 00:00:00 2001 From: Alexander Tikhonov Date: Wed, 6 Sep 2023 22:06:32 +0300 Subject: [PATCH] Do not use empty enum in Union See https://github.com/python/cpython/issues/109022 --- mashumaro/jsonschema/models.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mashumaro/jsonschema/models.py b/mashumaro/jsonschema/models.py index 3b6f6f5a..dbf43e18 100644 --- a/mashumaro/jsonschema/models.py +++ b/mashumaro/jsonschema/models.py @@ -98,11 +98,7 @@ class JSONSchema(DataClassJSONMixin): enum: Optional[List[Any]] = None const: Optional[Any] = field(default_factory=lambda: MISSING) format: Optional[ - Union[ - JSONSchemaInstanceFormat, - JSONSchemaStringFormat, - JSONSchemaInstanceFormatExtension, - ] + Union[JSONSchemaStringFormat, JSONSchemaInstanceFormatExtension] ] = None title: Optional[str] = None description: Optional[str] = None