Re: [apps-discuss] JSON patch: "test" operation

Carsten Bormann <cabo@tzi.org> Thu, 01 December 2011 12:47 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 718C621F8AFC for <apps-discuss@ietfa.amsl.com>; Thu, 1 Dec 2011 04:47:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.249
X-Spam-Level:
X-Spam-Status: No, score=-106.249 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Pe4Iy2IBm4jD for <apps-discuss@ietfa.amsl.com>; Thu, 1 Dec 2011 04:47:14 -0800 (PST)
Received: from informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::12]) by ietfa.amsl.com (Postfix) with ESMTP id 984FC21F8AFA for <apps-discuss@ietf.org>; Thu, 1 Dec 2011 04:47:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from smtp-fb3.informatik.uni-bremen.de (smtp-fb3.informatik.uni-bremen.de [134.102.224.120]) by informatik.uni-bremen.de (8.14.3/8.14.3) with ESMTP id pB1Cl6eQ017258; Thu, 1 Dec 2011 13:47:06 +0100 (CET)
Received: from [192.168.217.110] (p54899BA5.dip.t-dialin.net [84.137.155.165]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp-fb3.informatik.uni-bremen.de (Postfix) with ESMTPSA id E3210AE6; Thu, 1 Dec 2011 13:47:05 +0100 (CET)
Mime-Version: 1.0 (Apple Message framework v1251.1)
Content-Type: text/plain; charset="windows-1252"
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <4ED77513.3070506@gmx.de>
Date: Thu, 01 Dec 2011 13:47:02 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <58C610C7-5F52-4C4F-9479-4B1DED192709@tzi.org>
References: <4ED64A26.5030003@gmx.de> <BC564D94-6D00-4D63-863A-8AAD00E57B3A@tzi.org> <4ED77513.3070506@gmx.de>
To: Julian Reschke <julian.reschke@gmx.de>
X-Mailer: Apple Mail (2.1251.1)
Cc: IETF Apps Discuss <apps-discuss@ietf.org>
Subject: Re: [apps-discuss] JSON patch: "test" operation
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 01 Dec 2011 12:47:14 -0000

On Dec 1, 2011, at 13:37, Julian Reschke wrote:

> On 2011-12-01 13:26, Carsten Bormann wrote:
>> What happens when a test fails?
>> -- Keep or rewind the changes done so far?
>> 	(or do we stipulate "test" has to come before modifiers?)
> 
> I think requiring them to come first makes a lot of sense.

I think so, too.
(Still, something should be said about what is supposed to happen if they don't -- is that a MUST detect then?)

My comment ("what happens") can be generalized to the entire section 5 of draft-pbryan-json-patch-02.txt…  "Fails to complete" doesn't cut it, I think.

>> -- What is the response code you want to see?
> 
> 409 comes to mind.

Sounds good.  I think that the media type spec should contain text suggesting a specific response code, to rein in the otherwise uncontrollable inventiveness of the implementers.  Could go in section 5, too.

Grüße, Carsten