Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for read_required_str (0.07 seconds)

  1. tests/test_request_params/test_path/test_required_str.py

    from typing import Annotated
    
    import pytest
    from fastapi import FastAPI, Path
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.get("/required-str/{p}")
    async def read_required_str(p: Annotated[str, Path()]):
        return {"p": p}
    
    
    @app.get("/required-alias/{p_alias}")
    async def read_required_alias(p: Annotated[str, Path(alias="p_alias")]):
        return {"p": p}
    
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 2.3K bytes
    - Click Count (0)
Back to Top