Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for optional_list_str (0.05 sec)

  1. tests/test_request_params/test_form/test_optional_list.py

    from .utils import get_body_model_name
    
    app = FastAPI()
    
    # =====================================================================================
    # Without aliases
    
    
    @app.post("/optional-list-str", operation_id="optional_list_str")
    async def read_optional_list_str(
        p: Annotated[Optional[list[str]], Form()] = None,
    ):
        return {"p": p}
    
    
    class FormModelOptionalListStr(BaseModel):
        p: Optional[list[str]] = None
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  2. tests/test_request_params/test_body/test_optional_list.py

    from .utils import get_body_model_name
    
    app = FastAPI()
    
    # =====================================================================================
    # Without aliases
    
    
    @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
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 12.7K bytes
    - Viewed (0)
Back to top