Coverage for docs_src/conditional_openapi/tutorial001.py: 100%
9 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-08-08 03:53 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2024-08-08 03:53 +0000
1from fastapi import FastAPI 1abcde
2from pydantic_settings import BaseSettings 1abcde
5class Settings(BaseSettings): 1abcde
6 openapi_url: str = "/openapi.json" 1abcde
9settings = Settings() 1abcde
11app = FastAPI(openapi_url=settings.openapi_url) 1abcde
14@app.get("/") 1abcde
15def root(): 1abcde
16 return {"message": "Hello World"} 1abcde