elimity-com / scim

Golang Implementation of the SCIM v2 Specification
MIT License
177 stars 55 forks source link

Add Primary Sub-Attribute for Address in User Schema #152

Closed Vignesh-vendastian closed 1 year ago

Vignesh-vendastian commented 1 year ago

Hi, The following patch request fails because of a bug in User Schema.

{
  "Operations": [
    {
      "op": "replace",
      "path": "addresses[type eq \"work\"].primary",
      "value": true
     },
  ]
}

The primary subAttribute under address is actually missing, but it's present in the SCIM Core Schema RFC, which is the real issue. I have added primary attribute for the address in the Core User Schema and updated relevant test method changes as well.

Vignesh-vendastian commented 1 year ago

I've included fixes for the patch remove operation issue along with the unit test cases in this commit.

q-uint commented 1 year ago

Thanks @Vignesh-vendastian (and @richard-rance)!