Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for get_body_model_name (0.16 sec)

  1. tests/test_request_params/test_form/test_optional_list.py

    from typing import Annotated, Optional
    
    import pytest
    from fastapi import FastAPI, Form
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, Field
    
    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(
    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_file/utils.py

    from typing import Any
    
    
    def get_body_model_name(openapi: dict[str, Any], path: str) -> str:
        body = openapi["paths"][path]["post"]["requestBody"]
        body_schema = body["content"]["multipart/form-data"]["schema"]
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 271 bytes
    - Viewed (0)
  3. tests/test_request_params/test_file/test_optional.py

    from typing import Annotated, Optional
    
    import pytest
    from fastapi import FastAPI, File, UploadFile
    from fastapi.testclient import TestClient
    
    from .utils import get_body_model_name
    
    app = FastAPI()
    
    # =====================================================================================
    # Without aliases
    
    
    @app.post("/optional-bytes", operation_id="optional_bytes")
    async def read_optional_bytes(p: Annotated[Optional[bytes], File()] = None):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 9.7K bytes
    - Viewed (0)
  4. tests/test_request_params/test_form/test_optional_str.py

    from typing import Annotated, Optional
    
    import pytest
    from fastapi import FastAPI, Form
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, Field
    
    from .utils import get_body_model_name
    
    app = FastAPI()
    
    # =====================================================================================
    # Without aliases
    
    
    @app.post("/optional-str", operation_id="optional_str")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  5. tests/test_request_params/test_form/test_required_str.py

    from typing import Annotated
    
    import pytest
    from dirty_equals import IsOneOf
    from fastapi import FastAPI, Form
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, Field
    
    from .utils import get_body_model_name
    
    app = FastAPI()
    
    # =====================================================================================
    # Without aliases
    
    
    @app.post("/required-str", operation_id="required_str")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 10.6K bytes
    - Viewed (0)
  6. tests/test_request_params/test_file/test_list.py

    from typing import Annotated
    
    import pytest
    from fastapi import FastAPI, File, UploadFile
    from fastapi.testclient import TestClient
    
    from .utils import get_body_model_name
    
    app = FastAPI()
    
    # =====================================================================================
    # Without aliases
    
    
    @app.post("/list-bytes", operation_id="list_bytes")
    async def read_list_bytes(p: Annotated[list[bytes], File()]):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:31:34 UTC 2025
    - 11.2K bytes
    - Viewed (0)
  7. tests/test_request_params/test_body/test_required_str.py

    import pytest
    from dirty_equals import IsOneOf
    from fastapi import Body, FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, Field
    
    from .utils import get_body_model_name
    
    app = FastAPI()
    
    # =====================================================================================
    # Without aliases
    
    
    @app.post("/required-str", operation_id="required_str")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 11K bytes
    - Viewed (0)
  8. tests/test_request_params/test_file/test_optional_list.py

    from typing import Annotated, Optional
    
    import pytest
    from fastapi import FastAPI, File, UploadFile
    from fastapi.testclient import TestClient
    
    from .utils import get_body_model_name
    
    app = FastAPI()
    
    # =====================================================================================
    # Without aliases
    
    
    @app.post("/optional-list-bytes")
    async def read_optional_list_bytes(p: Annotated[Optional[list[bytes]], File()] = None):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 10.4K bytes
    - Viewed (0)
  9. tests/test_request_params/test_body/test_optional_list.py

    from typing import Annotated, Optional
    
    import pytest
    from fastapi import Body, FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, Field
    
    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(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  10. tests/test_request_params/test_file/test_required.py

    from typing import Annotated
    
    import pytest
    from fastapi import FastAPI, File, UploadFile
    from fastapi.testclient import TestClient
    
    from .utils import get_body_model_name
    
    app = FastAPI()
    
    # =====================================================================================
    # Without aliases
    
    
    @app.post("/required-bytes", operation_id="required_bytes")
    async def read_required_bytes(p: Annotated[bytes, File()]):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 10.8K bytes
    - Viewed (0)
Back to top