[openstack-dev] [nova][api] Strict validation in query parameters

Alex Xu soulxu at gmail.com
Fri Jun 16 01:43:28 UTC 2017

We added new decorator 'query_schema' to support validate the query
parameters by JSON-Schema.

It provides more strict valiadation as below:
* set the 'additionalProperties=False' in the schema, it means that reject
any invalid query parameters and return HTTPBadRequest 400 to the user.
* use the marco function 'single_param' to declare the specific query
parameter only support single value. For example, the 'marker' parameters
for the pagination actually only one value is the valid. If the user
specific multiple values "marker=1&marker=2", the validation will return
400 to the user.

Currently there is patch related to this:

So my question is:
Are we all good with this strict validation in all the future microversion?

I didn't remember we explicit agreement this at somewhere, just want to
double check this is the direction everybody want to go.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20170616/a973c0da/attachment-0001.html>

More information about the OpenStack-dev mailing list