Bytes fields in named operations are depicted in WADL as links to hosted files, not just binary data fields
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lazr.restful |
Triaged
|
Low
|
Unassigned |
Bug Description
To fix bug 353805 I made lazr.restful describe binary fields in WADL as 'type="binary"', so that lazr.restfulclient would know not to run values for those fields through simplejson.dumps(). lazr.restfulclient is doing its job, but lazr.restful is not, at least not in real life. Launchpad's WADL includes the following:
<wadl:param style="query" required="true" name="data">
<wadl:link resource_type="https:/
</wadl:param>
That's the 'data' parameter to the named operation Bug.addAttachment. It should just have a 'type="binary"', but instead it's being depicted as a link to a hosted file. That's what I'd expect for a Bytes field that was published as part of an entry (such as a user's mugshot), but now what I'd expect from a named operation.
This exact case isn't tested in the existing lazr.restful trunk, but it's easy to add a test and the test shows the behavior I'd expect. Fields that would be considered "binary" in the lazr.restful web service are said to be links to external resources when they're on Launchpad.
I don't know why this is, but I think it might have something to do with the Launchpad librarian.
Changed in lazr.restful: | |
importance: | Undecided → Low |
status: | New → Triaged |
trying to trigger bug 423880