{Validation error: Invalid json type, expected array of strings.}

I have…

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [ ] Bug report
  • [x] Performance issue
  • [ ] Documentation issue or request

Current behavior

I have a field schema definition. A reference field.

“name”: “Parent”,
“properties”: {
“isRequired”: false,
“isRequiredOnPublish”: false,
“isHalfWidth”: true,
“fieldType”: “References”,
“editor”: “Input”,
“inlineEditable”: false,
“isUnique”: false,
“contentType”: “Unspecified”,
“label”: “The Parent article”,
“hints”: “e.g., Parent article of related federal article”,
“schemaIds”: [
“isLocked”: false,
“isHidden”: false,
“isDisabled”: false,
“partitioning”: “invariant”

I have a coresponding model property for that field.

public class QuickReferenceToolComponent
    public IEnumerable<string> Parent { get; set; }

I’m assigning an ‘array of strings’ to this field.

squidexArticle.Tool = new QuickReferenceToolComponent
Parent = new List<string> { "<guid> or empty" }

On BulkUpdate

bulkResult = await articlesSquidexClient.BulkUpdateAsync(new BulkUpdate
Jobs = bulkUpdateJobs,
OptimizeValidation = false

bulkResult shows for all items:

“{Validation error: tool.iv.parent: Invalid json type, expected array of strings.}”

But I’m passing an array of strings.
Tried with
new string[] and JsonNull<IEnumerable<string>> and List<string>
And to annotate the model with [KeepCasing] and [JsonConverter(typeof(InvariantConverter))].

Expected behavior

Squidex doesn’t raise {Validation error: tool.iv.parent: Invalid json type, expected array of strings.}
when an array of strings if provided.

Minimal reproduction of the problem

Maybe should be a schema-1, and schema-2.
Schema-2 should have a reference field on schema-1 items, defined with fieldType: References and ditor: Input.

Sounds like general case, but why so strange validation error occurs.

Please use code blocks. It is super hard to read.

Mm, but I used, don’t I? Please give example of perfect formatting. I’m trying to be good.

Btw, just found a hint.
Validation error occurs, when the assigned list contains an empty string.
So should be or empty list, or a non empty string provided.
Testing second part.

I have described it in the first checkbox. Just normal code blocks. Not quote blocks.