Re: [apps-discuss] more feature requests, was: JSON patch: "test" operation

Julian Reschke <julian.reschke@gmx.de> Fri, 30 December 2011 14:15 UTC

Return-Path: <julian.reschke@gmx.de>
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 4626921F8C00 for <apps-discuss@ietfa.amsl.com>; Fri, 30 Dec 2011 06:15:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.01
X-Spam-Level:
X-Spam-Status: No, score=-103.01 tagged_above=-999 required=5 tests=[AWL=-0.411, BAYES_00=-2.599, 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 ticL6UEK4iKa for <apps-discuss@ietfa.amsl.com>; Fri, 30 Dec 2011 06:15:01 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by ietfa.amsl.com (Postfix) with SMTP id 556B121F8BDC for <apps-discuss@ietf.org>; Fri, 30 Dec 2011 06:15:00 -0800 (PST)
Received: (qmail invoked by alias); 30 Dec 2011 14:14:58 -0000
Received: from mail.greenbytes.de (EHLO [192.168.1.140]) [217.91.35.233] by mail.gmx.net (mp011) with SMTP; 30 Dec 2011 15:14:58 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1+4nZ9JKRi4OZ1J7yN4Ice2VWPxuJF4IAWJrSKGzF Lkl8SINDfQ2f2R
Message-ID: <4EFDC75F.8010106@gmx.de>
Date: Fri, 30 Dec 2011 15:14:55 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1
MIME-Version: 1.0
To: Sam Johnston <samj@samj.net>
References: <4ED64A26.5030003@gmx.de> <BC564D94-6D00-4D63-863A-8AAD00E57B3A@tzi.org> <4ED77513.3070506@gmx.de> <6E443D75-D1AC-451F-9B17-115C9A6C7696@mnot.net> <4ED7F8C2.9030804@gmx.de> <37E09A53-E9F4-45D2-BB8F-79655BECDBB2@mnot.net> <1322779521.1958.1.camel@neutron> <4EFC8A08.7000105@gmx.de> <1325222688.18477.25.camel@neutron> <CAKTR03_GdgdTwJF073uV1iUGSEW1E6wXxO-OtYpWReARBhRMgQ@mail.gmail.com> <4EFD954B.3090006@gmx.de> <CAKTR03_XZOW3HK4MLjG8n+-SmCBp68Zym4S-g6vj3NXa-=kHfQ@mail.gmail.com> <4EFDAABF.7020804@gmx.de> <CAKTR039MLM=QKo0xOJewbVqspuTpm82z_wSw3WF=CD9dao-a8g@mail.gmail.com>
In-Reply-To: <CAKTR039MLM=QKo0xOJewbVqspuTpm82z_wSw3WF=CD9dao-a8g@mail.gmail.com>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: IETF Apps Discuss <apps-discuss@ietf.org>
Subject: Re: [apps-discuss] more feature requests, was: 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: Fri, 30 Dec 2011 14:15:02 -0000

On 2011-12-30 15:05, Sam Johnston wrote:
> On Fri, Dec 30, 2011 at 1:12 PM, Julian Reschke <julian.reschke@gmx.de
> <mailto:julian.reschke@gmx.de>> wrote:
>
>     On 2011-12-30 12:36, Sam Johnston wrote:
>      > ...
>
>             Of course that depends on how you define the lifetime of a
>         resource.
>             Does a resource which currently doesn't have a retrievable
>             representation "exist"?
>
>             Technically, PATCH can work for creating an initial mapping
>         as well.
>
>         That's a contrived interpretation — is it something we want to
>         support?
>         I'd rather a PATCH throw a 4xx error if a resource didn't
>         exist... an
>         empty PUT would create a resource that could then be PATCHed, no?
>         ...
>
>
>     It probably belongs into the description of the patch format.
>
>
> Agreed.
>
>     I don't see how requiring an empty PUT makes things better, though.
>
>
> It would prevent misplaced PATCHes from creating new resources, while

If you want to do that, you can always add "If-None-Match: *".

> still allowing you to build up a resource from scratch with PATCHes.
> Maybe I'm being pedantic, but I thought that's what standards groups
> were for ;)

:-) As long as being too pedantic doesn't make things more complicated 
than they need to be (I can't recall why we have the prose about 
"existing" resources in the PATCH spec; we definitively discussed this 
use case at some point...)

Best regards, Julian