- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 39 for Elias (0.13 sec)
-
tests/test_response_by_alias.py
@app.get("/list", response_model=List[Model], response_model_by_alias=False) def read_list(): return [{"alias": "Foo"}, {"alias": "Bar"}] @app.get("/by-alias/dict", response_model=Model) def by_alias_dict(): return {"alias": "Foo"} @app.get("/by-alias/model", response_model=Model) def by_alias_model(): return Model(alias="Foo") @app.get("/by-alias/list", response_model=List[Model]) def by_alias_list():
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 11.1K bytes - Viewed (0) -
tests/test_repeated_parameter_alias.py
app = FastAPI() @app.get("/{repeated_alias}") def get_parameters_with_repeated_aliases( path: str = Path(..., alias="repeated_alias"), query: str = Query(..., alias="repeated_alias"), ): return {"path": path, "query": query} client = TestClient(app) def test_get_parameters(): response = client.get("/test_path", params={"repeated_alias": "test_query"})
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 3.7K bytes - Viewed (0) -
fastapi/params.py
default=default, default_factory=default_factory, annotation=annotation, alias=alias, alias_priority=alias_priority, validation_alias=validation_alias, serialization_alias=serialization_alias, title=title, description=description, gt=gt, ge=ge, lt=lt,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 27.5K bytes - Viewed (1) -
fastapi/param_functions.py
``` """ return params.Path( default=default, default_factory=default_factory, alias=alias, alias_priority=alias_priority, validation_alias=validation_alias, serialization_alias=serialization_alias, title=title, description=description, gt=gt, ge=ge, lt=lt, le=le,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 62.5K bytes - Viewed (0) -
fastapi/utils.py
f, cloned_types=cloned_types ) new_field = create_response_field(name=field.name, type_=use_type) new_field.has_alias = field.has_alias # type: ignore[attr-defined] new_field.alias = field.alias # type: ignore[misc] new_field.class_validators = field.class_validators # type: ignore[attr-defined] new_field.default = field.default # type: ignore[misc]
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 7.8K bytes - Viewed (0) -
docs/fr/docs/tutorial/query-params-str-validations.md
Le nom le plus proche serait `item_query`. Mais vous avez vraiment envie que ce soit exactement `item-query`... Pour cela vous pouvez déclarer un `alias`, et cet alias est ce qui sera utilisé pour trouver la valeur du paramètre : ```Python hl_lines="9" {!../../../docs_src/query_params_str_validations/tutorial009.py!} ``` ## Déprécier des paramètres
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jul 27 18:53:21 GMT 2023 - 9.8K bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial010.py
from typing import Union from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: Union[str, None] = Query( default=None, alias="item-query", title="Query string", description="Query string for the items to search in the database that have a good match", min_length=3, max_length=50, pattern="^fixedquery$", deprecated=True,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 574 bytes - Viewed (0) -
docs/em/docs/tutorial/query-params-str-validations.md
💖: ``` http://127.0.0.1:8000/items/?item-query=foobaritems ``` ✋️ `item-query` 🚫 ☑ 🐍 🔢 📛. 🔐 🔜 `item_query`. ✋️ 👆 💪 ⚫️ ⚫️❔ `item-query`... ⤴️ 👆 💪 📣 `alias`, & 👈 📛 ⚫️❔ 🔜 ⚙️ 🔎 🔢 💲: === "🐍 3️⃣.6️⃣ & 🔛" ```Python hl_lines="9" {!> ../../../docs_src/query_params_str_validations/tutorial009.py!} ``` === "🐍 3️⃣.1️⃣0️⃣ & 🔛"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 11.9K bytes - Viewed (0) -
docs/zh/docs/tutorial/response-model.md
!!! tip 但是依然建议你使用上面提到的主意,使用多个类而不是这些参数。 这是因为即使使用 `response_model_include` 或 `response_model_exclude` 来省略某些属性,在应用程序的 OpenAPI 定义(和文档)中生成的 JSON Schema 仍将是完整的模型。 这也适用于作用类似的 `response_model_by_alias`。 ```Python hl_lines="31 37" {!../../../docs_src/response_model/tutorial005.py!} ``` !!! tip `{"name", "description"}` 语法创建一个具有这两个值的 `set`。 等同于 `set(["name", "description"])`。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 7.9K bytes - Viewed (0) -
docs/ja/docs/tutorial/response-model.md
それでも、これらのパラメータではなく、複数のクラスを使用して、上記のようなアイデアを使うことをおすすめします。 これは`response_model_include`や`response_mode_exclude`を使用していくつかの属性を省略しても、アプリケーションのOpenAPI(とドキュメント)で生成されたJSON Schemaが完全なモデルになるからです。 同様に動作する`response_model_by_alias`にも当てはまります。 ```Python hl_lines="31 37" {!../../../docs_src/response_model/tutorial005.py!} ``` !!! tip "豆知識" `{"name", "description"}`の構文はこれら2つの値をもつ`set`を作成します。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 9.3K bytes - Viewed (0)