Add operation_id to upload endpoints for improved OpenAPI docs

The `operation_id` field was added to the `generate_presigned_url` and `upload_file` endpoints. This enhances the OpenAPI documentation by providing unique identifiers for better API clarity and client generation.
This commit is contained in:
2025-03-13 07:51:13 +01:00
parent 6397cfae49
commit b46533b18f

View File

@@ -15,7 +15,7 @@ router = APIRouter()
@router.post("/presigned-url", response_model=PresignedUrlResponse) @router.post("/presigned-url", response_model=PresignedUrlResponse, operation_id="generate_presigned_url")
async def generate_presigned_url( async def generate_presigned_url(
request: PresignedUrlRequest, request: PresignedUrlRequest,
current_user: User = Depends(get_current_user), current_user: User = Depends(get_current_user),
@@ -62,11 +62,11 @@ async def generate_presigned_url(
) )
@router.post("/{token}") @router.post("/{token}", operation_id="upload_file")
async def upload_file( async def upload_file(
token: str, token: str,
file: UploadFile = File(...), file: UploadFile = File(...),
storage: StorageProvider = Depends(get_storage_provider) storage: StorageProvider = Depends(get_storage_provider),
): ):
""" """
Upload a file using a presigned URL token. Upload a file using a presigned URL token.