mirror of
https://github.com/fastapi/fastapi.git
synced 2025-12-24 22:59:32 -05:00
* Add doc and example for env var config * Syntax highlight for .env file * Add test for configuration docs * 📝 Update settings docs, add more examples * ✅ Add tests for settings * 🚚 Rename "Application Configuration" to "Metadata and Docs URLs" to disambiguate between that and settings * 🔥 Remove replaced example file Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
9 lines
154 B
Python
9 lines
154 B
Python
from fastapi import FastAPI
|
|
|
|
app = FastAPI(openapi_url="/api/v1/openapi.json")
|
|
|
|
|
|
@app.get("/items/")
|
|
async def read_items():
|
|
return [{"name": "Foo"}]
|