Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: log level validation #643

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading