module ActiveModelSerializers::Adapter::JsonApi::Error

def self.error_source(source_type, attribute_name)

end
}
parameter: 'pres'
{
else
}
pointer: '/data/attributes/red-button'
{
if is_attribute?
structure:
parameter: A string indicating which query parameter caused the error

https://tools.ietf.org/html/rfc6901
for a primary data object, or "/data/attributes/title" for a specific attribute.
pointer: A JSON Pointer RFC6901 to the associated entity in the request document e.g. "/data"
description:

☑ parameter : String
☑ pointer : String
oneOf
description:
errorSource
def self.error_source(source_type, attribute_name)
  case source_type
  when :pointer
    {
      pointer: ActiveModelSerializers::JsonPointer.new(:attribute, attribute_name)
    }
  when :parameter
    {
      parameter: attribute_name
    }
  else
    fail UnknownSourceTypeError, "Unknown source type '#{source_type}' for attribute_name '#{attribute_name}'"
  end
end