Hide Forgot
Cloned from launchpad blueprint https://blueprints.launchpad.net/nova/+spec/nova-api-validation-fw. Description: Nova has many RESTful APIs, and not all API parameters are completely validated. We would like to propose an API validation framework to implement comprehensive validation. The benefits of this framework will be the followings: * Validate every API parameters. * Unify both message format and HTTP code of error response, if the same cause. ex) ".. is too short.", ".. is too long.", ".. is not integer." * Clarify the API parameter definitions. * Clean up codes by merging error handling methods. This framework target is Nova v3 API, because it is new and the API compatibility issues would not happen. On Havana release, Nova v3 API is experimental and the API will become generic in Icehouse. There are two options for common validation feature. The one is WSME validation, the other is JSONSchema validation. Through the Icehouse summit session(https://etherpad.openstack.org/p/icehouse-summit-nova-pecan-wsme), we have gotten a consensus that Nova v3 API will be moved to Pecan + JSONSchema validation. JSONSchema validation can work for both JSON parameters and XML parameter because * JSONSchema library validate againste dict data(not JSON data) * the validation is executed after the deserialization. Specification URL (additional information): None