launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #31536
[Merge] ~jugmac00/launchpad:expose-findbyowner-via-api into launchpad:master
Jürgen Gmach has proposed merging ~jugmac00/launchpad:expose-findbyowner-via-api into launchpad:master.
Commit message:
Expose RockRecipeSet.findByOwner via API
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~jugmac00/launchpad/+git/launchpad/+merge/473762
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~jugmac00/launchpad:expose-findbyowner-via-api into launchpad:master.
diff --git a/lib/lp/rocks/interfaces/rockrecipe.py b/lib/lp/rocks/interfaces/rockrecipe.py
index fa8efa9..4f1f677 100644
--- a/lib/lp/rocks/interfaces/rockrecipe.py
+++ b/lib/lp/rocks/interfaces/rockrecipe.py
@@ -44,6 +44,7 @@ from lazr.restful.declarations import (
exported_as_webservice_entry,
operation_for_version,
operation_parameters,
+ operation_returns_collection_of,
operation_returns_entry,
)
from lazr.restful.fields import CollectionField, Reference, ReferenceChoice
@@ -862,6 +863,12 @@ class IRockRecipeSet(Interface):
cannot be parsed.
"""
+ @operation_parameters(
+ owner=Reference(IPerson, title=_("Owner"), required=True)
+ )
+ @operation_returns_collection_of(IRockRecipe)
+ @export_read_operation()
+ @operation_for_version("devel")
def findByOwner(owner):
"""Return all rock recipes with the given `owner`."""