AttributeService API deviates from Saved Object client API #83133
Labels
Feature:Lens
impact:low
Addressing this issue will have a low level of impact on the quality/strength of our product.
Team:Visualizations
Visualization editors, elastic-charts and infrastructure
technical debt
Improvement of the software architecture and operational architecture
Saved Object client API places
attributes
andreferences
as siblings.AttributeService API places
references
as a child toattributes
.AttributeService API usage of references as a child to attributes deviates from what is expected by the saved object client and makes using the AttributeService API much harder then it should be.
I would recommend changing the AttributeService API so that
references
is passed in as a top level argument that is a sibling toattributes
so its more similar to saved object client API.Details
The wrapAttributes function is defined as
Consumers of the API put
references
innewAttributes
. For example, lens puts "reference" into "newAttributes" as part of runSave function.Then, in the depths of lens, weird stuff like below has to happen when working with the saved objects client. Its very confusing that
attributes
means different things in different APIs.cc @ThomThomson @flash1293
The text was updated successfully, but these errors were encountered: