[openstack-dev] [openstack-sdk-php] discussion: json schema to define apis

Ken'ichi Ohmichi ken1ohmichi at gmail.com
Thu May 1 04:34:15 UTC 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140501/4d5d014e/attachment.html>


More information about the OpenStack-dev mailing list