[openstack-dev] [api] Optional Properties in an Entity
Dean Troyer
dtroyer at gmail.com
Mon Jan 19 22:47:27 UTC 2015
On Mon, Jan 19, 2015 at 3:54 PM, Kevin L. Mitchell <
kevin.mitchell at rackspace.com> wrote:
> When we look at consistency, we look at everything else in OpenStack.
> From the standpoint of the nova API (with which I am the most familiar),
> I am not aware of any property that is ever omitted from any payload
> without versioning coming in to the picture, even if its value is null.
> Thus, I would argue that we should encourage the first situation, where
> all properties are included, even if their value is null.
>
Independent of actual implementations in OpenStack, I prefer always
including null/empty properties here because it is slightly more
self-documenting. Having spent the morning chasing down attributes for an
API to be named at a later date by looking at server code, we do not help
ourselves or the users of our APIs by omitting this sort of thing.
dt
--
Dean Troyer
dtroyer at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150119/f5665b8b/attachment.html>
More information about the OpenStack-dev
mailing list