2025-03-28 19:10:06 +00:00

10 lines
267 B
Python

from fastapi import APIRouter, status
from typing import List
router = APIRouter()
fruits = ["apple", "banana", "orange", "grape", "mango"]
@router.get("/endpoint", status_code=status.HTTP_200_OK, response_model=List[str])
async def get_fruits():
return fruits