fastapi/tests/test_modules_same_name_body/app/a.py

9 lines
166 B
Python

from fastapi import APIRouter, Body
router = APIRouter()
@router.post("/compute")
def compute(a: int = Body(...), b: str = Body(...)):
return {"a": a, "b": b}