Merge lp:~leonardr/lazr.restful/multiversion-destructors into lp:lazr.restful
Proposed by
Leonard Richardson
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~leonardr/lazr.restful/multiversion-destructors |
Merge into: | lp:lazr.restful |
Diff against target: |
227 lines (+94/-29) 2 files modified
src/lazr/restful/declarations.py (+37/-23) src/lazr/restful/docs/webservice-declarations.txt (+57/-6) |
To merge this branch: | bzr merge lp:~leonardr/lazr.restful/multiversion-destructors |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paul Hummer (community) | code | Approve | |
Review via email: mp+18643@code.launchpad.net |
To post a comment you must log in.
This branch adds multi-version error checking for destructor methods. A destructor method cannot have any arguments that are not fixed to specific values. The previous code was not version-aware, so it was only checking for the most recent version of the web service. In this branch I check every version in which the destructor method is published.
I also defined a tiny helper method, _version_name, which takes care of this logic which I was putting all over the place when printing out error messages:
if version is None:
version = "(earliest version)"