@mintlify/msft-sdk 1.1.61 → 1.1.63
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/api-playground/ApiPlayground/Response/DownloadFileButton.js +6 -5
- package/dist/api-playground/ApiPlayground/Response/ResponseBody/CodeResponseContent.js +13 -12
- package/dist/api-playground/ApiPlayground/Response/ResponsePlaceholder.js +8 -7
- package/dist/api-playground/ApiPlayground/Response/ResponseTable.js +3 -2
- package/dist/api-playground/ApiPlayground/Response/ResponseTopbar.js +9 -8
- package/dist/api-playground/ApiPlayground/Response/index.js +4 -3
- package/dist/api-playground/ApiPlayground/components/AdditionalPropertyButton.js +42 -21
- package/dist/api-playground/ApiPlayground/components/ParamFieldWrapper.js +13 -9
- package/dist/api-playground/ApiPlayground/components/PlaygroundModalWrapper.js +6 -5
- package/dist/api-playground/ApiPlayground/components/SendPill.js +3 -2
- package/dist/api-playground/ApiPlayground/components/TypeDropdown.js +6 -5
- package/dist/api-playground/EndpointFields/ParamFields/ExampleDescription.js +3 -2
- package/dist/api-playground/EndpointFields/components/Description.js +6 -5
- package/dist/api-playground/EndpointFields/components/OptionDropdown.js +9 -8
- package/dist/api-playground/EndpointFields/components/SectionHeading.js +8 -7
- package/dist/api-playground-2/ApiExamples.js +19 -20
- package/dist/api-playground-2/ApiFields.js +20 -247
- package/dist/api-playground-2/EndpointHeader.js +59 -47
- package/dist/api-playground-2/OperationPage.js +70 -66
- package/dist/api-playground-2/Playground.js +67 -83
- package/dist/api-playground-2/SchemaPage.js +22 -9
- package/dist/api-playground-2/components/EndpointFields/Body.js +40 -0
- package/dist/api-playground-2/components/EndpointFields/Parameters.js +90 -0
- package/dist/api-playground-2/components/EndpointFields/Response.js +146 -0
- package/dist/api-playground-2/components/EndpointFields/Security.js +88 -0
- package/dist/api-playground-2/components/EndpointFields/fields/ArrayParamField.js +93 -0
- package/dist/api-playground-2/components/EndpointFields/fields/Enum.js +29 -11
- package/dist/api-playground-2/components/EndpointFields/fields/ObjectParamField.js +145 -0
- package/dist/api-playground-2/components/EndpointFields/fields/PrimitiveParamField.js +60 -48
- package/dist/api-playground-2/components/EndpointFields/fields/SchemaField.js +230 -0
- package/dist/api-playground-2/components/Example/GeneratedRequestExample.js +93 -89
- package/dist/api-playground-2/components/Example/GeneratedResponseExample.js +18 -17
- package/dist/api-playground-2/components/Example/RequestExample.js +92 -93
- package/dist/api-playground-2/components/Example/ResponseExample.js +19 -15
- package/dist/api-playground-2/components/Request/ParameterSection.js +20 -18
- package/dist/api-playground-2/components/Request/SecuritySection.js +53 -43
- package/dist/api-playground-2/components/Request/inputs/ArrayInput.js +89 -40
- package/dist/api-playground-2/components/Request/inputs/DifferentiatedInput.js +12 -12
- package/dist/api-playground-2/components/Request/inputs/FileInput.js +16 -15
- package/dist/api-playground-2/components/Request/inputs/InputContainer.js +76 -57
- package/dist/api-playground-2/components/Request/inputs/NumberInput.js +10 -9
- package/dist/api-playground-2/components/Request/inputs/ObjectInput.js +98 -80
- package/dist/api-playground-2/components/Request/inputs/OneOfInput.js +55 -47
- package/dist/api-playground-2/components/Request/inputs/SelectInput.js +18 -17
- package/dist/api-playground-2/components/Request/inputs/StringInput.js +19 -18
- package/dist/api-playground-2/components/Request/inputs/TextInput.js +12 -11
- package/dist/api-playground-2/components/SendPillWrapper.js +35 -0
- package/dist/api-playground-2/contexts/ApiPlaygroundContext.js +3 -5
- package/dist/api-playground-2/generators/createCookies.js +23 -0
- package/dist/api-playground-2/generators/createHeaders.js +53 -36
- package/dist/api-playground-2/generators/createQueryString.js +30 -0
- package/dist/api-playground-2/generators/generateAuthPlaceholder.js +14 -0
- package/dist/api-playground-2/generators/generateInteractiveCodeSample.js +27 -25
- package/dist/api-playground-2/generators/generateRequest.js +47 -51
- package/dist/api-playground-2/generators/generateResponseExampleMap.js +15 -11
- package/dist/api-playground-2/generators/generateSnippet.js +1 -1
- package/dist/api-playground-2/generators/generateSnippetMap.js +13 -11
- package/dist/api-playground-2/hooks/useCopyPathWithInputs.js +11 -11
- package/dist/api-playground-2/hooks/useInitializeInputs.js +185 -88
- package/dist/api-playground-2/hooks/usePlaygroundInputsStore.js +70 -25
- package/dist/api-playground-2/hooks/useSelectedBaseUrl.js +13 -0
- package/dist/api-playground-2/hooks/useSelectedExample.js +10 -0
- package/dist/api-playground-2/hooks/useSelectedRequestBodyContentType.js +12 -0
- package/dist/api-playground-2/hooks/useSelectedResponseContentType.js +12 -0
- package/dist/api-playground-2/hooks/useSelectedSecurityOption.js +31 -0
- package/dist/api-playground-2/hooks/useSendPlaygroundRequest.js +114 -101
- package/dist/api-playground-2/schemaGraph/addApiReferenceDataFromMdxAndDocsConfig.js +23 -32
- package/dist/api-playground-2/schemaGraph/addTypeLabelsToSchema.js +50 -0
- package/dist/api-playground-2/schemaGraph/addUniqueKeysToSchema.js +40 -24
- package/dist/api-playground-2/schemaGraph/getExampleBodyInputs.js +94 -0
- package/dist/api-playground-2/schemaGraph/getSchemaGraphOperationData.js +56 -50
- package/dist/api-playground-2/schemaGraph/processExamples.js +117 -52
- package/dist/api-playground-2/schemaGraph/processSchema.js +10 -0
- package/dist/api-playground-2/schemaGraph/processSecurityOptions.js +58 -28
- package/dist/api-playground-2/schemaGraph/reduceCompositions.js +220 -181
- package/dist/api-playground-2/schemaGraph/resolveOperationWithDependencies.js +128 -89
- package/dist/api-playground-2/schemaGraph/resolveSchemaWithDependencies.js +15 -16
- package/dist/api-playground-2/schemaGraph/sortSchemaByRequired.js +14 -12
- package/dist/api-playground-2/schemaGraph/utils.js +185 -147
- package/dist/common/guards.js +11 -19
- package/dist/components/Api/Expandable.js +10 -9
- package/dist/components/Api/Param.js +11 -13
- package/dist/components/Api/dropdown-menu.js +10 -9
- package/dist/components/content-components/code-group.js +4 -4
- package/dist/contexts/EndpointLocationContext.js +3 -3
- package/dist/hooks/useApiParamFieldOption.js +10 -0
- package/dist/hooks/useEndpoint.js +3 -3
- package/dist/hooks/useKeyboardShortcut.js +13 -13
- package/dist/hooks/useSendPlaygroundRequest.js +14 -146
- package/dist/httpsnippet/src/helpers/code-builder.js +27 -0
- package/dist/httpsnippet/src/helpers/escape.js +11 -0
- package/dist/httpsnippet/src/helpers/headers.js +13 -0
- package/dist/httpsnippet/src/helpers/reducer.js +7 -0
- package/dist/httpsnippet/src/helpers/shell.js +5 -0
- package/dist/httpsnippet/src/helpers/url-format.js +35 -0
- package/dist/httpsnippet/src/helpers/url-parse.js +76 -0
- package/dist/httpsnippet/src/index.js +157 -0
- package/dist/httpsnippet/src/targets/c/libcurl/client.js +22 -0
- package/dist/httpsnippet/src/targets/c/target.js +15 -0
- package/dist/httpsnippet/src/targets/clojure/clj_http/client.js +120 -0
- package/dist/httpsnippet/src/targets/clojure/target.js +14 -0
- package/dist/httpsnippet/src/targets/csharp/httpclient/client.js +76 -0
- package/dist/httpsnippet/src/targets/csharp/restsharp/client.js +63 -0
- package/dist/httpsnippet/src/targets/csharp/target.js +17 -0
- package/dist/httpsnippet/src/targets/go/native/client.js +24 -0
- package/dist/httpsnippet/src/targets/go/target.js +15 -0
- package/dist/httpsnippet/src/targets/http/http1.1/client.js +34 -0
- package/dist/httpsnippet/src/targets/http/target.js +14 -0
- package/dist/httpsnippet/src/targets/index.js +43 -0
- package/dist/httpsnippet/src/targets/java/asynchttp/client.js +23 -0
- package/dist/httpsnippet/src/targets/java/nethttp/client.js +28 -0
- package/dist/httpsnippet/src/targets/java/okhttp/client.js +23 -0
- package/dist/httpsnippet/src/targets/java/target.js +20 -0
- package/dist/httpsnippet/src/targets/java/unirest/client.js +23 -0
- package/dist/httpsnippet/src/targets/javascript/axios/client.js +50 -0
- package/dist/httpsnippet/src/targets/javascript/fetch/client.js +61 -0
- package/dist/httpsnippet/src/targets/javascript/jquery/client.js +51 -0
- package/dist/httpsnippet/src/targets/javascript/target.js +20 -0
- package/dist/httpsnippet/src/targets/javascript/xhr/client.js +49 -0
- package/dist/httpsnippet/src/targets/json/native/client.js +39 -0
- package/dist/httpsnippet/src/targets/json/target.js +14 -0
- package/dist/httpsnippet/src/targets/kotlin/okhttp/client.js +23 -0
- package/dist/httpsnippet/src/targets/kotlin/target.js +14 -0
- package/dist/httpsnippet/src/targets/node/axios/client.js +40 -0
- package/dist/httpsnippet/src/targets/node/fetch/client.js +68 -0
- package/dist/httpsnippet/src/targets/node/native/client.js +45 -0
- package/dist/httpsnippet/src/targets/node/target.js +19 -0
- package/dist/httpsnippet/src/targets/objc/helpers.js +27 -0
- package/dist/httpsnippet/src/targets/objc/nsurlsession/client.js +63 -0
- package/dist/httpsnippet/src/targets/objc/target.js +14 -0
- package/dist/httpsnippet/src/targets/ocaml/cohttp/client.js +32 -0
- package/dist/httpsnippet/src/targets/ocaml/target.js +14 -0
- package/dist/httpsnippet/src/targets/php/curl/client.js +85 -0
- package/dist/httpsnippet/src/targets/php/guzzle/client.js +57 -0
- package/dist/httpsnippet/src/targets/php/helpers.js +65 -0
- package/dist/httpsnippet/src/targets/php/http1/client.js +28 -0
- package/dist/httpsnippet/src/targets/php/http2/client.js +55 -0
- package/dist/httpsnippet/src/targets/php/target.js +21 -0
- package/dist/httpsnippet/src/targets/powershell/common.js +19 -0
- package/dist/httpsnippet/src/targets/powershell/restmethod/client.js +14 -0
- package/dist/httpsnippet/src/targets/powershell/target.js +16 -0
- package/dist/httpsnippet/src/targets/powershell/webrequest/client.js +14 -0
- package/dist/httpsnippet/src/targets/python/helpers.js +33 -0
- package/dist/httpsnippet/src/targets/python/requests/client.js +74 -0
- package/dist/httpsnippet/src/targets/python/target.js +15 -0
- package/dist/httpsnippet/src/targets/r/httr/client.js +46 -0
- package/dist/httpsnippet/src/targets/r/target.js +14 -0
- package/dist/httpsnippet/src/targets/ruby/native/client.js +37 -0
- package/dist/httpsnippet/src/targets/ruby/target.js +14 -0
- package/dist/httpsnippet/src/targets/shell/curl/client.js +92 -0
- package/dist/httpsnippet/src/targets/shell/httpie/client.js +56 -0
- package/dist/httpsnippet/src/targets/shell/target.js +19 -0
- package/dist/httpsnippet/src/targets/shell/wget/client.js +30 -0
- package/dist/httpsnippet/src/targets/swift/helpers.js +38 -0
- package/dist/httpsnippet/src/targets/swift/target.js +14 -0
- package/dist/httpsnippet/src/targets/swift/urlsession/client.js +59 -0
- package/dist/index.d.ts +65 -58
- package/dist/index.js +109 -111
- package/dist/openapi/generateTypeStringFromSchema.js +2 -31
- package/dist/styles.css +1 -1
- package/package.json +17 -4
- package/dist/api-playground/ApiPlayground/Request/BodySection.js +0 -64
- package/dist/api-playground/ApiPlayground/Request/ParameterSection.js +0 -32
- package/dist/api-playground/ApiPlayground/Request/PlaygroundModal.js +0 -201
- package/dist/api-playground/ApiPlayground/Request/SecuritySection.js +0 -146
- package/dist/api-playground/ApiPlayground/Request/ServerSection.js +0 -30
- package/dist/api-playground/ApiPlayground/Request/index.js +0 -43
- package/dist/api-playground/ApiPlayground/Request/inputs/ArrayInput.js +0 -93
- package/dist/api-playground/ApiPlayground/Request/inputs/DifferentiatedInput.js +0 -90
- package/dist/api-playground/ApiPlayground/Request/inputs/FileInput.js +0 -62
- package/dist/api-playground/ApiPlayground/Request/inputs/NullInput.js +0 -33
- package/dist/api-playground/ApiPlayground/Request/inputs/NumberInput.js +0 -61
- package/dist/api-playground/ApiPlayground/Request/inputs/ObjectChildren.js +0 -109
- package/dist/api-playground/ApiPlayground/Request/inputs/ObjectInput.js +0 -87
- package/dist/api-playground/ApiPlayground/Request/inputs/RecursiveInput.js +0 -61
- package/dist/api-playground/ApiPlayground/Request/inputs/SelectInput.js +0 -54
- package/dist/api-playground/ApiPlayground/Request/inputs/StringInput.js +0 -67
- package/dist/api-playground/ApiPlayground/Request/inputs/TextInput.js +0 -44
- package/dist/api-playground/ApiPlayground/components/EndpointsMenu.js +0 -42
- package/dist/api-playground/ApiPlayground/components/EndpointsMenuLink.js +0 -43
- package/dist/api-playground/ApiPlayground/components/EndpointsMenuSearch.js +0 -38
- package/dist/api-playground/ApiPlayground/components/InputContainer.js +0 -128
- package/dist/api-playground/ApiPlayground/components/InputSectionContainer.js +0 -59
- package/dist/api-playground/ApiPlayground/components/PathHeader.js +0 -162
- package/dist/api-playground/ApiPlayground/components/TrashButton.js +0 -26
- package/dist/api-playground/ApiPlayground/index.js +0 -67
- package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/Enum.js +0 -19
- package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/NumberMetadata.js +0 -18
- package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/StringMetadata.js +0 -28
- package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/index.js +0 -5
- package/dist/api-playground/EndpointFields/ParamFields/RecursiveParamField.js +0 -13
- package/dist/api-playground/EndpointFields/index.js +0 -7
- package/dist/api-playground-2/components/EndpointFields/EndpointSecurity.js +0 -87
- package/dist/api-playground-2/components/EndpointFields/fields/SimpleArrayParamField.js +0 -89
- package/dist/api-playground-2/components/EndpointFields/fields/SimpleObjectParamField.js +0 -121
- package/dist/api-playground-2/components/EndpointFields/fields/SimplePrimitiveParamField.js +0 -74
- package/dist/api-playground-2/components/EndpointFields/fields/SimpleSchemaField.js +0 -252
- package/dist/common/potentiallyParseOpenApiString.js +0 -24
- package/dist/common/replaceSlashIndex.js +0 -6
- package/dist/common/slugToTitle.js +0 -10
- package/dist/constants/prism-languages.js +0 -19
- package/dist/contexts/ApiPlaygroundInputsContext.js +0 -17
- package/dist/contexts/MDXContentContext.js +0 -17
- package/dist/hooks/useApiPlaygroundInputs.js +0 -6
- package/dist/hooks/useApiPlaygroundPrefillExamples.js +0 -39
- package/dist/hooks/useBaseUrlOptions.js +0 -18
- package/dist/hooks/useComponentSchemas.js +0 -9
- package/dist/hooks/useGenerateNextAdditionalProperties.js +0 -11
- package/dist/hooks/useGenerateNextItems.js +0 -11
- package/dist/hooks/useGenerateNextProperties.js +0 -11
- package/dist/hooks/useMDXContent.js +0 -6
- package/dist/hooks/useMDXContentController/useApiPlaygroundInputs.js +0 -9
- package/dist/hooks/useMDXContentController/useMDXContentCallbacks/useSetApiBaseIndexCallback.js +0 -15
- package/dist/hooks/useMDXContentController/useMDXContentCallbacks/useSetApiPlaygroundInputsCallback.js +0 -15
- package/dist/hooks/usePlaygroundSchemaOptions.js +0 -42
- package/dist/hooks/usePrefilledInputs/index.js +0 -65
- package/dist/hooks/usePrefilledInputs/storedServerVariables.js +0 -29
- package/dist/hooks/useSecurityOption.js +0 -10
- package/dist/hooks/useSetDefaultValue.js +0 -63
- package/dist/openapi/filterEnums.js +0 -20
- package/dist/openapi/generateNextAdditionalProperties.js +0 -7
- package/dist/openapi/generateNextItems.js +0 -7
- package/dist/openapi/generateNextProperties.js +0 -23
- package/dist/openapi/generateOptionLabels.js +0 -20
- package/dist/openapi/generateSimpleLabels.js +0 -4
- package/dist/openapi/getAuthFilteredSchemaArray.js +0 -18
- package/dist/paths/isEqualIgnoringLeadingSlash.js +0 -21
- package/dist/paths/optionallyRemoveLeadingSlash.js +0 -6
- package/dist/paths/optionallyRemoveTrailingSlash.js +0 -6
- package/dist/utils/api-playground/defaults.js +0 -15
- package/dist/utils/api-playground/paramFieldDefaults.js +0 -10
- package/dist/utils/api-reference/getFilteredSecurityOptions.js +0 -4
- package/dist/utils/api-reference/getNextPropertiesByType.js +0 -5
- package/dist/utils/flattenObject.js +0 -10
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { jsx as n, jsxs as u } from "react/jsx-runtime";
|
|
2
|
-
import { useState as d } from "react";
|
|
3
|
-
import { SectionHeading as f } from "../../../api-playground/EndpointFields/components/SectionHeading.js";
|
|
4
|
-
import { Classes as y } from "../../types/index.js";
|
|
5
|
-
import { cn as z } from "../../../utils/cn.js";
|
|
6
|
-
import { PrimitiveParamField as o } from "./fields/PrimitiveParamField.js";
|
|
7
|
-
const T = ({
|
|
8
|
-
apiReferenceData: m
|
|
9
|
-
}) => {
|
|
10
|
-
var c;
|
|
11
|
-
const [a, l] = d(0), s = (c = m.dependencies) == null ? void 0 : c.processedSecurityOptions;
|
|
12
|
-
if (!s) return null;
|
|
13
|
-
const p = s[a];
|
|
14
|
-
if (!p) return null;
|
|
15
|
-
const { scheme: e, schema: t } = p, i = [];
|
|
16
|
-
if (e.type === "apiKey" && "name" in e && "in" in e)
|
|
17
|
-
i.push(
|
|
18
|
-
/* @__PURE__ */ n(
|
|
19
|
-
o,
|
|
20
|
-
{
|
|
21
|
-
fieldType: "authorization",
|
|
22
|
-
schema: t,
|
|
23
|
-
typeOptions: ["string"],
|
|
24
|
-
name: e.name
|
|
25
|
-
},
|
|
26
|
-
`${e.in}:${e.name}`
|
|
27
|
-
)
|
|
28
|
-
);
|
|
29
|
-
else if (e.type === "http" && "scheme" in e)
|
|
30
|
-
if (e.scheme === "basic") {
|
|
31
|
-
const r = { ...t, type: "string" };
|
|
32
|
-
i.push(
|
|
33
|
-
/* @__PURE__ */ n(
|
|
34
|
-
o,
|
|
35
|
-
{
|
|
36
|
-
fieldType: "authorization",
|
|
37
|
-
schema: r,
|
|
38
|
-
typeOptions: ["string"],
|
|
39
|
-
name: t.title ?? "Authorization"
|
|
40
|
-
},
|
|
41
|
-
`header:${t.title}`
|
|
42
|
-
)
|
|
43
|
-
);
|
|
44
|
-
} else e.scheme === "bearer" && i.push(
|
|
45
|
-
/* @__PURE__ */ n(
|
|
46
|
-
o,
|
|
47
|
-
{
|
|
48
|
-
fieldType: "authorization",
|
|
49
|
-
schema: t,
|
|
50
|
-
typeOptions: ["string"],
|
|
51
|
-
name: t.title ?? "Authorization"
|
|
52
|
-
},
|
|
53
|
-
`header:${t.title}`
|
|
54
|
-
)
|
|
55
|
-
);
|
|
56
|
-
else e.type === "oauth2" && i.push(
|
|
57
|
-
/* @__PURE__ */ n(
|
|
58
|
-
o,
|
|
59
|
-
{
|
|
60
|
-
fieldType: "authorization",
|
|
61
|
-
schema: t,
|
|
62
|
-
typeOptions: ["string"],
|
|
63
|
-
name: t.title ?? "Authorization"
|
|
64
|
-
},
|
|
65
|
-
`header:${t.title}`
|
|
66
|
-
)
|
|
67
|
-
);
|
|
68
|
-
if (i.length === 0) return null;
|
|
69
|
-
const h = s.map(
|
|
70
|
-
(r) => r.schema.title ?? "Authorization"
|
|
71
|
-
);
|
|
72
|
-
return /* @__PURE__ */ u("div", { className: z(y.APISection), children: [
|
|
73
|
-
/* @__PURE__ */ n(
|
|
74
|
-
f,
|
|
75
|
-
{
|
|
76
|
-
title: "Authorizations",
|
|
77
|
-
options: h,
|
|
78
|
-
selectedIndex: a,
|
|
79
|
-
onSelectOption: l
|
|
80
|
-
}
|
|
81
|
-
),
|
|
82
|
-
i
|
|
83
|
-
] });
|
|
84
|
-
};
|
|
85
|
-
export {
|
|
86
|
-
T as EndpointSecurity
|
|
87
|
-
};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { jsx as i, jsxs as d, Fragment as t } from "react/jsx-runtime";
|
|
2
|
-
import { isArrayObject as j } from "../../../schemaGraph/utils.js";
|
|
3
|
-
import { ParamFieldWrapper as k } from "../../../../api-playground/ApiPlayground/components/ParamFieldWrapper.js";
|
|
4
|
-
import { ExampleDescription as q } from "../../../../api-playground/EndpointFields/ParamFields/ExampleDescription.js";
|
|
5
|
-
import { Description as F } from "../../../../api-playground/EndpointFields/components/Description.js";
|
|
6
|
-
import { ParamHead as M } from "../../../../components/Api/Param.js";
|
|
7
|
-
import { SimpleSchemaField as N } from "./SimpleSchemaField.js";
|
|
8
|
-
import { cn as l } from "../../../../utils/cn.js";
|
|
9
|
-
const H = ({
|
|
10
|
-
displayFlattened: r = !1,
|
|
11
|
-
fieldType: e,
|
|
12
|
-
schema: n,
|
|
13
|
-
name: c,
|
|
14
|
-
location: m,
|
|
15
|
-
parentName: a,
|
|
16
|
-
typeOptions: o,
|
|
17
|
-
selectedIndex: f,
|
|
18
|
-
onSelectTypeOption: p,
|
|
19
|
-
paramId: u,
|
|
20
|
-
style: s,
|
|
21
|
-
explode: h,
|
|
22
|
-
required: g,
|
|
23
|
-
schemas: v
|
|
24
|
-
}) => {
|
|
25
|
-
if (!j(n)) return null;
|
|
26
|
-
const A = (o == null ? void 0 : o[f ?? 0]) ?? "unknown", b = n.items;
|
|
27
|
-
return /* @__PURE__ */ i(k, { paramId: u, className: "mint:array-param-field", children: /* @__PURE__ */ d("div", { className: l(!r && "mint:py-2"), children: [
|
|
28
|
-
/* @__PURE__ */ i(
|
|
29
|
-
M,
|
|
30
|
-
{
|
|
31
|
-
id: u,
|
|
32
|
-
name: c,
|
|
33
|
-
location: m,
|
|
34
|
-
required: g ?? !1,
|
|
35
|
-
deprecated: n.deprecated,
|
|
36
|
-
typeLabel: A,
|
|
37
|
-
fieldType: e,
|
|
38
|
-
typeOptions: o,
|
|
39
|
-
selectedTypeOptionIndex: f,
|
|
40
|
-
onSelectTypeOption: p,
|
|
41
|
-
parentName: a,
|
|
42
|
-
style: s,
|
|
43
|
-
explode: h
|
|
44
|
-
}
|
|
45
|
-
),
|
|
46
|
-
/* @__PURE__ */ d("div", { className: l({ "mint:mt-4 mint:mb-4": n.description }), children: [
|
|
47
|
-
c && n.description && /* @__PURE__ */ i(F, { markdown: n.description }),
|
|
48
|
-
/* @__PURE__ */ i(P, { schema: n, description: n.description }),
|
|
49
|
-
/* @__PURE__ */ i(
|
|
50
|
-
N,
|
|
51
|
-
{
|
|
52
|
-
schema: b,
|
|
53
|
-
displayFlattened: r,
|
|
54
|
-
fieldType: e,
|
|
55
|
-
location: m,
|
|
56
|
-
parentName: a,
|
|
57
|
-
style: s,
|
|
58
|
-
explode: h,
|
|
59
|
-
onSelectTypeOption: p,
|
|
60
|
-
schemas: v
|
|
61
|
-
}
|
|
62
|
-
),
|
|
63
|
-
/* @__PURE__ */ i(q, { schema: n })
|
|
64
|
-
] })
|
|
65
|
-
] }) });
|
|
66
|
-
}, P = ({
|
|
67
|
-
schema: r,
|
|
68
|
-
description: e
|
|
69
|
-
}) => /* @__PURE__ */ i(t, { children: (r.minItems !== void 0 || r.maxItems !== void 0) && /* @__PURE__ */ i("div", { className: l("mint:prose mint:prose-sm mint:prose-gray mint:dark:prose-invert", e && "mint:mt-6"), children: /* @__PURE__ */ i(S, { minItems: r.minItems, maxItems: r.maxItems }) }) }), S = ({ minItems: r, maxItems: e }) => r === e && r !== void 0 ? /* @__PURE__ */ d(t, { children: [
|
|
70
|
-
"Required array length: ",
|
|
71
|
-
/* @__PURE__ */ i("code", { children: r }),
|
|
72
|
-
" element",
|
|
73
|
-
r > 1 ? "s" : ""
|
|
74
|
-
] }) : r && e ? /* @__PURE__ */ d(t, { children: [
|
|
75
|
-
"Required array length: ",
|
|
76
|
-
/* @__PURE__ */ i("code", { children: `${r} - ${e}` }),
|
|
77
|
-
" element",
|
|
78
|
-
e > 1 ? "s" : ""
|
|
79
|
-
] }) : r ? /* @__PURE__ */ d(t, { children: [
|
|
80
|
-
"Minimum length: ",
|
|
81
|
-
/* @__PURE__ */ i("code", { children: r })
|
|
82
|
-
] }) : e ? /* @__PURE__ */ d(t, { children: [
|
|
83
|
-
"Maximum length: ",
|
|
84
|
-
/* @__PURE__ */ i("code", { children: e })
|
|
85
|
-
] }) : "";
|
|
86
|
-
export {
|
|
87
|
-
P as ArrayMetadata,
|
|
88
|
-
H as SimpleArrayParamField
|
|
89
|
-
};
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { jsx as i, jsxs as u, Fragment as L } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as M } from "react";
|
|
3
|
-
import { isSchemaObject as O } from "../../../schemaGraph/utils.js";
|
|
4
|
-
import { ParamFieldWrapper as R } from "../../../../api-playground/ApiPlayground/components/ParamFieldWrapper.js";
|
|
5
|
-
import { ExampleDescription as y } from "../../../../api-playground/EndpointFields/ParamFields/ExampleDescription.js";
|
|
6
|
-
import { getRecursiveParentName as C } from "../../../../api-playground/EndpointFields/ParamFields/RecursiveParamField.js";
|
|
7
|
-
import { Description as S } from "../../../../api-playground/EndpointFields/components/Description.js";
|
|
8
|
-
import { OneOfSelection as H } from "../../../../api-playground/EndpointFields/components/OneOfDropdown.js";
|
|
9
|
-
import { Expandable as U } from "../../../../components/Api/Expandable.js";
|
|
10
|
-
import { ParamHead as W } from "../../../../components/Api/Param.js";
|
|
11
|
-
import { generateSimpleSchemaLabel as z, SimpleSchemaField as A } from "./SimpleSchemaField.js";
|
|
12
|
-
import { cn as P } from "../../../../utils/cn.js";
|
|
13
|
-
function B(e) {
|
|
14
|
-
return e.type !== "object" ? { properties: void 0, additionalProperties: void 0 } : {
|
|
15
|
-
properties: e.properties,
|
|
16
|
-
additionalProperties: e.additionalProperties
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
const ir = ({
|
|
20
|
-
fieldType: e,
|
|
21
|
-
schema: r,
|
|
22
|
-
name: t,
|
|
23
|
-
location: p,
|
|
24
|
-
parentName: a,
|
|
25
|
-
typeOptions: q,
|
|
26
|
-
selectedIndex: j,
|
|
27
|
-
onSelectTypeOption: n,
|
|
28
|
-
paramId: v,
|
|
29
|
-
style: s,
|
|
30
|
-
explode: c,
|
|
31
|
-
required: w,
|
|
32
|
-
displayFlattened: f = !1,
|
|
33
|
-
schemas: x,
|
|
34
|
-
oneOfOptions: l
|
|
35
|
-
}) => {
|
|
36
|
-
const { properties: b, additionalProperties: o } = B(r), g = M(() => {
|
|
37
|
-
const E = [], N = (d, m) => {
|
|
38
|
-
const D = C(t ?? void 0, a), F = /* @__PURE__ */ i(
|
|
39
|
-
A,
|
|
40
|
-
{
|
|
41
|
-
schema: m,
|
|
42
|
-
name: d,
|
|
43
|
-
required: m.isRequired,
|
|
44
|
-
fieldType: e,
|
|
45
|
-
location: p,
|
|
46
|
-
parentName: D,
|
|
47
|
-
style: s,
|
|
48
|
-
explode: c,
|
|
49
|
-
onSelectTypeOption: n,
|
|
50
|
-
schemas: x
|
|
51
|
-
},
|
|
52
|
-
d
|
|
53
|
-
);
|
|
54
|
-
E.push(F);
|
|
55
|
-
};
|
|
56
|
-
return b && Object.entries(b).forEach(([d, m]) => {
|
|
57
|
-
N(d, m);
|
|
58
|
-
}), o && typeof o == "object" && O(o) && N("{key}", o), E;
|
|
59
|
-
}, [
|
|
60
|
-
b,
|
|
61
|
-
o,
|
|
62
|
-
e,
|
|
63
|
-
t,
|
|
64
|
-
a,
|
|
65
|
-
p,
|
|
66
|
-
s,
|
|
67
|
-
c,
|
|
68
|
-
n,
|
|
69
|
-
x
|
|
70
|
-
]), h = g.length > 0, k = z(r, !1);
|
|
71
|
-
return /* @__PURE__ */ i(R, { paramId: v, className: "mint:object-param-field", children: /* @__PURE__ */ u("div", { className: P(!f && "mint:py-0"), children: [
|
|
72
|
-
/* @__PURE__ */ i(
|
|
73
|
-
W,
|
|
74
|
-
{
|
|
75
|
-
id: v,
|
|
76
|
-
name: t,
|
|
77
|
-
location: p,
|
|
78
|
-
required: w ?? !1,
|
|
79
|
-
deprecated: r.deprecated,
|
|
80
|
-
typeLabel: k,
|
|
81
|
-
fieldType: e,
|
|
82
|
-
typeOptions: q ?? [k],
|
|
83
|
-
selectedTypeOptionIndex: j,
|
|
84
|
-
onSelectTypeOption: n,
|
|
85
|
-
parentName: a,
|
|
86
|
-
style: s,
|
|
87
|
-
explode: c
|
|
88
|
-
}
|
|
89
|
-
),
|
|
90
|
-
/* @__PURE__ */ u("div", { className: P({ "mint:mt-0": r.description || h }), children: [
|
|
91
|
-
t && r.description && /* @__PURE__ */ i(S, { markdown: r.description }),
|
|
92
|
-
/* @__PURE__ */ u(
|
|
93
|
-
"div",
|
|
94
|
-
{
|
|
95
|
-
className: P({
|
|
96
|
-
"mint:mt-4 mint:mb-4 mint:rounded-xl mint:border mint:border-gray-100 mint:px-4 mint:pb-4 mint:pt-2 mint:dark:border-white/10": l
|
|
97
|
-
}),
|
|
98
|
-
children: [
|
|
99
|
-
l && /* @__PURE__ */ i(
|
|
100
|
-
H,
|
|
101
|
-
{
|
|
102
|
-
selectedIndex: j,
|
|
103
|
-
options: l,
|
|
104
|
-
onSelectOption: n
|
|
105
|
-
}
|
|
106
|
-
),
|
|
107
|
-
!t && r.description && /* @__PURE__ */ i(S, { markdown: r.description }),
|
|
108
|
-
h && /* @__PURE__ */ i(G, { expandable: !f, defaultOpen: f, children: /* @__PURE__ */ i("div", { children: g }) }),
|
|
109
|
-
/* @__PURE__ */ i(y, { schema: r })
|
|
110
|
-
]
|
|
111
|
-
}
|
|
112
|
-
)
|
|
113
|
-
] })
|
|
114
|
-
] }) });
|
|
115
|
-
};
|
|
116
|
-
function G({ expandable: e, children: r, ...t }) {
|
|
117
|
-
return e ? /* @__PURE__ */ i(U, { ...t, children: r }) : /* @__PURE__ */ i(L, { children: r });
|
|
118
|
-
}
|
|
119
|
-
export {
|
|
120
|
-
ir as SimpleObjectParamField
|
|
121
|
-
};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { jsx as i, jsxs as e } from "react/jsx-runtime";
|
|
2
|
-
import { ParamFieldWrapper as b } from "../../../../api-playground/ApiPlayground/components/ParamFieldWrapper.js";
|
|
3
|
-
import { ExampleDescription as x } from "../../../../api-playground/EndpointFields/ParamFields/ExampleDescription.js";
|
|
4
|
-
import { EnumOptions as g } from "../../../../api-playground/EndpointFields/ParamFields/PrimitiveParamField/Enum.js";
|
|
5
|
-
import { NumberMetadata as w } from "../../../../api-playground/EndpointFields/ParamFields/PrimitiveParamField/NumberMetadata.js";
|
|
6
|
-
import { StringMetadata as S } from "../../../../api-playground/EndpointFields/ParamFields/PrimitiveParamField/StringMetadata.js";
|
|
7
|
-
import { Description as h } from "../../../../api-playground/EndpointFields/components/Description.js";
|
|
8
|
-
import { ParamHead as E } from "../../../../components/Api/Param.js";
|
|
9
|
-
import { cn as P } from "../../../../utils/cn.js";
|
|
10
|
-
const T = ({
|
|
11
|
-
fieldType: t,
|
|
12
|
-
schema: r,
|
|
13
|
-
required: m,
|
|
14
|
-
name: p,
|
|
15
|
-
location: u,
|
|
16
|
-
typeOptions: d,
|
|
17
|
-
selectedIndex: l,
|
|
18
|
-
onSelectTypeOption: f,
|
|
19
|
-
parentName: v,
|
|
20
|
-
paramId: s,
|
|
21
|
-
style: y,
|
|
22
|
-
explode: N,
|
|
23
|
-
enumTable: o
|
|
24
|
-
}) => {
|
|
25
|
-
const a = d[l ?? 0], n = r.description ?? (p === void 0 ? `The ${t} is of type \`${a}\`.` : void 0);
|
|
26
|
-
return /* @__PURE__ */ i(b, { paramId: s, className: "mint:primitive-param-field", children: /* @__PURE__ */ e("div", { className: "mint:py-2", children: [
|
|
27
|
-
/* @__PURE__ */ i(
|
|
28
|
-
E,
|
|
29
|
-
{
|
|
30
|
-
id: s,
|
|
31
|
-
name: p,
|
|
32
|
-
typeLabel: a,
|
|
33
|
-
location: u,
|
|
34
|
-
fieldType: t,
|
|
35
|
-
required: m ?? !1,
|
|
36
|
-
deprecated: r.deprecated,
|
|
37
|
-
defaultValue: r.default,
|
|
38
|
-
typeOptions: d,
|
|
39
|
-
selectedTypeOptionIndex: l,
|
|
40
|
-
onSelectTypeOption: f,
|
|
41
|
-
parentName: v,
|
|
42
|
-
style: y,
|
|
43
|
-
explode: N
|
|
44
|
-
}
|
|
45
|
-
),
|
|
46
|
-
/* @__PURE__ */ e("div", { className: P({ "mint:mt-4 mint:mb-4": n || c(r) }), children: [
|
|
47
|
-
n && /* @__PURE__ */ i(h, { markdown: n }),
|
|
48
|
-
o && /* @__PURE__ */ i(D, { enumTable: o }),
|
|
49
|
-
!o && c(r) && /* @__PURE__ */ i(g, { schema: r }),
|
|
50
|
-
j(r) && /* @__PURE__ */ i(S, { schema: r, description: n }),
|
|
51
|
-
C(r) && /* @__PURE__ */ i(w, { schema: r }),
|
|
52
|
-
/* @__PURE__ */ i(x, { schema: r })
|
|
53
|
-
] })
|
|
54
|
-
] }) });
|
|
55
|
-
}, c = (t) => t.type === "enum<integer>" || t.type === "enum<number>" || t.type === "enum<string>" || "enum" in t, j = (t) => t.type === "string", C = (t) => t.type === "number" || t.type === "integer", D = ({
|
|
56
|
-
enumTable: t
|
|
57
|
-
}) => /* @__PURE__ */ e("div", { className: "mint:whitespace-pre-wrap mint:prose mint:prose-sm mint:mt-6", children: [
|
|
58
|
-
"Available options:",
|
|
59
|
-
/* @__PURE__ */ e("table", { className: "mint:w-min mint:max-w-full mint:text-sm not-prose", children: [
|
|
60
|
-
/* @__PURE__ */ e("tr", { children: [
|
|
61
|
-
/* @__PURE__ */ i("th", { className: "mint:text-left", children: "Title" }),
|
|
62
|
-
/* @__PURE__ */ i("th", { children: "Const" })
|
|
63
|
-
] }),
|
|
64
|
-
t.map(({ title: r, const: m }) => /* @__PURE__ */ e("tr", { children: [
|
|
65
|
-
/* @__PURE__ */ i("td", { children: r }),
|
|
66
|
-
/* @__PURE__ */ i("td", { children: /* @__PURE__ */ i("code", { children: m }) })
|
|
67
|
-
] }, r))
|
|
68
|
-
] })
|
|
69
|
-
] });
|
|
70
|
-
export {
|
|
71
|
-
D as EnumConstTable,
|
|
72
|
-
T as SimplePrimitiveParamField,
|
|
73
|
-
c as isEnum
|
|
74
|
-
};
|
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { useState as E } from "react";
|
|
3
|
-
import { CIRCULAR_REF_KEY as k } from "../../../constants/index.js";
|
|
4
|
-
import { isCircularRef as I, isSchemaObject as A, isEnum as C, filterSchemasWithConsts as T, isArrayObject as U } from "../../../schemaGraph/utils.js";
|
|
5
|
-
import { Expandable as z } from "../../../../components/Api/Expandable.js";
|
|
6
|
-
import { SimpleArrayParamField as F } from "./SimpleArrayParamField.js";
|
|
7
|
-
import { SimpleObjectParamField as $ } from "./SimpleObjectParamField.js";
|
|
8
|
-
import { SimplePrimitiveParamField as M } from "./SimplePrimitiveParamField.js";
|
|
9
|
-
const w = " | null", a = (t, n, u) => {
|
|
10
|
-
const e = n ? w : "", i = u !== void 0 ? `Option ${u + 1}` : "unknown";
|
|
11
|
-
if (t.oneOf) {
|
|
12
|
-
const f = t.oneOf.filter(A).map((p, s) => a(p, n, s)), l = [...new Set(f)];
|
|
13
|
-
return l.length === 1 ? l[0] + e : `(${l.join(" | ")})${e}`;
|
|
14
|
-
}
|
|
15
|
-
if (!t.type)
|
|
16
|
-
return "properties" in t && typeof t.properties == "object" ? "object" + e : i;
|
|
17
|
-
if (Array.isArray(t.type))
|
|
18
|
-
return t.type.join(" | ");
|
|
19
|
-
if (t.enum)
|
|
20
|
-
switch (t.type) {
|
|
21
|
-
case "string":
|
|
22
|
-
return "enum<string>";
|
|
23
|
-
case "number":
|
|
24
|
-
return "enum<number>";
|
|
25
|
-
case "integer":
|
|
26
|
-
return "enum<integer>";
|
|
27
|
-
}
|
|
28
|
-
switch (t.type) {
|
|
29
|
-
case "object":
|
|
30
|
-
return "object";
|
|
31
|
-
case "array":
|
|
32
|
-
return U(t) && !Array.isArray(t.items) && A(t.items) ? `${a(t.items, n)}[]${e}` : "array";
|
|
33
|
-
case "string":
|
|
34
|
-
case "number":
|
|
35
|
-
case "integer":
|
|
36
|
-
case "boolean":
|
|
37
|
-
case "null":
|
|
38
|
-
return t.type + e;
|
|
39
|
-
default:
|
|
40
|
-
return "type" in t && typeof t.type == "string" ? t.type : i;
|
|
41
|
-
}
|
|
42
|
-
}, L = (t) => {
|
|
43
|
-
if (t.length === 0)
|
|
44
|
-
return [];
|
|
45
|
-
const n = t.some((r) => r.type === "null");
|
|
46
|
-
if (t = t.filter((r) => r.type !== "null"), t.length === 1 && t[0])
|
|
47
|
-
return [a(t[0], n, 0)];
|
|
48
|
-
if (t.every((r) => r.type === "object"))
|
|
49
|
-
return t.map((r, f) => (r.title ?? `Option ${f + 1}`) + (n ? w : ""));
|
|
50
|
-
const e = t.map((r, f) => a(r, n, f));
|
|
51
|
-
return new Set(e).size === e.length ? e : e.map((r, f) => {
|
|
52
|
-
var p;
|
|
53
|
-
return `${((p = t[f]) == null ? void 0 : p.title) ?? `Option ${f + 1}`} · ${r}` + (n ? w : "");
|
|
54
|
-
});
|
|
55
|
-
}, P = ({
|
|
56
|
-
schema: t,
|
|
57
|
-
name: n,
|
|
58
|
-
displayFlattened: u = !1,
|
|
59
|
-
typeOptions: e,
|
|
60
|
-
fieldType: i,
|
|
61
|
-
location: r,
|
|
62
|
-
parentName: f,
|
|
63
|
-
style: l,
|
|
64
|
-
explode: p,
|
|
65
|
-
required: s,
|
|
66
|
-
onSelectTypeOption: j,
|
|
67
|
-
selectedIndex: O,
|
|
68
|
-
schemas: b,
|
|
69
|
-
enumTable: W
|
|
70
|
-
}) => {
|
|
71
|
-
if (I(t)) {
|
|
72
|
-
const y = t[k], g = b == null ? void 0 : b[y];
|
|
73
|
-
return g ? /* @__PURE__ */ c(z, { lazy: !0, children: /* @__PURE__ */ c(
|
|
74
|
-
$,
|
|
75
|
-
{
|
|
76
|
-
displayFlattened: !0,
|
|
77
|
-
schema: g,
|
|
78
|
-
typeOptions: e,
|
|
79
|
-
fieldType: i,
|
|
80
|
-
name: n,
|
|
81
|
-
location: r,
|
|
82
|
-
style: l,
|
|
83
|
-
explode: p,
|
|
84
|
-
required: s,
|
|
85
|
-
schemas: b
|
|
86
|
-
}
|
|
87
|
-
) }) : null;
|
|
88
|
-
}
|
|
89
|
-
if (t.oneOf && Array.isArray(t.oneOf) && t.oneOf.length > 0) {
|
|
90
|
-
let y = t.oneOf.filter((o) => A(o));
|
|
91
|
-
if (y.length === 0) return null;
|
|
92
|
-
const g = y.some((o) => C(o) && "const" in o);
|
|
93
|
-
g && (y = T(y));
|
|
94
|
-
const R = L(y), S = y.filter((o) => o.type !== "null");
|
|
95
|
-
let v;
|
|
96
|
-
if (g && (v = y.filter((o) => C(o) && "const" in o).map((o) => ({
|
|
97
|
-
title: o.title ?? "Unknown",
|
|
98
|
-
const: o.const ?? ""
|
|
99
|
-
}))), S.length === 1 && S[0])
|
|
100
|
-
return /* @__PURE__ */ c(
|
|
101
|
-
P,
|
|
102
|
-
{
|
|
103
|
-
schema: S[0],
|
|
104
|
-
displayFlattened: u,
|
|
105
|
-
typeOptions: R,
|
|
106
|
-
fieldType: i,
|
|
107
|
-
name: n,
|
|
108
|
-
location: r,
|
|
109
|
-
style: l,
|
|
110
|
-
explode: p,
|
|
111
|
-
required: s,
|
|
112
|
-
schemas: b
|
|
113
|
-
}
|
|
114
|
-
);
|
|
115
|
-
if (S.every((o) => o.type === "object"))
|
|
116
|
-
return /* @__PURE__ */ c(
|
|
117
|
-
x,
|
|
118
|
-
{
|
|
119
|
-
schema: t,
|
|
120
|
-
schemas: S,
|
|
121
|
-
displayFlattened: u,
|
|
122
|
-
typeOptions: ["object"],
|
|
123
|
-
fieldType: i,
|
|
124
|
-
name: n,
|
|
125
|
-
location: r,
|
|
126
|
-
style: l,
|
|
127
|
-
explode: p,
|
|
128
|
-
parentName: f,
|
|
129
|
-
required: s
|
|
130
|
-
}
|
|
131
|
-
);
|
|
132
|
-
{
|
|
133
|
-
const o = S[O ?? 0];
|
|
134
|
-
return o ? /* @__PURE__ */ c(
|
|
135
|
-
_,
|
|
136
|
-
{
|
|
137
|
-
schemas: S,
|
|
138
|
-
schema: o,
|
|
139
|
-
enumTable: v,
|
|
140
|
-
displayFlattened: u,
|
|
141
|
-
typeOptions: R,
|
|
142
|
-
fieldType: i,
|
|
143
|
-
name: n,
|
|
144
|
-
location: r,
|
|
145
|
-
style: l,
|
|
146
|
-
explode: p,
|
|
147
|
-
required: s,
|
|
148
|
-
selectedIndex: O,
|
|
149
|
-
parentName: f,
|
|
150
|
-
onSelectTypeOption: j
|
|
151
|
-
}
|
|
152
|
-
) : null;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
const m = L([t]);
|
|
156
|
-
if (t.type !== "array" && t.type !== "object")
|
|
157
|
-
return /* @__PURE__ */ c(
|
|
158
|
-
M,
|
|
159
|
-
{
|
|
160
|
-
fieldType: i,
|
|
161
|
-
enumTable: W,
|
|
162
|
-
schema: t,
|
|
163
|
-
typeOptions: e ?? m,
|
|
164
|
-
name: n,
|
|
165
|
-
location: r,
|
|
166
|
-
parentName: f,
|
|
167
|
-
selectedIndex: O,
|
|
168
|
-
onSelectTypeOption: j,
|
|
169
|
-
style: l,
|
|
170
|
-
explode: p,
|
|
171
|
-
required: s
|
|
172
|
-
}
|
|
173
|
-
);
|
|
174
|
-
if (t.type === "object")
|
|
175
|
-
return /* @__PURE__ */ c(
|
|
176
|
-
$,
|
|
177
|
-
{
|
|
178
|
-
displayFlattened: u,
|
|
179
|
-
fieldType: i,
|
|
180
|
-
schema: t,
|
|
181
|
-
typeOptions: e ?? m,
|
|
182
|
-
name: n,
|
|
183
|
-
location: r,
|
|
184
|
-
parentName: f,
|
|
185
|
-
selectedIndex: O,
|
|
186
|
-
onSelectTypeOption: j,
|
|
187
|
-
style: l,
|
|
188
|
-
explode: p,
|
|
189
|
-
required: s,
|
|
190
|
-
schemas: b
|
|
191
|
-
}
|
|
192
|
-
);
|
|
193
|
-
if (t.type === "array")
|
|
194
|
-
return /* @__PURE__ */ c(
|
|
195
|
-
F,
|
|
196
|
-
{
|
|
197
|
-
displayFlattened: u,
|
|
198
|
-
fieldType: i,
|
|
199
|
-
schema: t,
|
|
200
|
-
typeOptions: e ?? m,
|
|
201
|
-
name: n,
|
|
202
|
-
location: r,
|
|
203
|
-
parentName: f,
|
|
204
|
-
selectedIndex: O,
|
|
205
|
-
onSelectTypeOption: j,
|
|
206
|
-
style: l,
|
|
207
|
-
explode: p,
|
|
208
|
-
required: s,
|
|
209
|
-
schemas: b
|
|
210
|
-
}
|
|
211
|
-
);
|
|
212
|
-
};
|
|
213
|
-
function _({
|
|
214
|
-
schemas: t,
|
|
215
|
-
...n
|
|
216
|
-
}) {
|
|
217
|
-
const [u, e] = E(0), i = t[u];
|
|
218
|
-
return i ? /* @__PURE__ */ c(
|
|
219
|
-
P,
|
|
220
|
-
{
|
|
221
|
-
...n,
|
|
222
|
-
selectedIndex: u,
|
|
223
|
-
onSelectTypeOption: e,
|
|
224
|
-
schema: i
|
|
225
|
-
}
|
|
226
|
-
) : null;
|
|
227
|
-
}
|
|
228
|
-
function x({
|
|
229
|
-
schemas: t,
|
|
230
|
-
...n
|
|
231
|
-
}) {
|
|
232
|
-
const [u, e] = E(0), i = t[u];
|
|
233
|
-
if (!i) return null;
|
|
234
|
-
const r = L(t);
|
|
235
|
-
return /* @__PURE__ */ c(
|
|
236
|
-
$,
|
|
237
|
-
{
|
|
238
|
-
...n,
|
|
239
|
-
oneOfOptions: r,
|
|
240
|
-
schema: i,
|
|
241
|
-
selectedIndex: u,
|
|
242
|
-
onSelectTypeOption: e
|
|
243
|
-
}
|
|
244
|
-
);
|
|
245
|
-
}
|
|
246
|
-
export {
|
|
247
|
-
_ as MultipleSchemasWithDropdown,
|
|
248
|
-
x as MultipleSchemasWithTabs,
|
|
249
|
-
P as SimpleSchemaField,
|
|
250
|
-
L as generateSchemaOptionLabels,
|
|
251
|
-
a as generateSimpleSchemaLabel
|
|
252
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { OpenAPIV3 as r } from "openapi-types";
|
|
2
|
-
const s = Object.values(r.HttpMethods).concat(
|
|
3
|
-
"webhook"
|
|
4
|
-
), p = (i) => {
|
|
5
|
-
const e = i.trim().split(/\s+/);
|
|
6
|
-
let n, t, o;
|
|
7
|
-
if (!(e.length > 3)) {
|
|
8
|
-
if (e[0] && e[1] && e[2])
|
|
9
|
-
[n, t, o] = e;
|
|
10
|
-
else if (e[0] && e[1])
|
|
11
|
-
[t, o] = e;
|
|
12
|
-
else
|
|
13
|
-
return;
|
|
14
|
-
if (!(t && (t = t.toLowerCase(), !s.includes(t))))
|
|
15
|
-
return {
|
|
16
|
-
method: t,
|
|
17
|
-
endpoint: o,
|
|
18
|
-
filename: n
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
export {
|
|
23
|
-
p as potentiallyParseOpenApiString
|
|
24
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
const s = (e) => {
|
|
2
|
-
const i = e.indexOf("?");
|
|
3
|
-
i > -1 && (e = e.substring(0, i));
|
|
4
|
-
const n = e.split("/");
|
|
5
|
-
let t = n[n.length - 1].split("-").join(" ");
|
|
6
|
-
return t = t.split("_").join(" "), t = t.charAt(0).toUpperCase() + t.slice(1), t;
|
|
7
|
-
};
|
|
8
|
-
export {
|
|
9
|
-
s as slugToTitle
|
|
10
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
const p = {
|
|
2
|
-
bash: "cURL",
|
|
3
|
-
c: "C",
|
|
4
|
-
csharp: "C#",
|
|
5
|
-
cpp: "C++",
|
|
6
|
-
go: "Go",
|
|
7
|
-
java: "Java",
|
|
8
|
-
javascript: "JavaScript",
|
|
9
|
-
php: "PHP",
|
|
10
|
-
python: "Python",
|
|
11
|
-
typescript: "TypeScript",
|
|
12
|
-
ruby: "Ruby",
|
|
13
|
-
json: "JSON",
|
|
14
|
-
markdown: "Markdown",
|
|
15
|
-
powershell: "PowerShell"
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
p as prismLangToDisplayLang
|
|
19
|
-
};
|