-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Description
Hi guys,
I have one FastAPI endpoint with the following details:
from typing import Annotated
from fastapi import APIRouter, Depends, File, HTTPException, UploadFile
@router.post("/upload", tags=["Frontend-related"])
async def upload_tickets(
file: Annotated[UploadFile, File(description="Excel file with tickets")],
ticket_service: Annotated[TicketServiceFacade, Depends(get_ticket_service_facade)],
) -> dict:
"""
Upload and process tickets from an Excel file.
Parameters
----------
file : Annotated[UploadFile, File(description="Excel file with tickets")]
The uploaded Excel file containing ticket data.
ticket_service : Annotated[TicketServiceFacade, Depends(get_ticket_service_facade)]
The ticket service facade instance.
Returns
-------
dict
Processed ticket data.
Raises
------
HTTPException
If required columns are missing from the uploaded file.
"""
But I always get the same error:
18: DOC105: Function `upload_tickets`: Argument names match, but type hints in these args do not match: file
Metadata
Metadata
Assignees
Labels
No labels