This should assist in transitioning from the deprecated location derivation without breaking (existing) Object Type API contracts.
Currently textfields are manually wired together, so you end up with a bunch of form variables that map to certain Objects API properties, e.g.:
postcode -> address.postcode
street -> address.streetName
Replacing this with an AddressNL component would instead create:
address -> address, but the nested keys inside may/will be mis-aligned
Because the form designer doesn't have any control over the nested keys, this would require them to update the objecttypes, which creates problems in other applications.
So, I'd propose that next to the mapping of form var -> target path, you can also specify some transformation for the value, so that you can rename the nested keys during registration to make this align properly.
This should in theory also enable us to transition from deprecated -> new in an automated, backwards compatible way, or at least build some tooling to assist in this.
Sparked by https://github.com/open-formulieren/open-forms/issues/3993#issuecomment-2178591720
This should assist in transitioning from the deprecated location derivation without breaking (existing) Object Type API contracts.
Currently textfields are manually wired together, so you end up with a bunch of form variables that map to certain Objects API properties, e.g.:
postcode
->address.postcode
street
->address.streetName
Replacing this with an AddressNL component would instead create:
address
->address
, but the nested keys inside may/will be mis-alignedBecause the form designer doesn't have any control over the nested keys, this would require them to update the objecttypes, which creates problems in other applications.
So, I'd propose that next to the mapping of form var -> target path, you can also specify some transformation for the value, so that you can rename the nested keys during registration to make this align properly.
This should in theory also enable us to transition from deprecated -> new in an automated, backwards compatible way, or at least build some tooling to assist in this.