A super lightweight Swift web framework for API mocking and UI testing, based on SWSGI.
Ambassador is a minimal web framework for Swift designed primarily for mocking API endpoints during UI automated testing. It builds on the SWSGI (Swift Web Server Gateway Interface) specification, allowing it to run with any compatible HTTP server like Embassy. The framework provides lightweight, composable middleware for simulating backend responses, including JSON, data, and delayed responses.
Swift developers, particularly iOS/macOS engineers, who need to mock backend APIs for UI automation testing or development environments. It is also suitable for anyone building Swift-based web services that require a simple, composable framework.
Developers choose Ambassador for its minimal overhead and focus on API mocking, unlike full-featured web frameworks. Its unique selling point is seamless integration with SWSGI-compliant servers, composable middleware design, and built-in helpers like DelayResponse for realistic network latency simulation.
Super lightweight web framework in Swift based on SWSGI
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Ambassador is designed with minimal overhead, focusing on simplicity for API mocking, as evidenced by its straightforward example code and lack of bloated features.
Based on the SWSGI specification, it can run with any compatible HTTP server like Embassy, providing flexibility in server choice without vendor lock-in.
Response handlers are structured as middlewares, allowing easy composition, such as wrapping JSONResponse with DelayResponse for realistic testing scenarios.
Includes helpers like DelayResponse for latency simulation and JSONResponse for quick JSON mocking, specifically tailored for UI automated testing.
As a minimal framework, it lacks advanced web features like templating, WebSocket support, or built-in security measures, which are standard in full frameworks like Vapor.
Requires integration with an external SWSGI-compatible HTTP server (e.g., Embassy), adding complexity to setup and deployment compared to all-in-one solutions.
The README provides basic examples but lacks comprehensive guides, troubleshooting tips, or API references, which might hinder deeper usage.