mirror of
https://github.com/fastapi/fastapi.git
synced 2026-03-30 12:43:15 -04:00
📝 Update docs for Query Params and String Validations, remove obsolete Ellipsis docs (...) (#13377)
This commit is contained in:
committed by
GitHub
parent
2c937aabef
commit
9ec452a154
@@ -6,7 +6,7 @@ app = FastAPI()
|
||||
|
||||
|
||||
@app.get("/items/")
|
||||
async def read_items(q: Union[str, None] = Query(default=..., min_length=3)):
|
||||
async def read_items(q: Union[str, None] = Query(min_length=3)):
|
||||
results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
|
||||
if q:
|
||||
results.update({"q": q})
|
||||
|
||||
Reference in New Issue
Block a user