The following example shows how to add one or more attributes to a User resource without using a "path" attribute.
()
| 24 | |
| 25 | // The following example shows how to add one or more attributes to a User resource without using a "path" attribute. |
| 26 | func Example_addWithoutPath() { |
| 27 | operation := `{ |
| 28 | "op": "add", |
| 29 | "value": { |
| 30 | "emails": [ |
| 31 | { |
| 32 | "value": "quint@elimity.com", |
| 33 | "type": "work" |
| 34 | } |
| 35 | ], |
| 36 | "nickname": "di-wu" |
| 37 | } |
| 38 | }` |
| 39 | validator, _ := NewValidator(operation, schema.CoreUserSchema()) |
| 40 | fmt.Println(validator.Validate()) |
| 41 | // Output: |
| 42 | // map[emails:[map[type:work value:quint@elimity.com]] nickname:di-wu] <nil> |
| 43 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…