Browse Source

Update `docs_src/app_testing/app_b_*`

pull/14753/head
Yurii Motov 6 months ago
parent
commit
0852f67a10
  1. 4
      docs_src/app_testing/app_b_an_py310/main.py
  2. 4
      docs_src/app_testing/app_b_an_py39/main.py
  3. 4
      docs_src/app_testing/app_b_py310/main.py
  4. 4
      docs_src/app_testing/app_b_py39/main.py

4
docs_src/app_testing/app_b_an_py310/main.py

@ -28,8 +28,8 @@ async def read_main(item_id: str, x_token: Annotated[str, Header()]):
return fake_db[item_id]
@app.post("/items/", response_model=Item)
async def create_item(item: Item, x_token: Annotated[str, Header()]):
@app.post("/items/")
async def create_item(item: Item, x_token: Annotated[str, Header()]) -> Item:
if x_token != fake_secret_token:
raise HTTPException(status_code=400, detail="Invalid X-Token header")
if item.id in fake_db:

4
docs_src/app_testing/app_b_an_py39/main.py

@ -28,8 +28,8 @@ async def read_main(item_id: str, x_token: Annotated[str, Header()]):
return fake_db[item_id]
@app.post("/items/", response_model=Item)
async def create_item(item: Item, x_token: Annotated[str, Header()]):
@app.post("/items/")
async def create_item(item: Item, x_token: Annotated[str, Header()]) -> Item:
if x_token != fake_secret_token:
raise HTTPException(status_code=400, detail="Invalid X-Token header")
if item.id in fake_db:

4
docs_src/app_testing/app_b_py310/main.py

@ -26,8 +26,8 @@ async def read_main(item_id: str, x_token: str = Header()):
return fake_db[item_id]
@app.post("/items/", response_model=Item)
async def create_item(item: Item, x_token: str = Header()):
@app.post("/items/")
async def create_item(item: Item, x_token: str = Header()) -> Item:
if x_token != fake_secret_token:
raise HTTPException(status_code=400, detail="Invalid X-Token header")
if item.id in fake_db:

4
docs_src/app_testing/app_b_py39/main.py

@ -28,8 +28,8 @@ async def read_main(item_id: str, x_token: str = Header()):
return fake_db[item_id]
@app.post("/items/", response_model=Item)
async def create_item(item: Item, x_token: str = Header()):
@app.post("/items/")
async def create_item(item: Item, x_token: str = Header()) -> Item:
if x_token != fake_secret_token:
raise HTTPException(status_code=400, detail="Invalid X-Token header")
if item.id in fake_db:

Loading…
Cancel
Save