- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 42 for model_config (0.22 sec)
-
tests/test_inherited_custom_class.py
assert type(asyncpg_uuid) is not uuid.UUID with pytest.raises(TypeError): vars(asyncpg_uuid) return {"fast_uuid": asyncpg_uuid} class SomeCustomClass(BaseModel): model_config = {"arbitrary_types_allowed": True} a_uuid: MyUuid @field_serializer("a_uuid") def serialize_a_uuid(self, v): return str(v) @app.get("/get_custom_class")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 17 04:13:50 UTC 2024 - 3K bytes - Viewed (0) -
docs/de/docs/advanced/settings.md
/// //// /// info
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 17.7K bytes - Viewed (0) -
tests/test_openapi_separate_input_output_schemas.py
sub_description: Optional[str] = None tags: List[str] = [] if PYDANTIC_V2: model_config = {"json_schema_serialization_defaults_required": True} class Item(BaseModel): name: str description: Optional[str] = None sub: Optional[SubItem] = None if PYDANTIC_V2: model_config = {"json_schema_serialization_defaults_required": True}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 12 09:44:57 UTC 2024 - 19.7K bytes - Viewed (0) -
docs/pt/docs/advanced/settings.md
//// tab | Pydantic v2 ```Python hl_lines="9" {!> ../../docs_src/settings/app03_an/config.py!} ``` /// dica O atributo `model_config` é usado apenas para configuração do Pydantic. Você pode ler mais em <a href="https://docs.pydantic.dev/latest/usage/model_config/" class="external-link" target="_blank">Pydantic Model Config</a>. /// //// //// tab | Pydantic v1 ```Python hl_lines="9-10"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 17K bytes - Viewed (0) -
tests/test_response_by_alias.py
app = FastAPI() class Model(BaseModel): name: str = Field(alias="alias") class ModelNoAlias(BaseModel): name: str if PYDANTIC_V2: model_config = ConfigDict( json_schema_extra={ "description": ( "response_model_by_alias=False is basically a quick hack, to support "
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 11.1K bytes - Viewed (0) -
docs/ko/docs/tutorial/schema-extra-example.md
``` //// 추가 정보는 있는 그대로 해당 모델의 **JSON 스키마** 결과에 추가되고, API 문서에서 사용합니다. //// tab | Pydantic v2 Pydantic 버전 2에서 <a href="https://docs.pydantic.dev/latest/usage/model_config/" class="external-link" target="_blank">Pydantic 공식 문서: Model Config</a>에 나와 있는 것처럼 `dict`를 받는 `model_config` 어트리뷰트를 사용할 것입니다. `"json_schema_extra"`를 생성된 JSON 스키마에서 보여주고 싶은 별도의 데이터와 `examples`를 포함하는 `dict`으로 설정할 수 있습니다. //// //// tab | Pydantic v1
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 13.5K bytes - Viewed (0) -
docs/en/docs/tutorial/schema-extra-example.md
``` //// That extra info will be added as-is to the output **JSON Schema** for that model, and it will be used in the API docs. //// tab | Pydantic v2 In Pydantic version 2, you would use the attribute `model_config`, that takes a `dict` as described in <a href="https://docs.pydantic.dev/latest/api/config/" class="external-link" target="_blank">Pydantic's docs: Configuration</a>.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.6K bytes - Viewed (0) -
docs/de/docs/tutorial/schema-extra-example.md
Diese zusätzlichen Informationen werden unverändert zum für dieses Modell ausgegebenen **JSON-Schema** hinzugefügt und in der API-Dokumentation verwendet. //// tab | Pydantic v2 In Pydantic Version 2 würden Sie das Attribut `model_config` verwenden, das ein `dict` akzeptiert, wie beschrieben in <a href="https://docs.pydantic.dev/latest/api/config/" class="external-link" target="_blank">Pydantic-Dokumentation: Configuration</a>.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 13.2K bytes - Viewed (0) -
tests/test_schema_extra_examples.py
from pydantic import BaseModel, ConfigDict def create_app(): app = FastAPI() class Item(BaseModel): data: str if PYDANTIC_V2: model_config = ConfigDict( json_schema_extra={"example": {"data": "Data in schema_extra"}} ) else: class Config:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 37.7K bytes - Viewed (0) -
fastapi/openapi/models.py
) -> CoreSchema: return with_info_plain_validator_function(cls._validate) class BaseModelWithConfig(BaseModel): if PYDANTIC_V2: model_config = {"extra": "allow"} else: class Config: extra = "allow" class Contact(BaseModelWithConfig): name: Optional[str] = None url: Optional[AnyUrl] = None
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 22:49:33 UTC 2024 - 15K bytes - Viewed (0)