[openstack-dev] [api] Optional Properties in an Entity
ian.cordasco at RACKSPACE.COM
Tue Jan 20 15:08:10 UTC 2015
On 1/20/15, 04:13, "Chris Dent" <chdent at redhat.com> wrote:
>On Mon, 19 Jan 2015, Dean Troyer wrote:
>> 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
>> API to be named at a later date by looking at server code, we do not
>> ourselves or the users of our APIs by omitting this sort of thing.
I’m in much the same position as Kevin. I’ve tried coming up with
reasoning for both positions but I don’t see a really compelling reason
for either side. On the one hand though, having strict schema about what
is returned can be valuable, so not allowing something to be omitted
**may** catch a bug somewhere else. Allowing things to be nullable is
perfectly reasonable to me.
It seems like a few of us are in agreement with this direction. Perhaps
one of us should write a proposal for the API-WG to review about this.
More information about the OpenStack-dev