Hello,
I want to use patternProperties to auto increments arrays name (vm1 , vm2 …).
For this I’m trying to use this schema :
{
“type”: “object”,
“properties”: {
“vms_to_deploy”: {
“type”: “array”,
“items”: {
“type”: “object”,
“patternProperties”: {
“^(vm[0-9]+)$”: {
“type”: “object”,
“properties”: {
“dns”: {
“type”: “string”,
“format”: “ipv4”
},
“gateway”: {
“type”: “string”,
“format”: “ipv4”
},
“ipaddress”: {
“type”: “string”,
“format”: “ipv4”
},
“name”: {
“type”: “string”
},
“netmask”: {
“type”: “string”,
“format”: “ipv4”
},
“networks”: {
“type”: “array”,
“items”: {
“type”: “string”
}
},
“ovf”: {
“type”: “string”
}
},
“required”: [“dns”, “gateway”, “ipaddress”, “name”, “netmask”, “networks”, “ovf”],
“additionalProperties”: false
}
}
}
}
}
}
And this UI schema :
{
“type”: “VerticalLayout”,
“elements”: [
{
“type”: “Control”,
“scope”: “#/properties/vms_to_deploy”,
“options”: {
“detail”: {
“type”: “VerticalLayout”,
“elements”: [
{
“type”: “Control”,
“scope”: “#/properties/dns”
},
{
“type”: “Control”,
“scope”: “#/properties/gateway”
},
{
“type”: “Control”,
“scope”: “#/properties/ipaddress”
},
{
“type”: “Control”,
“scope”: “#/properties/name”
},
{
“type”: “Control”,
“scope”: “#/properties/netmask”
},
{
“type”: “Control”,
“scope”: “#/properties/networks”,
“options”: {
“elementLabelProp”: “network”
}
},
{
“type”: “Control”,
“scope”: “#/properties/ovf”
}
]
}
}
}
]
}
But that not work… Could you help me please ?
PatternProperties are support or not ? I’m using v3.3 on angular.
Best regards,
Valentin