Although I'm an employee I decided to post this on the forums for better visibility to other developers.
In trying to configure a complex property tree object, I found that either I'm doing something wrong, or this isn't supported.
You can spacify an object's structure in an array property using the "items" keyword in the component's JSON schema. For example, I can tell the property tree that it has a property called "data" whose elements consist of a number of properties as well as view params based on a view path like this:
{
"path": {
"format": "view-path",
"type": "string",
"default"; ""
},
"aList": {
"type": "array",
"items": {
"type": "string"
}
},
"data": {
"type": "array",
"description": "Some view instance data",
"items": {
"type": "object",
"properties": {
"aProp": {
"type": "string",
"dynamicSuggestions": "/aList/*"
}
},
"extension": { "view-params": { "path": "/path" } },
"additionalProperties": true
}
}
}
What I'd like to do is specify a property "data" whose keys are any string, and values are defined by a similar schema in the same manner we can define them for an array. This is what I tried, effectively just changing the type from "array" to "object" and changing "items" to "additionalProperties"
{
"path": {
"format": "view-path",
"type": "string",
"default"; ""
},
"aList": {
"type": "array",
"items": {
"type": "string"
}
},
"data": {
"type": "object",
"description": "Some view instance data",
"additionalProperties": {
"type": "object",
"properties": {
"aProp": {
"type": "string",
"dynamicSuggestions": "/aList/*"
}
},
"extension": { "view-params": { "path": "/path" } },
"additionalProperties": true
}
}
}
I've found that when I add an object with a prop that is supposed to have dynamic suggestions, they dont work. Similarly, the objects added to the "data" object don't give the option to sync params despite the extension being specified.
Am I doing something wrong, or is this feature not available for the designer property tree?