Ken'ichi,

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 -

@validation.schema(request_body_schema=
                    remote_consoles_schema.get_vnc_console)

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 definitions.

        -Sean

--
Sean Dague
Samsung Research America
s...@dague.net / sean.da...@samsung.com
http://dague.net

_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to