- Sort Score
- Num 10 results
- Language All
Results 51 - 60 of 1,012 for modelA (0.05 seconds)
-
docs/zh/docs/tutorial/header-param-models.md
# Header 参数模型 { #header-parameter-models } 如果您有一组相关的 **header 参数**,您可以创建一个 **Pydantic 模型**来声明它们。 这将允许您在**多个地方**能够**重用模型**,并且可以一次性声明所有参数的验证和元数据。😎 /// note | 注意 自 FastAPI 版本 `0.115.0` 起支持此功能。🤓 /// ## 使用 Pydantic 模型的 Header 参数 { #header-parameters-with-a-pydantic-model } 在 **Pydantic 模型**中声明所需的 **header 参数**,然后将参数声明为 `Header` : {* ../../docs_src/header_param_models/tutorial001_an_py310.py hl[9:14,18] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:39:41 GMT 2026 - 2.5K bytes - Click Count (0) -
docs/zh/docs/tutorial/query-param-models.md
# 查询参数模型 { #query-parameter-models } 如果你有一组具有相关性的**查询参数**,你可以创建一个 **Pydantic 模型**来声明它们。 这将允许你在**多个地方**去**复用模型**,并且一次性为所有参数声明验证和元数据。😎 /// note | 注意 FastAPI 从 `0.115.0` 版本开始支持这个特性。🤓 /// ## 使用 Pydantic 模型的查询参数 { #query-parameters-with-a-pydantic-model } 在一个 **Pydantic 模型**中声明你需要的**查询参数**,然后将参数声明为 `Query`: {* ../../docs_src/query_param_models/tutorial001_an_py310.py hl[9:13,17] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:39:41 GMT 2026 - 2.1K bytes - Click Count (0) -
docs/tr/docs/tutorial/body-updates.md
**Güncelleme** için tüm değerleri optional olan modeller ile **oluşturma** için zorunlu değerlere sahip modelleri ayırmak için, [Extra Models](extra-models.md) bölümünde anlatılan fikirleri kullanabilirsiniz.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 4.5K bytes - Click Count (0) -
tests/test_duplicate_models_openapi.py
from inline_snapshot import snapshot from pydantic import BaseModel app = FastAPI() class Model(BaseModel): pass class Model2(BaseModel): a: Model class Model3(BaseModel): c: Model d: Model2 @app.get("/", response_model=Model3) def f(): return {"c": {}, "d": {"a": {}}} client = TestClient(app) def test_get_api_route():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 2.4K bytes - Click Count (0) -
docs/en/docs/tutorial/body-nested-models.md
## Nested Models { #nested-models } Each attribute of a Pydantic model has a type. But that type can itself be another Pydantic model. So, you can declare deeply nested JSON "objects" with specific attribute names, types and validations. All that, arbitrarily nested. ### Define a submodel { #define-a-submodel } For example, we can define an `Image` model:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 6.6K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/cookie-param-models.md
# Cookie 參數模型 { #cookie-parameter-models } 如果你有一組彼此相關的「**Cookie**」,你可以建立一個「**Pydantic 模型**」來宣告它們。🍪 這樣你就能在**多處**重複使用該模型,並且能一次性為所有參數宣告**驗證**與**中繼資料**。😎 /// note | 注意 自 FastAPI 版本 `0.115.0` 起支援。🤓 /// /// tip 同樣的技巧也適用於 `Query`、`Cookie` 與 `Header`。😎 /// ## 以 Pydantic 模型宣告 Cookie { #cookies-with-a-pydantic-model } 在 **Pydantic 模型**中宣告所需的 **Cookie** 參數,接著將參數宣告為 `Cookie`:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:15:26 GMT 2026 - 2.9K bytes - Click Count (0) -
docs/en/docs/tutorial/request-form-models.md
/// ## Pydantic Models for Forms { #pydantic-models-for-forms } You just need to declare a **Pydantic model** with the fields you want to receive as **form fields**, and then declare the parameter as `Form`: {* ../../docs_src/request_form_models/tutorial001_an_py310.py hl[9:11,15] *} **FastAPI** will **extract** the data for **each field** from the **form data** in the request and give you the Pydantic model you defined.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 2.1K bytes - Click Count (0) -
docs/ja/docs/tutorial/header-param-models.md
# ヘッダーパラメータのモデル { #header-parameter-models } 関連する**ヘッダーパラメータ**が一式ある場合、それらを宣言するための**Pydantic モデル**を作成できます。 これにより、モデルを**複数箇所**で**再利用**でき、さらにすべてのパラメータに対するバリデーションやメタデータを一括で宣言できます。😎 /// note | 備考 これは FastAPI バージョン `0.115.0` 以降でサポートされています。🤓 /// ## Pydantic モデルによるヘッダーパラメータ { #header-parameters-with-a-pydantic-model } 必要な**ヘッダーパラメータ**を**Pydantic モデル**内で宣言し、関数引数ではそのパラメータを `Header` として宣言します:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 15:24:30 GMT 2026 - 3.2K bytes - Click Count (0) -
docs/en/docs/tutorial/header-param-models.md
# Header Parameter Models { #header-parameter-models } If you have a group of related **header parameters**, you can create a **Pydantic model** to declare them. This would allow you to **re-use the model** in **multiple places** and also to declare validations and metadata for all the parameters at once. 😎 /// note This is supported since FastAPI version `0.115.0`. 🤓 ///Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Aug 31 09:15:41 GMT 2025 - 2.6K bytes - Click Count (0) -
docs/ja/docs/tutorial/cookie-param-models.md
# クッキーパラメータモデル { #cookie-parameter-models } もし関連する**複数のクッキー**から成るグループがあるなら、それらを宣言するために、**Pydanticモデル**を作成できます。🍪 こうすることで、**複数の場所**で**そのPydanticモデルを再利用**でき、バリデーションやメタデータを、すべてのパラメータに対して一度に宣言できます。😎 /// note | 備考 この機能は、FastAPIのバージョン `0.115.0` からサポートされています。🤓 /// /// tip | 豆知識 これと同じテクニックは `Query` 、 `Cookie` 、 `Header` にも適用できます。 😎 /// ## Pydanticモデルを使用したクッキー { #cookies-with-a-pydantic-model }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 15:24:30 GMT 2026 - 4.1K bytes - Click Count (0)