Repository navigation
1.0.77 #14
chuckbeyor101
announced in
Announcements
1.0.77
#14
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
🚀 New Feature:
start_api()– Auto-Generated REST APIMSO now includes a powerful, zero-config API generation utility to expose MongoDB collections as a REST API using FastAPI.
✨ Highlights
Instant API: Generate full-featured CRUD endpoints from your MongoDB database schema using:
Smart Schema Binding: Dynamically binds to collections using MSO's
get_model()from your live MongoDB validator schemas.Pagination, Filtering, and Sorting:
Flexible query body with filter and sort support
ISO date string parsing into proper
datetimeobjectsAuthentication Support:
Pass an
auth_func(request)to enforce global or route-specific authentication using FastAPIDepends.Views Supported (Read-only):
Automatically detects MongoDB views and limits operations to safe queries.
CORS Middleware: Enabled by default with customizable origins, methods, and headers.
🔧 Included Endpoints (per collection):
🔐 Example Authentication Hook
Then pass:
🧪 Bonus Features
Smart object ID parsing (
ObjectId) with error handlingEnum-based sorting: accepts
"asc"/"desc"or1/-1Cleaner OpenAPI documentation with formatted tags
Full Changelog: 1.0.76...1.0.77
This discussion was created from the release 1.0.77.
All reactions