Sha256: d1424aeb699dd27ef7c4b333a933ae932a26a8d863c8f8c40e589a7693d122b6

Contents?: true

Size: 537 Bytes

Versions: 2

Compression:

Stored size: 537 Bytes

Contents

module Berkshelf::API
  module Endpoint
    class V1 < Endpoint::Base
      helpers Berkshelf::API::Mixin::Services
      version 'v1', using: :header, vendor: 'berkshelf'
      format :json

      rescue_from Grape::Exceptions::Validation do |e|
        body = JSON.generate({status: e.status, message: e.message, param: e.param})
        rack_response(body, e.status, "Content-type" => "application/json")
      end

      desc "list all known cookbooks"
      get 'universe' do
        cache_manager.cache
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
berkshelf-api-0.2.0 lib/berkshelf/api/endpoint/v1.rb
berkshelf-api-0.1.0 lib/berkshelf/api/endpoint/v1.rb