- Sort Score
- Result 10 results
- Languages All
Results 461 - 470 of 1,417 for itemId (0.22 sec)
-
docs_src/path_operation_advanced_configuration/tutorial002.py
from fastapi import FastAPI from fastapi.routing import APIRoute app = FastAPI() @app.get("/items/") async def read_items(): return [{"item_id": "Foo"}] def use_route_names_as_operation_ids(app: FastAPI) -> None: """ Simplify operation IDs so that generated API clients have simpler function names. Should be called only after all routes have been added. """ for route in app.routes:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 572 bytes - Viewed (0) -
docs_src/response_directly/tutorial001.py
from fastapi.responses import JSONResponse from pydantic import BaseModel class Item(BaseModel): title: str timestamp: datetime description: Union[str, None] = None app = FastAPI() @app.put("/items/{id}") def update_item(id: str, item: Item): json_compatible_item_data = jsonable_encoder(item)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 505 bytes - Viewed (0) -
docs_src/path_operation_advanced_configuration/tutorial007_pv1.py
from pydantic import BaseModel, ValidationError app = FastAPI() class Item(BaseModel): name: str tags: List[str] @app.post( "/items/", openapi_extra={ "requestBody": { "content": {"application/x-yaml": {"schema": Item.schema()}}, "required": True, }, }, ) async def create_item(request: Request):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 789 bytes - Viewed (0) -
docs_src/handling_errors/tutorial005.py
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, content=jsonable_encoder({"detail": exc.errors(), "body": exc.body}), ) class Item(BaseModel): title: str size: int @app.post("/items/") async def create_item(item: Item):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 667 bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008b_an.py
client = TestClient(app) def test_get_no_item(): response = client.get("/items/foo") assert response.status_code == 404, response.text assert response.json() == {"detail": "Item not found"} def test_owner_error(): response = client.get("/items/plumbus") assert response.status_code == 400, response.text assert response.json() == {"detail": "Owner error: Rick"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Dec 26 20:37:34 UTC 2023 - 700 bytes - Viewed (0) -
tests/test_validate_response_recursive/app_pv1.py
RecursiveSubitemInSubmodel.update_forward_refs() @app.get("/items/recursive", response_model=RecursiveItem) def get_recursive(): return {"name": "item", "sub_items": [{"name": "subitem", "sub_items": []}]} @app.get("/items/recursive-submodel", response_model=RecursiveItemViaSubmodel) def get_recursive_submodel(): return { "name": "item", "sub_items1": [ {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.1K bytes - Viewed (0) -
tests/test_tutorial/test_query_params/test_tutorial005.py
client = TestClient(app) def test_foo_needy_very(): response = client.get("/items/foo?needy=very") assert response.status_code == 200 assert response.json() == {"item_id": "foo", "needy": "very"} def test_foo_no_needy(): response = client.get("/items/foo") assert response.status_code == 422 assert response.json() == IsDict( { "detail": [
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 4K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008d_an_py39.py
@needs_py39 def test_get_no_item(client: TestClient): response = client.get("/items/foo") assert response.status_code == 404, response.text assert response.json() == {"detail": "Item not found, there's only a plumbus here"} @needs_py39 def test_get(client: TestClient): response = client.get("/items/plumbus") assert response.status_code == 200, response.text assert response.json() == "plumbus"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.3K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008b_an_py39.py
return client @needs_py39 def test_get_no_item(client: TestClient): response = client.get("/items/foo") assert response.status_code == 404, response.text assert response.json() == {"detail": "Item not found"} @needs_py39 def test_owner_error(client: TestClient): response = client.get("/items/plumbus") assert response.status_code == 400, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 918 bytes - Viewed (0) -
src/main/java/org/codelibs/fess/mylasta/direction/sponsor/FessMultipartRequestHandler.java
showFieldLoggingTitle(); for (DiskFileItem item : items) { if (item.isFormField()) { showFormFieldParameter(item); addTextParameter(request, item); } else { showFileFieldParameter(item); final String itemName = item.getName();
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Wed Oct 23 13:27:21 UTC 2024 - 18.6K bytes - Viewed (0)