Code review comment for lp:~leonardr/lazr.restful/fix-media-type-misspelling

Revision history for this message
Leonard Richardson (leonardr) wrote :

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.

« Back to merge proposal