Coverage for docs_src / conditional_openapi / tutorial001_py310.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.13.3, created at 2026-04-06 01:24 +0000

1from fastapi import FastAPI 1efaghbijckld

2from pydantic_settings import BaseSettings 1efaghbijckld

3 

4 

5class Settings(BaseSettings): 1efaghbijckld

6 openapi_url: str = "/openapi.json" 1efaghbijckld

7 

8 

9settings = Settings() 1efaghbijckld

10 

11app = FastAPI(openapi_url=settings.openapi_url) 1efaghbijckld

12 

13 

14@app.get("/") 1efaghbijckld

15def root(): 1efaghbijckld

16 return {"message": "Hello World"} 1abcd