From fe6af1986fe522713753e2bf4217e43ed201a186 Mon Sep 17 00:00:00 2001 From: Shawn Erquhart Date: Wed, 21 Nov 2018 22:32:50 -0500 Subject: [PATCH] fix(config): remove identifier field validation (#1882) --- .../src/constants/configSchema.js | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/packages/netlify-cms-core/src/constants/configSchema.js b/packages/netlify-cms-core/src/constants/configSchema.js index 6c719bfa..62cf0461 100644 --- a/packages/netlify-cms-core/src/constants/configSchema.js +++ b/packages/netlify-cms-core/src/constants/configSchema.js @@ -1,7 +1,6 @@ import AJV from 'ajv'; import ajvErrors from 'ajv-errors'; import { formatExtensions, frontmatterFormats, extensionFormatters } from 'Formats/formats'; -import { IDENTIFIER_FIELDS } from 'Constants/fieldInference'; /** * Config for fields in both file and folder collections. @@ -119,20 +118,6 @@ const getConfigSchema = () => ({ }, required: ['format'], }, - folder: { - errorMessage: { - _: 'must have a field that is a valid entry identifier', - }, - properties: { - fields: { - contains: { - properties: { - name: { enum: [{ $data: '3/identifier_field' }, ...IDENTIFIER_FIELDS] }, - }, - }, - }, - }, - }, }, }, }, @@ -170,7 +155,7 @@ class ConfigError extends Error { * the config that is passed in. */ export function validateConfig(config) { - const ajv = new AJV({ allErrors: true, jsonPointers: true, $data: true }); + const ajv = new AJV({ allErrors: true }); ajvErrors(ajv); const valid = ajv.validate(getConfigSchema(), config);