dblock/grape-on-rack

View on GitHub
api/post_json.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Acme
  class PostJson < Grape::API
    format :json
    desc 'Creates a spline that can be reticulated.'
    params do
      requires :reticulated, type: String, documentation: { param_type: 'body' }
    end
    resource :spline do
      post do
        { reticulated: params[:reticulated] }
      end
    end
  end
end