Open naitian opened 1 month ago
Which version of pydantic are you using? I also had issues with pydantic BaseModels until I upgraded pydantic to the latest version.
I'm on 2.9.2, which afaik is the latest unfortunately :(. Were your issues functional or just related to the type hinting?
I've implemented a basic version of the quickstart example using pydantic models:
This works (the docs get generated), but pylance reports a type error (
Argument of type "(data: Todo) -> Coroutine[Any, Any, tuple[Todo, int]]" cannot be assigned to parameter of type "T_route@route"
-- see screenshot from VS Code). As far as I understand, it's because Pydantic are not one of the Quart return types, but I guess I would have expected the@validate_response
decorator to have done some kind of type coercion?I'm not totally sure how Quart-Schema works so sorry if this issue actually belongs elsewhere. Thanks.