fix(config): remove identifier field validation (#1882)
This commit is contained in:
parent
6de47cdc56
commit
fe6af1986f
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user