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

Russell Bryant rbryant at redhat.com
Tue Jun 4 14:39:51 UTC 2013


On 06/04/2013 10:32 AM, Doug Hellmann wrote:
>     >>> 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!
> 
>     WSME does type checking and validation.  Doug, can you comment further?
> 
> 
> WSME does type conversion/checking. I typically implement validation in
> the model class constructor so it's right there inline and easy to find.

Ah, ok, I see where the line is now.  Thanks for the clarification.

If there's value in doing jsonschema validation on top of WSME, it would
be interesting to see a prototype to see what it would look like.

-- 
Russell Bryant



More information about the OpenStack-dev mailing list