Fern

A DSL for writing REST APIs on top of Ruby on Rails.

Examples

class PostsController < ApplicationController
  get :show do
    params do
      param :id, :integer, required: true
    end

    presenter PostPresenter
    
    request do
      present Post.find(params.validated.id)
    end
  end
end

Source

Fern is on GitHub.