Merge lp:~leonardr/lazr.restful/web-link into lp:lazr.restful
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Tim Penhey | ||||
Approved revision: | 164 | ||||
Merged at revision: | 169 | ||||
Proposed branch: | lp:~leonardr/lazr.restful/web-link | ||||
Merge into: | lp:lazr.restful | ||||
Diff against target: |
339 lines (+145/-34) 6 files modified
src/lazr/restful/_resource.py (+20/-13) src/lazr/restful/docs/webservice.txt (+25/-10) src/lazr/restful/publisher.py (+1/-1) src/lazr/restful/tales.py (+4/-0) src/lazr/restful/templates/wadl-root.pt (+7/-0) src/lazr/restful/tests/test_webservice.py (+88/-10) |
||||
To merge this branch: | bzr merge lp:~leonardr/lazr.restful/web-link | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tim Penhey (community) | Approve | ||
Review via email:
|
Description of the change
This branch fixes numerous errors and oversights in my initial implementation of the web_link parameter, which caused test failures and other problems as I integrated web_link into Launchpad.
1. If you send a PUT or PATCH request that mentions web_link, you'll get an error if and only if you tried to _change_ the web_link.
2. I created a property 'publish_web_link' in the entry adapter utility which is used consistently when deciding whether or not a given entry type supports web_link.
3. I fixed a bug in browser_
4. I added a 'web_link' <param> tag to the WADL definition of every resource type that publishes web_link. This will tell lazr.restfulclient about the web links, so they can actually be used.
> if self.adapter_ utility. publish_ web_link: inatingRequest( self.request)
> # Objects in the web service correspond to pages on some website.
> # Provide the link to the corresponding page on the website.
> browser_request = IWebBrowserOrig
Can we be sure here that there is an adapter for request to a inatingRequest?
IWebBrowserOrig
I'm pretty sure that you can rewrite: web_service_ request, IWebBrowserOrig inatingRequest) iginatingReques t(web_service_ request, None)
queryAdapter(
as
IWebBrowserOr
Not sure if you think this is better or not.