<p dir="ltr"><br>
On Jun 4, 2015 12:00 AM, "Xu, Hejie" <<a href="mailto:hejie.xu@intel.com">hejie.xu@intel.com</a>> wrote:<br>
><br>
> Hi, guys,<br>
>  <br>
> I’m working on adding Microversion into the API-WG’s guideline which make sure we have consistent Microversion behavior in the API for user.<br>
> The Nova and Ironic already have Microversion implementation, and as I know Magnum <a href="https://review.openstack.org/#/c/184975/">https://review.openstack.org/#/c/184975/</a> is going to implement Microversion also.<br>
>  <br>
> Hope all the projects which support( or plan to) Microversion can join the review of guideline.<br>
>  <br>
> The Mircoversion specification(this almost copy from nova-specs): <a href="https://review.openstack.org/#/c/187112">https://review.openstack.org/#/c/187112</a><br>
> And another guideline for when we should bump Mircoversion <a href="https://review.openstack.org/#/c/187896/">https://review.openstack.org/#/c/187896/</a><br>
>  <br>
> As I know, there already have a little different between Nova and Ironic’s implementation. Ironic return min/max version when the requested<br>
> version doesn’t support in server by http-headers. There isn’t such thing in nova. But that is something for version negotiation we need for nova also.<br>
> Sean have pointed out we should use response body instead of http headers, the body can includes error message. Really hope ironic team can take a<br>
> look at if you guys have compelling reason for using http headers.<br>
>  <br>
> And if we think return body instead of http headers, we probably need think about back-compatible also. Because Microversion itself isn’t versioned.<br>
> So I think we should keep those header for a while, does make sense?<br>
>  <br>
> Hope we have good guideline for Microversion, because we only can change Mircoversion itself by back-compatible way.<br></p>
<p dir="ltr">Ironic returns the min/max/current API version in the http headers for every request. </p>
<p dir="ltr">Why would it return this information in a header on success and in the body on failure? (How would this inconsistency benefit users?)</p>
<p dir="ltr">To be clear, I'm not opposed to *also* having a useful error message in the body, but while writing the client side of api versioning, parsing the range consistently from the response header is, IMO, better than requiring a conditional.</p>
<p dir="ltr">-Deva</p>