function adaptAdditionalRules(mergedSchema) {
	// skip enum validation if explicitly not restricted
	const { schema } = mergedSchema;
	if (mergedSchema.restricted === false) {
		if (schema.type === 'array' && schema.items && schema.items.enum) {
			return {
				...mergedSchema,
				schema: {
					...schema,
					items: {
						...schema.items,
						enum: undefined,
					},
				},
			};
		} else if (schema.enum) {
			return {
				...mergedSchema,
				schema: {
					...schema,
					enum: undefined,
				},
			};
		}
	}

	return mergedSchema;
}
/**
 * Adapt merged schema from jsfc with additional rules
 * @param mergedSchema The jsfc merged schema
 * @returns The adapted merged schema
 */
Adapt merged schema from jsfc with additional rules
@param mergedSchema The jsfc merged schema
@returns The adapted merged schema
Adapt merged schema from jsfc with additional rules @param mergedSchema The jsfc merged schema @returns The adapted merged schema
function adaptAdditionalRules(mergedSchema) {
	const { schema } = mergedSchema;
	if (mergedSchema.restricted === false) {
		if (schema.type === 'array' && schema.items && schema.items.enum) {
			return {
				...mergedSchema,
				schema: {
					...schema,
					items: {
						...schema.items,
						enum: undefined,
					},
				},
			};
		} else if (schema.enum) {
			return {
				...mergedSchema,
				schema: {
					...schema,
					enum: undefined,
				},
			};
		}
	}
	return mergedSchema;
}
function adaptAdditionalRules ( mergedSchema ) { const { schema } = mergedSchema ; if ( mergedSchema . restricted === false ) { if ( schema . type === 'array' && schema . items && schema . items . enum ) { return { ... mergedSchema , schema : { ... schema , items : { ... schema . items , enum : undefined , } , } , } ; } else if ( schema . enum ) { return { ... mergedSchema , schema : { ... schema , enum : undefined , } , } ; } } return mergedSchema ; }
Adapt merged schema from jsfc with additional rules
 @param mergedSchema The jsfc merged schema
 @returns The adapted merged schema
Adapt merged schema from jsfc with additional rules @param mergedSchema The jsfc merged schema @returns The adapted merged schema
// skip enum validation if explicitly not restricted