I am using the Materail React renderer set, I am not using a UI Schema, just data schema. The data Schema has a property that looks like this:
"inputModelFiles": {
"oneOf": [
{
"title": "Isotropic",
"type": "object",
"properties": {
"anisotropyType": {
"const": "isotropic"
},
"vp": {
"type": "string",
"format": "uri"
}
},
"required": [
"anisotropyType",
"vp"
]
},
{
"title": "TTI",
"type": "object",
"properties": {
"anisotropyType": {
"const": "tti"
},
"vp": {
"type": "string",
"format": "uri"
},
"epsilon": {
"type": "string",
"format": "uri"
}
}
"required": [
"anisotropyType",
"vp",
"epsilon"
]
}
]
}
The UI is rendered correctly with 2 tabs, first tab has one text box called vp, the second has 2 text box one called vp on called epsilon.
The anisotropicType property which is a constant is not rendered which is not a problem as it is redundant with title.
The issue is that the data generated does not include the anisotropicType, which should be set to “isotropic” or “tti” based on which tab you filled in, and the json generated is not compliant with the schema.
Do I need a custom renderer for that? Any guidance on how to create one would be greatly appreciated as I am new to JsonForm.
Thanks!
Cyril