RapiTapir - APIs so clean and fast, they practically run wild! 🦙⚡
TL;DR: RapiTapir brings Scala Tapir’s elegance to Ruby with type-safe API development, automatic OpenAPI docs, and a clean DSL that makes building production APIs a joy.
The Problem: Ruby API Development Pain PointsRuby developers love the language’s expressiveness, but API development often involves:
- Manual documentation that gets out of sync with code
- Runtime errors from type mismatches that could be caught earlier
- Boilerplate code for validation, serialization, and error handling
- Inconsistent patterns across different teams and projects
What if we could have the type safety of languages like Scala while keeping Ruby’s elegance?
Enter RapiTapir 🦙RapiTapir is inspired by Scala’s Tapir library, bringing declarative, type-safe API development to Ruby. Define your endpoints once with strong typing, and get automatic validation, documentation, and client generation.
Start the server and visit http://localhost:4567/docs
for interactive Swagger documentation that’s always in sync with your code.
🚀 Development Speed: Define endpoints declaratively, get validation + docs for free
🐛 Fewer Bugs: Type checking catches issues at definition time, not runtime
📖 Always-Current Docs: Swagger UI generated from your actual code
🔧 Better DX: Enhanced error messages, auto-completion, consistent patterns
⚡ Easy Testing: Validate schemas independently, generate test fixtures
Framework Integration The Ruby Community ConnectionRapiTapir builds on Ruby’s strengths:
- Sinatra’s simplicity with enhanced capabilities
- Rack’s composability for middleware and deployment
- Ruby’s expressiveness with added type safety
- Community gems for auth, testing, deployment
It’s not about replacing your stack - it’s about making it better.
Check out the comprehensive examples and documentation.
What’s Next?- 🎯 Rails integration for seamless adoption in existing apps
- 🌐 Multi-language client generation (TypeScript, Python, Go)
- 📊 Enhanced observability with distributed tracing
- 🔌 Plugin ecosystem for community extensions
RapiTapir is production-ready with comprehensive tests, clear documentation, and real-world examples. Whether you’re building a new API or enhancing an existing one, RapiTapir helps you write better Ruby code.
Links:
- 📦 Gem: rubygems.org/gems/rapitapir
- 💻 Source: github.com/riccardomerolla/rapitapir
- 📖 Docs: Examples and guides
Built with ❤️ for the Ruby community. Questions? Feedback? Open an issue or discussion on GitHub!
RapiTapir - APIs so clean and fast, they practically run wild! 🦙⚡
Post a comment