zudoku 0.35.4 → 0.35.5
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/OperationList.js +1 -0
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/ParamInfos.js +1 -1
- package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +5 -3
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js +2 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +5 -2
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/lib/{OasProvider-BbSqUQka.js → OasProvider-CJ8KOnsH.js} +2 -2
- package/lib/{OasProvider-BbSqUQka.js.map → OasProvider-CJ8KOnsH.js.map} +1 -1
- package/lib/{OperationList-CENzwqY8.js → OperationList-C4rpJdcE.js} +359 -361
- package/lib/OperationList-C4rpJdcE.js.map +1 -0
- package/lib/{index-BVhQWA89.js → index-Dowg8c_k.js} +6 -4
- package/lib/index-Dowg8c_k.js.map +1 -0
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/package.json +1 -1
- package/src/app/main.css +4 -0
- package/src/lib/plugins/openapi/OperationList.tsx +1 -0
- package/src/lib/plugins/openapi/ParamInfos.tsx +1 -1
- package/src/lib/plugins/openapi/ParameterListItem.tsx +20 -14
- package/src/lib/plugins/openapi/graphql/gql.ts +3 -3
- package/src/lib/plugins/openapi/graphql/graphql.ts +3 -0
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +10 -6
- package/lib/OperationList-CENzwqY8.js.map +0 -1
- package/lib/index-BVhQWA89.js.map +0 -1
|
@@ -5,6 +5,7 @@ import type { OperationListItemResult } from "./OperationList.js";
|
|
|
5
5
|
import type { ParameterGroup } from "./OperationListItem.js";
|
|
6
6
|
import { ParamInfos } from "./ParamInfos.js";
|
|
7
7
|
import { EnumValues } from "./components/EnumValues.js";
|
|
8
|
+
import { SelectOnClick } from "./components/SelectOnClick.js";
|
|
8
9
|
|
|
9
10
|
const getParameterSchema = (
|
|
10
11
|
parameter: ParameterListItemResult,
|
|
@@ -35,23 +36,28 @@ export const ParameterListItem = ({
|
|
|
35
36
|
return (
|
|
36
37
|
<li className="p-4 bg-border/20 text-sm flex flex-col gap-1.5">
|
|
37
38
|
<div className="flex items-center gap-2">
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
39
|
+
<SelectOnClick asChild>
|
|
40
|
+
<code>
|
|
41
|
+
{group === "path" ? (
|
|
42
|
+
<ColorizedParam
|
|
43
|
+
name={parameter.name}
|
|
44
|
+
backgroundOpacity="15%"
|
|
45
|
+
className="px-2"
|
|
46
|
+
slug={`${id}-${parameter.name}`}
|
|
47
|
+
/>
|
|
48
|
+
) : (
|
|
49
|
+
parameter.name
|
|
50
|
+
)}
|
|
51
|
+
</code>
|
|
52
|
+
</SelectOnClick>
|
|
50
53
|
<ParamInfos
|
|
51
54
|
schema={paramSchema}
|
|
52
55
|
extraItems={[
|
|
53
|
-
parameter.required &&
|
|
54
|
-
|
|
56
|
+
parameter.required && (
|
|
57
|
+
<span className="text-primary">required</span>
|
|
58
|
+
),
|
|
59
|
+
parameter.style && `style: ${parameter.style}`,
|
|
60
|
+
parameter.explode && `explode: ${parameter.explode}`,
|
|
55
61
|
]}
|
|
56
62
|
/>
|
|
57
63
|
</div>
|
|
@@ -14,7 +14,7 @@ import * as types from "./graphql.js";
|
|
|
14
14
|
*/
|
|
15
15
|
type Documents = {
|
|
16
16
|
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": typeof types.ServersQueryDocument;
|
|
17
|
-
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\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": typeof types.OperationsFragmentFragmentDoc;
|
|
17
|
+
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n parameters {\n name\n in\n description\n required\n schema\n style\n explode\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": typeof types.OperationsFragmentFragmentDoc;
|
|
18
18
|
"\n query AllOperations(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tags(name: $tag) {\n name\n description\n }\n operations(tag: $tag, untagged: $untagged) {\n slug\n ...OperationsFragment\n }\n }\n }\n": typeof types.AllOperationsDocument;
|
|
19
19
|
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": typeof types.GetServerQueryDocument;
|
|
20
20
|
"\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n tags {\n name\n }\n }\n }\n": typeof types.GetCategoriesDocument;
|
|
@@ -23,7 +23,7 @@ type Documents = {
|
|
|
23
23
|
const documents: Documents = {
|
|
24
24
|
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n":
|
|
25
25
|
types.ServersQueryDocument,
|
|
26
|
-
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\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":
|
|
26
|
+
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n parameters {\n name\n in\n description\n required\n schema\n style\n explode\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":
|
|
27
27
|
types.OperationsFragmentFragmentDoc,
|
|
28
28
|
"\n query AllOperations(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tags(name: $tag) {\n name\n description\n }\n operations(tag: $tag, untagged: $untagged) {\n slug\n ...OperationsFragment\n }\n }\n }\n":
|
|
29
29
|
types.AllOperationsDocument,
|
|
@@ -45,7 +45,7 @@ export function graphql(
|
|
|
45
45
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
46
46
|
*/
|
|
47
47
|
export function graphql(
|
|
48
|
-
source: "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\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",
|
|
48
|
+
source: "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n parameters {\n name\n in\n description\n required\n schema\n style\n explode\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",
|
|
49
49
|
): typeof import("./graphql.js").OperationsFragmentFragmentDoc;
|
|
50
50
|
/**
|
|
51
51
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
@@ -212,6 +212,7 @@ export type OperationsFragmentFragment = {
|
|
|
212
212
|
required?: boolean | null;
|
|
213
213
|
schema?: any | null;
|
|
214
214
|
style?: string | null;
|
|
215
|
+
explode?: boolean | null;
|
|
215
216
|
examples?: Array<{
|
|
216
217
|
__typename?: "ExampleItem";
|
|
217
218
|
name: string;
|
|
@@ -390,6 +391,7 @@ export const OperationsFragmentFragmentDoc = new TypedDocumentString(
|
|
|
390
391
|
required
|
|
391
392
|
schema
|
|
392
393
|
style
|
|
394
|
+
explode
|
|
393
395
|
examples {
|
|
394
396
|
name
|
|
395
397
|
description
|
|
@@ -490,6 +492,7 @@ export const AllOperationsDocument = new TypedDocumentString(`
|
|
|
490
492
|
required
|
|
491
493
|
schema
|
|
492
494
|
style
|
|
495
|
+
explode
|
|
493
496
|
examples {
|
|
494
497
|
name
|
|
495
498
|
description
|
|
@@ -7,6 +7,7 @@ import { Button } from "../../../ui/Button.js";
|
|
|
7
7
|
import { cn } from "../../../util/cn.js";
|
|
8
8
|
import { objectEntries } from "../../../util/objectEntries.js";
|
|
9
9
|
import { EnumValues } from "../components/EnumValues.js";
|
|
10
|
+
import { SelectOnClick } from "../components/SelectOnClick.js";
|
|
10
11
|
import { ParamInfos } from "../ParamInfos.js";
|
|
11
12
|
import { LogicalGroup } from "./LogicalGroup/LogicalGroup.js";
|
|
12
13
|
import { SchemaView } from "./SchemaView.js";
|
|
@@ -72,10 +73,7 @@ export const SchemaPropertyItem = ({
|
|
|
72
73
|
<div className="flex flex-col gap-2.5 justify-between text-sm">
|
|
73
74
|
<div className="flex gap-2 items-center">
|
|
74
75
|
<code>{name}</code>
|
|
75
|
-
<ParamInfos
|
|
76
|
-
schema={schema}
|
|
77
|
-
extraItems={[group === "optional" && "optional"]}
|
|
78
|
-
/>
|
|
76
|
+
<ParamInfos schema={schema} />
|
|
79
77
|
<RecursiveIndicator />
|
|
80
78
|
</div>
|
|
81
79
|
</div>
|
|
@@ -87,10 +85,16 @@ export const SchemaPropertyItem = ({
|
|
|
87
85
|
<li className="p-4 bg-border/20 hover:bg-border/30">
|
|
88
86
|
<div className="flex flex-col gap-2.5 justify-between text-sm">
|
|
89
87
|
<div className="flex gap-2 items-center">
|
|
90
|
-
<
|
|
88
|
+
<SelectOnClick asChild>
|
|
89
|
+
<code>{name}</code>
|
|
90
|
+
</SelectOnClick>
|
|
91
91
|
<ParamInfos
|
|
92
92
|
schema={schema}
|
|
93
|
-
extraItems={[
|
|
93
|
+
extraItems={[
|
|
94
|
+
group !== "optional" && (
|
|
95
|
+
<span className="text-primary">required</span>
|
|
96
|
+
),
|
|
97
|
+
]}
|
|
94
98
|
/>
|
|
95
99
|
{schema.type === "array" &&
|
|
96
100
|
"items" in schema &&
|