From 53cb65206916ee42223a85450ea53e428b9fb502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Bour=C3=A9?= Date: Thu, 17 Oct 2024 08:42:59 +0200 Subject: [PATCH] fix: log level validation (#643) --- src/__tests__/validation/__snapshots__/base.test.ts.snap | 2 +- src/validation.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/__tests__/validation/__snapshots__/base.test.ts.snap b/src/__tests__/validation/__snapshots__/base.test.ts.snap index b2b9d274..7afdb44d 100644 --- a/src/__tests__/validation/__snapshots__/base.test.ts.snap +++ b/src/__tests__/validation/__snapshots__/base.test.ts.snap @@ -30,7 +30,7 @@ exports[`Valdiation Domain Invalid should validate a useCloudFormation: not pres exports[`Valdiation Domain Invalid should validate a useCloudFormation: true, certificateArn or hostedZoneId is required 1`] = `"/domain: when using CloudFormation, you must provide either certificateArn or hostedZoneId."`; exports[`Valdiation Log Invalid should validate a Invalid 1`] = ` -"/logging/level: must be one of 'ALL', 'ERROR' or 'NONE' +"/logging/level: must be one of 'ALL', 'INFO', 'DEBUG', 'ERROR' or 'NONE' /logging/retentionInDays: must be integer /logging/excludeVerboseContent: must be boolean" `; diff --git a/src/validation.ts b/src/validation.ts index 4cc292e0..0a961928 100644 --- a/src/validation.ts +++ b/src/validation.ts @@ -801,8 +801,9 @@ export const appSyncSchema = { roleArn: { $ref: '#/definitions/stringOrIntrinsicFunction' }, level: { type: 'string', - enum: ['ALL', 'ERROR', 'NONE'], - errorMessage: "must be one of 'ALL', 'ERROR' or 'NONE'", + enum: ['ALL', 'INFO', 'DEBUG', 'ERROR', 'NONE'], + errorMessage: + "must be one of 'ALL', 'INFO', 'DEBUG', 'ERROR' or 'NONE'", }, retentionInDays: { type: 'integer' }, excludeVerboseContent: { type: 'boolean' },