[openstack-dev] [Keystone] Use JSON Schemas to validate API requests data

Ken Wronkiewicz ken.wronkiewicz at RACKSPACE.COM
Wed Jun 5 18:16:28 UTC 2013


> Another bonus is that the JSON Schemas are portable where WSME is not, at
> least in theory. There are many people using many languages to interact
> with our APIs and it would be a bonus for them to be able to use those
> schemas both to validate their messages and serve as authoritative
> documentation of what messages the API will accept. It also helps when the
> API is returning 400 without a great error message or when you want to
> generate valid messages for various testing scenarios.

I'd like to amplify this point further.

In a world where orchestration and workflows and taskflows and other things that live atop OpenStack infrastructure are written, JSON schema is a great way to enable systems that are not necessarily part of OpenStack to better interact.

Having the JSON schema publicly exposed as part of the API as metainformation makes this even easier.

One good use case for this is any number of orchestration systems (Autoscale, provisioning, lazy-load) that will, at some point along the way, create a Swift container or a Nova compute node but not right away.  So you want to be able to know that, excepting internal failures or limits, that a request is likely to succeed.


More information about the OpenStack-dev mailing list