diff --git a/schema.json b/schema.json index 2615fef..6afe2c1 100644 --- a/schema.json +++ b/schema.json @@ -54,6 +54,7 @@ { "schema": { "type": "string", + "nullable": true, "description": "Fully-qualified hostname to update, for example nas.example.com." }, "required": false, @@ -64,6 +65,7 @@ { "schema": { "type": "string", + "nullable": true, "description": "Client-supplied IPv4 or IPv6 address. Invalid values are ignored in favor of CF-Connecting-IP." }, "required": false, @@ -74,6 +76,7 @@ { "schema": { "type": "string", + "nullable": true, "description": "Unused by this worker, but included for Synology DynDNS2 compatibility." }, "required": false, @@ -84,6 +87,7 @@ { "schema": { "type": "string", + "nullable": true, "description": "Shared secret used to authenticate the update request." }, "required": false, diff --git a/src/endpoints/synology.ts b/src/endpoints/synology.ts index f9f433e..8fbcc6b 100644 --- a/src/endpoints/synology.ts +++ b/src/endpoints/synology.ts @@ -24,17 +24,17 @@ import { z } from "zod"; const SynologyQuery = z.object({ hostname: z .string() - .optional() + .nullish() .describe("Fully-qualified hostname to update, for example nas.example.com."), myip: z .string() - .optional() + .nullish() .describe("Client-supplied IPv4 or IPv6 address. Invalid values are ignored in favor of CF-Connecting-IP."), username: z .string() - .optional() + .nullish() .describe("Unused by this worker, but included for Synology DynDNS2 compatibility."), - password: z.string().optional().describe("Shared secret used to authenticate the update request."), + password: z.string().nullish().describe("Shared secret used to authenticate the update request."), }); /**