Skip to content

Commit 6ccb5e9

Browse files
update schemas to match expected (#12520)
Co-authored-by: Banks Nussman <[email protected]>
1 parent 7c80c1b commit 6ccb5e9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packages/validation/src/cloudpulse.schema.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,7 @@ export const createAlertDefinitionSchema = object({
7878
tags: array().of(string().defined()).optional(),
7979
entity_ids: array().of(string().defined()).optional(),
8080
regions: array().of(string().defined()).optional(),
81-
scope: string()
82-
.oneOf(['entity', 'region', 'account'])
83-
.defined()
84-
.required(fieldErrorMessage),
81+
scope: string().oneOf(['entity', 'region', 'account']).nullable().optional(),
8582
});
8683

8784
export const editAlertDefinitionSchema = object({
@@ -125,6 +122,6 @@ export const editAlertDefinitionSchema = object({
125122
status: string()
126123
.oneOf(['enabled', 'disabled', 'in progress', 'failed'])
127124
.optional(),
128-
scope: string().oneOf(['entity', 'region', 'account']).required(),
125+
scope: string().oneOf(['entity', 'region', 'account']).nullable().optional(),
129126
regions: array().of(string().defined()).optional(),
130127
});

0 commit comments

Comments
 (0)