[MGNLRESTUI-9] Findbar Search-results-supplier: Use a REST Client Created: 14/Feb/19  Updated: 24/Jan/20  Resolved: 27/Sep/19

Status: Closed
Project: Magnolia REST Client UI
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0

Type: Story Priority: Neutral
Reporter: Christopher Zimmermann Assignee: Jorge Franco
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split to MGNLPER-114 Testing orchestration of search results Closed
Relates
relates to MGNLPER-119 Deprecate or remove RestSearchResultS... Closed
relates to MGNLPER-127 Add filter to include/exclude externa... Closed
causality
is causing MGNLRESTCL-109 DOC: REST content can be aggregated a... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Release notes required:
Yes
Documentation update required:
Yes
Date of First Response:
Epic Link: Easy Outbound REST
Sprint: Declarative REST 6, Declarative REST 7
Story Points: 8

 Description   

As a developer, I want to use a REST Client for a Findbar Search-results-supplier, so that I don't have to configure the same REST config in multiple places.

Acceptance Criteria:

  • FindBar Search Results display external content.
  • Specify the REST Client to use via configuration and light development.


 Comments   
Comment by Mikaël Geljić [ 10/Sep/19 ]

see RestSearchResultSupplier: similar impl may be provided by rest-client module or ui-framework-rest, with awareness of the new rest-client API

Comment by Jorge Franco [ 17/Sep/19 ]

I have used this example to check my implementation:

Result supplier definition:

class: info.magnolia.restcontentapp.periscope.RestClientResultSupplierDefinition
restClient: bitbucket
restCall: searchTitleIssues
titleJsonPath: $.values[*].title
urlJsonPath: $.values[*].links.html.href
contentJsonPath: $.values[*].content.raw
dateJsonPath: $.values[*].updated_on
enabled: false

And rest client definition:

baseUrl: https://api.bitbucket.org
restCalls:
  searchTitleIssues:
    method: get
    entityClass: com.fasterxml.jackson.databind.JsonNode
    path: /2.0/repositories/pypy/pypy/issues
    queryParameters: {q: "title~\"{query}\""}
Generated at Mon Feb 12 06:50:58 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.