Render array of string

Hello,

I am trying to render array of strings, but result is “No applicable renderer found”. Could you help me how to solve this issue?

Data:

{
    "subcopy": {
        "enabled": false,
        "data": {
            "lines": ["Line1", "Line2"]
        }
    }
}

JSON Schema:

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "subcopy": {
            "type": "object",
            "properties": {
                "enabled": {
                    "type": "boolean"
                },
                "data": {
                    "type": "object",
                    "properties": {
                        "lines": {
                            "type": "array",
                            "items": [
                                {
                                    "type": "string"
                                }
                            ]
                        }
                    },
                    "required": ["lines"]
                }
            },
            "required": ["enabled", "data"]
        },
    }
}

UI Schema:

{
    "type": "VerticalLayout",
    "elements": [
        {
            "type": "Group",
            "label": "Subcopy",
            "elements": [
                {
                    "type": "Control",
                    "scope": "#/properties/subcopy/properties/enabled"
                },
                {
                    "type": "Group",
                    "label": "Data",
                    "rule": {
                        "effect": "HIDE",
                        "condition": {
                            "scope": "#/properties/subcopy/properties/enabled",
                            "schema": {
                                "const": false
                            }
                        }
                    },
                    "elements": [
                        {
                            "type": "Control",
                            "scope": "#/properties/subcopy/properties/data/properties/lines",
                            "options": {
                                "detail": "REGISTERED"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}

Hi @adam.cernohorsky, the problem here is that the off-the-shelf renderer sets don’t support item tuples. Therefore no renderer is found for this array control.

You can replace the item array with an object, i.e. instead of

"items": [
  {
    "type": "string"
  }
]

you can use

"items": {
  "type": "string"
}

Thank you for solution! This one works!