On Thu, Oct 2, 2014 at 6:04 AM, Ken'ichi Ohmichi <ken1ohmi...@gmail.com>
wrote:


>
> Thanks for your advice, that is very useful input for me.
> I read both keystone-specs and ietf draft-spec for JSON-Home.
> I have a question.
>
> JSON-Home is useful for advertising API URL paths to clients, I guess
> but it cannot advertise the supported attributes of a request body.
> Is that right?
>
>
Right, it says right in the FAQ:
https://tools.ietf.org/html/draft-nottingham-json-home-03#appendix-B.5 :

How Do I find the schema for a format?

   That isn't addressed by home documents. ...


Also, you might want to check out section 5, Representation Hints :
https://tools.ietf.org/html/draft-nottingham-json-home-03#section-5
 . All it says is TBD. So we might have to make up our own standard here.


> For example, we can create a user "nobody" by passing the following
> request body to Keystone /v2.0/users with POST method:
>
>   '{"user": {"email": null, "password": null, "enabled": true, "name":
> "nobody", "tenantId": null}}'
>
> In this case, I hope Keystone can advertise the above
> attributes("email", "name", etc).
> but JSON-Home doesn't cover it as its scope, I guess.
>
>
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.

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.

On current Nova v2 API, we need to add dummy extension when adding new
> attributes to the existing request/response body because of
> advertising something
> changed to clients. I'm glad if we can use more standard way for doing it.
>
> Thanks
> Ken'ichi Ohmichi
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to