Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for Extras (0.03 sec)

  1. docs/en/docs/release-notes.md

    * [Forbid Extra Query Parameters](https://fastapi.tiangolo.com/tutorial/query-param-models/#forbid-extra-query-parameters)
    * [Forbid Extra Headers](https://fastapi.tiangolo.com/tutorial/header-param-models/#forbid-extra-headers)
    * [Forbid Extra Cookies](https://fastapi.tiangolo.com/tutorial/cookie-param-models/#forbid-extra-cookies)
    
    ### Features
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:06:15 UTC 2025
    - 586.7K bytes
    - Viewed (0)
  2. fastapi/params.py

            deprecated: Union[deprecated, str, bool, None] = None,
            include_in_schema: bool = True,
            json_schema_extra: Union[dict[str, Any], None] = None,
            **extra: Any,
        ):
            if example is not _Unset:
                warnings.warn(
                    "`example` has been deprecated, please use `examples` instead",
                    category=FastAPIDeprecationWarning,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 26.3K bytes
    - Viewed (0)
  3. tests/test_openapi_query_parameter_extension.py

            "parameters": [
                {
                    "required": False,
                    "schema": {"title": "Extra Param 1"},
                    "name": "extra_param_1",
                    "in": "query",
                },
                {
                    "required": True,
                    "schema": {"title": "Extra Param 2"},
                    "name": "extra_param_2",
                    "in": "query",
                },
            ]
        },
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  4. fastapi/param_functions.py

                Any additional JSON schema data.
                """
            ),
        ] = None,
        **extra: Annotated[
            Any,
            Doc(
                """
                Include extra fields used by the JSON Schema.
                """
            ),
            deprecated(
                """
                The `extra` kwargs is deprecated. Use `json_schema_extra` instead.
                """
            ),
        ],
    ) -> Any:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 63K bytes
    - Viewed (0)
  5. tests/test_forms_single_model.py

        alias_with: str = Field(alias="with", default="nothing")
    
    
    class FormModelExtraAllow(BaseModel):
        param: str
    
        model_config = {"extra": "allow"}
    
    
    @app.post("/form/")
    def post_form(user: Annotated[FormModel, Form()]):
        return user
    
    
    @app.post("/form-extra-allow/")
    def post_form_extra_allow(params: Annotated[FormModelExtraAllow, Form()]):
        return params
    
    
    client = TestClient(app)
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 3.4K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_cookie_param_models/test_tutorial002.py

            c.cookies.set("session_id", "123")
            c.cookies.set("extra", "track-me-here-too")
            response = c.get("/items/")
        assert response.status_code == 422
        assert response.json() == snapshot(
            {
                "detail": [
                    {
                        "type": "extra_forbidden",
                        "loc": ["cookie", "extra"],
                        "msg": "Extra inputs are not permitted",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  7. pyproject.toml

        # To validate email fields
        "email-validator >=2.0.0",
        # Uvicorn with uvloop
        "uvicorn[standard] >=0.12.0",
        # # Settings management
        "pydantic-settings >=2.0.0",
        # # Extra Pydantic data types
        "pydantic-extra-types >=2.0.0",
    ]
    
    standard-no-fastapi-cloud-cli = [
        "fastapi-cli[standard-no-fastapi-cloud-cli] >=0.0.8",
        # For the test client
        "httpx >=0.23.0,<1.0.0",
        # For templates
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  8. tests/test_response_model_as_return_annotation.py

                    }
                },
                "/response_model-no_annotation-return_dict_with_extra_data": {
                    "get": {
                        "summary": "Response Model No Annotation Return Dict With Extra Data",
                        "operationId": "response_model_no_annotation_return_dict_with_extra_data_response_model_no_annotation_return_dict_with_extra_data_get",
                        "responses": {
                            "200": {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 47.7K bytes
    - Viewed (0)
  9. tests/test_additional_properties_bool.py

    from typing import Union
    
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, ConfigDict
    
    
    class FooBaseModel(BaseModel):
        model_config = ConfigDict(extra="forbid")
    
    
    class Foo(FooBaseModel):
        pass
    
    
    app = FastAPI()
    
    
    @app.post("/")
    async def post(
        foo: Union[Foo, None] = None,
    ):
        return foo
    
    
    client = TestClient(app)
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 3.7K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_header_param_models/test_tutorial002.py

        assert response.json() == snapshot(
            {
                "detail": [
                    {
                        "type": "extra_forbidden",
                        "loc": ["header", "tool"],
                        "msg": "Extra inputs are not permitted",
                        "input": "plumbus",
                    }
                ]
            }
        )
    
    
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 7.2K bytes
    - Viewed (0)
Back to top