-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
RFC7643: Complex attribute 'emails' does not declare subAttribute '$ref' #72
Comments
Thinking outloud here: Indeed, It is unclear to me on which level the schemas displayed on RFC7643 §8.7 are authoritative.
☝️ This quote from RFC7643 §8.7 is unclear on what exactly has been modified for readability on the example schemas. Is the
☝️ This quote from RFC7643 §8.7.1 seems to indicate that the schemas defined on that section are just examples and that implementations may change here and there where it is permitted. But what does permitted mean in this context? Is adding a
☝️ This quote from RFC7643 §2.4 indicates that the
There are other examples of multi-valued complex attributes in the documentations that do define the
In the end, I think you are right and the |
Thanks for your investigations around the spec! 🧐 I am thinking of making a contribution, unless you know how to do that exactly. I would go for splitting class MultiValuedComplexAttribute(ComplexAttribute):
pass
class TypeAttributeMixin:
type: Optional[str] = None
"""A label indicating the attribute's function."""
class PrimaryAttributeMixin:
primary: Optional[bool] = None
"""A Boolean value indicating the 'primary' or preferred attribute value
for this attribute."""
class DisplayAttributeMixin:
display: Annotated[Optional[str], Mutability.immutable] = None
"""A human-readable name, primarily used for display purposes."""
class ValueAttributeMixin:
value: Optional[Any] = None
"""The value of an entitlement."""
class RefAttributeMixin:
ref: Optional[Reference] = Field(None, serialization_alias="$ref")
"""The reference URI of a target resource, if the attribute is a
reference.""" This way, for instance, the class Email(MultiValuedComplexAttribute, ValueAttributeMixin, DisplayAttributeMixin, PrimaryAttributeMixin, TypeAttributeMixin):
... Does it make sense to you? |
I like the idea with the mixins, it would make the models more flexible. Just to add something here, I saw the scim2-models adds the |
I use scim2-tester against the scimmy-routers middleware for express
It appears that scimmy-test sends
$ref
sub attributes foremails
. Scimmy does not expect it and rejects the request with an error.When I take a look at the RFC 7643, section 2.4 states that the
$ref
attribute is by default added to multi-valued attribute:On pages 53 and 54, the
emails
attribute does not contain this$ref
, so I would say it's SCIMMY / scimmy-routers who are right :) :The text was updated successfully, but these errors were encountered: