Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for tutorial003 (0.05 sec)

  1. tests/test_tutorial/test_body_nested_models/test_tutorial001_tutorial002_tutorial003.py

        tags_schema = {"default": [], "title": "Tags"}
        if mod_name.startswith("tutorial001"):
            tags_schema.update(UNTYPED_LIST_SCHEMA)
        elif mod_name.startswith("tutorial002"):
            tags_schema.update(LIST_OF_STR_SCHEMA)
        elif mod_name.startswith("tutorial003"):
            tags_schema.update(SET_OF_STR_SCHEMA)
    
        response = client.get("/openapi.json")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_path_operation_configurations/test_tutorial003_tutorial004.py

    import pytest
    from dirty_equals import IsList
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    DESCRIPTIONS = {
        "tutorial003": "Create an item with all the information, name, description, price, tax and a set of unique tags",
        "tutorial004": dedent("""
            Create an item with all the information:
    
            - **name**: each item must have a name
            - **description**: a long description
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 7K bytes
    - Viewed (0)
  3. docs/zh/docs/advanced/dataclasses.md

    本例把标准的 `dataclasses` 直接替换为 `pydantic.dataclasses`:
    
    ```{ .python .annotate hl_lines="1  5  8-11  14-17  23-25  28" }
    {!../../docs_src/dataclasses_/tutorial003.py!}
    ```
    
    1. 本例依然要从标准的 `dataclasses` 中导入 `field`;
    
    2. 使用 `pydantic.dataclasses` 直接替换 `dataclasses`;
    
    3. `Author` 数据类包含 `Item` 数据类列表;
    
    4. `Author` 数据类用于 `response_model` 参数;
    
    5. 其它带有数据类的标准类型注解也可以作为请求体;
    
        本例使用的是 `Item` 数据类列表;
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 3.7K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_custom_response/test_tutorial002_tutorial003_tutorial004.py

        assert response.status_code == 200, response.text
        assert response.text == html_contents
    
    
    def test_openapi_schema(client: TestClient, mod_name: str):
        if mod_name.startswith("tutorial003"):
            response_content = {"application/json": {"schema": {}}}
        else:
            response_content = {"text/html": {"schema": {"type": "string"}}}
    
        response = client.get("/openapi.json")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 1.8K bytes
    - Viewed (0)
  5. docs/en/docs/release-notes.md

    * 📝 Remove obsolete `url` field in error responses in docs. PR [#13655](https://github.com/fastapi/fastapi/pull/13655) by [@Taoup](https://github.com/Taoup).
    * 📝 Bring the `scope` claim in line with the standard in `docs_src/security/tutorial005.py`. PR [#11189](https://github.com/fastapi/fastapi/pull/11189) by [@DurandA](https://github.com/DurandA).
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:06:15 UTC 2025
    - 586.7K bytes
    - Viewed (0)
Back to top