Open tariqksoliman opened 2 months ago
Thanks @tariqksoliman !
Just last week, we made some optimization of the opensearch request builder that are conflicting with your code. Do you mind to pull the latest develop
branch and rebase it in your branch ? Let me know if you have questions on that.
@tariqksoliman we can talk more about this offline at the next IMG - EN tag-up, but for an operational deployment to enable supporting this at scale across the PDS, we will need to refactor this to use Product_Service, e.g. this one for analyst's notebook. I thought I documented this in the ticket, but looks like this was just an offline discussion at our last meeting. Thanks for the PR!
@tloubrieu-jpl As request, I've moved cross-links.json into /service/src/main/resources
.
Switching this PR to draft for the time being until we are able to get this into a more production-ready state
Staging
🗒️ Summary
/products/{lidvid}/tools
lidvid -> tool
mappings. Located at/service/cross-links.json
CrossLinksLoader.java
file to load that file on startCrossLinks.java
file to represent that json file and perform the mapping logicproductCrossLinks()
method toProductsController.java
CrossLinks
to get all tool cross-links.⚙️ Test Data and/or Report
Sample curls:
Explanation of cross-links.json
Sample:
injectableParams
: Doesn't nothing but indicate with params can be set in a tool's"base"
url.tools
name
: tool name that just gets passed to the responsebase
: Base template url to deep link to the given lidvid product in the tool.injectableParams
can be templated by wrapping it in curly brackets:{injectableVariable}
description
: tool description that just gets passed to the responsealiases
: Sometimes tools have slightly different names for things. If a tool requires "m20" in their url, aliases allows such mapping.acceptOnly
: Leave as empty array to accept all, otherwise if a lidvid's field's value does not match what's configured here, the tool entry will not show in the response.acceptOnly
s are ANDed together. "match" supports java regexesreject
: Leave as empty array to not specify any rejections. Otherwise if any lidvid's field matches a reject case, the tool entry will not show up in the response. "match" supports java regexes♻️ Related Issues
Fixes #472
Note: This is my first PR and first time using Java in over a decade so please review this with extra caution.