summaryrefslogtreecommitdiff
path: root/app/serializers/accessibility_reports_comparer_entity.rb
blob: 3768607a3fc9dd97e385262aba2733ee0cc709fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

class AccessibilityReportsComparerEntity < Grape::Entity
  expose :status

  expose :new_errors, using: AccessibilityErrorEntity
  expose :resolved_errors, using: AccessibilityErrorEntity
  expose :existing_errors, using: AccessibilityErrorEntity

  expose :summary do
    expose :total_count, as: :total
    expose :resolved_count, as: :resolved
    expose :errors_count, as: :errored
  end
end