Skip to content

Commit 702793a

Browse files
authored
Merge pull request #1504 from relu91/fix-cli-schema
fix(cli): update servient json schema with dataMapping property
2 parents 13ea375 + 58cfc43 commit 702793a

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

packages/cli/src/node-wot-schema.conf.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
"definitions": {},
33
"$schema": "http://json-schema.org/draft-07/schema#",
44
"type": "object",
5+
"$defs": {
6+
"mapping": {
7+
"type": "object",
8+
"properties": {
9+
"nw:valuePath": {
10+
"type": "string"
11+
}
12+
},
13+
"required": ["nw:valuePath"]
14+
}
15+
},
516
"properties": {
617
"$schema": { "type": "string" },
718
"servient": {
@@ -15,6 +26,21 @@
1526
"staticAddress": {
1627
"type": "string",
1728
"description": "hostname or IP literal for static address config"
29+
},
30+
"dataSchemaMapping": {
31+
"type": "object",
32+
"description": "Extracts specific values from a Thing's response object",
33+
"properties": {
34+
"nw:property": {
35+
"$ref": "#/$defs/mapping"
36+
},
37+
"nw:action": {
38+
"$ref": "#/$defs/mapping"
39+
},
40+
"nw:event": {
41+
"$ref": "#/$defs/mapping"
42+
}
43+
}
1844
}
1945
},
2046
"additionalProperties": false

0 commit comments

Comments
 (0)