MCPcopy Create free account
hub / github.com/elimity-com/scim / Example_addMemberToGroup

Function Example_addMemberToGroup

internal/patch/add_test.go:9–23  ·  view source on GitHub ↗

The following example shows how to add a member to a group.

()

Source from the content-addressed store, hash-verified

7
8// The following example shows how to add a member to a group.
9func Example_addMemberToGroup() {
10 operation := `{
11 "op": "add",
12 "path": "members",
13 "value": {
14 "display": "di-wu",
15 "$ref": "https://example.com/v2/Users/0001",
16 "value": "0001"
17 }
18}`
19 validator, _ := NewValidator(operation, schema.CoreGroupSchema())
20 fmt.Println(validator.Validate())
21 // Output:
22 // [map[$ref:https://example.com/v2/Users/0001 display:di-wu value:0001]] <nil>
23}
24
25// The following example shows how to add one or more attributes to a User resource without using a "path" attribute.
26func Example_addWithoutPath() {

Callers

nothing calls this directly

Calls 3

ValidateMethod · 0.95
CoreGroupSchemaFunction · 0.92
NewValidatorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…