zudoku 0.15.2 → 0.16.0
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/graphql/index.js +4 -4
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/oas/parser/upgrade/index.js +3 -1
- package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.d.ts +5 -0
- package/dist/lib/plugins/openapi/CollapsibleCode.js +22 -0
- package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -0
- package/dist/lib/plugins/openapi/OperationList.js +14 -0
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +7 -3
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +9 -2
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +2 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +3 -2
- package/dist/lib/plugins/openapi/graphql/gql.js +2 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +16 -117
- package/dist/lib/plugins/openapi/graphql/graphql.js +116 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +2 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +0 -1
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js +25 -36
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
- package/dist/vite/output.js +3 -1
- package/dist/vite/output.js.map +1 -1
- package/dist/vite/prerender.js +3 -2
- package/dist/vite/prerender.js.map +1 -1
- package/lib/{OperationList-Tj7ubW_t.js → OperationList-35iw_Gil.js} +17 -3
- package/lib/OperationList-35iw_Gil.js.map +1 -0
- package/lib/{Route-C3DGB6OS.js → Route-BsEZmkNl.js} +2 -2
- package/lib/{Route-C3DGB6OS.js.map → Route-BsEZmkNl.js.map} +1 -1
- package/lib/assets/{worker-Bf8vjASY.js → worker-CBt_PtXk.js} +1081 -1079
- package/lib/assets/{worker-Bf8vjASY.js.map → worker-CBt_PtXk.js.map} +1 -1
- package/lib/{index-AjWCJNGC.js → index-BdD8UbS-.js} +1772 -1547
- package/lib/index-BdD8UbS-.js.map +1 -0
- package/lib/zudoku.openapi-worker.js +722 -720
- package/lib/zudoku.openapi-worker.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/package.json +2 -2
- package/src/app/main.css +1 -1
- package/src/lib/oas/graphql/index.ts +4 -4
- package/src/lib/oas/parser/upgrade/index.ts +3 -1
- package/src/lib/plugins/openapi/CollapsibleCode.tsx +83 -0
- package/src/lib/plugins/openapi/OperationList.tsx +14 -0
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +18 -13
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +17 -12
- package/src/lib/plugins/openapi/Sidecar.tsx +10 -7
- package/src/lib/plugins/openapi/graphql/gql.ts +4 -3
- package/src/lib/plugins/openapi/graphql/graphql.ts +132 -133
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +4 -1
- package/src/lib/plugins/openapi/util/generateSchemaExample.ts +28 -42
- package/lib/OperationList-Tj7ubW_t.js.map +0 -1
- package/lib/index-AjWCJNGC.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zudoku",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"homepage": "https://zudoku.dev",
|
|
6
6
|
"repository": {
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"@types/react": "18.3.11",
|
|
142
142
|
"@types/react-dom": "18.3.1",
|
|
143
143
|
"@vitejs/plugin-react": "4.3.1",
|
|
144
|
-
"@zudoku/config": "0.
|
|
144
|
+
"@zudoku/config": "0.16.0",
|
|
145
145
|
"@zudoku/httpsnippet": "10.0.9",
|
|
146
146
|
"@zudoku/react-helmet-async": "2.0.4",
|
|
147
147
|
"autoprefixer": "10.4.20",
|
package/src/app/main.css
CHANGED
|
@@ -206,7 +206,7 @@ const ExampleItem = builder
|
|
|
206
206
|
name: t.exposeString("name"),
|
|
207
207
|
summary: t.exposeString("summary", { nullable: true }),
|
|
208
208
|
description: t.exposeString("description", { nullable: true }),
|
|
209
|
-
value: t.
|
|
209
|
+
value: t.expose("value", { type: JSONObjectScalar, nullable: true }),
|
|
210
210
|
externalValue: t.exposeString("externalValue", { nullable: true }),
|
|
211
211
|
}),
|
|
212
212
|
});
|
|
@@ -348,10 +348,10 @@ const OperationItem = builder
|
|
|
348
348
|
statusCode,
|
|
349
349
|
description: response.description,
|
|
350
350
|
content: Object.entries(response.content ?? {}).map(
|
|
351
|
-
([mediaType,
|
|
351
|
+
([mediaType, { schema, examples }]) => ({
|
|
352
352
|
mediaType,
|
|
353
|
-
schema
|
|
354
|
-
examples: Object.entries(
|
|
353
|
+
schema,
|
|
354
|
+
examples: Object.entries(examples ?? {}).map(
|
|
355
355
|
([name, value]) => ({ name, ...value }),
|
|
356
356
|
),
|
|
357
357
|
}),
|
|
@@ -64,7 +64,9 @@ export const upgradeSchema = (schema: Record<string, any>): OpenAPIDocument => {
|
|
|
64
64
|
schema = traverse(schema, (sub) => {
|
|
65
65
|
if (sub.example !== undefined) {
|
|
66
66
|
sub.examples = {
|
|
67
|
-
default:
|
|
67
|
+
default: {
|
|
68
|
+
value: sub.example,
|
|
69
|
+
},
|
|
68
70
|
};
|
|
69
71
|
delete sub.example;
|
|
70
72
|
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type CSSProperties,
|
|
3
|
+
type ReactNode,
|
|
4
|
+
useEffect,
|
|
5
|
+
useRef,
|
|
6
|
+
useState,
|
|
7
|
+
} from "react";
|
|
8
|
+
import { Button } from "zudoku/ui/Button.js";
|
|
9
|
+
import {
|
|
10
|
+
Collapsible,
|
|
11
|
+
CollapsibleContent,
|
|
12
|
+
CollapsibleTrigger,
|
|
13
|
+
} from "zudoku/ui/Collapsible.js";
|
|
14
|
+
import { cn } from "../../util/cn.js";
|
|
15
|
+
|
|
16
|
+
export const CollapsibleCode = ({
|
|
17
|
+
children,
|
|
18
|
+
maxHeight = 250,
|
|
19
|
+
}: {
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
maxHeight?: number;
|
|
22
|
+
}) => {
|
|
23
|
+
const contentRef = useRef<HTMLDivElement | null>(null);
|
|
24
|
+
const [isOverflowing, setIsOverflowing] = useState(false);
|
|
25
|
+
const [open, setOpen] = useState(false);
|
|
26
|
+
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
const el = contentRef.current;
|
|
29
|
+
if (!el) return;
|
|
30
|
+
|
|
31
|
+
const observer = new ResizeObserver(() => {
|
|
32
|
+
setIsOverflowing(el.scrollHeight > maxHeight);
|
|
33
|
+
});
|
|
34
|
+
observer.observe(el);
|
|
35
|
+
|
|
36
|
+
return () => observer.disconnect();
|
|
37
|
+
}, [maxHeight]);
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<Collapsible
|
|
41
|
+
className="group"
|
|
42
|
+
open={open}
|
|
43
|
+
onOpenChange={setOpen}
|
|
44
|
+
style={{ "--max-height": `${maxHeight}px` } as CSSProperties}
|
|
45
|
+
>
|
|
46
|
+
<CollapsibleContent
|
|
47
|
+
forceMount
|
|
48
|
+
className={cn(
|
|
49
|
+
"relative overflow-hidden",
|
|
50
|
+
!open && isOverflowing && "max-h-[--max-height]",
|
|
51
|
+
)}
|
|
52
|
+
>
|
|
53
|
+
{!open && isOverflowing && (
|
|
54
|
+
<div className="absolute inset-0 bg-gradient-to-b from-transparent to-zinc-50/90 dark:to-zinc-800/90 z-10"></div>
|
|
55
|
+
)}
|
|
56
|
+
<div ref={contentRef}>{children}</div>
|
|
57
|
+
{!open && isOverflowing && (
|
|
58
|
+
<CollapsibleTrigger
|
|
59
|
+
className="absolute inset-0 grid place-items-center z-10"
|
|
60
|
+
asChild
|
|
61
|
+
>
|
|
62
|
+
<div>
|
|
63
|
+
<Button className="bg-primary/70 border border-accent-foreground/25">
|
|
64
|
+
Expand code
|
|
65
|
+
</Button>
|
|
66
|
+
</div>
|
|
67
|
+
</CollapsibleTrigger>
|
|
68
|
+
)}
|
|
69
|
+
</CollapsibleContent>
|
|
70
|
+
{isOverflowing && (
|
|
71
|
+
<div
|
|
72
|
+
className={cn("flex justify-center w-full mb-2", !open && "hidden")}
|
|
73
|
+
>
|
|
74
|
+
<CollapsibleTrigger asChild>
|
|
75
|
+
<Button className="border border-accent-foreground/25">
|
|
76
|
+
Collapse code
|
|
77
|
+
</Button>
|
|
78
|
+
</CollapsibleTrigger>
|
|
79
|
+
</div>
|
|
80
|
+
)}
|
|
81
|
+
</Collapsible>
|
|
82
|
+
);
|
|
83
|
+
};
|
|
@@ -44,6 +44,13 @@ export const OperationsFragment = graphql(/* GraphQL */ `
|
|
|
44
44
|
encoding {
|
|
45
45
|
name
|
|
46
46
|
}
|
|
47
|
+
examples {
|
|
48
|
+
name
|
|
49
|
+
description
|
|
50
|
+
externalValue
|
|
51
|
+
value
|
|
52
|
+
summary
|
|
53
|
+
}
|
|
47
54
|
schema
|
|
48
55
|
}
|
|
49
56
|
description
|
|
@@ -54,6 +61,13 @@ export const OperationsFragment = graphql(/* GraphQL */ `
|
|
|
54
61
|
links
|
|
55
62
|
description
|
|
56
63
|
content {
|
|
64
|
+
examples {
|
|
65
|
+
name
|
|
66
|
+
description
|
|
67
|
+
externalValue
|
|
68
|
+
value
|
|
69
|
+
summary
|
|
70
|
+
}
|
|
57
71
|
mediaType
|
|
58
72
|
encoding {
|
|
59
73
|
name
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SyntaxHighlight } from "../../components/SyntaxHighlight.js";
|
|
2
2
|
import { type SchemaObject } from "../../oas/graphql/index.js";
|
|
3
|
+
import { CollapsibleCode } from "./CollapsibleCode.js";
|
|
3
4
|
import type { OperationListItemResult } from "./OperationList.js";
|
|
4
5
|
import * as SidecarBox from "./SidecarBox.js";
|
|
5
6
|
import { generateSchemaExample } from "./util/generateSchemaExample.js";
|
|
@@ -12,6 +13,14 @@ type Content = NonNullable<
|
|
|
12
13
|
export const RequestBodySidecarBox = ({ content }: { content: Content }) => {
|
|
13
14
|
if (!content.length) return null;
|
|
14
15
|
|
|
16
|
+
const firstContent = content.at(0);
|
|
17
|
+
|
|
18
|
+
const example =
|
|
19
|
+
firstContent?.examples?.at(0)?.value ??
|
|
20
|
+
(firstContent?.schema
|
|
21
|
+
? generateSchemaExample(firstContent.schema as SchemaObject)
|
|
22
|
+
: "");
|
|
23
|
+
|
|
15
24
|
return (
|
|
16
25
|
<>
|
|
17
26
|
<SidecarBox.Root>
|
|
@@ -19,19 +28,15 @@ export const RequestBodySidecarBox = ({ content }: { content: Content }) => {
|
|
|
19
28
|
<span className="font-mono">Request Body Example</span>
|
|
20
29
|
</SidecarBox.Head>
|
|
21
30
|
<SidecarBox.Body className="p-0">
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
null,
|
|
32
|
-
2,
|
|
33
|
-
)}
|
|
34
|
-
/>
|
|
31
|
+
<CollapsibleCode>
|
|
32
|
+
<SyntaxHighlight
|
|
33
|
+
language={example ? "json" : "plain"}
|
|
34
|
+
noBackground
|
|
35
|
+
copyable
|
|
36
|
+
className="[--scrollbar-color:gray] text-xs max-h-[500px] p-2"
|
|
37
|
+
code={example ? JSON.stringify(example, null, 2) : "No example"}
|
|
38
|
+
/>
|
|
39
|
+
</CollapsibleCode>
|
|
35
40
|
</SidecarBox.Body>
|
|
36
41
|
</SidecarBox.Root>
|
|
37
42
|
</>
|
|
@@ -2,6 +2,7 @@ import * as Tabs from "@radix-ui/react-tabs";
|
|
|
2
2
|
import { SyntaxHighlight } from "../../components/SyntaxHighlight.js";
|
|
3
3
|
import { type SchemaObject } from "../../oas/graphql/index.js";
|
|
4
4
|
import { cn } from "../../util/cn.js";
|
|
5
|
+
import { CollapsibleCode } from "./CollapsibleCode.js";
|
|
5
6
|
import type { OperationListItemResult } from "./OperationList.js";
|
|
6
7
|
import * as SidecarBox from "./SidecarBox.js";
|
|
7
8
|
import { generateSchemaExample } from "./util/generateSchemaExample.js";
|
|
@@ -41,25 +42,29 @@ export const ResponsesSidecarBox = ({
|
|
|
41
42
|
</Tabs.List>
|
|
42
43
|
</SidecarBox.Head>
|
|
43
44
|
{responses.map((response) => {
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
const firstContent = response.content?.at(0);
|
|
46
|
+
|
|
47
|
+
const example =
|
|
48
|
+
firstContent?.examples?.at(0)?.value ??
|
|
49
|
+
(firstContent?.schema
|
|
50
|
+
? generateSchemaExample(firstContent.schema as SchemaObject)
|
|
51
|
+
: "");
|
|
47
52
|
|
|
48
53
|
return (
|
|
49
54
|
<Tabs.Content key={response.statusCode} value={response.statusCode}>
|
|
50
55
|
<SidecarBox.Body className="p-0">
|
|
51
|
-
|
|
56
|
+
<CollapsibleCode>
|
|
52
57
|
<SyntaxHighlight
|
|
53
|
-
language="json"
|
|
58
|
+
language={example ? "json" : "plain"}
|
|
54
59
|
noBackground
|
|
55
|
-
className="text-xs max-h-[
|
|
56
|
-
code={
|
|
60
|
+
className="[--scrollbar-color:gray] text-xs max-h-[500px] p-2"
|
|
61
|
+
code={
|
|
62
|
+
example
|
|
63
|
+
? JSON.stringify(example, null, 2)
|
|
64
|
+
: "Empty response"
|
|
65
|
+
}
|
|
57
66
|
/>
|
|
58
|
-
|
|
59
|
-
<span className="text-muted-foreground font-mono italic text-xs">
|
|
60
|
-
Empty Response
|
|
61
|
-
</span>
|
|
62
|
-
)}
|
|
67
|
+
</CollapsibleCode>
|
|
63
68
|
</SidecarBox.Body>
|
|
64
69
|
<SidecarBox.Footer className="flex justify-end text-xs">
|
|
65
70
|
{response.description}
|
|
@@ -7,6 +7,7 @@ import { TextColorMap } from "../../components/navigation/SidebarBadge.js";
|
|
|
7
7
|
import { SyntaxHighlight } from "../../components/SyntaxHighlight.js";
|
|
8
8
|
import type { SchemaObject } from "../../oas/parser/index.js";
|
|
9
9
|
import { cn } from "../../util/cn.js";
|
|
10
|
+
import { CollapsibleCode } from "./CollapsibleCode.js";
|
|
10
11
|
import { ColorizedParam } from "./ColorizedParam.js";
|
|
11
12
|
import { useOasConfig } from "./context.js";
|
|
12
13
|
import { graphql } from "./graphql/index.js";
|
|
@@ -193,13 +194,15 @@ export const Sidecar = ({
|
|
|
193
194
|
operation={operation}
|
|
194
195
|
/>
|
|
195
196
|
</SidecarBox.Head>
|
|
196
|
-
<SidecarBox.Body className="
|
|
197
|
-
<
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
197
|
+
<SidecarBox.Body className="p-0">
|
|
198
|
+
<CollapsibleCode>
|
|
199
|
+
<SyntaxHighlight
|
|
200
|
+
language={selectedLang}
|
|
201
|
+
noBackground
|
|
202
|
+
className="[--scrollbar-color:gray] text-xs max-h-[500px] p-2"
|
|
203
|
+
code={code!}
|
|
204
|
+
/>
|
|
205
|
+
</CollapsibleCode>
|
|
203
206
|
</SidecarBox.Body>
|
|
204
207
|
<SidecarBox.Footer className="flex items-center text-xs gap-2 justify-end py-1">
|
|
205
208
|
<span>Show example in</span>
|
|
@@ -11,11 +11,12 @@ import * as types from "./graphql.js";
|
|
|
11
11
|
* 3. It does not support dead code elimination, so it will add unused operations.
|
|
12
12
|
*
|
|
13
13
|
* Therefore it is highly recommended to use the babel or swc plugin for production.
|
|
14
|
+
* Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size
|
|
14
15
|
*/
|
|
15
16
|
const documents = {
|
|
16
17
|
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n":
|
|
17
18
|
types.ServersQueryDocument,
|
|
18
|
-
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n":
|
|
19
|
+
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n":
|
|
19
20
|
types.OperationsFragmentFragmentDoc,
|
|
20
21
|
"\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n":
|
|
21
22
|
types.AllOperationsDocument,
|
|
@@ -49,8 +50,8 @@ export function graphql(
|
|
|
49
50
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
50
51
|
*/
|
|
51
52
|
export function graphql(
|
|
52
|
-
source: "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n",
|
|
53
|
-
): (typeof documents)["\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n"];
|
|
53
|
+
source: "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n",
|
|
54
|
+
): (typeof documents)["\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n"];
|
|
54
55
|
/**
|
|
55
56
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
56
57
|
*/
|
|
@@ -33,143 +33,10 @@ export type Scalars = {
|
|
|
33
33
|
JSONObject: { input: any; output: any };
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
export type EncodingItem = {
|
|
37
|
-
__typename?: "EncodingItem";
|
|
38
|
-
allowReserved?: Maybe<Scalars["Boolean"]["output"]>;
|
|
39
|
-
contentType?: Maybe<Scalars["String"]["output"]>;
|
|
40
|
-
explode?: Maybe<Scalars["Boolean"]["output"]>;
|
|
41
|
-
headers?: Maybe<Scalars["JSONObject"]["output"]>;
|
|
42
|
-
name: Scalars["String"]["output"];
|
|
43
|
-
style?: Maybe<Scalars["String"]["output"]>;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export type ExampleItem = {
|
|
47
|
-
__typename?: "ExampleItem";
|
|
48
|
-
description?: Maybe<Scalars["String"]["output"]>;
|
|
49
|
-
externalValue?: Maybe<Scalars["String"]["output"]>;
|
|
50
|
-
name: Scalars["String"]["output"];
|
|
51
|
-
summary?: Maybe<Scalars["String"]["output"]>;
|
|
52
|
-
value?: Maybe<Scalars["String"]["output"]>;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export type MediaTypeObject = {
|
|
56
|
-
__typename?: "MediaTypeObject";
|
|
57
|
-
encoding?: Maybe<Array<EncodingItem>>;
|
|
58
|
-
examples?: Maybe<Array<ExampleItem>>;
|
|
59
|
-
mediaType: Scalars["String"]["output"];
|
|
60
|
-
schema?: Maybe<Scalars["JSON"]["output"]>;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export type OperationItem = {
|
|
64
|
-
__typename?: "OperationItem";
|
|
65
|
-
contentTypes: Array<Scalars["String"]["output"]>;
|
|
66
|
-
deprecated?: Maybe<Scalars["Boolean"]["output"]>;
|
|
67
|
-
description?: Maybe<Scalars["String"]["output"]>;
|
|
68
|
-
method: Scalars["String"]["output"];
|
|
69
|
-
operationId?: Maybe<Scalars["String"]["output"]>;
|
|
70
|
-
parameters?: Maybe<Array<ParameterItem>>;
|
|
71
|
-
path: Scalars["String"]["output"];
|
|
72
|
-
requestBody?: Maybe<RequestBodyObject>;
|
|
73
|
-
responses: Array<ResponseItem>;
|
|
74
|
-
slug: Scalars["String"]["output"];
|
|
75
|
-
summary?: Maybe<Scalars["String"]["output"]>;
|
|
76
|
-
tags?: Maybe<Array<TagItem>>;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
36
|
export type ParameterIn = "cookie" | "header" | "path" | "query";
|
|
80
37
|
|
|
81
|
-
export type ParameterItem = {
|
|
82
|
-
__typename?: "ParameterItem";
|
|
83
|
-
allowEmptyValue?: Maybe<Scalars["Boolean"]["output"]>;
|
|
84
|
-
allowReserved?: Maybe<Scalars["Boolean"]["output"]>;
|
|
85
|
-
deprecated?: Maybe<Scalars["Boolean"]["output"]>;
|
|
86
|
-
description?: Maybe<Scalars["String"]["output"]>;
|
|
87
|
-
examples?: Maybe<Array<ExampleItem>>;
|
|
88
|
-
explode?: Maybe<Scalars["Boolean"]["output"]>;
|
|
89
|
-
in: ParameterIn;
|
|
90
|
-
name: Scalars["String"]["output"];
|
|
91
|
-
required?: Maybe<Scalars["Boolean"]["output"]>;
|
|
92
|
-
schema?: Maybe<Scalars["JSON"]["output"]>;
|
|
93
|
-
style?: Maybe<Scalars["String"]["output"]>;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export type PathItem = {
|
|
97
|
-
__typename?: "PathItem";
|
|
98
|
-
methods: Array<Scalars["String"]["output"]>;
|
|
99
|
-
path: Scalars["String"]["output"];
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
export type Query = {
|
|
103
|
-
__typename?: "Query";
|
|
104
|
-
schema: Schema;
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
export type QuerySchemaArgs = {
|
|
108
|
-
input: Scalars["JSON"]["input"];
|
|
109
|
-
type: SchemaType;
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
export type RequestBodyObject = {
|
|
113
|
-
__typename?: "RequestBodyObject";
|
|
114
|
-
content?: Maybe<Array<MediaTypeObject>>;
|
|
115
|
-
description?: Maybe<Scalars["String"]["output"]>;
|
|
116
|
-
required?: Maybe<Scalars["Boolean"]["output"]>;
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
export type ResponseItem = {
|
|
120
|
-
__typename?: "ResponseItem";
|
|
121
|
-
content?: Maybe<Array<MediaTypeObject>>;
|
|
122
|
-
description?: Maybe<Scalars["String"]["output"]>;
|
|
123
|
-
headers?: Maybe<Scalars["JSON"]["output"]>;
|
|
124
|
-
links?: Maybe<Scalars["JSON"]["output"]>;
|
|
125
|
-
statusCode: Scalars["String"]["output"];
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
export type Schema = {
|
|
129
|
-
__typename?: "Schema";
|
|
130
|
-
description?: Maybe<Scalars["String"]["output"]>;
|
|
131
|
-
openapi: Scalars["String"]["output"];
|
|
132
|
-
operations: Array<OperationItem>;
|
|
133
|
-
paths: Array<PathItem>;
|
|
134
|
-
servers: Array<Server>;
|
|
135
|
-
tags: Array<SchemaTag>;
|
|
136
|
-
title: Scalars["String"]["output"];
|
|
137
|
-
url: Scalars["String"]["output"];
|
|
138
|
-
version: Scalars["String"]["output"];
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
export type SchemaOperationsArgs = {
|
|
142
|
-
method?: InputMaybe<Scalars["String"]["input"]>;
|
|
143
|
-
operationId?: InputMaybe<Scalars["String"]["input"]>;
|
|
144
|
-
path?: InputMaybe<Scalars["String"]["input"]>;
|
|
145
|
-
tag?: InputMaybe<Scalars["String"]["input"]>;
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
export type SchemaTagsArgs = {
|
|
149
|
-
name?: InputMaybe<Scalars["String"]["input"]>;
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
export type SchemaTag = {
|
|
153
|
-
__typename?: "SchemaTag";
|
|
154
|
-
description?: Maybe<Scalars["String"]["output"]>;
|
|
155
|
-
name?: Maybe<Scalars["String"]["output"]>;
|
|
156
|
-
operations: Array<OperationItem>;
|
|
157
|
-
};
|
|
158
|
-
|
|
159
38
|
export type SchemaType = "file" | "raw" | "url";
|
|
160
39
|
|
|
161
|
-
export type Server = {
|
|
162
|
-
__typename?: "Server";
|
|
163
|
-
description?: Maybe<Scalars["String"]["output"]>;
|
|
164
|
-
url: Scalars["String"]["output"];
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
export type TagItem = {
|
|
168
|
-
__typename?: "TagItem";
|
|
169
|
-
description?: Maybe<Scalars["String"]["output"]>;
|
|
170
|
-
name: Scalars["String"]["output"];
|
|
171
|
-
};
|
|
172
|
-
|
|
173
40
|
export type ServersQueryQueryVariables = Exact<{
|
|
174
41
|
input: Scalars["JSON"]["input"];
|
|
175
42
|
type: SchemaType;
|
|
@@ -219,6 +86,14 @@ export type OperationsFragmentFragment = {
|
|
|
219
86
|
mediaType: string;
|
|
220
87
|
schema?: any | null;
|
|
221
88
|
encoding?: Array<{ __typename?: "EncodingItem"; name: string }> | null;
|
|
89
|
+
examples?: Array<{
|
|
90
|
+
__typename?: "ExampleItem";
|
|
91
|
+
name: string;
|
|
92
|
+
description?: string | null;
|
|
93
|
+
externalValue?: string | null;
|
|
94
|
+
value?: string | null;
|
|
95
|
+
summary?: string | null;
|
|
96
|
+
}> | null;
|
|
222
97
|
}> | null;
|
|
223
98
|
} | null;
|
|
224
99
|
responses: Array<{
|
|
@@ -230,6 +105,14 @@ export type OperationsFragmentFragment = {
|
|
|
230
105
|
__typename?: "MediaTypeObject";
|
|
231
106
|
mediaType: string;
|
|
232
107
|
schema?: any | null;
|
|
108
|
+
examples?: Array<{
|
|
109
|
+
__typename?: "ExampleItem";
|
|
110
|
+
name: string;
|
|
111
|
+
description?: string | null;
|
|
112
|
+
externalValue?: string | null;
|
|
113
|
+
value?: string | null;
|
|
114
|
+
summary?: string | null;
|
|
115
|
+
}> | null;
|
|
233
116
|
encoding?: Array<{ __typename?: "EncodingItem"; name: string }> | null;
|
|
234
117
|
}> | null;
|
|
235
118
|
}>;
|
|
@@ -389,6 +272,35 @@ export const OperationsFragmentFragmentDoc = {
|
|
|
389
272
|
],
|
|
390
273
|
},
|
|
391
274
|
},
|
|
275
|
+
{
|
|
276
|
+
kind: "Field",
|
|
277
|
+
name: { kind: "Name", value: "examples" },
|
|
278
|
+
selectionSet: {
|
|
279
|
+
kind: "SelectionSet",
|
|
280
|
+
selections: [
|
|
281
|
+
{
|
|
282
|
+
kind: "Field",
|
|
283
|
+
name: { kind: "Name", value: "name" },
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
kind: "Field",
|
|
287
|
+
name: { kind: "Name", value: "description" },
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
kind: "Field",
|
|
291
|
+
name: { kind: "Name", value: "externalValue" },
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
kind: "Field",
|
|
295
|
+
name: { kind: "Name", value: "value" },
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
kind: "Field",
|
|
299
|
+
name: { kind: "Name", value: "summary" },
|
|
300
|
+
},
|
|
301
|
+
],
|
|
302
|
+
},
|
|
303
|
+
},
|
|
392
304
|
{
|
|
393
305
|
kind: "Field",
|
|
394
306
|
name: { kind: "Name", value: "schema" },
|
|
@@ -416,6 +328,35 @@ export const OperationsFragmentFragmentDoc = {
|
|
|
416
328
|
selectionSet: {
|
|
417
329
|
kind: "SelectionSet",
|
|
418
330
|
selections: [
|
|
331
|
+
{
|
|
332
|
+
kind: "Field",
|
|
333
|
+
name: { kind: "Name", value: "examples" },
|
|
334
|
+
selectionSet: {
|
|
335
|
+
kind: "SelectionSet",
|
|
336
|
+
selections: [
|
|
337
|
+
{
|
|
338
|
+
kind: "Field",
|
|
339
|
+
name: { kind: "Name", value: "name" },
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
kind: "Field",
|
|
343
|
+
name: { kind: "Name", value: "description" },
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
kind: "Field",
|
|
347
|
+
name: { kind: "Name", value: "externalValue" },
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
kind: "Field",
|
|
351
|
+
name: { kind: "Name", value: "value" },
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
kind: "Field",
|
|
355
|
+
name: { kind: "Name", value: "summary" },
|
|
356
|
+
},
|
|
357
|
+
],
|
|
358
|
+
},
|
|
359
|
+
},
|
|
419
360
|
{
|
|
420
361
|
kind: "Field",
|
|
421
362
|
name: { kind: "Name", value: "mediaType" },
|
|
@@ -711,6 +652,35 @@ export const AllOperationsDocument = {
|
|
|
711
652
|
],
|
|
712
653
|
},
|
|
713
654
|
},
|
|
655
|
+
{
|
|
656
|
+
kind: "Field",
|
|
657
|
+
name: { kind: "Name", value: "examples" },
|
|
658
|
+
selectionSet: {
|
|
659
|
+
kind: "SelectionSet",
|
|
660
|
+
selections: [
|
|
661
|
+
{
|
|
662
|
+
kind: "Field",
|
|
663
|
+
name: { kind: "Name", value: "name" },
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
kind: "Field",
|
|
667
|
+
name: { kind: "Name", value: "description" },
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
kind: "Field",
|
|
671
|
+
name: { kind: "Name", value: "externalValue" },
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
kind: "Field",
|
|
675
|
+
name: { kind: "Name", value: "value" },
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
kind: "Field",
|
|
679
|
+
name: { kind: "Name", value: "summary" },
|
|
680
|
+
},
|
|
681
|
+
],
|
|
682
|
+
},
|
|
683
|
+
},
|
|
714
684
|
{
|
|
715
685
|
kind: "Field",
|
|
716
686
|
name: { kind: "Name", value: "schema" },
|
|
@@ -738,6 +708,35 @@ export const AllOperationsDocument = {
|
|
|
738
708
|
selectionSet: {
|
|
739
709
|
kind: "SelectionSet",
|
|
740
710
|
selections: [
|
|
711
|
+
{
|
|
712
|
+
kind: "Field",
|
|
713
|
+
name: { kind: "Name", value: "examples" },
|
|
714
|
+
selectionSet: {
|
|
715
|
+
kind: "SelectionSet",
|
|
716
|
+
selections: [
|
|
717
|
+
{
|
|
718
|
+
kind: "Field",
|
|
719
|
+
name: { kind: "Name", value: "name" },
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
kind: "Field",
|
|
723
|
+
name: { kind: "Name", value: "description" },
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
kind: "Field",
|
|
727
|
+
name: { kind: "Name", value: "externalValue" },
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
kind: "Field",
|
|
731
|
+
name: { kind: "Name", value: "value" },
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
kind: "Field",
|
|
735
|
+
name: { kind: "Name", value: "summary" },
|
|
736
|
+
},
|
|
737
|
+
],
|
|
738
|
+
},
|
|
739
|
+
},
|
|
741
740
|
{
|
|
742
741
|
kind: "Field",
|
|
743
742
|
name: { kind: "Name", value: "mediaType" },
|