diff options
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/accessibility_error_entity.rb | 12 | ||||
-rw-r--r-- | app/serializers/accessibility_reports_comparer_entity.rb | 15 | ||||
-rw-r--r-- | app/serializers/accessibility_reports_comparer_serializer.rb | 5 |
3 files changed, 32 insertions, 0 deletions
diff --git a/app/serializers/accessibility_error_entity.rb b/app/serializers/accessibility_error_entity.rb new file mode 100644 index 00000000000..540f5384d66 --- /dev/null +++ b/app/serializers/accessibility_error_entity.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +class AccessibilityErrorEntity < Grape::Entity + expose :code + expose :type + expose :typeCode, as: :type_code + expose :message + expose :context + expose :selector + expose :runner + expose :runnerExtras, as: :runner_extras +end diff --git a/app/serializers/accessibility_reports_comparer_entity.rb b/app/serializers/accessibility_reports_comparer_entity.rb new file mode 100644 index 00000000000..3768607a3fc --- /dev/null +++ b/app/serializers/accessibility_reports_comparer_entity.rb @@ -0,0 +1,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 diff --git a/app/serializers/accessibility_reports_comparer_serializer.rb b/app/serializers/accessibility_reports_comparer_serializer.rb new file mode 100644 index 00000000000..a6b8162e4ea --- /dev/null +++ b/app/serializers/accessibility_reports_comparer_serializer.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +class AccessibilityReportsComparerSerializer < BaseSerializer + entity AccessibilityReportsComparerEntity +end |