marshmallow-code / apispec

A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification)..

Home Page:https://apispec.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

release 5.2.0: The annotations for path in `path()` have changed

chey opened this issue · comments

commented

apispec/src/apispec/core.py

Lines 470 to 482 in eda2887

path: dict | None = None,
*,
operations: dict[str, typing.Any] | None = None,
summary: str | None = None,
description: str | None = None,
parameters: list[dict] | None = None,
**kwargs: typing.Any,
) -> APISpec:
"""Add a new path object to the spec.
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#path-item-object
:param str|None path: URL path component

I'm getting annotation errors with this release.

error: Argument "path" to "path" of "APISpec" has incompatible type "str"; expected "Optional[Dict[Any, Any]]"