I have…
- [ ] Read the following guideline: https://docs.squidex.io/01-getting-started/installation/troubleshooting-and-support. I understand that my support request might get deleted if I do not follow the guideline.
- [x] Used code blocks with ``` to format my code examples like JSON or logs properly.
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”: [
“<<schema.articles>>”
]
},
“isLocked”: false,
“isHidden”: false,
“isDisabled”: false,
“partitioning”: “invariant”
}
I have a coresponding model property for that field.
[KeepCasing] 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.