Skip to content

Commit 6b5e38c

Browse files
committed
chore: add changelog
1 parent ae2f4a0 commit 6b5e38c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.changeset/hungry-spies-stand.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@redocly/respect-core": patch
3+
---
4+
5+
Resolved an issue where the response list was not correctly assigned to the output.

packages/respect-core/src/modules/runtime-expressions/evaluate.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,12 @@ function normalizeExpression(expression: string, context: RuntimeExpressionConte
153153
const normalizedSymbolsExpression = normalizeSymbolsExpression(modifiedJsExpression);
154154

155155
// Remove the curly braces surrounding the ENTIRE expression (if any), but not braces within JSON
156-
// Only unwrap if the expression starts with { and ends with }
157156
let cleanedJsExpression = normalizedSymbolsExpression;
157+
158158
if (cleanedJsExpression.startsWith('{') && cleanedJsExpression.endsWith('}')) {
159-
// Check if this is a runtime expression wrapper, not a JSON object
160159
// A runtime expression wrapper has the form {$variable...} with no nested braces until the end
161-
// Try to unwrap it, but if it fails to parse after unwrapping, keep it as-is
162160
const potentialUnwrapped = cleanedJsExpression.slice(1, -1);
163-
// Only unwrap if it doesn't look like JSON (i.e., doesn't start with { or [)
161+
// Unwrap if it doesn't look like JSON (i.e., doesn't start with { or [)
164162
if (!potentialUnwrapped.trim().startsWith('{') && !potentialUnwrapped.trim().startsWith('[')) {
165163
cleanedJsExpression = potentialUnwrapped;
166164
}

0 commit comments

Comments
 (0)