Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 3 of 3 for serialization_alias (0.12 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. tests/test_schema_ref_pydantic_v2.py

    from pydantic import BaseModel, ConfigDict, Field
    
    
    @pytest.fixture(name="client")
    def get_client():
        app = FastAPI()
    
        class ModelWithRef(BaseModel):
            ref: str = Field(validation_alias="$ref", serialization_alias="$ref")
            model_config = ConfigDict(validate_by_alias=True, serialize_by_alias=True)
    
        @app.get("/", response_model=ModelWithRef)
        async def read_root() -> Any:
            return {"$ref": "some-ref"}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 2.1K bytes
    - Click Count (0)
  2. fastapi/_compat/v2.py

            va = self.field_info.validation_alias
            if isinstance(va, str) and va:
                return va
            return None
    
        @property
        def serialization_alias(self) -> str | None:
            sa = self.field_info.serialization_alias
            return sa or None
    
        @property
        def default(self) -> Any:
            return self.get_default()
    
        def __post_init__(self) -> None:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 16.7K bytes
    - Click Count (0)
  3. docs/en/docs/release-notes.md

        * `Cookie()`
        * `Body()`
        * `Form()`
        * `File()`
    
    * The new parameter fields are:
    
        * `default_factory`
        * `alias_priority`
        * `validation_alias`
        * `serialization_alias`
        * `discriminator`
        * `strict`
        * `multiple_of`
        * `allow_inf_nan`
        * `max_digits`
        * `decimal_places`
        * `json_schema_extra`
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Apr 03 12:07:04 GMT 2026
    - 631K bytes
    - Click Count (0)
Back to Top