i wanna validate data in request i have dictionary (a and b are use cases, 1234 are sub use cases)
d ={'a':[1,2],'b':[3,4]}
and request @router.post("/documents")
from typing import Literal, List, Optional, Dict
@router.post("/documents")
async def data(usecase: Literal[frozenset(d.keys())] = Form(...))
it works and allowed values only a and b
But i wanna extend validation
@router.post("/documents")
async def data(usecase: Literal[frozenset(d.keys())] = Form(...),
subusecase: THERE I WANNA VALIDATE 1234 VALUES = Form(...)
)
I will be very grateful for the help