Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 94 for myfield (0.07 sec)

  1. docs/de/docs/how-to/migrate-from-pydantic-v1-to-pydantic-v2.md

            direction TB
            subgraph V2["Pydantic-v2-Modell"]
                V1Field["Pydantic-v1-Modell"]
            end
            subgraph V1["Pydantic-v1-Modell"]
                V2Field["Pydantic-v2-Modell"]
            end
        end
    
        style V2 fill:#f9fff3
        style V1 fill:#fff6f0
        style V1Field fill:#fff6f0
        style V2Field fill:#f9fff3
    ```
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 24 10:28:19 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  2. fastapi/param_functions.py

            Union[Literal["function", "request"], None],
            Doc(
                """
                Mainly for dependencies with `yield`, define when the dependency function
                should start (the code before `yield`) and when it should end (the code
                after `yield`).
    
                * `"function"`: start the dependency before the *path operation function*
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 63K bytes
    - Viewed (0)
  3. fastapi/openapi/models.py

        # Core Vocabulary
        schema_: Optional[str] = Field(default=None, alias="$schema")
        vocabulary: Optional[str] = Field(default=None, alias="$vocabulary")
        id: Optional[str] = Field(default=None, alias="$id")
        anchor: Optional[str] = Field(default=None, alias="$anchor")
        dynamicAnchor: Optional[str] = Field(default=None, alias="$dynamicAnchor")
        ref: Optional[str] = Field(default=None, alias="$ref")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  4. fastapi/routing.py

                        "application code is raising an exception and a dependency with yield "
                        "has a block with a bare except, or a block with except Exception, "
                        "and is not raising the exception again. Read more about it in the "
                        "docs: https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-with-yield/#dependencies-with-yield-and-except"
                    )
    
            # Same as in Starlette
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 174.6K bytes
    - Viewed (0)
  5. fastapi/_compat/v2.py

            else "validation"
        )
        field_alias = (
            (field.validation_alias or field.alias)
            if field.mode == "validation"
            else (field.serialization_alias or field.alias)
        )
    
        # This expects that GenerateJsonSchema was already used to generate the definitions
        json_schema = field_mapping[(field, override_mode or field.mode)]
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 19.1K bytes
    - Viewed (0)
  6. fastapi/dependencies/utils.py

                    is_scalar_field(field)
                    or is_scalar_sequence_field(field)
                    or (
                        lenient_issubclass(field.type_, BaseModel)
                        # For Pydantic v1
                        and getattr(field, "shape", 1) == 1
                    )
                )
    
        return ParamDetails(type_annotation=type_annotation, depends=depends, field=field)
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 37.6K bytes
    - Viewed (3)
  7. tests/test_compat.py

        from fastapi._compat import v2
    
        field_info = FieldInfo(annotation=Union[list[str], None])
        field = v2.ModelField(name="items", field_info=field_info)
        result = v2.serialize_sequence_value(field=field, value=["a", "b", "c"])
        assert result == ["a", "b", "c"]
        assert isinstance(result, list)
    
    
    @needs_py310
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  8. tests/test_request_params/test_query/test_list.py

    from typing import Annotated
    
    import pytest
    from dirty_equals import IsOneOf
    from fastapi import FastAPI, Query
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, Field
    
    app = FastAPI()
    
    # =====================================================================================
    # Without aliases
    
    
    @app.get("/required-list-str")
    async def read_required_list_str(p: Annotated[list[str], Query()]):
        return {"p": p}
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:31:34 UTC 2025
    - 10.9K bytes
    - Viewed (0)
  9. tests/test_request_params/test_query/test_required_str.py

    from typing import Annotated
    
    import pytest
    from dirty_equals import IsOneOf
    from fastapi import FastAPI, Query
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, Field
    
    app = FastAPI()
    
    # =====================================================================================
    # Without aliases
    
    
    @app.get("/required-str")
    async def read_required_str(p: str):
        return {"p": p}
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  10. tests/test_request_params/test_form/test_required_str.py

    from typing import Annotated
    
    import pytest
    from dirty_equals import IsOneOf
    from fastapi import FastAPI, Form
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, Field
    
    from .utils import get_body_model_name
    
    app = FastAPI()
    
    # =====================================================================================
    # Without aliases
    
    
    @app.post("/required-str", operation_id="required_str")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 10.6K bytes
    - Viewed (0)
Back to top