Sha256: cd3bed2cac9114e2361f699aae7dbfa242d5ae8374023b57154ed04faa0691e7

Contents?: true

Size: 612 Bytes

Versions: 5

Compression:

Stored size: 612 Bytes

Contents

class Dummy::CompanyAPI < IntrospectiveGrape::API
  paginate

  restful Company, [:id, :name, :short_name, :gizmos, :widgets, :sprockets] do

    desc "Test default values in an extra endpoint"
    params do
      optional :boolean_default, type: Boolean, default: false
      optional :string_default, type: String, default: "foo"
      optional :integer_default, type: Integer, default: 123
    end
    get '/special/list' do
      authorize Company.new, :index?
      present params
    end

  end

  class CompanyEntity < Grape::Entity
    expose :id, :name, :short_name, :created_at, :updated_at
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
introspective_grape-0.5.0 spec/dummy/app/api/dummy/company_api.rb
introspective_grape-0.3.7 spec/dummy/app/api/dummy/company_api.rb
introspective_grape-0.3.6 spec/dummy/app/api/dummy/company_api.rb
introspective_grape-0.3.5 spec/dummy/app/api/dummy/company_api.rb
introspective_grape-0.3.3 spec/dummy/app/api/dummy/company_api.rb