diff --git a/mashumaro/jsonschema/plugins.py b/mashumaro/jsonschema/plugins.py index 0974d07..3396c9c 100644 --- a/mashumaro/jsonschema/plugins.py +++ b/mashumaro/jsonschema/plugins.py @@ -1,4 +1,5 @@ from dataclasses import is_dataclass +from inspect import cleandoc from typing import Optional from mashumaro.jsonschema.models import Context, JSONSchema @@ -23,5 +24,5 @@ def get_schema( schema: Optional[JSONSchema] = None, ) -> Optional[JSONSchema]: if schema and is_dataclass(instance.type) and instance.type.__doc__: - schema.description = instance.type.__doc__ + schema.description = cleandoc(instance.type.__doc__) return None