Skip to content

Response model is missing in the OpenAPI spec and Swagger for @cache decorated endpoints #384

@arseniiarsenii

Description

@arseniiarsenii

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):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions