[openstack-dev] [api] Minor changes to API
everett.toews at RACKSPACE.COM
Tue Apr 21 20:53:42 UTC 2015
On Apr 20, 2015, at 2:19 PM, Douglas Mendizabal <douglas.mendizabal at RACKSPACE.COM<mailto:douglas.mendizabal at RACKSPACE.COM>> wrote:
I was wondering if the API Working Group had an opinion on how to deal with minor changes to the api? For example, what if you wanted to add a new attribute to a JSON response? I would think that a minor change like that could be done without having to create a new versioned endpoint. So a newer release would just add the new attribute without having to create a new /v1.1/ endpoint.
I’d suggest (like others have already) doing microversions like Nova . Creating a new endpoint would be a cruel thing to do to your clients, especially considering it’s a seemingly backwards compatible change.
However, minor changes like that could still possibly break clients that are not expecting them. For example, a client that uses the json response as arguments to a method via **kwargs would start seeing TypeErrors for unexpected arguments.
And let us not forget statically typed languages. But even there adding a new attribute isn’t that big of a deal. If there’s an unexpected attribute in a response, it can simply be ignored. No harm done.
But the user might not even be aware the new attribute is available unless they’re not looking at their request/response logs. Hence the need for microversions.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev