From 58cfc4357e859cfe6d803828f8a15f7056bf7d50 Mon Sep 17 00:00:00 2001 From: reluc Date: Thu, 19 Mar 2026 11:23:42 +0100 Subject: [PATCH] fix(cli): update servient json schema with dataMapping property --- packages/cli/src/node-wot-schema.conf.json | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/packages/cli/src/node-wot-schema.conf.json b/packages/cli/src/node-wot-schema.conf.json index 91405d250..c065f896c 100644 --- a/packages/cli/src/node-wot-schema.conf.json +++ b/packages/cli/src/node-wot-schema.conf.json @@ -2,6 +2,17 @@ "definitions": {}, "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", + "$defs": { + "mapping": { + "type": "object", + "properties": { + "nw:valuePath": { + "type": "string" + } + }, + "required": ["nw:valuePath"] + } + }, "properties": { "$schema": { "type": "string" }, "servient": { @@ -15,6 +26,21 @@ "staticAddress": { "type": "string", "description": "hostname or IP literal for static address config" + }, + "dataSchemaMapping": { + "type": "object", + "description": "Extracts specific values from a Thing's response object", + "properties": { + "nw:property": { + "$ref": "#/$defs/mapping" + }, + "nw:action": { + "$ref": "#/$defs/mapping" + }, + "nw:event": { + "$ref": "#/$defs/mapping" + } + } } }, "additionalProperties": false