zudoku 0.4.3-dev.27 → 0.4.3-dev.28
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/dist/lib/oas/parser/index.js +9 -2
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +4 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/lib/{OperationList-Dnqhaqy7.js → OperationList-uEkS-Cqb.js} +2 -2
- package/lib/{OperationList-Dnqhaqy7.js.map → OperationList-uEkS-Cqb.js.map} +1 -1
- package/lib/{Route-DZhAsCnX.js → Route-D6yy1Q6U.js} +2 -2
- package/lib/{Route-DZhAsCnX.js.map → Route-D6yy1Q6U.js.map} +1 -1
- package/lib/assets/{worker-4PRCYVz5.js → worker-BsNqC5G3.js} +8 -7
- package/lib/assets/{worker-4PRCYVz5.js.map → worker-BsNqC5G3.js.map} +1 -1
- package/lib/{index-CMzlvgYf.js → index-Brsmo1Re.js} +4 -4
- package/lib/{index-CMzlvgYf.js.map → index-Brsmo1Re.js.map} +1 -1
- package/lib/zudoku.openapi-worker.js +8 -7
- package/lib/zudoku.openapi-worker.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/package.json +1 -1
- package/src/lib/oas/parser/index.ts +9 -2
- package/src/lib/plugins/openapi/Sidecar.tsx +4 -1
package/package.json
CHANGED
|
@@ -73,10 +73,17 @@ const parseSchemaInput = async (
|
|
|
73
73
|
);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
const schemaText = await response.text();
|
|
77
|
+
|
|
76
78
|
try {
|
|
77
|
-
|
|
79
|
+
if (schemaText.trim().startsWith("{")) {
|
|
80
|
+
return JSON.parse(schemaText) as JSONSchema;
|
|
81
|
+
} else {
|
|
82
|
+
const yaml = await import("yaml");
|
|
83
|
+
return yaml.parse(schemaText) as JSONSchema;
|
|
84
|
+
}
|
|
78
85
|
} catch (err) {
|
|
79
|
-
throw new GraphQLError("Fetched invalid
|
|
86
|
+
throw new GraphQLError("Fetched invalid schema", {
|
|
80
87
|
originalError: err,
|
|
81
88
|
});
|
|
82
89
|
}
|
|
@@ -193,7 +193,10 @@ export const Sidecar = ({
|
|
|
193
193
|
value={selectedLang}
|
|
194
194
|
onChange={(e) => {
|
|
195
195
|
startTransition(() => {
|
|
196
|
-
setSearchParams(
|
|
196
|
+
setSearchParams((prev) => {
|
|
197
|
+
prev.set("lang", e.target.value);
|
|
198
|
+
return prev;
|
|
199
|
+
});
|
|
197
200
|
});
|
|
198
201
|
}}
|
|
199
202
|
options={[
|