fix(ci): repair phone control and cron schema gates

This commit is contained in:
Vincent Koc
2026-06-01 03:25:20 +01:00
parent 6e985931de
commit 9dd7f04b71
2 changed files with 13 additions and 17 deletions
+12 -16
View File
@@ -477,22 +477,18 @@ describe("cron tool", () => {
expect(jobDelivery?.properties?.channel?.type).toBe("string");
expect(jobDelivery?.properties?.failureDestination?.anyOf).toBeUndefined();
expect(jobDelivery?.properties?.failureDestination?.type).toBe("object");
expect(patch?.properties?.agentId?.anyOf?.map((entry) => entry.type)).toEqual([
"string",
"null",
]);
expect(patch?.properties?.sessionKey?.anyOf?.map((entry) => entry.type)).toEqual([
"string",
"null",
]);
expect(payload?.properties?.toolsAllow?.anyOf?.map((entry) => entry.type)).toEqual([
"array",
"null",
]);
expect(delivery?.properties?.channel?.anyOf?.map((entry) => entry.type)).toEqual([
"string",
"null",
]);
expect(patch?.properties?.agentId?.anyOf).toBeUndefined();
expect(patch?.properties?.agentId?.type).toBe("string");
expect(patch?.properties?.agentId?.description).toContain("null to clear");
expect(patch?.properties?.sessionKey?.anyOf).toBeUndefined();
expect(patch?.properties?.sessionKey?.type).toBe("string");
expect(patch?.properties?.sessionKey?.description).toContain("null to clear");
expect(payload?.properties?.toolsAllow?.anyOf).toBeUndefined();
expect(payload?.properties?.toolsAllow?.type).toBe("array");
expect(payload?.properties?.toolsAllow?.description).toContain("null to clear");
expect(delivery?.properties?.channel?.anyOf).toBeUndefined();
expect(delivery?.properties?.channel?.type).toBe("string");
expect(delivery?.properties?.channel?.description).toContain("null to clear");
expect(delivery?.properties?.failureDestination?.anyOf?.map((entry) => entry.type)).toEqual([
"object",
"null",
+1 -1
View File
@@ -79,7 +79,7 @@ function nullableStringArraySchema(description: string) {
function deliveryStringSchema(params: { description: string; nullableClears: boolean }) {
return params.nullableClears
? nullableStringSchema(params.description)
? nullableStringSchema(`${params.description}, or null to clear`)
: Type.Optional(Type.String({ description: params.description }));
}