Repository navigation
0.5.0
Highlight
Middleware
You can add your custom middleware, like this:
import json
from nexify import Nexify
from nexify.responses import JSONResponse
def custom_my_middleware(route, event, context, call_next, **kwargs):
response = call_next(event, context, **kwargs)
response.headers["x-custom-header"] = "Custom Value"
return response
app = Nexify(middlewares=[custom_my_middleware])
@app.get("/items")
def read_items():
return JSONResponse(content={"items": [{"name": "Item One"}, {"name": "Item Two"}]})Features
Fixes
- 🐛 Ensure .nexify directory exists before writing OpenAPI and template files. Commit e964f47 by @junah201
- 🐛 Fix OpenAPI JSON serialization by using deepcopy to prevent mutation. Commit 61a335d by @junah201
Docs
- 📝 Add path parameters tutorial. Commit 0ea1891 by @junah201
- 📝 Add query parameters tutorial. Commit 32f7940 by @junah201
- 📝 Add request body tutorial. Commit d443c76 by @junah201
- 📝 Add path and query validation and extra information tutorial. Commit 661726f by @junah201
- 📝 Add body fields tutorial. Commit fd4b3bb by @junah201
Internal
- 🐛 Fix branch condition in deploy-docs workflow for main branch