Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 81 - 90 of 1,076 for itemId (0.19 seconds)

  1. docs_src/additional_status_codes/tutorial001_py310.py

    app = FastAPI()
    
    items = {"foo": {"name": "Fighters", "size": 6}, "bar": {"name": "Tenders", "size": 3}}
    
    
    @app.put("/items/{item_id}")
    async def upsert_item(
        item_id: str,
        name: str | None = Body(default=None),
        size: int | None = Body(default=None),
    ):
        if item_id in items:
            item = items[item_id]
            item["name"] = name
            item["size"] = size
            return item
        else:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 646 bytes
    - Click Count (0)
  2. src/test/java/org/codelibs/fess/api/chat/ChatApiManagerTest.java

            final List<String> items = List.of("item1", "item2", "item3");
            chatApiManager.sendSseEvent(writer, "test", Map.of("items", items));
    
            final String output = stringWriter.toString();
            assertTrue(output.contains("event: test"));
            assertTrue(output.contains("["));
            assertTrue(output.contains("item1"));
            assertTrue(output.contains("item2"));
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Sat Mar 14 01:39:16 GMT 2026
    - 35K bytes
    - Click Count (0)
  3. tests/test_tutorial/test_body/test_tutorial004.py

                "paths": {
                    "/items/{item_id}": {
                        "put": {
                            "parameters": [
                                {
                                    "in": "path",
                                    "name": "item_id",
                                    "required": True,
                                    "schema": {
                                        "title": "Item Id",
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 6.6K bytes
    - Click Count (0)
  4. docs/de/docs/tutorial/path-params.md

    Der Wert des Pfad-Parameters `item_id` wird Ihrer Funktion als das Argument `item_id` übergeben.
    
    Wenn Sie dieses Beispiel ausführen und auf [http://127.0.0.1:8000/items/foo](http://127.0.0.1:8000/items/foo) gehen, sehen Sie als <abbr title="Response – Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr>:
    
    ```JSON
    {"item_id":"foo"}
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 10K bytes
    - Click Count (0)
  5. docs_src/handling_errors/tutorial001_py310.py

    from fastapi import FastAPI, HTTPException
    
    app = FastAPI()
    
    items = {"foo": "The Foo Wrestlers"}
    
    
    @app.get("/items/{item_id}")
    async def read_item(item_id: str):
        if item_id not in items:
            raise HTTPException(status_code=404, detail="Item not found")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 299 bytes
    - Click Count (0)
  6. docs_src/handling_errors/tutorial002_py310.py

    app = FastAPI()
    
    items = {"foo": "The Foo Wrestlers"}
    
    
    @app.get("/items-header/{item_id}")
    async def read_item_header(item_id: str):
        if item_id not in items:
            raise HTTPException(
                status_code=404,
                detail="Item not found",
                headers={"X-Error": "There goes my error"},
            )
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 404 bytes
    - Click Count (0)
  7. tests/test_tutorial/test_body_updates/test_tutorial002.py

                            "summary": "Read Item",
                            "operationId": "read_item_items__item_id__get",
                            "parameters": [
                                {
                                    "required": True,
                                    "schema": {"title": "Item Id", "type": "string"},
                                    "name": "item_id",
                                    "in": "path",
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 7.8K bytes
    - Click Count (0)
  8. docs_src/query_params_str_validations/tutorial006c_py310.py

    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: str | None = Query(min_length=3)):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 15 16:23:59 GMT 2025
    - 261 bytes
    - Click Count (0)
  9. docs_src/query_params_str_validations/tutorial005_py310.py

    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: str = Query(default="fixedquery", min_length=3)):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 276 bytes
    - Click Count (0)
  10. docs_src/query_params_str_validations/tutorial006_an_py310.py

    from typing import Annotated
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: Annotated[str, Query(min_length=3)]):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 294 bytes
    - Click Count (0)
Back to Top