Skip to content

Commit

Permalink
fix: log level validation (sid88in#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
bboure authored and DoyleBrendan committed Oct 21, 2024
1 parent 041f64b commit eae3122
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/__tests__/validation/__snapshots__/base.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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"
`;
Expand Down
5 changes: 3 additions & 2 deletions src/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand Down

0 comments on commit eae3122

Please sign in to comment.