feat(core): implement Thing-level data schema mapping extraction#1499
Merged
danielpeintner merged 14 commits intoeclipse-thingweb:masterfrom Mar 5, 2026
Merged
Conversation
Make InteractionOutput accepts a DataSchemaMapping object instead of a strig for the value path. This allows to extend the mapping in the future with more properties if needed.
danielpeintner
approved these changes
Mar 2, 2026
Member
danielpeintner
left a comment
There was a problem hiding this comment.
I have some minor comments/suggestions.
Please let me know whether they make sense..
Comment on lines
+167
to
+168
| synchronous?: boolean, | ||
| mapping?: DataSchemaMapping |
Member
There was a problem hiding this comment.
Minor: I wonder whether we should keep the order of the arguments more consistent..
In handleActionInteractionOutput(...) we used to have synchronous after mapping. We could do the same here
…r ActionInteractionOutput
Co-authored-by: danielpeintner <daniel.peintner@gmail.com>
Member
|
@danielpeintner done, if everything looks good, please go ahead and merge this. |
Member
|
Thanks @siddharthbaleja7 @relu91 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1411
This PR implements the experimental
nw:dataSchemaMappingfeature at the Thing-level, allowing developers to extract specific nested values from Thing responses using dot-notation or JSON pointers.As discussed with the maintainers, this feature strictly targets Thing responses (readProperty, invokeAction outputs, and subscribeEvent emissions). Input payloads are unaffected.
Key Implementation Details:
dataSchemaMappingto the Servient configuration. If a consumed/produced Thing Description lacks a mapping, the Servient's default mapping is automatically injected.@experimentaltags to allnw:prefixed types inthing-description.ts.eslint-disableanycasting.Testing
npm run test -w packages/core).npm run lint --workspacesandnpm run test:browserlocally).Documentation
README.md.