[openstack-dev] [nova] api schema validation pattern changes
sean at dague.net
Sun Jan 12 13:13:15 UTC 2014
I've been going through a bunch of the API validation reviews, and while
the specifics are fine, there are some overarching style patterns that I
think we might want to change.
First, the decorator -
The decorator only takes 1 parameter, so calling it by name seems
excessive, especially as it forces a line break.
Second, the module names:
We've already got schemas in the path, I don't think we need the module
to also be _schema.py. If we are running into name space conflicts on
import, just import as an alias. I think this will also tighten up the code.
Last, is a question, is it possible to currently run the full API an
build a json schema for it all? Or to query these validating schemas? We
*really* want that over in tempest, so we can completely drop the manual
creation of negative testing, and just fuzz known bad against the schema
Samsung Research America
sean at dague.net / sean.dague at samsung.com
More information about the OpenStack-dev