@readme/oas-to-har 17.0.4 → 17.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/index.js +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## <small>17.0.5 (2022-05-20)</small>
|
|
2
|
+
|
|
3
|
+
* fix: add handling for when `requestBody` is present w/o a `schema` (#89) ([d8911e0](https://github.com/readmeio/oas-to-har/commit/d8911e0)), closes [#89](https://github.com/readmeio/oas-to-har/issues/89)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
1
7
|
## <small>17.0.4 (2022-05-04)</small>
|
|
2
8
|
|
|
3
9
|
* fix: more quirks with handling RAW_BODY primitives (#88) ([9f421cd](https://github.com/readmeio/oas-to-har/commit/9f421cd)), closes [#88](https://github.com/readmeio/oas-to-har/issues/88)
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -447,7 +447,10 @@ module.exports = (
|
|
|
447
447
|
// Add a `Content-Type` header if there are any body values setup above or if there is a schema
|
|
448
448
|
// defined, but only do so if we don't already have a `Content-Type` present as it's impossible
|
|
449
449
|
// for a request to have multiple.
|
|
450
|
-
if (
|
|
450
|
+
if (
|
|
451
|
+
(har.postData.text || (requestBody && requestBody.schema && Object.keys(requestBody.schema).length)) &&
|
|
452
|
+
!hasContentType
|
|
453
|
+
) {
|
|
451
454
|
har.headers.push({
|
|
452
455
|
name: 'Content-Type',
|
|
453
456
|
value: contentType,
|