Subject: [scim] Use of [] brackets consistently in PATCH

From: Phil Hunt <[email-masked]>
Date: Mon, 7 Jul 2014 15:34:30 -0700

It has been brought to my attention that in the API PATCH examples, when there is a single operation, the operation looks like this:
   {
     "schemas": ["urn:scim:api:messages:2.0:PatchOp"],
     "op":"replace",
     "path":"addresses[type eq \"work\"].streetAddress",
     "value":"911 Universal City Plaza"
   }

When there are multiple operations, square brackets are used to indicate an array of operations:
   [
     { "schemas": ["urn:scim:api:messages:2.0:PatchOp"],
       "op":"remove","path":"members"},
     {
       "schemas": ["urn:scim:api:messages:2.0:PatchOp"],
       "op":"add",
       "path":"members",
       "value":[
       {
         "display": "Babs Jensen",
         "$ref": "https://example.com/v2/Users/2819c223...413861904646",
         "value": "2819c223-7f76-453a-919d-413861904646"
       },
       {
         "display": "James Smith",
         "$ref": "https://example.com/v2/Users/08e1d05d...473d93df9210",
         "value": "08e1d05d-121c-4561-8b96-473d93df9210"
       }]
     }
   ]

While I believe this is technically ok for JSON, the question was that the message format is not consistent.

Should we insist that square brackets always be the outer most element in a PATCH operation even when there is a single operation?

Phil

@independentid
www.independentid.com
[email-masked]

---

From: Ian Glazer <[email-masked]>
Date: Tue, 8 Jul 2014 09:37:16 -0400

Consistency is a good thing - I say even in the single op case use squares.

On Mon, Jul 7, 2014 at 6:34 PM, Phil Hunt <[email-masked]> wrote:

> It has been brought to my attention that in the API PATCH examples, when
> there is a single operation, the operation looks like this:
>
>    {
> Should we insist that square brackets always be the outer most element in
> a PATCH operation even when there is a single operation?
>
>    Phil
>
> @independentid
> www.independentid.com
> [email-masked]
>
>
>
>
> _______________________________________________
> scim mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/scim
>
>

-- 
Ian Glazer
Senior Director, Identity
+1 202 255 3166
@iglazer <https://twitter.com/iglazer>

---

From: Leif Johansson <[email-masked]>
Date: Tue, 08 Jul 2014 15:40:28 +0200

> Consistency is a good thing - I say even in the single op case use squares.
+1 as an individual!

---

From: Kelly Grizzle <[email-masked]>
Date: Tue, 8 Jul 2014 13:47:22 +0000

+1

-----Original Message-----
From: scim [mailto:[email-masked]] On Behalf Of Leif Johansson
Sent: Tuesday, July 08, 2014 8:40 AM
To: [email-masked]
Subject: Re: [scim] Use of [] brackets consistently in PATCH

+1 as an individual!

---

From: Phil Hunt <[email-masked]>
Date: Tue, 8 Jul 2014 10:00:36 -0700

Hey, I thought you folks could use a "t-ball" question in the mix. 

Phil

> On Jul 8, 2014, at 6:47, Kelly Grizzle <[email-masked]> wrote:
> 
> +1
>

---

From: "Salvatore D'Agostino" <[email-masked]>
Date: Tue, 8 Jul 2014 13:43:32 -0400

Yes, even I can hit this.. +1

-----Original Message-----
From: scim [mailto:[email-masked]] On Behalf Of Phil Hunt
Sent: Tuesday, July 08, 2014 1:01 PM
To: Kelly Grizzle
Cc: Leif Johansson; [email-masked]
Subject: Re: [scim] Use of [] brackets consistently in PATCH

Phil