You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have built my integration using scimmy and it mostly seems to be working. However, I pulled down the example PostMan tests mentioned here scimmyjs/scimmy-routers#10 (comment)
I brought in parse/filter from scim2-parse-filter for applying filters, but the attribute filtering seems to be automatic/built in.
The issue is that there is a test that hits /Users?attributes=emails[type eq "work"]. The core problem is that even though I have data that should match this attribute filter, it doesn't seem to work correctly. For example, you can see if I limit myself to ids I created to test, I have rows that do have an email sub-object of type "work":
However, if I add back in the filter on type eq "work", it finds no emails:
Which I think is wrong
I put some breakpoints in this library and I ended up tracing down into #filter in scimmy/dist/lib/types.js and it seemed like the issue was that it would see that it was an array filter on a complex attribute, so it'd recurse onto the user.emails, then recurse to user.emails[0], but the inclusions object is empty because this if on line 1755 doesn't pass:
so the emails.type gets ignored, so its an empty object with no inclusions, so my emails[0] doesn't pass the filter type eq "work", which when I bubble up to the part where its filtering the array, we see v is empty now, so it gets thrown out:
The text was updated successfully, but these errors were encountered:
I have built my integration using scimmy and it mostly seems to be working. However, I pulled down the example PostMan tests mentioned here scimmyjs/scimmy-routers#10 (comment)
I brought in parse/filter from
scim2-parse-filter
for applying filters, but the attribute filtering seems to be automatic/built in.The issue is that there is a test that hits
/Users?attributes=emails[type eq "work"]
. The core problem is that even though I have data that should match this attribute filter, it doesn't seem to work correctly. For example, you can see if I limit myself to ids I created to test, I have rows that do have an email sub-object of type "work":However, if I add back in the filter on
type eq "work"
, it finds no emails:Which I think is wrong
I put some breakpoints in this library and I ended up tracing down into
#filter
inscimmy/dist/lib/types.js
and it seemed like the issue was that it would see that it was an array filter on a complex attribute, so it'd recurse onto the user.emails, then recurse to user.emails[0], but theinclusions
object is empty because this if on line 1755 doesn't pass:so the
emails.type
gets ignored, so its an empty object with no inclusions, so my emails[0] doesn't pass the filtertype eq "work"
, which when I bubble up to the part where its filtering the array, we seev
is empty now, so it gets thrown out:The text was updated successfully, but these errors were encountered: