What problem does it solve?
This Skill helps you build and manage the JSON API surface of a Rails 8.1 app, handling serialization, versioning, pagination, error handling, CORS, and documentation.
Core Features & Use Cases
- API Style Selection: Choose between REST and GraphQL for your API.
- Serializer Options: Select from Jbuilder, Alba, jsonapi-serializer, or Blueprinter for JSON serialization.
- Versioning: Decide on URL path or Accept-header versioning.
- Pagination: Use Pagy or Kaminari for collection pagination.
- Error Handling: Standardize error responses into a consistent envelope.
- CORS Configuration: Configure CORS for browser or mobile clients.
- Documentation: Generate OpenAPI/Swagger documentation with rswag.
- Use Case: For a new Rails app, use this Skill to set up the JSON API surface with your chosen settings and ensure it returns well-shaped responses.
Quick Start
Use the rails-api skill to build a JSON API surface for your Rails app.