Skip to content

fix: RDKEMW-21046 : Fix Actions.intent return type - stringify result - #290

Closed
swethasukumarr wants to merge 1 commit into
nextfrom
feature/RDKEMW-21046
Closed

fix: RDKEMW-21046 : Fix Actions.intent return type - stringify result#290
swethasukumarr wants to merge 1 commit into
nextfrom
feature/RDKEMW-21046

Conversation

@swethasukumarr

@swethasukumarr swethasukumarr commented Jul 14, 2026

Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings July 14, 2026 15:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 inline contentMediaType: application/json) result schemas during macro expansion and attach a jsonString transform 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 jsonString is 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.

Comment thread src/macrofier/engine.mjs
Copilot AI review requested due to automatic review settings July 14, 2026 16:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment thread src/macrofier/engine.mjs
@dhillomk dhillomk closed this Jul 14, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants