Closed colleenXu closed 2 years ago
The first API that we want to do this with is text-mining targeted association api: 978fe380a147a8641caf72320862697b . I'll update this post when I get the updated Smartapi yaml for this api out (that has the edge-attributes)
@marcodarko The SmartAPI yaml for text-mining targeted association api (978fe380a147a8641caf72320862697b) is updated. The response mapping is here
I suggest testing by querying this API directly and thru BTE: https://pending.biothings.io/text_mining_targeted_association and http://localhost:3000/v1/smartapi/978fe380a147a8641caf72320862697b/query
Right now, BTE is treating the response-mapping with "edge-attributes" as just another single edge attribute.
Instead, BTE should replace the edge attributes array with the array that comes from the "edge-attributes" response-mapping field...
Then, BTE has to keep the behavior of adding its own provenance edge-attribute to that array...(the first object of the example above).
Update: the linked PRs seem to provide the expected behavior.
Note that the ARAX UI does not correctly display nested attributes:
It also seems that BTE is not providing full-capacity to these endpoints (aka not running ID resolution on output IDs). I'll open another ticket to discuss this...[EDIT: other ticket is here #318]
close once it's confirmed that this is on prod...
Closing. Can use the queries from here https://github.com/biothings/BioThings_Explorer_TRAPI/issues/241#issuecomment-940375780 and look at the edges to see that we are ingesting their attributes as-intended
I'll add details as they emerge.
We plan to update some APIs so that their x-bte-response-mapping has something like this:
edge-attributes: association.edge_attributes
In this situation where the key is "edge-attributes", we want to ingest everything under it (it should be an array of objects), PRSERVE it, and put it as the edge's attributes. Then BTE should continue to add its own source provenance edge attribute as well.
It is similar to the behavior of provenance situation A, which was previously addressed by Eric Zhou.