summaryrefslogtreecommitdiff
path: root/lib/api/entities/protected_branch.rb
blob: 42f721b40a6b604ffaf81f26d2a6b52ecf5164c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module API
  module Entities
    class ProtectedBranch < Grape::Entity
      expose :id, documentation: { type: 'integer', example: 1 }
      expose :name, documentation: { type: 'string', example: 'main' }
      expose :push_access_levels, using: Entities::ProtectedRefAccess, documentation: { is_array: true }
      expose :merge_access_levels, using: Entities::ProtectedRefAccess, documentation: { is_array: true }
      expose :allow_force_push, documentation: { type: 'boolean' }
    end
  end
end

API::Entities::ProtectedBranch.prepend_mod_with('API::Entities::ProtectedBranch')