mirror of https://github.com/openclaw/openclaw.git
fix(discovery): add missing domain to wideArea Zod config schema
The wideArea schema uses .strict() but was missing the domain field that is defined in WideAreaDiscoveryConfig type (types.gateway.ts:21) and used across gateway, CLI, and infrastructure code for unicast DNS-SD discovery. Users setting discovery.wideArea.domain in their config get a validation error. Add the field to the schema and a regression test.
This commit is contained in:
parent
e9b1e856a0
commit
05475629a8
|
|
@ -211,4 +211,17 @@ describe("config schema regressions", () => {
|
|||
|
||||
expect(res.ok).toBe(true);
|
||||
});
|
||||
|
||||
it("accepts discovery.wideArea.domain for unicast DNS-SD", () => {
|
||||
const res = validateConfigObject({
|
||||
discovery: {
|
||||
wideArea: {
|
||||
enabled: true,
|
||||
domain: "openclaw.internal",
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
expect(res.ok).toBe(true);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -596,6 +596,7 @@ export const OpenClawSchema = z
|
|||
wideArea: z
|
||||
.object({
|
||||
enabled: z.boolean().optional(),
|
||||
domain: z.string().optional(),
|
||||
})
|
||||
.strict()
|
||||
.optional(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue