[openstack-dev] [Keystone] Use JSON Schemas to validate API requests data
Monty Taylor
mordred at inaugust.com
Mon Jun 3 18:38:48 UTC 2013
On 06/03/2013 02:14 PM, Jarret Raim wrote:
> On 6/3/13 10:24 AM, "Russell Bryant" <rbryant at redhat.com> wrote:
>
>
>> On 06/02/2013 11:09 AM, Jarret Raim wrote:
>>> Both the Barbican (Key Management) and Meniscus (Logging) projects are
>>> moving down the path of using jsonschema for message validation.
>>
>> But please take a look at WSME. We've deprecated the home grown wsgi
>> code in Oslo. Instead, we're encouraging all projects to adopt similar
>> tooling (pecan and WSME) when developing new APIs.
>
> We aren't using the oslo stuff, we've been using Falcon up until now. It
> seems to me like there still isn't much consensus on the common wsgi
> question. There seem to be quite a few projects who aren't going to use it
> or can't use it for some reason. I'm just pulling from memory so let me
> know if I've got the wrong impression. Do we have a list of which projects
> are currently using Pecan? And which ones are planning on migrating?
I don't get the same impression. The consensus is that we're going to
move to Pecan/WSME as projects need to write an API, but we were not
going to both re-writing old API code just for the fun of it.
Off the top of my head, I believe that in addition to ceilometer and
ironic are both using pecan, and someone else was talking about it for
their next api rev - but I honestly don't remember.
At the very least I believe it was as decided as anything is around here
that we'd start using pecan/WSME for new things.
>> If there are things lacking in WSME, it would be good to know so that it
>> can be improved.
>
> From a quick look at WSME, it seems like you still need to write
> validation code (obviously) so using JSON schema to perform that
> validation seems like something that could co-exist with WSME's strongly
> typed request / responses. Fair?
That sounds completely sensible to me!
More information about the OpenStack-dev
mailing list