How can I show some properties of an array which contains anyOf?

Hi, I am trying to write uischema. I have an array which includes anyof and I need to show only some properties in the array. For example, x and y exist in the array. I will show only x. I write below uischema but I got subschema findIndex error and it’s related to usage of anyOf. How can I write it?

“properties”: {
“XType”: {
“type”: “object”,
“properties”: {
“test”: {
“type”: “array”,
“items”: {
“anyOf”: [
{"$ref": “#/definitions/AType”},
{"$ref": “#/definitions/BType”},
{"$ref": “#/definitions/CType”}
]
},
“minItems”: 0
}
}
}
}

“definitions”: {
“AType”: {
“type”: “object”,

  "allOf": [
    {
      "$ref": "#/definitions/DType"
    },
    {
      "type": "object",
      "properties": {
        "x": {
          "type": "string"
        },
        "y": {
          "type": "integer"
        }
      }
    }
  ]
}

}

uischema
“type”: “VerticalLayout”,
“elements”: [
{
“type”: “Group”,
“label”: “Test”,
“elements”: [
{
“type”: “Control”,
“scope”: “#/properties/XType/properties/test”
“options”: {
“detail”: {
“type”: “VerticalLayout”,
“elements”: [
{
“type”: “Control”,
“scope”: “#/properties/x”
}
]
}
}
}
]
}
},

[original thread by gizsar]

Hi @gizsar(gizsar), thank you for your interest in JSON Forms! Scopes can also just include combinators like usual. So your scope could for example be: #/anyOf/0/allOf/1/properties/x.

However we have some magic resolving in there which should allow you to skip the anyOf/ and allOf/ parts in the scope, so in theory I would have expected your uischema to work when you are using the latest stable release of the React Material renderer set.

Which renderer set and which version of JSON Forms are you using?

It could be that the problem is related to it being a detail ui schema. Can you also test your case outside of an array and see whether it works then?