<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 2, 2014 at 6:04 AM, Ken'ichi Ohmichi <span dir="ltr"><<a href="mailto:ken1ohmichi@gmail.com" target="_blank">ken1ohmichi@gmail.com</a>></span> wrote:<br><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">
<br>
</span>Thanks for your advice, that is very useful input for me.<br>
I read both keystone-specs and ietf draft-spec for JSON-Home.<br>
I have a question.<br>
<br>
JSON-Home is useful for advertising API URL paths to clients, I guess<br>
but it cannot advertise the supported attributes of a request body.<br>
Is that right?<br>
<br></blockquote><div><br></div><div>Right, it says right in the FAQ: <a href="https://tools.ietf.org/html/draft-nottingham-json-home-03#appendix-B.5">https://tools.ietf.org/html/draft-nottingham-json-home-03#appendix-B.5</a> :<br><br><pre class=""><span class=""><h1>How Do I find the schema for a format?</h1></span>

   That isn't addressed by home documents. ...</pre><br></div><div>Also, you might want to check out section 5, Representation Hints : <a href="https://tools.ietf.org/html/draft-nottingham-json-home-03#section-5">https://tools.ietf.org/html/draft-nottingham-json-home-03#section-5</a><br></div><div> . All it says is TBD. So we might have to make up our own standard here.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
For example, we can create a user "nobody" by passing the following<br>
request body to Keystone /v2.0/users with POST method:<br>
<br>
  '{"user": {"email": null, "password": null, "enabled": true, "name":<br>
"nobody", "tenantId": null}}'<br>
<br>
In this case, I hope Keystone can advertise the above<br>
attributes("email", "name", etc).<br>
but JSON-Home doesn't cover it as its scope, I guess.<br>
<br></blockquote><div><br></div><div>When discussing the document schema I think we're planning to use JSONSchema... In Keystone, we've got J-S implemented on some parts (I don't think it covers all resources yet). I also don't think our JSONSchema is discoverable yet (i.e., you can't download the schema from the server). I haven't heard of other projects implementing this yet, but maybe someone has.<br><br></div><div>There probably is some way to integrate JSON Home with JSONSchema. Maybe you can put a reference to the JSONSchema in the "hints" for the resource.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On current Nova v2 API, we need to add dummy extension when adding new<br>
attributes to the existing request/response body because of<br>
advertising something<br>
changed to clients. I'm glad if we can use more standard way for doing it.<br>
<br>
Thanks<br>
<span class=""><font color="#888888">Ken'ichi Ohmichi<br>
</font></span><div class=""><div class="h5"><br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</div></div></blockquote></div><br></div></div>