diff --git a/AUTHORS.rst b/AUTHORS.rst index 17bea2b9..39c485ee 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -78,3 +78,4 @@ Contributors (chronological) - Mounier Florian `@paradoxxxzero `_ - Renato Damas `@codectl `_ - Tayler Sokalski `@tsokalski `_ +- Luna Lovegood `@duchuyvp `_ \ No newline at end of file diff --git a/src/apispec/ext/marshmallow/__init__.py b/src/apispec/ext/marshmallow/__init__.py index 2595581d..6e118099 100644 --- a/src/apispec/ext/marshmallow/__init__.py +++ b/src/apispec/ext/marshmallow/__init__.py @@ -89,8 +89,9 @@ def resolver(schema: type[Schema]) -> str: schema_cls = resolve_schema_cls(schema) name = schema_cls.__name__ if name.endswith("Schema"): - return name[:-6] or name - return name + name_ = name[:-6] or name + return name_.strip() + return name.strip() class MarshmallowPlugin(BasePlugin):