mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-24 05:05:39 +00:00
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:
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user