Skip to content

update: concatenate Arrays when target node is an array #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

paulRbr
Copy link
Contributor

@paulRbr paulRbr commented Dec 29, 2023

This is a suggestion to be able to update an array by concatenating
the given update array to any target array.

This is done only if target AND update are of array types.

An example overlay is provided as a unit test.

This is a suggestion to be able to update an array by concatenating
the given `update` array to any target array.

This is done only if target AND update are of `array` types.

An example overlay is provided as a unit test.
@lornajane
Copy link
Owner

Thanks for proposing this change. I think it's sensible and useful functionality, but it's covering something that isn't particularly clear in the overlays spec itself what the right behaviour is. We should probably try to clarify the intended behaviour before we merge a change to this library.

@philsturgeon
Copy link

Another similar conversation over here: OAI/Overlay-Specification#30

It would be good to really flesh out whats meant to happen with an array when its "updated", is it replaced, concatenated, merged (with overrides happening somehow), etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants