Open gmkohler opened 5 years ago
Might make sense to make this customizable too. I use form objects and attach exceptions to an attr_accessor :exception
which should also be attached to /data
if this interpretation of the spec is correct.
The only thing I think might be wrong here is that nested association errors shouldn't be on base but rather on a relationship instead. However, that's not in v1 of the spec so not sure
@JoeWoodward can you write an example of what you mean by:
The only thing I think might be wrong here is that nested association errors shouldn't be on base but rather on a relationship instead
?
The specification for
"/data"
in a JSONAPI error object'ssource
attribute and the suggested usage of:base
inActiveModel::Error
seem aligned.Wrote this such that any actual
:base
attribute would override this, but not sure what sort of tests need to be added or whether it's worth adding at all.