Closed UweStolz closed 2 years ago
Hi!
In the failing example the last control points to #/properties/virtualCloudServerProperties/properties/vpcRam
but this property simply does not exist in the schema
at that location, therefore it can't render anything. In the schema it's part of the anyOf/if
chain at the root level, so it would be #/properties/vpcRam
.
My guess is that you want to move the anyOf/if
further in, e.g.
{
"type":"object",
"properties":{
"systemConfiguration":{
"title":"System Configuration(s)",
"type":"array",
"items":{
"type":"object",
"properties":{
"baInSystemDescription":{
"type":"string"
},
"baInOrderId":{
"type":"string"
},
"addVirtualCloudServer":{
"type":"boolean"
},
"virtualCloudServerProperties":{
"type":"object",
"anyOf":[
{
"if":{
"properties":{
"operatingSystem":{
"enum":[
"Win2022",
"Win2019",
"Win2016"
]
}
}
},
"then":{
"properties":{
"vpcRam":{
"type":"integer",
"minimum":4,
"maximum":96
}
}
},
"else":{
"properties":{
"vpcRam":{
"type":"integer",
"minimum":1,
"maximum":96
}
}
}
}
],
"properties":{
"serverDescription":{
"type":"string"
},
"orderId":{
"type":"string"
},
"cloud":{
"type":"string",
"enum":[
"VPC",
"Azure",
"AWS",
"GPC"
]
},
"cloudAccount":{
"type":"string"
},
"cloudRegion":{
"type":"string"
},
"plannedServerFunction":{
"type":"string",
"enum":[
"Other",
"Web Application",
"Oracle",
"SAP",
"MSSQL",
"Citrix",
"Domain Controller",
"SCOM Gateway",
"TSM Proxy"
]
},
"operatingSystem":{
"type":"string",
"enum":[
"Win2022",
"Win2019",
"Win2016",
"SLES15",
"SLES12",
"CENTOS7"
]
},
"domain":{
"type":"string"
},
"vpcVcpu":{
"type":"integer",
"minimum":1,
"maximum":20
},
"serverNetwork":{
"type":"string"
},
"serverPatchWindow":{
"type":"string",
"enum":[
"PW1MW2WED",
"PW1MW1THU",
"PW1MW2THU",
"PW1MW3THU",
"PW1MW1FRI",
"PW1MW2FRI",
"PW1MW1SAT",
"PW1MW2SUN",
"PW2MW1MON",
"PW2MW2MON",
"PW2MW1TUE",
"PW2MW2TUE",
"PW2MW3TUE",
"PW2MW1WED",
"PW2MW2WED",
"PW2MW1THU",
"PW2MW2THU",
"PW2MW2FRI",
"PW2MW1SUN"
]
},
"serverPatchIntervallLinux":{
"type":"string",
"enum":[
"03/09",
"06/12"
]
},
"serverPatchIntervallWindows":{
"type":"string",
"default":"1,2,3,4,5,6,7,8,9,10,11,12",
"readOnly":true
}
}
}
}
}
}
}
}
I hope this helps. For questions like this feel free to ask in the forum instead of opening an issue.
Describe the bug
I try to use
if
/then
/else
in a context withListWithDetail
but it seems that the input element doesn't render properly and I am unsure if this is a bug or the schemata is simply wrong. I provide a simple working example and a more complex one in an array context.Jsonforms version:
3.0.0-rc.0
Expected behavior
The input element should render and display if the input value is valid depending on the select "Operating System".
Steps to reproduce the issue
Screenshots
Working example:
Complex failing example:
See: https://react-ts-hdzzvs.stackblitz.io/
In which browser are you experiencing the issue?
Edge Version 104.0.1293.54, Chrome 104.0.5112.81
Framework
React
RendererSet
Material
Additional context
Schemata
Working example
Schema
UIschema
Failing example
Schema
UIschema