mirror of
https://github.com/fastapi/fastapi.git
synced 2026-10-22 09:55:32 -04:00
📝 Update docs for Query Params and String Validations, remove obsolete Ellipsis docs (...) (#13377)
This commit is contained in:
1 parent
2c937aabef
commit
9ec452a154
17 files changed
+20
-294
No files matched your search
@@ -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