From eae0e496425763b396a3207c6566c49127d0d52b Mon Sep 17 00:00:00 2001 From: Daniel Lautzenheiser Date: Mon, 17 Apr 2023 10:53:50 -0400 Subject: [PATCH] fix: schema issues --- packages/core/src/widgets/list/schema.ts | 14 +++++++++++--- packages/core/src/widgets/object/schema.ts | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/core/src/widgets/list/schema.ts b/packages/core/src/widgets/list/schema.ts index 4743f469..fd744b0e 100644 --- a/packages/core/src/widgets/list/schema.ts +++ b/packages/core/src/widgets/list/schema.ts @@ -5,10 +5,18 @@ export default { { type: 'boolean' }, { type: 'string' }, { type: 'number' }, + { type: 'object' }, { type: 'array', minItems: 1, - items: { oneOf: [{ type: 'boolean' }, { type: 'string' }, { type: 'number' }] }, + items: { + oneOf: [ + { type: 'boolean' }, + { type: 'string' }, + { type: 'number' }, + { type: 'object' }, + ], + }, }, ], }, @@ -16,12 +24,12 @@ export default { collapsed: { type: 'boolean' }, summary: { type: 'string' }, label_singular: { type: 'string' }, - fields: { type: 'object' }, + fields: { type: 'array', items: { type: 'object' } }, max: { type: 'number' }, min: { type: 'number' }, i18n: { type: 'boolean' }, add_to_top: { type: 'boolean' }, - types: { type: 'object' }, + types: { type: 'array', items: { type: 'object' } }, type_key: { type: 'string' }, }, }; diff --git a/packages/core/src/widgets/object/schema.ts b/packages/core/src/widgets/object/schema.ts index f735da01..39d86e3c 100644 --- a/packages/core/src/widgets/object/schema.ts +++ b/packages/core/src/widgets/object/schema.ts @@ -4,6 +4,6 @@ export default { collapsed: { type: 'boolean' }, summary: { type: 'string' }, i18n: { type: 'boolean' }, - fields: { type: 'object' }, + fields: { type: 'array', items: { type: 'object' } }, }, };