Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 3,476 for item$ (0.12 sec)

  1. docs_src/body_updates/tutorial001.py

    }
    
    
    @app.get("/items/{item_id}", response_model=Item)
    async def read_item(item_id: str):
        return items[item_id]
    
    
    @app.put("/items/{item_id}", response_model=Item)
    async def update_item(item_id: str, item: Item):
        update_item_encoded = jsonable_encoder(item)
        items[item_id] = update_item_encoded
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 906 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_body_updates/test_tutorial001_py39.py

                                }
                            },
                            "required": True,
                        },
                    },
                }
            },
            "components": {
                "schemas": {
                    "Item": {
                        "type": "object",
                        "title": "Item",
                        "properties": {
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Sep 28 04:14:40 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  3. platforms/core-configuration/model-core/src/main/java/org/gradle/model/ModelMap.java

         * @return true if this collection contains an item with the given name.
         */
        boolean containsKey(Object name);
    
        /**
         * Returns true if this collection contains the given item.
         *
         * @param item The item.
         * @return true if this collection contains the given item.
         */
        boolean containsValue(Object item);
    
        /**
         * Returns the names of the items in this collection.
         *
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 9.2K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_path_operation_configurations/test_tutorial005_py310.py

                        },
                        "summary": "Create an item",
                        "description": "Create an item with all the information:\n\n- **name**: each item must have a name\n- **description**: a long description\n- **price**: required\n- **tax**: if the item doesn't have tax, you can omit this\n- **tags**: a set of unique tag strings for this item",
                        "operationId": "create_item_items__post",
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Sep 28 04:14:40 UTC 2023
    - 8.9K bytes
    - Viewed (0)
  5. tests/test_openapi_separate_input_output_schemas.py

        @app.post("/items/")
        def create_item(item: Item):
            return item
    
        @app.post("/items-list/")
        def create_item_list(item: List[Item]):
            return item
    
        @app.get("/items/")
        def read_items() -> List[Item]:
            return [
                Item(
                    name="Portal Gun",
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Sep 28 04:14:40 UTC 2023
    - 18.4K bytes
    - Viewed (0)
  6. docs_src/schema_extra_example/tutorial001_py310.py

                    }
                ]
            }
        }
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item):
        results = {"item_id": item_id, "item": item}
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 646 bytes
    - Viewed (0)
  7. docs_src/schema_extra_example/tutorial003.py

    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        item_id: int,
        item: Item = Body(
            examples=[
                {
                    "name": "Foo",
                    "description": "A very nice Item",
                    "price": 35.4,
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 612 bytes
    - Viewed (0)
  8. 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: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 13.7K bytes
    - Viewed (0)
  9. docs_src/schema_extra_example/tutorial005_an_py39.py

    from fastapi import Body, FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        *,
        item_id: int,
        item: Annotated[
            Item,
            Body(
                openapi_examples={
                    "normal": {
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Aug 26 18:03:13 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_response_model/test_tutorial005.py

    client = TestClient(app)
    
    
    def test_read_item_name():
        response = client.get("/items/bar/name")
        assert response.status_code == 200, response.text
        assert response.json() == {"name": "Bar", "description": "The Bar fighters"}
    
    
    def test_read_item_public_data():
        response = client.get("/items/bar/public")
        assert response.status_code == 200, response.text
        assert response.json() == {
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Aug 04 20:47:07 UTC 2023
    - 6K bytes
    - Viewed (0)
Back to top