If you've hit this validation error:
INVALID_SCREEN_DATA: Expected the property 'items' to be of type boolean or object
You're not alone. This happens when you mistakenly assign a string value to the items property in your JSON schema.
Quick Fix
If you're setting the items property in an array schema, make sure it's an object or boolean, not a string. Here's the corrected version:
{
"type": "array",
"items": {
"type": "string"
},
"__example__": ["example item"]
}
The Problem
This is invalid:
{
"type": "array",
"items": "string",
"__example__": []
}
Although "string" feels intuitive, items expects either:
an object defining the schema for each item, or
false if you want to disallow items (rarely used).
The Solution
Wrap the type inside an object:
{
"type": "array",
"items": {
"type": "string"
},
"__example__": ["example item"]
}
Now the schema explicitly tells the renderer: "Each item in this array is a string." That’s exactly what it needs to validate and display your screen correctly.
Whenever you define an array in your screen schema, always pair it with a clear and valid items object. It prevents breakage and saves debugging time down the line.
For more troubleshooting insights related to WhatsApp Business API, check out heltar.com/blogs.