Response model is missing in the OpenAPI spec and Swagger for @cache decorated endpoints
arseniiarsenii opened this issue · 2 comments
arseniiarsenii commented
I've noticed, that response model is missing in the OpenAPI spec and Swagger for @cache decorated endpoints unless response_model
is specified explicitly in the endpoint handler decorator, which is optional for newer versions of FastAPI. Specifying return type annotation of a handler function should be enough.
Versions (from pyproject.toml):
- fastapi-cache2 = {git = "https://github.com/long2ice/fastapi-cache.git", extras = ["redis"]}
- fastapi = "^0.101.0"
mkdir700 commented
Thank you for your feedback, I will try to fix it.