Open drodarie opened 2 months ago
there's a keys
kind of thing for $import
already, which can serve as a workaround. If you could source dive and clarify that mechanism here? :D should be:
$import:
ref: ...
keys: A, B, C
and then only the A, B and C key will be copied over.
You could rename that to include(_keys)
, exclude(_keys)
I should have put more description: if I want to import every key from a file but one, then I have to specify all the other key.
For instance, if I want to import every connectivity strategies from the connectivity
field but the key A
, I will have to list all the other keys from the connectivity
field.
connectivity:
$import:
ref: path/to/file#/connectivity
values:
- B
- C
- D
- ...
Now it does not matter if I want to override A
: I can import it and have it modified by a local field:
connectivity:
A:
...
$import:
ref: path/to/file#/
values:
- connectivity
But if I do not want A anymore, I do not think there is an alternative. With the exclude
field:
$import:
ref: path/to/file#/
values:
- connectivity
exclude:
- connectivity/A
yea I think a general solution would be:
$import:
ref: path/to/file#/
include:
- connectivity
- placement/B
exclude:
- connectivity/A
right? Where you have generic fine grained access to the nested keys you want to include and exclude?
I think the behaviour should be:
include
:
include
keys.exclude
: remove these keys from what has been include
d
As a user, I wish to be able to import a configuration content and specifying fields that I want to ignore / not import.