From 290d708b12df0fa6c9f87122f83841550f6bc65a Mon Sep 17 00:00:00 2001 From: Daniel Lautzenheiser Date: Mon, 17 Apr 2023 14:17:15 -0400 Subject: [PATCH] Allow extra config options, simply ignore them --- packages/core/src/constants/configSchema.tsx | 19 ------------------- packages/core/src/widgets/file/schema.ts | 1 - packages/core/src/widgets/image/schema.ts | 1 - packages/core/src/widgets/markdown/schema.ts | 1 - 4 files changed, 22 deletions(-) diff --git a/packages/core/src/constants/configSchema.tsx b/packages/core/src/constants/configSchema.tsx index 6abe6840..630f68bb 100644 --- a/packages/core/src/constants/configSchema.tsx +++ b/packages/core/src/constants/configSchema.tsx @@ -119,7 +119,6 @@ const viewFilters = { ], }, }, - additionalProperties: false, required: ['label', 'field', 'pattern'], }, }; @@ -134,7 +133,6 @@ const viewGroups = { field: { type: 'string' }, pattern: { type: 'string' }, }, - additionalProperties: false, required: ['label', 'field'], }, }; @@ -183,11 +181,9 @@ function getConfigSchema() { uploadMedia: { type: 'string' }, deleteMedia: { type: 'string' }, }, - additionalProperties: false, }, }, required: ['name'], - additionalProperties: false, }, collections: { type: 'array', @@ -213,7 +209,6 @@ function getConfigSchema() { field: { type: 'string' }, }, required: ['value', 'field'], - additionalProperties: false, }, label_singular: { type: 'string' }, label: { type: 'string' }, @@ -231,7 +226,6 @@ function getConfigSchema() { }, }, required: ['field'], - additionalProperties: false, }, fields: { type: 'array', @@ -241,7 +235,6 @@ function getConfigSchema() { }, }, required: ['fields'], - additionalProperties: false, }, view_filters: viewFilters, view_groups: viewGroups, @@ -253,7 +246,6 @@ function getConfigSchema() { preview: { type: 'boolean' }, frame: { type: 'boolean' }, }, - additionalProperties: false, }, identifier_field: { type: 'string' }, path: { type: 'string' }, @@ -276,7 +268,6 @@ function getConfigSchema() { max_file_size: { type: 'number' }, folder_support: { type: 'boolean' }, }, - additionalProperties: false, }, folder: { type: 'string' }, fields: fieldsConfig(), @@ -294,11 +285,9 @@ function getConfigSchema() { index_file: { type: 'string' }, }, required: ['index_file'], - additionalProperties: false, }, }, required: ['depth'], - additionalProperties: false, }, files: { type: 'array', @@ -320,7 +309,6 @@ function getConfigSchema() { max_file_size: { type: 'number' }, folder_support: { type: 'boolean' }, }, - additionalProperties: false, }, i18n: i18nCollection, editor: { @@ -329,11 +317,9 @@ function getConfigSchema() { preview: { type: 'boolean' }, frame: { type: 'boolean' }, }, - additionalProperties: false, }, }, required: ['name', 'label', 'file', 'fields'], - additionalProperties: false, }, uniqueItemProperties: ['name'], }, @@ -376,7 +362,6 @@ function getConfigSchema() { max_file_size: { type: 'number' }, folder_support: { type: 'boolean' }, }, - additionalProperties: false, }, load_config_file: { type: 'boolean' }, slug: { @@ -386,7 +371,6 @@ function getConfigSchema() { clean_accents: { type: 'boolean' }, sanitize_replacement: { type: 'string' }, }, - additionalProperties: false, }, i18n: i18nRoot, local_backend: { @@ -401,7 +385,6 @@ function getConfigSchema() { items: { type: 'string' }, }, }, - additionalProperties: false, }, ], }, @@ -411,12 +394,10 @@ function getConfigSchema() { preview: { type: 'boolean' }, frame: { type: 'boolean' }, }, - additionalProperties: false, }, search: { type: 'string' }, }, required: ['backend', 'collections', 'media_folder'], - additionalProperties: false, }; } diff --git a/packages/core/src/widgets/file/schema.ts b/packages/core/src/widgets/file/schema.ts index 83f35912..4269a839 100644 --- a/packages/core/src/widgets/file/schema.ts +++ b/packages/core/src/widgets/file/schema.ts @@ -22,7 +22,6 @@ export default { max_file_size: { type: 'number' }, folder_support: { type: 'boolean' }, }, - additionalProperties: false, }, }, }; diff --git a/packages/core/src/widgets/image/schema.ts b/packages/core/src/widgets/image/schema.ts index 83f35912..4269a839 100644 --- a/packages/core/src/widgets/image/schema.ts +++ b/packages/core/src/widgets/image/schema.ts @@ -22,7 +22,6 @@ export default { max_file_size: { type: 'number' }, folder_support: { type: 'boolean' }, }, - additionalProperties: false, }, }, }; diff --git a/packages/core/src/widgets/markdown/schema.ts b/packages/core/src/widgets/markdown/schema.ts index 933c6598..b9e1e9c7 100644 --- a/packages/core/src/widgets/markdown/schema.ts +++ b/packages/core/src/widgets/markdown/schema.ts @@ -11,7 +11,6 @@ export default { max_file_size: { type: 'number' }, folder_support: { type: 'boolean' }, }, - additionalProperties: false, }, }, };