How do you render an array of primitives?

I’m not sure if my JSON schema is wrong or my UI schema is off but I cannot figure out why how to make a form that accepts just an array of strings.


If I don’t include "detail" : "GENERATED" then no control shows at all.
From my json schema I have

  "filenames": {
      "type": "array",
      "items": [
        {
          "type": "string"
        }
      ]
    }

and my ui schema use for the screen grab is:

 {
      "type": "Control",
      "scope": "#/properties/filenames",
      "options": {
        "detail" : "GENERATED"
      }
    }

any suggestion where I can look to fix this?

In your example, you have coded items as an array. My understanding is that the syntax for items in the JSON Schema is an object that describes the schema of ALL the items in the data.

Maybe try the following and let’s see what happens:

"filenames": {
  "type": "array",
  "items": {
    "type": "string"
  }
}

Hi @JefStat,

@kolban-google is right. At the moment we only support the object variant of items with the “off-the-shelf” renderer sets. So you either need to switch to that or implement a custom renderer which is able to handle items arrays.

Thanks! The malformed schema was what I wanted to fix here.