-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow requesting specific attributes (derived from #102) #127
Conversation
Allow requesting specific attributes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just in regards to your comment
A change in #102 blanket removal of nil values. There's a small chance that some existing Scimitar clients might be relying on "key is present, but value is nil" in returned data, so nil items are now only stripped out if an include-attributes list is included; otherwise, nil handling behaviour is unchanged.
I don't see anything asserting this in the new tests, I assume it's already covered in existing tests hence it doesn't show in the diff?
Otherwise happy.
Yes, "missing" diffs can be tricky things! If you look at https://github.com/RIPAGlobal/scimitar/pull/102/files#diff-f82acfe1ea74bff57d9a8330817ac4f7ed9b8a027d75a1ff36c9c0dd47cf5408R330 you'll see that in #102, tests which did check for |
Hey, @pond. It's great to see this moving, thank you! For the removed attributes, you're right. Nevertheless, JSON clients could assume a difference between a present and a null value. I'll look into removing these attributes from the output JSON when attributes are requested, so we get a cleaner JSON when needed in a future PR, this was the main goal of this blanket removal of nil values, but I agree it wasn't the best solution. |
That's what I've implemented. The That's really (aside from some minor formatting changes) the only difference between this and your PR (which is the starting basis in this feature branch of the code here). |
Perfect, thanks @pond ! Looking forward to incorporate this on our project! |
This is derived from #102 with:
nil
values. There's a small chance that some existing Scimitar clients might be relying on "key is present, but value isnil
" in returned data, sonil
items are now only stripped out if an include-attributes list is included; otherwise,nil
handling behaviour is unchanged.Many thanks to @xjunior for this work.