Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for userDir (0.03 sec)

  1. tests/test_infer_param_optionality.py

    
    @user_router.get("/")
    def get_users():
        return [{"user_id": "u1"}, {"user_id": "u2"}]
    
    
    @user_router.get("/{user_id}")
    def get_user(user_id: str):
        return {"user_id": user_id}
    
    
    @item_router.get("/")
    def get_items(user_id: Optional[str] = None):
        if user_id is None:
            return [{"item_id": "i1", "user_id": "u1"}, {"item_id": "i2", "user_id": "u2"}]
        else:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 12.1K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_response_model/test_tutorial003_01.py

                                    },
                                }
                            },
                        },
                        "UserIn": {
                            "title": "UserIn",
                            "required": ["username", "email", "password"],
                            "type": "object",
                            "properties": {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 5.9K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_response_model/test_tutorial003.py

                                    "anyOf": [{"type": "string"}, {"type": "null"}],
                                },
                            },
                        },
                        "UserIn": {
                            "title": "UserIn",
                            "required": ["username", "password", "email"],
                            "type": "object",
                            "properties": {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 5.9K bytes
    - Viewed (0)
  4. docs/en/docs/release-notes.md

    * Allow path parameters to have default values (e.g. `None`) and discard them instead of raising an error.
        * This allows declaring a parameter like `user_id: str = None` that can be taken from a query parameter, but the same *path operation* can be included in a router with a path `/users/{user_id}`, in which case will be taken from the path and will be required.
    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