Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 45 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. tests/test_request_params/test_body/test_required_str.py

    # =====================================================================================
    # Without aliases
    
    
    @app.post("/required-str", operation_id="required_str")
    async def read_required_str(p: Annotated[str, Body(embed=True)]):
        return {"p": p}
    
    
    class BodyModelRequiredStr(BaseModel):
        p: str
    
    
    @app.post("/model-required-str", operation_id="model_required_str")
    async def read_model_required_str(p: BodyModelRequiredStr):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 10.9K bytes
    - Click Count (0)
  4. tests/test_request_params/test_body/test_list.py

    # Without aliases
    
    
    @app.post("/required-list-str", operation_id="required_list_str")
    async def read_required_list_str(p: Annotated[list[str], Body(embed=True)]):
        return {"p": p}
    
    
    class BodyModelRequiredListStr(BaseModel):
        p: list[str]
    
    
    @app.post("/model-required-list-str", operation_id="model_required_list_str")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 11.9K bytes
    - Click Count (0)
  5. tests/test_request_params/test_body/test_optional_str.py

    # =====================================================================================
    # Without aliases
    
    
    @app.post("/optional-str", operation_id="optional_str")
    async def read_optional_str(p: Annotated[str | None, Body(embed=True)] = None):
        return {"p": p}
    
    
    class BodyModelOptionalStr(BaseModel):
        p: str | None = None
    
    
    @app.post("/model-optional-str", operation_id="model_optional_str")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 11.5K bytes
    - Click Count (0)
  6. tests/test_request_params/test_body/test_optional_list.py

    # Without aliases
    
    
    @app.post("/optional-list-str", operation_id="optional_list_str")
    async def read_optional_list_str(
        p: Annotated[list[str] | None, Body(embed=True)] = None,
    ):
        return {"p": p}
    
    
    class BodyModelOptionalListStr(BaseModel):
        p: list[str] | None = None
    
    
    @app.post("/model-optional-list-str", operation_id="model_optional_list_str")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 12.6K bytes
    - Click Count (0)
  7. 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)
  8. 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)
  9. build-logic/documentation/src/main/groovy/gradlebuild/docs/ReleaseNotesTransformer.java

            // Replace YouTube references by embedded videos, ?si= attribute is a must
            // E.g. @youtube(Summary,UN0AFCLASZA?si=9aG5tDzj6nL1_IKT&start=371)@ => https://www.youtube.com/embed/UN0AFCLASZA?si=9aG5tDzj6nL1_IKT&start=371"
            // "&rel=0" is also force-injected to prevent video recommendations from other channels
            rewritten = rewritten.replaceAll("\\@youtube\\(([a-zA-Z\\-_]+)\\,([^\\s<]+)\\)\\@",
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Tue Mar 03 01:59:51 GMT 2026
    - 11.3K bytes
    - Click Count (0)
  10. 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)
Back to Top