Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 21 - 30 of 1,139 for docs_src (0.23 seconds)

  1. docs/en/docs/advanced/path-operation-advanced-configuration.md

    ///
    
    You can set the OpenAPI `operationId` to be used in your *path operation* with the parameter `operation_id`.
    
    You would have to make sure that it is unique for each operation.
    
    {* ../../docs_src/path_operation_advanced_configuration/tutorial001_py310.py hl[6] *}
    
    ### Using the *path operation function* name as the operationId { #using-the-path-operation-function-name-as-the-operationid }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 7.1K bytes
    - Click Count (0)
  2. docs/zh/docs/tutorial/path-params-numeric-validations.md

    不过你可以重新排序,让没有默认值的参数(查询参数 `q`)放在最前面。
    
    对 **FastAPI** 来说这无关紧要。它会通过参数的名称、类型和默认值声明(`Query`、`Path` 等)来检测参数,而不关心顺序。
    
    因此,你可以将函数声明为:
    
    {* ../../docs_src/path_params_numeric_validations/tutorial002_py310.py hl[7] *}
    
    但请记住,如果你使用 `Annotated`,你就不会遇到这个问题,因为你没有使用 `Query()` 或 `Path()` 作为函数参数的默认值。
    
    {* ../../docs_src/path_params_numeric_validations/tutorial002_an_py310.py *}
    
    ## 按需对参数排序的技巧 { #order-the-parameters-as-you-need-tricks }
    
    /// tip | 提示
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 6K bytes
    - Click Count (0)
  3. docs/en/docs/tutorial/handling-errors.md

    ## Use `HTTPException` { #use-httpexception }
    
    To return HTTP responses with errors to the client you use `HTTPException`.
    
    ### Import `HTTPException` { #import-httpexception }
    
    {* ../../docs_src/handling_errors/tutorial001_py310.py hl[1] *}
    
    ### Raise an `HTTPException` in your code { #raise-an-httpexception-in-your-code }
    
    `HTTPException` is a normal Python exception with additional data relevant for APIs.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 8.9K bytes
    - Click Count (0)
  4. docs/en/docs/tutorial/metadata.md

        * You can set its URL with the parameter `docs_url`.
        * You can disable it by setting `docs_url=None`.
    * **ReDoc**: served at `/redoc`.
        * You can set its URL with the parameter `redoc_url`.
        * You can disable it by setting `redoc_url=None`.
    
    For example, to set Swagger UI to be served at `/documentation` and disable ReDoc:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 5.8K bytes
    - Click Count (0)
  5. docs/zh-hant/docs/tutorial/path-params-numeric-validations.md

    但你可以調整它們的順序,先放沒有預設值(查詢參數 `q`)的參數。
    
    對 **FastAPI** 來說沒差。它會依參數名稱、型別與預設宣告(`Query`、`Path` 等)來辨識參數,並不在意順序。
    
    因此,你可以這樣宣告你的函式:
    
    {* ../../docs_src/path_params_numeric_validations/tutorial002_py310.py hl[7] *}
    
    但請記住,若使用 `Annotated`,你就不會有這個問題,因為你不是用函式參數預設值來放 `Query()` 或 `Path()`。
    
    {* ../../docs_src/path_params_numeric_validations/tutorial002_an_py310.py *}
    
    ## 依需求調整參數順序的技巧 { #order-the-parameters-as-you-need-tricks }
    
    /// tip
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 5.8K bytes
    - Click Count (0)
  6. docs/ja/docs/tutorial/body-nested-models.md

    内部の型を持つモデルの属性にも同じ標準の構文を使用してください。
    
    そのため、以下の例では`tags`を具体的な「文字列のリスト」にすることができます:
    
    {* ../../docs_src/body_nested_models/tutorial002_py310.py hl[12] *}
    
    ## セット型 { #set-types }
    
    しかし、よく考えてみると、タグは繰り返すべきではなく、おそらくユニークな文字列になるのではないかと気付いたとします。
    
    そして、Pythonにはユニークな項目のセットのための特別なデータ型`set`があります。
    
    そして、`tags`を文字列のセットとして宣言できます:
    
    {* ../../docs_src/body_nested_models/tutorial003_py310.py hl[12] *}
    
    これを使えば、データが重複しているリクエストを受けた場合でも、ユニークな項目のセットに変換されます。
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 8.6K bytes
    - Click Count (0)
  7. docs/zh-hant/docs/tutorial/response-model.md

    ## 新增一個輸出模型 { #add-an-output-model }
    
    我們可以改為建立一個包含明文密碼的輸入模型,以及一個不含密碼的輸出模型:
    
    {* ../../docs_src/response_model/tutorial003_py310.py hl[9,11,16] *}
    
    在這裡,雖然「路徑操作函式」回傳的是同一個包含密碼的輸入使用者:
    
    {* ../../docs_src/response_model/tutorial003_py310.py hl[24] *}
    
    ...我們把 `response_model` 宣告為不包含密碼的 `UserOut` 模型:
    
    {* ../../docs_src/response_model/tutorial003_py310.py hl[22] *}
    
    因此,FastAPI 會負責(透過 Pydantic)過濾掉輸出模型中未宣告的所有資料。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 14.5K bytes
    - Click Count (0)
  8. docs/en/docs/how-to/extending-openapi.md

    First, write all your **FastAPI** application as normally:
    
    {* ../../docs_src/extending_openapi/tutorial001_py310.py hl[1,4,7:9] *}
    
    ### Generate the OpenAPI schema { #generate-the-openapi-schema }
    
    Then, use the same utility function to generate the OpenAPI schema, inside a `custom_openapi()` function:
    
    {* ../../docs_src/extending_openapi/tutorial001_py310.py hl[2,15:21] *}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 3.3K bytes
    - Click Count (0)
  9. docs/ko/docs/tutorial/body-multiple-params.md

    ## `Path`, `Query` 및 본문 매개변수 혼합 { #mix-path-query-and-body-parameters }
    
    먼저, 물론 `Path`, `Query` 및 요청 본문 매개변수 선언을 자유롭게 혼합해서 사용할 수 있고, **FastAPI**는 어떤 동작을 할지 압니다.
    
    또한 기본 값을 `None`으로 설정해 본문 매개변수를 선택사항으로 선언할 수 있습니다:
    
    {* ../../docs_src/body_multiple_params/tutorial001_an_py310.py hl[18:20] *}
    
    /// note | 참고
    
    이 경우에는 본문에서 가져올 `item`이 선택사항이라는 점을 유의하세요. 기본값이 `None`이기 때문입니다.
    
    ///
    
    ## 다중 본문 매개변수 { #multiple-body-parameters }
    
    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)
  10. docs/en/docs/advanced/settings.md

    For example, you could have a file `config.py` with:
    
    {* ../../docs_src/settings/app01_py310/config.py *}
    
    And then use it in a file `main.py`:
    
    {* ../../docs_src/settings/app01_py310/main.py hl[3,11:13] *}
    
    /// tip
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 10.9K bytes
    - Click Count (0)
Back to Top