mirror of
https://github.com/rjNemo/fastapi
synced 2026-06-06 18:46:40 +00:00
11 lines
283 B
Python
11 lines
283 B
Python
from fastapi import FastAPI, Query
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.get("/items/")
|
|
async def read_items(hidden_query: str | None = Query(None, include_in_schema=False)):
|
|
if hidden_query:
|
|
return {"hidden_query": hidden_query}
|
|
else:
|
|
return {"hidden_query": "Not found"}
|