From 491c76952bc4b208119c9ea29c74422abe83756e Mon Sep 17 00:00:00 2001 From: Nicolas Moreau Date: Mon, 31 Jul 2023 14:47:47 +0200 Subject: [PATCH] chore: document library need --- .../src/decorators/validation/action.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/datasource-customizer/src/decorators/validation/action.ts b/packages/datasource-customizer/src/decorators/validation/action.ts index 383a49b6d6..2fc6a1f05e 100644 --- a/packages/datasource-customizer/src/decorators/validation/action.ts +++ b/packages/datasource-customizer/src/decorators/validation/action.ts @@ -10,8 +10,10 @@ import { ActionDefinition, actionSchema } from '../actions/types/actions'; import { DynamicField, fieldActionSchema } from '../actions/types/fields'; const ajv = new Ajv({ allErrors: true }); -ajvErrors(ajv); -ajvKeywords(ajv); +ajvErrors(ajv); // NOTICE: this library adds support for custom invalidity error messages. +// ex: errorMessage: 'should either by an array of string or a function' ; +ajvKeywords(ajv); // NOTICE: this library adds support for 'typeof' validation keyword, which allows +// to test if the objects passed are functions (ex: {typeof: 'function'}) export default class ActionValidator { static validateActionConfiguration(name: string, action: ActionDefinition) {