Skip to content

Cannot add a member to a group without specifying attribute $ref #269

@doublep

Description

@doublep

Describe the bug
Validation of JSON Group.members fails with this message: "Attribute members[0].$ref is required and must have a value" if you don't specify $ref attribute.

The reason is apparently in file src/main/java/com/unboundid/scim2/common/types/Member.java:

@Nullable
@Attribute(description = "The URI of the member resource.",
    isRequired = true,
    referenceTypes = { "User", "Group" },
    mutability = AttributeDefinition.Mutability.IMMUTABLE,
    returned = AttributeDefinition.Returned.DEFAULT,
    uniqueness = AttributeDefinition.Uniqueness.NONE)
@JsonProperty("$ref")
private URI ref;

To Reproduce
Send a modification request to /Groups, e.g. to create a new group with members, where members are specified in JSON like this:

"members": [{ "value": "..." }]

Expected behavior
$ref must not be needed, $value already specifies member identifier. Requiring the client to supply both is annoying and inconvenient.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions