Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 28 for embed (0.02 seconds)

  1. docs/en/docs/tutorial/body-multiple-params.md

    
    /// info
    
    `Body` also has all the same extra validation and metadata parameters as `Query`, `Path` and others you will see later.
    
    ///
    
    ## Embed a single body parameter { #embed-a-single-body-parameter }
    
    Let's say you only have a single `item` body parameter from a Pydantic model `Item`.
    
    By default, **FastAPI** will then expect its body directly.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Feb 11 18:32:12 GMT 2026
    - 4.8K bytes
    - Click Count (0)
  2. build-logic/documentation/src/main/groovy/gradlebuild/docs/DecorateReleaseNotes.java

        public abstract RegularFileProperty getDestinationFile();
    
        /**
         * The release notes JavaScript to embed in the HTML
         */
        @InputFile
        @PathSensitive(PathSensitivity.NONE)
        public abstract RegularFileProperty getReleaseNotesJavascriptFile();
    
        /**
         * The release notes CSS to embed in the HTML
         */
        @InputFile
        @PathSensitive(PathSensitivity.NONE)
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Thu Jan 22 12:08:23 GMT 2026
    - 3.8K bytes
    - Click Count (0)
  3. docs_src/body_fields/tutorial001_py310.py

        )
        price: float = Field(gt=0, description="The price must be greater than zero")
        tax: float | None = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item = Body(embed=True)):
        results = {"item_id": item_id, "item": item}
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 523 bytes
    - Click Count (0)
  4. docs/zh-hant/docs/tutorial/body-multiple-params.md

    `Body` 也具有與 `Query`、`Path` 以及之後你會看到的其他工具相同的額外驗證與中繼資料參數。
    
    ///
    
    ## 嵌入單一 Body 參數 { #embed-a-single-body-parameter }
    
    假設你只有一個來自 Pydantic 模型 `Item` 的單一 `item` Body 參數。
    
    預設情況下,**FastAPI** 會直接期望該模型的內容作為請求主體。
    
    但如果你想讓它像宣告多個 Body 參數時那樣,期望一個帶有 `item` 鍵、其內含模型內容的 JSON,你可以使用 `Body` 的特殊參數 `embed`:
    
    ```Python
    item: Item = Body(embed=True)
    ```
    
    如下:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 14 08:15:26 GMT 2026
    - 4.6K bytes
    - Click Count (0)
  5. docs_src/body_multiple_params/tutorial005_py310.py

    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item = Body(embed=True)):
        results = {"item_id": item_id, "item": item}
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 369 bytes
    - Click Count (0)
  6. docs_src/pydantic_v1_in_v2/tutorial004_an_py310.py

    
    class Item(BaseModel):
        name: str
        description: str | None = None
        size: float
    
    
    app = FastAPI()
    
    
    @app.post("/items/")
    async def create_item(item: Annotated[Item, Body(embed=True)]) -> Item:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Oct 11 16:45:54 GMT 2025
    - 360 bytes
    - Click Count (0)
  7. docs/ko/docs/tutorial/body-multiple-params.md

    ///
    
    ## 단일 본문 매개변수 삽입하기 { #embed-a-single-body-parameter }
    
    Pydantic 모델 `Item`에서 가져온 단일 `item` 본문 매개변수만 있다고 하겠습니다.
    
    기본적으로 **FastAPI**는 그 본문을 직접 예상합니다.
    
    하지만 추가 본문 매개변수를 선언할 때처럼, `item` 키를 가지고 그 안에 모델 내용이 들어 있는 JSON을 예상하게 하려면, `Body`의 특별한 매개변수 `embed`를 사용할 수 있습니다:
    
    ```Python
    item: Item = Body(embed=True)
    ```
    
    다음과 같이요:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 14 08:57:01 GMT 2026
    - 5.5K bytes
    - Click Count (0)
  8. docs_src/body_fields/tutorial001_an_py310.py

        )
        price: float = Field(gt=0, description="The price must be greater than zero")
        tax: float | None = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Annotated[Item, Body(embed=True)]):
        results = {"item_id": item_id, "item": item}
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 563 bytes
    - Click Count (0)
  9. docs_src/body_multiple_params/tutorial005_an_py310.py

    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Annotated[Item, Body(embed=True)]):
        results = {"item_id": item_id, "item": item}
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 409 bytes
    - Click Count (0)
  10. docs/zh/docs/tutorial/body-multiple-params.md

    `Body` 同样具有与 `Query`、`Path` 以及其他后面将看到的类完全相同的额外校验和元数据参数。
    
    ///
    
    ## 嵌入单个请求体参数 { #embed-a-single-body-parameter }
    
    假设你只有一个来自 Pydantic 模型 `Item` 的请求体参数 `item`。
    
    默认情况下,**FastAPI** 将直接期望这样的请求体。
    
    但是,如果你希望它期望一个拥有 `item` 键并在值中包含模型内容的 JSON,就像在声明额外的请求体参数时所做的那样,则可以使用一个特殊的 `Body` 参数 `embed`:
    
    ```Python
    item: Item = Body(embed=True)
    ```
    
    比如:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 13 13:37:57 GMT 2026
    - 4.9K bytes
    - Click Count (0)
Back to Top