Merge lp:~leonardr/lazr.restful/fix-media-type-misspelling into lp:lazr.restful
Proposed by
Leonard Richardson
Status: | Merged |
---|---|
Approved by: | Gavin Panella |
Approved revision: | 90 |
Merged at revision: | not available |
Proposed branch: | lp:~leonardr/lazr.restful/fix-media-type-misspelling |
Merge into: | lp:lazr.restful |
Diff against target: |
330 lines 7 files modified
src/lazr/restful/NEWS.txt (+5/-0) src/lazr/restful/_bytestorage.py (+3/-3) src/lazr/restful/_resource.py (+14/-8) src/lazr/restful/example/base/tests/entry.txt (+14/-7) src/lazr/restful/example/base/tests/wadl.txt (+39/-10) src/lazr/restful/templates/wadl-root.pt (+3/-3) src/lazr/restful/version.txt (+1/-1) |
To merge this branch: | bzr merge lp:~leonardr/lazr.restful/fix-media-type-misspelling |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella | Approve | ||
Review via email: mp+13711@code.launchpad.net |
To post a comment you must log in.
This branch fixes bug 457146 by correcting a misspelling of the WADL media type.
The complication is that if we simply correct the misspelling, old versions of lazr.restfulclient will stop working (they'll be served JSON representations instead of WADL). So we need to treat old clients the same way we did before.
I changed all references to the old media type to the new media type, and all code that pivots on the old media type to operate on either the old or new media type. I was a little worried that my changes to the WADL template itself would break old versions of lazr.restfulclient, but a test with an actual old version showed that it didn't matter.
I added tests to wadl.txt that show how to get WADL representations using the misspelled media type. Just to make extra sure, I also ran the entire wadl.txt suite before correcting the misspelling, to make sure that all the old code still worked.