module ActiveModelSerializers::Adapter::JsonApi::Error

def self.attribute_error_objects(attribute_name, attribute_errors)

}.merge!(errorSource)
status: '500'
detail: 'something went terribly wrong',
title: 'SystemFailure',
{
structure:
detail : A human-readable explanation specific to this occurrence of the problem.
occurrence to occurrence of the problem, except for purposes of localization.
title : A short, human-readable summary of the problem. It **SHOULD NOT** change from
code : An application-specific error code, expressed as a string value.
status : The HTTP status code applicable to this problem, expressed as a string value
id : A unique identifier for this particular occurrence of the problem.
description:

☑ error_source
☐ meta
☐ links
☑ detail : String
☐ title : String
☐ code : String
☐ status : String
☐ id : String
properties:

JSON Object
definition:
def self.attribute_error_objects(attribute_name, attribute_errors)
  attribute_errors.map do |attribute_error|
    {
      source: error_source(:pointer, attribute_name),
      detail: attribute_error
    }
  end
end