Closed chamini2 closed 7 years ago
@ShadowManu remember that
_.matches({data: {attributes: {decription: '...'}})({data: {attributes: {decription: '...', name: 'Matteo'}})
returns true
since matches
matches as having at least all the properties in the first parameter, but maybe there are more properties in the second parameter.
So we have the same setup, but expect
different things; like, we don't check for id
nor type
in the one that checks omit
; also, we expect
the result not to contain the idAttribute
s (name
, email
).
@chamini2 got it. LGTM then.
The idea of this PR is to handle
idAttribute
values from Bookshelf that are arrays, these are a little bit supported and my team is currently using them for some stuff.Thought we could add it even though it's not official.
What should we return for
id
? I set it to return the a string of the ids joined by commas,
, but could be a differently formatted string.NOTE: JSONAPI specifies that
id
MUST be a string.