- Sort Score
- Num 10 results
- Language All
Results 451 - 460 of 1,168 for item2 (0.03 seconds)
-
docs/uk/docs/tutorial/body-multiple-params.md
Припустимо, у вас є лише один параметр тіла запиту `item` з моделі Pydantic `Item`. За замовчуванням **FastAPI** очікуватиме, що тіло запиту міститиме вміст безпосередньо. Але якщо Ви хочете, щоб він очікував JSON з ключем `item`, а всередині — вміст моделі (так, як це відбувається при оголошенні додаткових параметрів тіла), Ви можете використати спеціальний параметр `Body` — `embed`: ```Python item: Item = Body(embed=True) ```
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Feb 28 14:19:00 GMT 2025 - 7.4K bytes - Click Count (0) -
tests/test_security_oauth2_authorization_code_bearer_description.py
tokenUrl="token", description="OAuth2 Code Bearer", auto_error=True, ) @app.get("/items/") async def read_items(token: Optional[str] = Security(oauth2_scheme)): return {"token": token} client = TestClient(app) def test_no_token(): response = client.get("/items") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"}
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.4K bytes - Click Count (0) -
tests/test_security_oauth2_password_bearer_optional.py
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/token", auto_error=False) @app.get("/items/") async def read_items(token: Optional[str] = Security(oauth2_scheme)): if token is None: return {"msg": "Create an account first"} return {"token": token} client = TestClient(app) def test_no_token(): response = client.get("/items") assert response.status_code == 200, response.text
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.1K bytes - Click Count (0) -
docs/es/docs/tutorial/body-multiple-params.md
Supongamos que solo tienes un único parámetro de cuerpo `item` de un modelo Pydantic `Item`. Por defecto, **FastAPI** esperará su cuerpo directamente. Pero si deseas que espere un JSON con una clave `item` y dentro de ella los contenidos del modelo, como lo hace cuando declaras parámetros de cuerpo extra, puedes usar el parámetro especial `Body` `embed`: ```Python item: Item = Body(embed=True) ``` como en:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Dec 16 16:33:45 GMT 2025 - 5.2K bytes - Click Count (0) -
docs/en/overrides/main.html
<div class="announce-wrapper"> <div id="announce-left"> <div class="item"> <a class="announce-link" href="https://fastapicloud.com" target="_blank"> <span class="twemoji"> {% include ".icons/material/cloud-arrow-up.svg" %} </span> Join the <strong>FastAPI Cloud</strong> waiting list 🚀 </a> </div> <div class="item"> <a class="announce-link" href="https://x.com/fastapi" target="_blank">Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Dec 01 20:06:57 GMT 2025 - 5.5K bytes - Click Count (0) -
docs/ja/docs/tutorial/handling-errors.md
### レスポンス結果 クライアントが`http://example.com/items/foo`(`item_id` `"foo"`)をリクエストすると、HTTPステータスコードが200で、以下のJSONレスポンスが返されます: ```JSON { "item": "The Foo Wrestlers" } ``` しかし、クライアントが`http://example.com/items/bar`(存在しない`item_id` `"bar"`)をリクエストした場合、HTTPステータスコード404("not found"エラー)と以下のJSONレスポンスが返されます: ```JSON { "detail": "Item not found" } ``` /// tip | 豆知識
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Oct 11 17:48:49 GMT 2025 - 11.6K bytes - Click Count (0) -
tests/test_tutorial/test_metadata/test_tutorial001_1.py
"info": { "title": "ChimichangApp", "summary": "Deadpool's favorite app. Nuff said.", "description": "\nChimichangApp API helps you do awesome stuff. 🚀\n\n## Items\n\nYou can **read items**.\n\n## Users\n\nYou will be able to:\n\n* **Create users** (_not implemented_).\n* **Read users** (_not implemented_).\n", "termsOfService": "http://example.com/terms/", "contact": {
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.7K bytes - Click Count (0) -
tests/test_tutorial/test_path_operation_configurations/test_tutorial006.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 2.4K bytes - Click Count (0) -
tests/test_tutorial/test_extending_openapi/test_tutorial001.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.5K bytes - Click Count (0) -
docs_src/path_operation_configuration/tutorial002b_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 323 bytes - Click Count (0)