-
Notifications
You must be signed in to change notification settings - Fork 34
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
Empty ref node calculation does not work for canonical 'User.groups[].type' value #176
Comments
I see your point but I would need to think of a reliable solution. The custom case you mentioned is not an option for this implementation. The type could be used with values of "direct" and "indirect" in other custom resources too this would create a conflict causing reference urls of Group-resources to be entered in other resources. Alternatively I might be able to add a
what do you think? would this be an appropriate solution for you? |
I just noticed that the previous noted solution with the |
Please take a short look at the changes. I changed the method signature on the The references are not added automatically as you would have liked but I fear I have no better solution here. |
Oh, I much prefer the It looks like it would force a code update on all users of the current API, (which I am fine with!) - that could be mitigated with some default facade methods that accept the new Thanks for the quick response! |
I actually wanted to this for quite some time now since I was very unhappy with the |
Running version 1.10.0.
Issue
The feature of adding a
$ref
value is super handy. Unfortunately it does not seem to work with the canonical values for listing groups a user belongs to, because it uses theRFC7643.TYPE
field to try and lookup a resource type. This fails if you use the RFC7643 recommended values of "direct" or "indirect". Seems like a simple fix is possible - add a special case to check if the TYPE field is one of the canonical values of "direct" or "indirect", and map that to "Group".For example:
Workaround
Use non-canonical resource name e.g.
GroupNode.builder().type("Group")
instead ofGroupNode.builder().type("direct")
. This works as expected:RFC7643 section 4.1.2
Relevant code
See ResponseAttributeValidator#overrideEmptyReferenceNodeInComplex:
The text was updated successfully, but these errors were encountered: