Browse Source

3.9 union

pull/9837/head
JONEMI21 6 months ago
parent
commit
07ceed403d
  1. 4
      tests/test_request_params/test_query/test_free_form.py

4
tests/test_request_params/test_query/test_free_form.py

@ -155,12 +155,12 @@ def test_required_dict_union(path: str):
@app.get("/required-dict-of-union")
async def read_required_dict_of_union(p: Annotated[dict[str, int | bool], Query()]):
async def read_required_dict_of_union(p: Annotated[dict[str, Union[int, bool]], Query()]):
return {"p": p}
class QueryModelRequiredDictOfUnion(BaseModel):
p: dict[str, int | bool]
p: dict[str, Union[int, bool]]
@app.get("/model-required-dict-of-union")

Loading…
Cancel
Save