- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 889 for item01 (0.03 sec)
-
tests/test_tutorial/test_additional_responses/test_tutorial004.py
"openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/items/{item_id}": { "get": { "responses": { "404": {"description": "Item not found"}, "302": {"description": "The item was moved"}, "403": {"description": "Not enough privileges"}, "200": {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 4.9K bytes - Viewed (0) -
README.md
System.out.println(response.getContentAsString()); } ``` ### Asynchronous request ```java import org.codelibs.curl.Curl; Curl.post("https://api.example.com/items") .body("{\"name\":\"item1\"}") .header("Content-Type", "application/json") .execute( response -> System.out.println("Async status: " + response.getHttpStatusCode()), error -> error.printStackTrace()); ```
Registered: Sat Dec 20 09:13:53 UTC 2025 - Last Modified: Thu Nov 20 13:34:13 UTC 2025 - 2.5K bytes - Viewed (0) -
docs_src/response_model/tutorial006_py39.py
}, } @app.get( "/items/{item_id}/name", response_model=Item, response_model_include=["name", "description"], ) async def read_item_name(item_id: str): return items[item_id] @app.get("/items/{item_id}/public", response_model=Item, response_model_exclude=["tax"]) async def read_item_public_data(item_id: str):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 848 bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial009.py
def test_query_params_str_validations_no_query(client: TestClient): response = client.get("/items/") assert response.status_code == 200 assert response.json() == {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} def test_query_params_str_validations_item_query_fixedquery(client: TestClient): response = client.get("/items/", params={"item-query": "fixedquery"}) assert response.status_code == 200 assert response.json() == {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 4.3K bytes - Viewed (0) -
tests/test_tutorial/test_path_params_numeric_validations/test_tutorial001.py
f"docs_src.path_params_numeric_validations.{request.param}" ) return TestClient(mod.app) @pytest.mark.parametrize( "path,expected_response", [ ("/items/42", {"item_id": 42}), ("/items/123?item-query=somequery", {"item_id": 123, "q": "somequery"}), ], ) def test_read_items(client: TestClient, path, expected_response): response = client.get(path)Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 5.6K bytes - Viewed (0) -
tests/test_extra_routes.py
return {"item_id": item_id, "item": item} @app.head("/items/{item_id}") def head_item(item_id: str): return JSONResponse(None, headers={"x-fastapi-item-id": item_id}) @app.options("/items/{item_id}") def options_item(item_id: str): return JSONResponse(None, headers={"x-fastapi-item-id": item_id}) @app.patch("/items/{item_id}") def patch_item(item_id: str, item: Item):Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 13.5K bytes - Viewed (0) -
tests/test_tutorial/test_handling_errors/test_tutorial002.py
client = TestClient(app) def test_get_item_header(): response = client.get("/items-header/foo") assert response.status_code == 200, response.text assert response.json() == {"item": "The Foo Wrestlers"} def test_get_item_not_found_header(): response = client.get("/items-header/bar") assert response.status_code == 404, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.3K bytes - Viewed (0) -
docs/ru/docs/how-to/migrate-from-pydantic-v1-to-pydantic-v2.md
{* ../../docs_src/pydantic_v1_in_v2/tutorial003_an_py310.py hl[2:3,6,12,21:22] *} В примере выше модель входных данных — это модель Pydantic v1, а модель выходных данных (указанная в `response_model=ItemV2`) — это модель Pydantic v2. ### Параметры Pydantic v1 { #pydantic-v1-parameters }Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 10 20:54:56 UTC 2025 - 8.1K bytes - Viewed (0) -
tests/test_tutorial/test_body/test_tutorial004.py
response = client.put( "/items/123", json={"name": "Foo", "price": 50.1}, ) assert response.status_code == 200 assert response.json() == { "item_id": 123, "name": "Foo", "price": 50.1, "description": None, "tax": None, } def test_put_with_no_data(client: TestClient): response = client.put("/items/123", json={})
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 6K bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial005.py
"paths": { "/items/{item_id}": { "put": { "summary": "Update Item", "operationId": "update_item_items__item_id__put", "parameters": [ { "required": True, "schema": {"title": "Item Id", "type": "integer"},
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 6.1K bytes - Viewed (0)