@scalar/postman-to-openapi 0.7.31 → 0.7.32
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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @scalar/postman-to-openapi
|
|
2
2
|
|
|
3
|
+
## 0.7.32
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#11055](https://github.com/scalar/scalar/pull/11055): fix: wrap saved response bodies in an example object
|
|
8
|
+
|
|
9
|
+
Saved Postman responses were written straight into `examples.default`, so the converted document failed OpenAPI 3.1 validation and tools reading `examples.default.value` got nothing. The body now goes into `value`, the same way request body examples already work. Non-JSON bodies are kept as plain strings instead of `{ rawContent }` objects.
|
|
10
|
+
|
|
3
11
|
## 0.7.31
|
|
4
12
|
|
|
5
13
|
No changes in this release.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../src/helpers/responses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAc,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAMzD,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAchE,CAAA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,QAAQ,EAAE,EACrB,IAAI,CAAC,EAAE,IAAI,EACX,eAAe,CAAC,EAAE,MAAM,GACvB,WAAW,CAAC,eAAe,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../src/helpers/responses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAc,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAMzD,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAchE,CAAA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,QAAQ,EAAE,EACrB,IAAI,CAAC,EAAE,IAAI,EACX,eAAe,CAAC,EAAE,MAAM,GACvB,WAAW,CAAC,eAAe,GAAG,SAAS,CAiEzC"}
|
|
@@ -46,7 +46,9 @@ export function extractResponses(responses, item, acceptMediaType) {
|
|
|
46
46
|
[mediaType]: {
|
|
47
47
|
schema: inferSchemaFromExample(response.body || ''),
|
|
48
48
|
examples: {
|
|
49
|
-
default:
|
|
49
|
+
default: {
|
|
50
|
+
value: tryParseJson(response.body || ''),
|
|
51
|
+
},
|
|
50
52
|
},
|
|
51
53
|
},
|
|
52
54
|
};
|
|
@@ -152,6 +154,6 @@ function tryParseJson(jsonString) {
|
|
|
152
154
|
return JSON.parse(jsonString);
|
|
153
155
|
}
|
|
154
156
|
catch (_e) {
|
|
155
|
-
return
|
|
157
|
+
return jsonString;
|
|
156
158
|
}
|
|
157
159
|
}
|
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"export",
|
|
20
20
|
"scalar"
|
|
21
21
|
],
|
|
22
|
-
"version": "0.7.
|
|
22
|
+
"version": "0.7.32",
|
|
23
23
|
"engines": {
|
|
24
24
|
"node": ">=22"
|
|
25
25
|
},
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@scalar/openapi-types": "0.9.9"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@scalar/openapi-parser": "0.29.
|
|
45
|
+
"@scalar/openapi-parser": "0.29.23",
|
|
46
46
|
"@types/node": "^24.19.2",
|
|
47
47
|
"vite": "8.3.4"
|
|
48
48
|
},
|