Skip to content

Dynamic json body variables#1003

Open
ruwinirathnamalala wants to merge 3 commits into
buerokratt:devfrom
rootcodelabs:978/dynamic_json_body_variables
Open

Dynamic json body variables#1003
ruwinirathnamalala wants to merge 3 commits into
buerokratt:devfrom
rootcodelabs:978/dynamic_json_body_variables

Conversation

@ruwinirathnamalala
Copy link
Copy Markdown
Collaborator

#978

This pull request introduces improvements to how dynamic variable expressions are handled in service assignments and endpoint bodies, as well as fixes to the service testing workflow to ensure state consistency. The changes aim to make variable interpolation more robust, prevent parsing errors, and avoid stale state issues during service testing.

Variable interpolation and parsing improvements:

  • Added the normalizeAssignValue function in service-builder.ts to strip unnecessary String() wrappers from API response variables in assignment expressions, ensuring correct handling by downstream parsers.
  • Updated raw JSON body parsing in both handleEndpointStep (service-builder.ts) and getEndpointBody (new-services.store.ts) to wrap unquoted ${...} expressions in quotes before parsing, preventing JSON parsing errors when dynamic variables are used. [1] [2]

Service testing workflow fixes:

  • Modified runServiceTest in service-tester.ts to clear previous test states before running a new test, and to re-fetch the latest nodes from the store to avoid using stale snapshots, ensuring accurate validation of node states during repeated tests. [1] [2]

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@matKlju matKlju linked an issue May 13, 2026 that may be closed by this pull request
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dynamic Raw JSON Body Variables

1 participant