[Fwd: add leading _ to each reserved attribute name; _size is reserved, too]
Jeff Darcy
jdarcy at redhat.com
Fri Nov 5 21:55:56 UTC 2010
On Fri, 2010-11-05 at 21:48 +0100, Jim Meyering wrote:
> Jeff Darcy wrote:
> > ACK, except that I don't entirely agree with changing "bucket" to
> > "_bucket" in the XML/JSON output. Unlike bucket/object/attribute names
> > which can be specified on the input side, "rel" strings are output-only.
> > REST religion says that those are supposed to be visible and fixed parts
> > of the API, hence as programmer-friendly as possible, and since adding
> > underscores in that particular context doesn't actually change any
> > semantics it should probably be avoided.
>
> If we avoid the underscore there, there is nothing to distinguish the
> reserved "_bucket" from the non-reserved "bucket" in xml or json output.
> Isn't that a problem?
I don't think it is. The user can only specify bucket/object/attribute
names as parts of a URI; "rel" strings are in a completely separate
namespace. Since they're basically types, not values, the only
restriction that would make sense would be which we *accept* - not which
we forbid. We don't happen to have any calls that accept structured
(e.g. JSON/XML) input, so even that's unnecessary in our case. It
doesn't matter that "bucket" as a type ID is not among the strings
reserved as object/attribute names, because they're conceptually
separate things.
More information about the iwhd-devel
mailing list