Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 343 for anyone (0.05 sec)

  1. tests/test_tutorial/test_body_multiple_params/test_tutorial005.py

                "price": 50.5,
                "description": None,
                "tax": None,
            },
        }
    
    
    def test_post_no_body(client: TestClient):
        response = client.put("/items/5", json=None)
        assert response.status_code == 422
        assert response.json() == {
            "detail": [
                {
                    "input": None,
                    "loc": [
                        "body",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 8.2K bytes
    - Viewed (0)
  2. tests/test_openapi_examples.py

                    "value": "item_2",
                },
            },
        ),
    ):
        return item_id
    
    
    @app.get("/query_examples/")
    def query_examples(
        data: Union[str, None] = Query(
            default=None,
            examples=[
                "json_schema_query1",
                "json_schema_query2",
            ],
            openapi_examples={
                "Query One": {
                    "summary": "Query One Summary",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_header_param_models/test_tutorial003.py

        assert response.status_code == 200
        assert response.json() == {
            "host": "testserver",
            "save_data": True,
            "if_modified_since": None,
            "traceparent": None,
            "x_tag": [],
        }
    
    
    def test_header_param_model_invalid(client: TestClient):
        response = client.get("/items/")
        assert response.status_code == 422
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 8.5K bytes
    - Viewed (0)
  4. docs/pt/docs/tutorial/extra-models.md

    {* ../../docs_src/extra_models/tutorial002_py310.py hl[7,13:14,17:18,21:22] *}
    
    ## `Union` ou `anyOf` { #union-or-anyof }
    
    Você pode declarar uma resposta como o `Union` de dois ou mais tipos, o que significa que a resposta seria qualquer um deles.
    
    Isso será definido no OpenAPI com `anyOf`.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Nov 12 16:23:57 UTC 2025
    - 7.5K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_dependencies/test_tutorial002_tutorial003_tutorial004.py

                        "parameters": [
                            {
                                "required": False,
                                "schema": {
                                    "anyOf": [{"type": "string"}, {"type": "null"}],
                                    "title": "Q",
                                },
                                "name": "q",
                                "in": "query",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 6K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_encoder/test_tutorial001.py

                        "type": "object",
                    },
                    "Item": {
                        "properties": {
                            "description": {
                                "anyOf": [
                                    {
                                        "type": "string",
                                    },
                                    {
                                        "type": "null",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  7. tests/test_request_params/test_query/test_optional_str.py

    # Without aliases
    
    
    @app.get("/optional-str")
    async def read_optional_str(p: Optional[str] = None):
        return {"p": p}
    
    
    class QueryModelOptionalStr(BaseModel):
        p: Optional[str] = None
    
    
    @app.get("/model-optional-str")
    async def read_model_optional_str(p: Annotated[QueryModelOptionalStr, Query()]):
        return {"p": p.p}
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  8. tests/test_request_params/test_body/test_optional_list.py

    
    @app.post("/optional-list-str", operation_id="optional_list_str")
    async def read_optional_list_str(
        p: Annotated[Optional[list[str]], Body(embed=True)] = None,
    ):
        return {"p": p}
    
    
    class BodyModelOptionalListStr(BaseModel):
        p: Optional[list[str]] = None
    
    
    @app.post("/model-optional-list-str", operation_id="model_optional_list_str")
    async def read_model_optional_list_str(p: BodyModelOptionalListStr):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  9. docs/en/data/github_sponsors.yml

        url: https://github.com/BoostryJP
      - login: requestly
        avatarUrl: https://avatars.githubusercontent.com/u/12287519?v=4
        url: https://github.com/requestly
      - login: acsone
        avatarUrl: https://avatars.githubusercontent.com/u/7601056?v=4
        url: https://github.com/acsone
    - - login: scalar
        avatarUrl: https://avatars.githubusercontent.com/u/301879?v=4
        url: https://github.com/scalar
      - login: Trivie
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Dec 01 06:30:56 UTC 2025
    - 20.1K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_body_nested_models/test_tutorial001_tutorial002_tutorial003.py

                                "anyOf": [{"type": "string"}, {"type": "null"}],
                            },
                            "price": {
                                "title": "Price",
                                "type": "number",
                            },
                            "tax": {
                                "title": "Tax",
                                "anyOf": [{"type": "number"}, {"type": "null"}],
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 7.9K bytes
    - Viewed (0)
Back to top