- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for UserForm (0.42 sec)
-
tests/test_union_forms.py
from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class UserForm(BaseModel): name: str email: str class CompanyForm(BaseModel): company_name: str industry: str @app.post("/form-union/") def post_union_form(data: Annotated[Union[UserForm, CompanyForm], Form()]): return {"received": data} client = TestClient(app)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 5.2K bytes - Viewed (0)