mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(ci): repair phone control and cron schema gates
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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 }));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user