I have FastAPI function like this:
@router.post("/test/")
async def test(ids: List[str] = Body(..., )):
# some logic
I want "ids" field as required and pass there values like ["1", "2"]. If I pass a valid list it working fine. But if I pass empty list - [], this is also will be valid param and I dont want that. I can write function that checks it myself pretty easy, but I feel from my expirience with this wonderful framework that FastAPI have it covered already and I just dont know how.