fastapi/full-stack-fastapi-template

Typing problem when using the `example` attribute of the `Path` class

EwertonDCSilv opened this issue · 2 comments

I believe that keeping the restriction to Optional[Dict[str, Any]] makes the use of examples very rigid.

Wouldn't something like Optional[Union[str, Dict[str, Any]]] be more common?

image

Nor is the typing of documentation examples included.

image
image

@tiangolo It would be important to add a step in the release process that checks the typing signature via mypy