openapi-explorer 2.2.678 → 2.2.680
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.
@@ -637,10 +637,12 @@ export default class ApiRequest extends LitElement {
|
|
637
637
|
if (exampleTextAreaEl && exampleTextAreaEl.value) {
|
638
638
|
fetchOptions.body = exampleTextAreaEl.value;
|
639
639
|
if (requestBodyType.includes('json')) {
|
640
|
-
fetchOptions.body = JSON.stringify(json5.parse(exampleTextAreaEl.value));
|
641
640
|
try {
|
641
|
+
fetchOptions.body = JSON.stringify(json5.parse(exampleTextAreaEl.value));
|
642
642
|
curlData = ` \\\n -d '${fetchOptions.body}'`;
|
643
|
-
} catch (err) {
|
643
|
+
} catch (err) {
|
644
|
+
/* Ignore unparseable JSON, falls back automatically to the original value, which is better than nothing */
|
645
|
+
}
|
644
646
|
}
|
645
647
|
if (!curlData) {
|
646
648
|
// Save single quotes wrapped => 'text' => `"'"text"'"`
|
@@ -642,10 +642,12 @@ class ApiRequest extends _lit.LitElement {
|
|
642
642
|
if (exampleTextAreaEl && exampleTextAreaEl.value) {
|
643
643
|
fetchOptions.body = exampleTextAreaEl.value;
|
644
644
|
if (requestBodyType.includes('json')) {
|
645
|
-
fetchOptions.body = JSON.stringify(_json.default.parse(exampleTextAreaEl.value));
|
646
645
|
try {
|
646
|
+
fetchOptions.body = JSON.stringify(_json.default.parse(exampleTextAreaEl.value));
|
647
647
|
curlData = ` \\\n -d '${fetchOptions.body}'`;
|
648
|
-
} catch (err) {
|
648
|
+
} catch (err) {
|
649
|
+
/* Ignore unparseable JSON, falls back automatically to the original value, which is better than nothing */
|
650
|
+
}
|
649
651
|
}
|
650
652
|
if (!curlData) {
|
651
653
|
// Save single quotes wrapped => 'text' => `"'"text"'"`
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "openapi-explorer",
|
3
|
-
"version": "2.2.
|
3
|
+
"version": "2.2.680",
|
4
4
|
"description": "OpenAPI Explorer - API viewer with dynamically generated components, documentation, and interaction console",
|
5
5
|
"author": "Authress Developers <developers@authress.io>",
|
6
6
|
"type": "module",
|