fix: coerce Postman header values to string during import (#7564)

Postman collections can contain numeric header values (e.g., status code 200),
which fail Bruno's schema validation expecting strings. Wrap header.value in
String() for example request and response headers, matching the existing
pattern used for regular request headers.
This commit is contained in:
Abhishek S Lal
2026-03-27 20:08:36 +05:30
committed by GitHub
parent d07c323755
commit 2977fc7bea

View File

@@ -639,7 +639,7 @@ const importPostmanV2CollectionItem = (brunoParent, item, { useWorkers = false }
example.request.headers.push({
uid: uuid(),
name: header.key ?? '',
value: header.value ?? '',
value: String(header.value ?? ''),
description: transformDescription(header.description),
enabled: !header.disabled
});
@@ -740,7 +740,7 @@ const importPostmanV2CollectionItem = (brunoParent, item, { useWorkers = false }
example.response.headers.push({
uid: uuid(),
name: header.key ?? '',
value: header.value ?? '',
value: String(header.value ?? ''),
description: transformDescription(header.description),
enabled: true
});