additionalProperties creates wrong path

hi,

i have been playing around with the vuetify renderer and the additionalProperties feature (JSON Forms Vue 2 Vuetify example) and found the following problem.

in the following scheme, the data is saved in the wrong path.

{
  "type": "object",
  "properties": {
    "user": {
      "type": "object",
      "properties": {},
      "additionalProperties": {
        "type": "string"
      }
    }
  }
}

the result is:

{
  "user": {
    "name": {
      "name": "Ron"
    }
  }
}

The rendered path is “user.name.name” instead of “user.name”
It is apparently not possible to create additional properties in the “user” object. however, this problem does not occur in the “root”.

Hi,

I did some searching and found this place:

This creates a scope with “path/name”:

propUiSchema = {
  scope: "user/name"
  type: "Control"
}

Is that correct? Is this a special format for scope?

If I remove the “path”, just “scope:‘name’”, everything works as expected.

Hi @davewwww,

Yes, that is incorrect. We should have a very simple propSchema at this point of time and the propUiSchema should also be very simple. To be fair I would have expected the propSchema to just be something like type: 'string' and then the propUiSchema to have the scope #.

The control.value.path should come into play only later for the change handling, there we need to combine the path of the overall renderer with the one of the additionalProp.