- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for Elias (0.33 sec)
-
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/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) -
docs/zh/docs/tutorial/query-params-str-validations.md
像下面这样: ``` http://127.0.0.1:8000/items/?item-query=foobaritems ``` 但是 `item-query` 不是一个有效的 Python 变量名称。 最接近的有效名称是 `item_query`。 但是你仍然要求它在 URL 中必须是 `item-query`... 这时你可以用 `alias` 参数声明一个别名,该别名将用于在 URL 中查找查询参数值: ```Python hl_lines="9" {!../../../docs_src/query_params_str_validations/tutorial009.py!} ``` ## 弃用参数 现在假设你不再喜欢此参数。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 9.2K bytes - Viewed (0) -
tests/test_jsonable_encoder.py
model = ModelWithConfig(role=RoleEnum.admin) assert jsonable_encoder(model) == {"role": "admin"} def test_encode_model_with_alias_raises(): with pytest.raises(ValidationError): ModelWithAlias(foo="Bar") def test_encode_model_with_alias(): model = ModelWithAlias(Foo="Bar") assert jsonable_encoder(model) == {"Foo": "Bar"} def test_encode_model_with_default():
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 21:56:59 GMT 2024 - 9K bytes - Viewed (0) -
docs/fr/docs/advanced/additional-status-codes.md
!!! note "Détails techniques" Vous pouvez également utiliser `from starlette.responses import JSONResponse`. Pour plus de commodités, **FastAPI** fournit les objets `starlette.responses` sous forme d'un alias accessible par `fastapi.responses`. Mais la plupart des réponses disponibles proviennent directement de Starlette. Il en est de même avec l'objet `statut`. ## Documents OpenAPI et API
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 2.3K bytes - Viewed (0) -
docs/en/docs/tutorial/request-forms.md
With `Form` you can declare the same configurations as with `Body` (and `Query`, `Path`, `Cookie`), including validation, examples, an alias (e.g. `user-name` instead of `username`), etc. !!! info `Form` is a class that inherits directly from `Body`. !!! tip
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Mar 13 19:02:19 GMT 2024 - 3.2K bytes - Viewed (0) -
docs/de/docs/tutorial/request-forms.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 18:06:54 GMT 2024 - 3.7K bytes - Viewed (0) -
docs/ko/docs/tutorial/response-model.md
이는 일부 어트리뷰트를 생략하기 위해 `response_model_include` 또는 `response_model_exclude`를 사용하더라도 앱의 OpenAPI(및 문서)가 생성한 JSON 스키마가 여전히 전체 모델에 대한 스키마이기 때문입니다. 비슷하게 작동하는 `response_model_by_alias` 역시 마찬가지로 적용됩니다. ```Python hl_lines="31 37" {!../../../docs_src/response_model/tutorial005.py!} ``` !!! tip "팁" 문법 `{"name", "description"}`은 두 값을 갖는 `set`을 만듭니다.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 8.2K bytes - Viewed (0)