fix: enhance schema generation for image and file types to support multiple values #1023

This commit is contained in:
Elio Struyf
2026-04-07 15:43:57 +02:00
parent 0a8c27a6ba
commit a46b854827
+10 -2
View File
@@ -123,12 +123,20 @@ export class ContentTypeSchemaGenerator {
switch (field.type) {
case 'string':
case 'slug':
case 'image':
case 'file':
case 'customField':
schema.type = 'string';
break;
case 'image':
case 'file':
if (field.multiple) {
schema.type = 'array';
schema.items = { type: 'string' };
} else {
schema.type = 'string';
}
break;
case 'number':
schema.type = 'number';
if (field.numberOptions) {