zudoku 0.65.1 → 0.65.3
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/plugins/openapi/GeneratedExampleSidecarBox.js +1 -1
- package/dist/lib/plugins/openapi/ParameterList.js +1 -1
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +2 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +4 -3
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +9 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +7 -3
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/lib/{OasProvider-BuBeRIHB.js → OasProvider-CpniNNrW.js} +2 -2
- package/lib/{OasProvider-BuBeRIHB.js.map → OasProvider-CpniNNrW.js.map} +1 -1
- package/lib/{OperationList-Cx8TGKhB.js → OperationList-CmMoKpGu.js} +1141 -1121
- package/lib/OperationList-CmMoKpGu.js.map +1 -0
- package/lib/{SchemaList-rBWXYJEb.js → SchemaList-BykD27ga.js} +3 -3
- package/lib/{SchemaList-rBWXYJEb.js.map → SchemaList-BykD27ga.js.map} +1 -1
- package/lib/{SchemaView-jouS_xvc.js → SchemaView-Dt6hbCAt.js} +2 -2
- package/lib/{SchemaView-jouS_xvc.js.map → SchemaView-Dt6hbCAt.js.map} +1 -1
- package/lib/{circular-CGkbVs2O.js → circular-CNHs4gAz.js} +2 -2
- package/lib/{circular-CGkbVs2O.js.map → circular-CNHs4gAz.js.map} +1 -1
- package/lib/{createServer-CcV_75PW.js → createServer-BmcVQAOQ.js} +3 -3
- package/lib/{createServer-CcV_75PW.js.map → createServer-BmcVQAOQ.js.map} +1 -1
- package/lib/{index-I4zC7Yht.js → index-unv8c40u.js} +54 -50
- package/lib/{index-I4zC7Yht.js.map → index-unv8c40u.js.map} +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/package.json +1 -1
- package/src/lib/plugins/openapi/GeneratedExampleSidecarBox.tsx +1 -1
- package/src/lib/plugins/openapi/ParameterList.tsx +2 -2
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +22 -2
- package/src/lib/plugins/openapi/Sidecar.tsx +17 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +7 -3
- package/lib/OperationList-Cx8TGKhB.js.map +0 -1
|
@@ -3,7 +3,7 @@ import "lucide-react";
|
|
|
3
3
|
import "./chunk-PVWAREVJ-BMhpCH5D.js";
|
|
4
4
|
import "./ui/Button.js";
|
|
5
5
|
import "./ZudokuContext-BUZ5hkWB.js";
|
|
6
|
-
import { y as e, U as n, z as s } from "./index-
|
|
6
|
+
import { y as e, U as n, z as s } from "./index-unv8c40u.js";
|
|
7
7
|
export {
|
|
8
8
|
e as GetNavigationOperationsQuery,
|
|
9
9
|
n as UNTAGGED_PATH,
|
package/package.json
CHANGED
|
@@ -22,7 +22,7 @@ export const GeneratedExampleSidecarBox = ({
|
|
|
22
22
|
<SidecarBox.Root>
|
|
23
23
|
<SidecarBox.Head className="text-xs flex justify-between items-center">
|
|
24
24
|
<div className="flex items-center gap-1.5">
|
|
25
|
-
<span className="font-medium">Request Body
|
|
25
|
+
<span className="font-medium">Example Request Body</span>
|
|
26
26
|
<TooltipProvider>
|
|
27
27
|
<Tooltip>
|
|
28
28
|
<TooltipTrigger asChild>
|
|
@@ -35,14 +35,14 @@ export const ParameterList = ({
|
|
|
35
35
|
<Frame>
|
|
36
36
|
<FramePanel className="p-0!">
|
|
37
37
|
<ItemGroup className="overflow-clip">
|
|
38
|
-
{sortedParameters.map((parameter) => (
|
|
38
|
+
{sortedParameters.map((parameter, index) => (
|
|
39
39
|
<Fragment key={`${parameter.name}-${parameter.in}`}>
|
|
40
|
+
{index > 0 && <ItemSeparator />}
|
|
40
41
|
<ParameterListItem
|
|
41
42
|
parameter={parameter}
|
|
42
43
|
id={id}
|
|
43
44
|
group={group}
|
|
44
45
|
/>
|
|
45
|
-
<ItemSeparator />
|
|
46
46
|
</Fragment>
|
|
47
47
|
))}
|
|
48
48
|
</ItemGroup>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChevronsDownUpIcon, ChevronsUpDownIcon } from "lucide-react";
|
|
1
|
+
import { ChevronsDownUpIcon, ChevronsUpDownIcon, InfoIcon } from "lucide-react";
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import { Button } from "zudoku/components";
|
|
4
4
|
import {
|
|
@@ -7,6 +7,12 @@ import {
|
|
|
7
7
|
CollapsibleTrigger,
|
|
8
8
|
} from "zudoku/ui/Collapsible.js";
|
|
9
9
|
import { NativeSelect, NativeSelectOption } from "zudoku/ui/NativeSelect.js";
|
|
10
|
+
import {
|
|
11
|
+
Tooltip,
|
|
12
|
+
TooltipContent,
|
|
13
|
+
TooltipProvider,
|
|
14
|
+
TooltipTrigger,
|
|
15
|
+
} from "zudoku/ui/Tooltip.js";
|
|
10
16
|
import type { ResponseItem } from "./graphql/graphql.js";
|
|
11
17
|
import * as SidecarBox from "./SidecarBox.js";
|
|
12
18
|
import { SidecarExamples } from "./SidecarExamples.js";
|
|
@@ -16,11 +22,13 @@ export const ResponsesSidecarBox = ({
|
|
|
16
22
|
selectedResponse,
|
|
17
23
|
isOnScreen,
|
|
18
24
|
shouldLazyHighlight,
|
|
25
|
+
isGenerated,
|
|
19
26
|
}: {
|
|
20
27
|
responses: ResponseItem[];
|
|
21
28
|
selectedResponse?: string;
|
|
22
29
|
isOnScreen: boolean;
|
|
23
30
|
shouldLazyHighlight?: boolean;
|
|
31
|
+
isGenerated?: boolean;
|
|
24
32
|
}) => {
|
|
25
33
|
const [internalSelectedResponse, setInternalSelectedResponse] = useState(
|
|
26
34
|
selectedResponse ?? responses[0]?.statusCode,
|
|
@@ -57,8 +65,20 @@ export const ResponsesSidecarBox = ({
|
|
|
57
65
|
</Button>
|
|
58
66
|
</CollapsibleTrigger>
|
|
59
67
|
Example Responses
|
|
68
|
+
{isGenerated && (
|
|
69
|
+
<TooltipProvider>
|
|
70
|
+
<Tooltip>
|
|
71
|
+
<TooltipTrigger asChild>
|
|
72
|
+
<InfoIcon size={13} />
|
|
73
|
+
</TooltipTrigger>
|
|
74
|
+
<TooltipContent>
|
|
75
|
+
This example is auto-generated from the schema.
|
|
76
|
+
</TooltipContent>
|
|
77
|
+
</Tooltip>
|
|
78
|
+
</TooltipProvider>
|
|
79
|
+
)}
|
|
60
80
|
</div>
|
|
61
|
-
<div className="group-data-[state=closed]/collapsible:
|
|
81
|
+
<div className="group-data-[state=closed]/collapsible:invisible">
|
|
62
82
|
<NativeSelect
|
|
63
83
|
className="text-xs h-fit py-1 -my-1 bg-background"
|
|
64
84
|
value={internalSelectedResponse}
|
|
@@ -267,7 +267,7 @@ export const Sidecar = ({
|
|
|
267
267
|
/>
|
|
268
268
|
) : null}
|
|
269
269
|
|
|
270
|
-
{hasResponseExamples
|
|
270
|
+
{hasResponseExamples ? (
|
|
271
271
|
<ResponsesSidecarBox
|
|
272
272
|
isOnScreen={isOnScreen}
|
|
273
273
|
shouldLazyHighlight={shouldLazyHighlight}
|
|
@@ -286,6 +286,22 @@ export const Sidecar = ({
|
|
|
286
286
|
: response.content,
|
|
287
287
|
}))}
|
|
288
288
|
/>
|
|
289
|
+
) : (
|
|
290
|
+
<ResponsesSidecarBox
|
|
291
|
+
isGenerated
|
|
292
|
+
isOnScreen={isOnScreen}
|
|
293
|
+
shouldLazyHighlight={shouldLazyHighlight}
|
|
294
|
+
selectedResponse={selectedResponse}
|
|
295
|
+
responses={operation.responses.map((response) => ({
|
|
296
|
+
...response,
|
|
297
|
+
content: response.content?.map((content) => ({
|
|
298
|
+
...content,
|
|
299
|
+
examples: content.schema
|
|
300
|
+
? [{ name: "", value: generateSchemaExample(content.schema) }]
|
|
301
|
+
: content.examples,
|
|
302
|
+
})),
|
|
303
|
+
}))}
|
|
304
|
+
/>
|
|
289
305
|
)}
|
|
290
306
|
</aside>
|
|
291
307
|
);
|
|
@@ -227,7 +227,7 @@ export const Playground = ({
|
|
|
227
227
|
|
|
228
228
|
switch (data.bodyMode) {
|
|
229
229
|
case "file":
|
|
230
|
-
body = data.file
|
|
230
|
+
body = data.file || undefined;
|
|
231
231
|
headers.delete("Content-Type");
|
|
232
232
|
break;
|
|
233
233
|
case "multipart": {
|
|
@@ -241,13 +241,17 @@ export const Playground = ({
|
|
|
241
241
|
break;
|
|
242
242
|
}
|
|
243
243
|
default:
|
|
244
|
-
body = data.body
|
|
244
|
+
body = data.body || undefined;
|
|
245
245
|
break;
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
const request = new Request(
|
|
249
249
|
createUrl(server ?? selectedServer, url, data),
|
|
250
|
-
{
|
|
250
|
+
{
|
|
251
|
+
method,
|
|
252
|
+
headers,
|
|
253
|
+
body: ["GET", "HEAD"].includes(method.toUpperCase()) ? null : body,
|
|
254
|
+
},
|
|
251
255
|
);
|
|
252
256
|
|
|
253
257
|
if (data.identity !== NO_IDENTITY) {
|