Coverage for docs_src/query_params_str_validations/tutorial014_an_py39.py: 100%
8 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-08-08 03:53 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2024-08-08 03:53 +0000
1from typing import Annotated, Union 1abc
3from fastapi import FastAPI, Query 1abc
5app = FastAPI() 1abc
8@app.get("/items/") 1abc
9async def read_items( 1abc
10 hidden_query: Annotated[Union[str, None], Query(include_in_schema=False)] = None,
11):
12 if hidden_query: 1abc
13 return {"hidden_query": hidden_query} 1abc
14 else:
15 return {"hidden_query": "Not found"} 1abc