[openstack-dev] [openstack-sdk-php] discussion: json schema to define apis
Matthew Farina
matt at mattfarina.com
Fri May 2 19:35:36 UTC 2014
Ken'ichi, thanks for the detail. I just added that summit session to my
list to attend. I'm looking forward to it.
On Thu, May 1, 2014 at 12:34 AM, Ken'ichi Ohmichi <ken1ohmichi at gmail.com>wrote:
>
>
> Hi,
>
> 2014-04-29 10:28 GMT+09:00 Matthew Farina <matt at mattfarina.com>:
>
>
>>> *3. Where would JSON schemas come from?*
>>>
>>> It depends on each OpenStack service. Glance and Marconi (soon) offer
>>> schemas directly through the API - so they are directly responsible for
>>> maintaining this - we'd just consume it. We could probably cache a local
>>> version to minimize requests.
>>>
>>> For services that do not offer schemas yet, we'd have to use local
>>> schema files. There's a project called Tempest which does integration tests
>>> for OpenStack clusters, and it uses schema files. So there might be a
>>> possibility of using their files in the future. If this is not possible,
>>> we'd write them ourselves. It took me 1-2 days to write the entire Nova
>>> API. Once a schema file has been fully tested and signed off as 100%
>>> operational, it can be frozen as a set version.
>>>
>>
>> Can we convert the schema files from Tempest into something we can use?
>>
>
> just FYI
>
> Now Tempest contains schemas for Nova API only, and the schemas of request
> and response are stored into different directories.
> We can see
> request schema:
> https://github.com/openstack/tempest/tree/master/etc/schemas/compute
> response schema:
> https://github.com/openstack/tempest/tree/master/tempest/api_schema/compute
>
> In the future, the way to handle these schemas in Tempest is one of the
> topics in the next
> summit.
> http://junodesignsummit.sched.org/event/e3999a28ec02aa14b69ad67848be570a
>
> Nova also contains request schema under
>
> https://github.com/openstack/nova/tree/master/nova/api/openstack/compute/schemas/v3
> These schemas are used only for Nova v3 API, there is nothing for v2
> API(current) because
> v2 API does not use jsonschema.
>
>
> Thanks
> Ken'ichi Ohmichi
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140502/7a2ee1b7/attachment.html>
More information about the OpenStack-dev
mailing list