fix: RDKEMW-21046 : Fix Actions.intent return type - stringify result - #290
Closed
swethasukumarr wants to merge 1 commit into
Closed
fix: RDKEMW-21046 : Fix Actions.intent return type - stringify result#290swethasukumarr wants to merge 1 commit into
swethasukumarr wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the JavaScript SDK code generation/runtime to support methods/events whose logical return type is JSONString by serializing transport-delivered JSON objects into strings for SDK consumers.
Changes:
- Detect
JSONString(and inlinecontentMediaType: application/json) result schemas during macro expansion and attach ajsonStringtransform flag. - Add event transform registration hooks in the generated event module code and implement transform application in the Events runtime.
- Extend the shared Results transformer to stringify JSON results when
jsonStringis enabled.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/macrofier/engine.mjs | Adds JSONString detection and emits transform-related imports/macros during JS SDK generation. |
| languages/javascript/templates/methods/event.js | Generates registerEventTransform(...) calls for events when transforms are present. |
| languages/javascript/templates/imports/transform-event.mjs | Adds import template for registerEventTransform. |
| languages/javascript/src/shared/Results/index.mjs | Implements jsonString transform for method call results. |
| languages/javascript/src/shared/Events/index.mjs | Adds event transform registration and applies transforms to emitted event payloads. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
swethasukumarr
force-pushed
the
feature/RDKEMW-21046
branch
from
July 14, 2026 16:41
f976eb1 to
4f8cb57
Compare
…ring results in JS SDK
swethasukumarr
force-pushed
the
feature/RDKEMW-21046
branch
from
July 14, 2026 16:45
4f8cb57 to
609a333
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.