Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 546 for Extras (1.73 sec)

  1. docs/pt/docs/tutorial/header-param-models.md

    </div>
    
    ## Proibindo Cabeçalhos adicionais { #forbid-extra-headers }
    
    Em alguns casos de uso especiais (provavelmente não muito comuns), você pode querer **restringir** os cabeçalhos que você quer receber.
    
    Você pode usar a configuração dos modelos do Pydantic para proibir (`forbid`) quaisquer campos `extra`:
    
    {* ../../docs_src/header_param_models/tutorial002_an_py310.py hl[10] *}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Nov 12 16:23:57 UTC 2025
    - 2.9K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/body-fields.md

    ///
    
    ## Add extra information { #add-extra-information }
    
    You can declare extra information in `Field`, `Query`, `Body`, etc. And it will be included in the generated JSON Schema.
    
    You will learn more about adding extra information later in the docs, when learning to declare examples.
    
    /// warning
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 2.3K bytes
    - Viewed (0)
  3. docs/uk/docs/tutorial/request-form-models.md

    ```json
    {
        "detail": [
            {
                "type": "extra_forbidden",
                "loc": ["body", "extra"],
                "msg": "Extra inputs are not permitted",
                "input": "Mr. Poopybutthole"
            }
        ]
    }
    ```
    
    ## Підсумок
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Thu Feb 20 14:16:09 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  4. docs/pt/docs/advanced/dataclasses.md

    <img src="/img/tutorial/dataclasses/image01.png">
    
    ## Dataclasses em Estruturas de Dados Aninhadas { #dataclasses-in-nested-data-structures }
    
    Você também pode combinar `dataclasses` com outras anotações de tipo para criar estruturas de dados aninhadas.
    
    Em alguns casos, você ainda pode ter que usar a versão do Pydantic das `dataclasses`. Por exemplo, se você tiver erros com a documentação da API gerada automaticamente.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/query-param-models.md

    <div class="screenshot">
    <img src="/img/tutorial/query-param-models/image01.png">
    </div>
    
    ## Forbid Extra Query Parameters { #forbid-extra-query-parameters }
    
    In some special use cases (probably not very common), you might want to **restrict** the query parameters that you want to receive.
    
    You can use Pydantic's model configuration to `forbid` any `extra` fields:
    
    {* ../../docs_src/query_param_models/tutorial002_an_py310.py hl[10] *}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 2.2K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. tests/test_query_cookie_header_model_extra_params.py

    from fastapi import Cookie, FastAPI, Header, Query
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Model(BaseModel):
        param: str
    
        model_config = {"extra": "allow"}
    
    
    @app.get("/query")
    async def query_model_with_extra(data: Model = Query()):
        return data
    
    
    @app.get("/header")
    async def header_model_with_extra(data: Model = Header()):
        return data
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 2.3K bytes
    - Viewed (0)
  9. docs/zh/docs/tutorial/request-form-models.md

    自 FastAPI 版本 `0.114.0` 起支持此功能。🤓
    
    ///
    
    您可以使用 Pydantic 的模型配置来禁止( `forbid` )任何额外( `extra` )字段:
    
    {* ../../docs_src/request_form_models/tutorial002_an_py39.py hl[12] *}
    
    如果客户端尝试发送一些额外的数据,他们将收到**错误**响应。
    
    例如,如果客户端尝试发送这样的表单字段:
    
    * `username`: `Rick`
    * `password`: `Portal Gun`
    * `extra`: `Mr. Poopybutthole`
    
    他们将收到一条错误响应,表明字段 `extra` 是不被允许的:
    
    ```json
    {
        "detail": [
            {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 10 20:36:08 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/header-param-models.md

    </div>
    
    ## Forbid Extra Headers { #forbid-extra-headers }
    
    In some special use cases (probably not very common), you might want to **restrict** the headers that you want to receive.
    
    You can use Pydantic's model configuration to `forbid` any `extra` fields:
    
    {* ../../docs_src/header_param_models/tutorial002_an_py310.py hl[10] *}
    
    If a client tries to send some **extra headers**, they will receive an **error** response.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 2.6K bytes
    - Viewed (0)
Back to top