@scalar/api-reference 1.43.4 → 1.43.7
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/CHANGELOG.md +85 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +7 -7
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +5 -5
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue2.js +5 -5
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js +11 -11
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue2.js +2 -2
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js +7 -7
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.js +2 -2
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue2.js +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +16 -16
- package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.js +2 -2
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js +1 -1
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +7 -7
- package/dist/browser/standalone.js +18486 -18113
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Anchor/WithBreadcrumb.vue.js +3 -3
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +1 -1
- package/dist/components/ApiReference.vue2.js +16 -11
- package/dist/components/Content/Auth/Auth.vue.js +7 -7
- package/dist/components/Content/Content.vue.js +28 -28
- package/dist/components/Content/Models/Model.vue.js +14 -14
- package/dist/components/Content/Models/ModelTag.vue.js +8 -8
- package/dist/components/Content/Models/components/ClassicLayout.vue2.js +15 -15
- package/dist/components/Content/Models/components/ModernLayout.vue.js +11 -11
- package/dist/components/Content/Operations/TraversedEntry.vue.js +51 -51
- package/dist/components/Content/Schema/Schema.vue2.js +40 -40
- package/dist/components/Content/Schema/SchemaComposition.vue.js +17 -17
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue2.js +3 -3
- package/dist/components/Content/Schema/SchemaHeading.vue2.js +7 -7
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +31 -31
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +2 -2
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +88 -147
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue2.js +2 -2
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue2.js +6 -6
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts +14 -0
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.js +31 -0
- package/dist/components/Content/Schema/helpers/get-enum-values.d.ts +9 -0
- package/dist/components/Content/Schema/helpers/get-enum-values.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/get-enum-values.js +20 -0
- package/dist/components/Content/Schema/helpers/get-property-description.d.ts +9 -0
- package/dist/components/Content/Schema/helpers/get-property-description.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/get-property-description.js +34 -0
- package/dist/components/Content/Schema/helpers/has-complex-array-items.d.ts +10 -0
- package/dist/components/Content/Schema/helpers/has-complex-array-items.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/has-complex-array-items.js +48 -0
- package/dist/components/Content/Schema/helpers/should-display-description.d.ts +10 -0
- package/dist/components/Content/Schema/helpers/should-display-description.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/should-display-description.js +12 -0
- package/dist/components/Content/Schema/helpers/should-display-heading.d.ts +11 -0
- package/dist/components/Content/Schema/helpers/should-display-heading.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/should-display-heading.js +12 -0
- package/dist/components/Content/Schema/helpers/should-render-array-item-composition.d.ts +10 -0
- package/dist/components/Content/Schema/helpers/should-render-array-item-composition.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/should-render-array-item-composition.js +15 -0
- package/dist/components/Content/Tags/Tag.vue.js +11 -11
- package/dist/components/Content/Tags/components/ClassicLayout.vue2.js +6 -6
- package/dist/components/Content/Tags/components/ModernLayout.vue2.js +10 -10
- package/dist/components/Content/Tags/components/TagSection.vue.js +14 -14
- package/dist/components/Content/index.d.ts +1 -0
- package/dist/components/Content/index.d.ts.map +1 -1
- package/dist/components/GettingStarted.vue2.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +3 -3
- package/dist/components/IntersectionObserver.vue.js +2 -2
- package/dist/components/LoadingSkeleton.vue2.js +2 -2
- package/dist/components/MobileHeader.vue.js +6 -6
- package/dist/components/OperationPath.vue2.js +1 -1
- package/dist/components/OperationsList/OperationsList.vue2.js +5 -5
- package/dist/components/OperationsList/OperationsListItem.vue2.js +8 -8
- package/dist/components/RenderPlugins/RenderPlugins.vue.js +2 -2
- package/dist/components/Section/CompactSection.vue2.js +9 -9
- package/dist/components/Section/SectionAccordion.vue2.js +5 -5
- package/dist/components/Section/SectionContainer.vue2.js +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue2.js +3 -3
- package/dist/components/Section/SectionContent.vue2.js +1 -1
- package/dist/components/Section/SectionHeader.vue2.js +2 -2
- package/dist/components/Section/SectionHeaderTag.vue2.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +18 -16
- package/dist/features/Operation/Operation.vue.js +18 -18
- package/dist/features/Operation/components/Header.vue.js +8 -8
- package/dist/features/Operation/components/Headers.vue2.js +5 -5
- package/dist/features/Operation/components/OperationParameters.vue.js +17 -17
- package/dist/features/Operation/components/OperationResponses.vue.js +6 -6
- package/dist/features/Operation/components/ParameterList.vue.js +6 -6
- package/dist/features/Operation/components/ParameterListItem.vue2.js +16 -16
- package/dist/features/Operation/components/RequestBody.vue2.js +17 -17
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +10 -10
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +3 -3
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +49 -49
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +50 -50
- package/dist/features/Search/components/SearchButton.vue.js +5 -5
- package/dist/features/Search/components/SearchModal.vue2.js +1 -1
- package/dist/features/Search/components/SearchResult.vue.js +14 -14
- package/dist/features/example-responses/ExampleResponse.vue2.js +3 -3
- package/dist/features/external-docs/ExternalDocs.vue.js +3 -3
- package/dist/features/info-object/Contact.vue.js +6 -6
- package/dist/features/info-object/License.vue.js +4 -4
- package/dist/features/info-object/TermsOfService.vue.js +2 -2
- package/dist/features/multiple-documents/DocumentSelector.vue.js +1 -1
- package/dist/features/specification-extension/SpecificationExtension.vue2.js +3 -3
- package/dist/features/test-request-button/TestRequestButton.vue2.js +2 -2
- package/dist/features/toolbar/ApiReferenceToolbar.vue.js +4 -4
- package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.js +1 -1
- package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.js +1 -1
- package/dist/features/toolbar/ApiReferenceToolbarShare.vue.js +2 -2
- package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.js +1 -1
- package/dist/helpers/id-routing.d.ts.map +1 -1
- package/dist/helpers/id-routing.js +7 -1
- package/dist/helpers/load-from-perssistance.d.ts +32 -0
- package/dist/helpers/load-from-perssistance.d.ts.map +1 -0
- package/dist/helpers/load-from-perssistance.js +74 -0
- package/dist/helpers/map-config-plugins.d.ts +17 -2
- package/dist/helpers/map-config-plugins.d.ts.map +1 -1
- package/dist/helpers/map-config-plugins.js +20 -22
- package/dist/helpers/map-config-to-workspace-store.d.ts.map +1 -1
- package/dist/helpers/map-config-to-workspace-store.js +1 -8
- package/dist/helpers/storage.d.ts +6 -6
- package/dist/helpers/storage.d.ts.map +1 -1
- package/dist/helpers/storage.js +15 -10
- package/dist/plugins/hooks/usePluginManager.js +1 -1
- package/dist/style.css +133 -116
- package/package.json +31 -31
|
@@ -10,16 +10,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
10
10
|
},
|
|
11
11
|
setup(__props) {
|
|
12
12
|
return (_ctx, _cache) => {
|
|
13
|
-
return
|
|
13
|
+
return __props.breadcrumb && __props.breadcrumb.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
14
14
|
key: 0,
|
|
15
|
-
id:
|
|
15
|
+
id: __props.breadcrumb.join("."),
|
|
16
16
|
class: "relative scroll-mt-24"
|
|
17
17
|
}, [
|
|
18
18
|
renderSlot(_ctx.$slots, "default"),
|
|
19
19
|
createElementVNode("button", {
|
|
20
20
|
class: "text-c-3 hover:text-c-1 absolute -top-2 -left-4.5 flex h-[calc(100%+16px)] w-4.5 cursor-pointer items-center justify-center pr-1.5 opacity-0 group-hover:opacity-100 focus-visible:opacity-100",
|
|
21
21
|
type: "button",
|
|
22
|
-
onClick: _cache[0] || (_cache[0] = () =>
|
|
22
|
+
onClick: _cache[0] || (_cache[0] = () => __props.eventBus?.emit("copy-url:nav-item", { id: __props.breadcrumb.join(".") }))
|
|
23
23
|
}, [
|
|
24
24
|
createVNode(unref(ScalarIconLink), {
|
|
25
25
|
class: "size-3",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"AAgpCA,OAAO,EAEL,KAAK,4BAA4B,EAGlC,MAAM,6BAA6B,CAAA;AAyDpC,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAC;AAGF,KAAK,WAAW,GAAG;IACjB,eAAe,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1C,aAAa,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IACxC,eAAe,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1C,aAAa,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IACxC,oBAAoB,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/C,MAAM,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;CAClC,CAAC;AAwsCF,QAAA,MAAM,eAAe;;;oPAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -4,7 +4,7 @@ import _sfc_main from "./ApiReference.vue2.js";
|
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
import _export_sfc from "../_virtual/_plugin-vue_export-helper.js";
|
|
7
|
-
const ApiReference = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
7
|
+
const ApiReference = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9b26f178"]]);
|
|
8
8
|
export {
|
|
9
9
|
ApiReference as default
|
|
10
10
|
};
|
|
@@ -26,6 +26,7 @@ import { getSystemModePreference } from "../helpers/color-mode.js";
|
|
|
26
26
|
import { downloadDocument } from "../helpers/download.js";
|
|
27
27
|
import { getIdFromUrl, makeUrlFromId } from "../helpers/id-routing.js";
|
|
28
28
|
import { intersectionEnabled, scrollToLazy, blockIntersection } from "../helpers/lazy-bus.js";
|
|
29
|
+
import { loadClientFromStorage, loadAuthSchemesFromStorage } from "../helpers/load-from-perssistance.js";
|
|
29
30
|
import { mapConfigPlugins } from "../helpers/map-config-plugins.js";
|
|
30
31
|
import { mapConfigToWorkspaceStore } from "../helpers/map-config-to-workspace-store.js";
|
|
31
32
|
import { mapConfiguration } from "../helpers/map-configuration.js";
|
|
@@ -258,12 +259,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
258
259
|
workspaceStore
|
|
259
260
|
});
|
|
260
261
|
const changeSelectedDocument = async (slug, elementId) => {
|
|
261
|
-
workspaceStore.update("x-scalar-active-document", slug);
|
|
262
|
-
apiClient.value?.route({
|
|
263
|
-
documentSlug: slug,
|
|
264
|
-
method: "get",
|
|
265
|
-
path: "/"
|
|
266
|
-
});
|
|
267
262
|
const normalized = configList.value[slug];
|
|
268
263
|
if (!normalized) {
|
|
269
264
|
console.warn(`Document ${slug} not found in configList`);
|
|
@@ -275,6 +270,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
275
270
|
};
|
|
276
271
|
const onDocumentSelectPromise = config.onDocumentSelect?.();
|
|
277
272
|
syncSlugAndUrlWithDocument(slug, elementId, config);
|
|
273
|
+
apiClient.value?.route({
|
|
274
|
+
documentSlug: slug,
|
|
275
|
+
method: "get",
|
|
276
|
+
path: "/"
|
|
277
|
+
});
|
|
278
278
|
const isFirstLoad = !workspaceStore.workspace.documents[slug];
|
|
279
279
|
if (isFirstLoad) {
|
|
280
280
|
const proxy = (input, init) => fetch(redirectToProxy(config.proxyUrl, input.toString()), init);
|
|
@@ -291,6 +291,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
291
291
|
}
|
|
292
292
|
);
|
|
293
293
|
}
|
|
294
|
+
workspaceStore.update("x-scalar-active-document", slug);
|
|
295
|
+
if (config.persistAuth) {
|
|
296
|
+
loadAuthSchemesFromStorage(workspaceStore);
|
|
297
|
+
}
|
|
294
298
|
void (async () => {
|
|
295
299
|
await onDocumentSelectPromise;
|
|
296
300
|
void config.onLoaded?.(slug);
|
|
@@ -352,16 +356,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
352
356
|
}
|
|
353
357
|
);
|
|
354
358
|
onServerPrefetch(() => changeSelectedDocument(activeSlug.value));
|
|
355
|
-
onBeforeMount(
|
|
356
|
-
()
|
|
359
|
+
onBeforeMount(async () => {
|
|
360
|
+
loadClientFromStorage(workspaceStore);
|
|
361
|
+
await changeSelectedDocument(
|
|
357
362
|
activeSlug.value,
|
|
358
363
|
getIdFromUrl(
|
|
359
364
|
window.location.href,
|
|
360
365
|
configList.value[activeSlug.value]?.config.pathRouting?.basePath,
|
|
361
366
|
isMultiDocument.value ? void 0 : activeSlug.value
|
|
362
367
|
)
|
|
363
|
-
)
|
|
364
|
-
);
|
|
368
|
+
);
|
|
369
|
+
});
|
|
365
370
|
const documentUrl = computed(() => {
|
|
366
371
|
return configList.value[activeSlug.value]?.source?.url;
|
|
367
372
|
});
|
|
@@ -376,7 +381,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
376
381
|
eventBus,
|
|
377
382
|
workspaceStore,
|
|
378
383
|
options: mergedConfig,
|
|
379
|
-
plugins: mapConfigPlugins(mergedConfig
|
|
384
|
+
plugins: mapConfigPlugins(mergedConfig)
|
|
380
385
|
});
|
|
381
386
|
});
|
|
382
387
|
onBeforeUnmount(() => {
|
|
@@ -46,20 +46,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
46
46
|
{ immediate: true }
|
|
47
47
|
);
|
|
48
48
|
return (_ctx, _cache) => {
|
|
49
|
-
return Object.keys(
|
|
49
|
+
return Object.keys(__props.securitySchemes).length ? (openBlock(), createBlock(unref(AuthSelector), {
|
|
50
50
|
key: 0,
|
|
51
|
-
environment:
|
|
52
|
-
eventBus:
|
|
51
|
+
environment: __props.environment,
|
|
52
|
+
eventBus: __props.eventBus,
|
|
53
53
|
isReadOnly: "",
|
|
54
54
|
isStatic: "",
|
|
55
55
|
layout: "reference",
|
|
56
56
|
meta: { type: "document" },
|
|
57
|
-
persistAuth:
|
|
58
|
-
proxyUrl:
|
|
57
|
+
persistAuth: __props.options.persistAuth,
|
|
58
|
+
proxyUrl: __props.options.proxyUrl ?? "",
|
|
59
59
|
securityRequirements: securityRequirements.value,
|
|
60
|
-
securitySchemes:
|
|
60
|
+
securitySchemes: __props.securitySchemes,
|
|
61
61
|
selectedSecurity: selectedSecurity.value,
|
|
62
|
-
server:
|
|
62
|
+
server: __props.selectedServer,
|
|
63
63
|
title: "Authentication"
|
|
64
64
|
}, null, 8, ["environment", "eventBus", "persistAuth", "proxyUrl", "securityRequirements", "securitySchemes", "selectedSecurity", "server"])) : createCommentVNode("", true);
|
|
65
65
|
};
|
|
@@ -49,35 +49,35 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
49
|
createVNode(unref(SectionFlare)),
|
|
50
50
|
createElementVNode("div", _hoisted_1, [
|
|
51
51
|
renderSlot(_ctx.$slots, "start"),
|
|
52
|
-
createVNode(_sfc_main$1, { id:
|
|
52
|
+
createVNode(_sfc_main$1, { id: __props.infoSectionId }, {
|
|
53
53
|
"empty-state": withCtx(() => [
|
|
54
54
|
renderSlot(_ctx.$slots, "empty-state")
|
|
55
55
|
]),
|
|
56
56
|
default: withCtx(() => [
|
|
57
57
|
createVNode(unref(_sfc_main$2), {
|
|
58
|
-
id:
|
|
59
|
-
documentDownloadType:
|
|
58
|
+
id: __props.infoSectionId,
|
|
59
|
+
documentDownloadType: __props.options.documentDownloadType,
|
|
60
60
|
documentExtensions: documentExtensions.value,
|
|
61
|
-
eventBus:
|
|
62
|
-
externalDocs:
|
|
63
|
-
headingSlugGenerator:
|
|
64
|
-
info:
|
|
61
|
+
eventBus: __props.eventBus,
|
|
62
|
+
externalDocs: __props.document?.externalDocs,
|
|
63
|
+
headingSlugGenerator: __props.headingSlugGenerator,
|
|
64
|
+
info: __props.document?.info,
|
|
65
65
|
infoExtensions: infoExtensions.value,
|
|
66
|
-
layout:
|
|
67
|
-
oasVersion:
|
|
66
|
+
layout: __props.options.layout,
|
|
67
|
+
oasVersion: __props.document?.["x-original-oas-version"]
|
|
68
68
|
}, {
|
|
69
69
|
selectors: withCtx(() => [
|
|
70
70
|
createVNode(unref(ScalarErrorBoundary), null, {
|
|
71
71
|
default: withCtx(() => [
|
|
72
|
-
|
|
72
|
+
__props.document?.servers?.length ? (openBlock(), createBlock(unref(IntroductionCardItem), {
|
|
73
73
|
key: 0,
|
|
74
74
|
class: "scalar-reference-intro-server scalar-client introduction-card-item text-base leading-normal [--scalar-address-bar-height:0px]"
|
|
75
75
|
}, {
|
|
76
76
|
default: withCtx(() => [
|
|
77
77
|
createVNode(unref(_sfc_main$3), {
|
|
78
|
-
eventBus:
|
|
78
|
+
eventBus: __props.eventBus,
|
|
79
79
|
selectedServer: selectedServer.value,
|
|
80
|
-
servers:
|
|
80
|
+
servers: __props.document?.servers ?? []
|
|
81
81
|
}, null, 8, ["eventBus", "selectedServer", "servers"])
|
|
82
82
|
]),
|
|
83
83
|
_: 1
|
|
@@ -87,16 +87,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
87
87
|
}),
|
|
88
88
|
createVNode(unref(ScalarErrorBoundary), null, {
|
|
89
89
|
default: withCtx(() => [
|
|
90
|
-
|
|
90
|
+
__props.document ? (openBlock(), createBlock(unref(IntroductionCardItem), {
|
|
91
91
|
key: 0,
|
|
92
92
|
class: "scalar-reference-intro-auth scalar-client introduction-card-item leading-normal"
|
|
93
93
|
}, {
|
|
94
94
|
default: withCtx(() => [
|
|
95
95
|
createVNode(unref(_sfc_main$4), {
|
|
96
|
-
document:
|
|
97
|
-
environment:
|
|
98
|
-
eventBus:
|
|
99
|
-
options:
|
|
96
|
+
document: __props.document,
|
|
97
|
+
environment: __props.environment,
|
|
98
|
+
eventBus: __props.eventBus,
|
|
99
|
+
options: __props.options,
|
|
100
100
|
securitySchemes: securitySchemes.value,
|
|
101
101
|
selectedServer: selectedServer.value
|
|
102
102
|
}, null, 8, ["document", "environment", "eventBus", "options", "securitySchemes", "selectedServer"])
|
|
@@ -116,9 +116,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
116
116
|
createVNode(unref(ClientSelector), {
|
|
117
117
|
class: "introduction-card-item scalar-reference-intro-clients",
|
|
118
118
|
clientOptions: clientOptions.value,
|
|
119
|
-
eventBus:
|
|
120
|
-
selectedClient:
|
|
121
|
-
xScalarSdkInstallation:
|
|
119
|
+
eventBus: __props.eventBus,
|
|
120
|
+
selectedClient: __props.xScalarDefaultClient,
|
|
121
|
+
xScalarSdkInstallation: __props.document?.info?.["x-scalar-sdk-installation"]
|
|
122
122
|
}, null, 8, ["clientOptions", "eventBus", "selectedClient", "xScalarSdkInstallation"])
|
|
123
123
|
]),
|
|
124
124
|
_: 1
|
|
@@ -132,20 +132,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
132
132
|
]),
|
|
133
133
|
_: 3
|
|
134
134
|
}, 8, ["id"]),
|
|
135
|
-
|
|
135
|
+
__props.items.length && __props.document ? (openBlock(), createBlock(_sfc_main$5, {
|
|
136
136
|
key: 0,
|
|
137
137
|
clientOptions: clientOptions.value,
|
|
138
|
-
document:
|
|
139
|
-
entries:
|
|
140
|
-
eventBus:
|
|
141
|
-
expandedItems:
|
|
142
|
-
options:
|
|
138
|
+
document: __props.document,
|
|
139
|
+
entries: __props.items,
|
|
140
|
+
eventBus: __props.eventBus,
|
|
141
|
+
expandedItems: __props.expandedItems,
|
|
142
|
+
options: __props.options,
|
|
143
143
|
securitySchemes: securitySchemes.value,
|
|
144
|
-
selectedClient:
|
|
144
|
+
selectedClient: __props.xScalarDefaultClient,
|
|
145
145
|
selectedServer: selectedServer.value
|
|
146
146
|
}, null, 8, ["clientOptions", "document", "entries", "eventBus", "expandedItems", "options", "securitySchemes", "selectedClient", "selectedServer"])) : createCommentVNode("", true),
|
|
147
147
|
createVNode(unref(_sfc_main$6), {
|
|
148
|
-
options:
|
|
148
|
+
options: __props.options,
|
|
149
149
|
viewName: "content.end"
|
|
150
150
|
}, null, 8, ["options"]),
|
|
151
151
|
renderSlot(_ctx.$slots, "end"),
|
|
@@ -16,27 +16,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16
16
|
const section = useTemplateRef("section");
|
|
17
17
|
useIntersection(section, () => __props.eventBus?.emit("intersecting:nav-item", { id: __props.id }));
|
|
18
18
|
return (_ctx, _cache) => {
|
|
19
|
-
return
|
|
19
|
+
return __props.schema ? (openBlock(), createElementBlock("div", {
|
|
20
20
|
key: 0,
|
|
21
21
|
ref_key: "section",
|
|
22
22
|
ref: section
|
|
23
23
|
}, [
|
|
24
|
-
|
|
24
|
+
__props.options.layout === "classic" ? (openBlock(), createBlock(ClassicLayout, {
|
|
25
25
|
key: 0,
|
|
26
|
-
id:
|
|
27
|
-
eventBus:
|
|
28
|
-
isCollapsed:
|
|
29
|
-
name:
|
|
30
|
-
options:
|
|
31
|
-
schema:
|
|
26
|
+
id: __props.id,
|
|
27
|
+
eventBus: __props.eventBus,
|
|
28
|
+
isCollapsed: __props.isCollapsed,
|
|
29
|
+
name: __props.name,
|
|
30
|
+
options: __props.options,
|
|
31
|
+
schema: __props.schema
|
|
32
32
|
}, null, 8, ["id", "eventBus", "isCollapsed", "name", "options", "schema"])) : (openBlock(), createBlock(_sfc_main$1, {
|
|
33
33
|
key: 1,
|
|
34
|
-
id:
|
|
35
|
-
eventBus:
|
|
36
|
-
isCollapsed:
|
|
37
|
-
name:
|
|
38
|
-
options:
|
|
39
|
-
schema:
|
|
34
|
+
id: __props.id,
|
|
35
|
+
eventBus: __props.eventBus,
|
|
36
|
+
isCollapsed: __props.isCollapsed,
|
|
37
|
+
name: __props.name,
|
|
38
|
+
options: __props.options,
|
|
39
|
+
schema: __props.schema
|
|
40
40
|
}, null, 8, ["id", "eventBus", "isCollapsed", "name", "options", "schema"]))
|
|
41
41
|
], 512)) : createCommentVNode("", true);
|
|
42
42
|
};
|
|
@@ -18,15 +18,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
return (_ctx, _cache) => {
|
|
19
19
|
return openBlock(), createBlock(_sfc_main$1, { id: "models" }, {
|
|
20
20
|
default: withCtx(() => [
|
|
21
|
-
|
|
21
|
+
__props.layout === "modern" ? (openBlock(), createBlock(SectionContainer, {
|
|
22
22
|
key: 0,
|
|
23
23
|
id: "model"
|
|
24
24
|
}, {
|
|
25
25
|
default: withCtx(() => [
|
|
26
26
|
createVNode(unref(Section), {
|
|
27
|
-
id:
|
|
27
|
+
id: __props.id,
|
|
28
28
|
"aria-label": "Models",
|
|
29
|
-
onIntersecting: _cache[1] || (_cache[1] = () =>
|
|
29
|
+
onIntersecting: _cache[1] || (_cache[1] = () => __props.eventBus?.emit("intersecting:nav-item", { id: __props.id }))
|
|
30
30
|
}, {
|
|
31
31
|
default: withCtx(() => [
|
|
32
32
|
createVNode(unref(SectionHeader), null, {
|
|
@@ -40,11 +40,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
40
40
|
]),
|
|
41
41
|
_: 1
|
|
42
42
|
}),
|
|
43
|
-
!
|
|
43
|
+
!__props.isCollapsed ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createBlock(ShowMoreButton, {
|
|
44
44
|
key: 1,
|
|
45
|
-
id:
|
|
45
|
+
id: __props.id,
|
|
46
46
|
class: "top-0",
|
|
47
|
-
onClick: _cache[0] || (_cache[0] = () =>
|
|
47
|
+
onClick: _cache[0] || (_cache[0] = () => __props.eventBus.emit("toggle:nav-item", { id: __props.id, open: true }))
|
|
48
48
|
}, null, 8, ["id"]))
|
|
49
49
|
]),
|
|
50
50
|
_: 3
|
|
@@ -55,8 +55,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
55
55
|
key: 1,
|
|
56
56
|
"aria-label": "Models",
|
|
57
57
|
class: "pb-12",
|
|
58
|
-
modelValue: !
|
|
59
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = () =>
|
|
58
|
+
modelValue: !__props.isCollapsed,
|
|
59
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = () => __props.eventBus?.emit("toggle:nav-item", { id: __props.id, open: __props.isCollapsed }))
|
|
60
60
|
}, {
|
|
61
61
|
title: withCtx(() => [
|
|
62
62
|
createVNode(unref(SectionHeader), { level: 2 }, {
|
|
@@ -23,23 +23,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
setup(__props) {
|
|
24
24
|
return (_ctx, _cache) => {
|
|
25
25
|
return openBlock(), createBlock(unref(SectionAccordion), {
|
|
26
|
-
"aria-label":
|
|
27
|
-
modelValue: !
|
|
28
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = (value) =>
|
|
26
|
+
"aria-label": __props.schema.title ?? __props.name,
|
|
27
|
+
modelValue: !__props.isCollapsed,
|
|
28
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = (value) => __props.eventBus?.emit("toggle:nav-item", { id: __props.id, open: value }))
|
|
29
29
|
}, {
|
|
30
30
|
title: withCtx(() => [
|
|
31
31
|
createVNode(unref(_sfc_main$1), {
|
|
32
32
|
class: "reference-models-anchor",
|
|
33
|
-
eventBus:
|
|
34
|
-
onCopyAnchorUrl: _cache[0] || (_cache[0] = () =>
|
|
33
|
+
eventBus: __props.eventBus,
|
|
34
|
+
onCopyAnchorUrl: _cache[0] || (_cache[0] = () => __props.eventBus?.emit("copy-url:nav-item", { id: __props.id }))
|
|
35
35
|
}, {
|
|
36
36
|
default: withCtx(() => [
|
|
37
37
|
createVNode(unref(SectionHeaderTag), { level: 3 }, {
|
|
38
38
|
default: withCtx(() => [
|
|
39
39
|
createVNode(unref(SchemaHeading), {
|
|
40
40
|
class: "reference-models-label",
|
|
41
|
-
name:
|
|
42
|
-
value:
|
|
41
|
+
name: __props.schema.title ?? __props.name,
|
|
42
|
+
value: __props.schema
|
|
43
43
|
}, null, 8, ["name", "value"])
|
|
44
44
|
]),
|
|
45
45
|
_: 1
|
|
@@ -49,22 +49,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
49
|
}, 8, ["eventBus"])
|
|
50
50
|
]),
|
|
51
51
|
default: withCtx(() => [
|
|
52
|
-
"properties" in
|
|
53
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(Object.entries(
|
|
52
|
+
"properties" in __props.schema ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
53
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(Object.entries(__props.schema.properties ?? {}), ([property, value]) => {
|
|
54
54
|
return openBlock(), createBlock(unref(SchemaProperty), {
|
|
55
55
|
key: property,
|
|
56
|
-
eventBus:
|
|
56
|
+
eventBus: __props.eventBus,
|
|
57
57
|
name: property,
|
|
58
|
-
options:
|
|
59
|
-
required:
|
|
58
|
+
options: __props.options,
|
|
59
|
+
required: __props.schema.required?.includes(property),
|
|
60
60
|
schema: unref(getResolvedRef)(value)
|
|
61
61
|
}, null, 8, ["eventBus", "name", "options", "required", "schema"]);
|
|
62
62
|
}), 128))
|
|
63
63
|
])) : (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
64
64
|
createVNode(unref(SchemaProperty), {
|
|
65
|
-
eventBus:
|
|
66
|
-
options:
|
|
67
|
-
schema:
|
|
65
|
+
eventBus: __props.eventBus,
|
|
66
|
+
options: __props.options,
|
|
67
|
+
schema: __props.schema
|
|
68
68
|
}, null, 8, ["eventBus", "options", "schema"])
|
|
69
69
|
]))
|
|
70
70
|
]),
|
|
@@ -17,19 +17,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
17
|
setup(__props) {
|
|
18
18
|
return (_ctx, _cache) => {
|
|
19
19
|
return openBlock(), createBlock(unref(CompactSection), {
|
|
20
|
-
id:
|
|
21
|
-
key:
|
|
22
|
-
label:
|
|
23
|
-
modelValue: !
|
|
24
|
-
onCopyAnchorUrl: _cache[0] || (_cache[0] = () =>
|
|
25
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = (value) =>
|
|
20
|
+
id: __props.id,
|
|
21
|
+
key: __props.name,
|
|
22
|
+
label: __props.name,
|
|
23
|
+
modelValue: !__props.isCollapsed,
|
|
24
|
+
onCopyAnchorUrl: _cache[0] || (_cache[0] = () => __props.eventBus?.emit("copy-url:nav-item", { id: __props.id })),
|
|
25
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = (value) => __props.eventBus?.emit("toggle:nav-item", { id: __props.id, open: value }))
|
|
26
26
|
}, {
|
|
27
27
|
heading: withCtx(() => [
|
|
28
28
|
createVNode(unref(SectionHeaderTag), { level: 3 }, {
|
|
29
29
|
default: withCtx(() => [
|
|
30
30
|
createVNode(unref(SchemaHeading), {
|
|
31
|
-
name:
|
|
32
|
-
value:
|
|
31
|
+
name: __props.schema.title ?? __props.name,
|
|
32
|
+
value: __props.schema
|
|
33
33
|
}, null, 8, ["name", "value"])
|
|
34
34
|
]),
|
|
35
35
|
_: 1
|
|
@@ -39,13 +39,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
39
39
|
createVNode(unref(ScalarErrorBoundary), null, {
|
|
40
40
|
default: withCtx(() => [
|
|
41
41
|
createVNode(unref(Schema), {
|
|
42
|
-
eventBus:
|
|
42
|
+
eventBus: __props.eventBus,
|
|
43
43
|
hideHeading: "",
|
|
44
44
|
hideModelNames: "",
|
|
45
45
|
level: 1,
|
|
46
46
|
noncollapsible: "",
|
|
47
|
-
options:
|
|
48
|
-
schema:
|
|
47
|
+
options: __props.options,
|
|
48
|
+
schema: __props.schema
|
|
49
49
|
}, null, 8, ["eventBus", "options", "schema"])
|
|
50
50
|
]),
|
|
51
51
|
_: 1
|
|
@@ -32,101 +32,101 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
32
|
}
|
|
33
33
|
return (_ctx, _cache) => {
|
|
34
34
|
const _component_TraversedEntry = resolveComponent("TraversedEntry", true);
|
|
35
|
-
return openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
35
|
+
return openBlock(true), createElementBlock(Fragment, null, renderList(__props.entries, (entry) => {
|
|
36
36
|
return openBlock(), createBlock(_sfc_main$1, {
|
|
37
37
|
id: entry.id,
|
|
38
|
-
key: `${entry.id}-${
|
|
38
|
+
key: `${entry.id}-${__props.options.layout}`
|
|
39
39
|
}, {
|
|
40
40
|
default: withCtx(() => [
|
|
41
41
|
isOperation(entry) || isWebhook(entry) ? (openBlock(), createBlock(unref(SectionContainer), {
|
|
42
42
|
key: 0,
|
|
43
|
-
omit:
|
|
43
|
+
omit: __props.level !== 0
|
|
44
44
|
}, {
|
|
45
45
|
default: withCtx(() => [
|
|
46
46
|
createVNode(unref(_sfc_main$2), {
|
|
47
47
|
id: entry.id,
|
|
48
|
-
clientOptions:
|
|
49
|
-
document:
|
|
50
|
-
eventBus:
|
|
51
|
-
isCollapsed: !
|
|
48
|
+
clientOptions: __props.clientOptions,
|
|
49
|
+
document: __props.document,
|
|
50
|
+
eventBus: __props.eventBus,
|
|
51
|
+
isCollapsed: !__props.expandedItems[entry.id],
|
|
52
52
|
isWebhook: isWebhook(entry),
|
|
53
53
|
method: entry.method,
|
|
54
|
-
options:
|
|
54
|
+
options: __props.options,
|
|
55
55
|
path: isWebhook(entry) ? entry.name : entry.path,
|
|
56
56
|
pathValue: getPathValue(entry),
|
|
57
|
-
securitySchemes:
|
|
58
|
-
selectedClient:
|
|
59
|
-
server:
|
|
57
|
+
securitySchemes: __props.securitySchemes,
|
|
58
|
+
selectedClient: __props.selectedClient,
|
|
59
|
+
server: __props.selectedServer
|
|
60
60
|
}, null, 8, ["id", "clientOptions", "document", "eventBus", "isCollapsed", "isWebhook", "method", "options", "path", "pathValue", "securitySchemes", "selectedClient", "server"])
|
|
61
61
|
]),
|
|
62
62
|
_: 2
|
|
63
63
|
}, 1032, ["omit"])) : isTag(entry) ? (openBlock(), createBlock(unref(_sfc_main$3), {
|
|
64
64
|
key: 1,
|
|
65
|
-
eventBus:
|
|
66
|
-
isCollapsed: !
|
|
65
|
+
eventBus: __props.eventBus,
|
|
66
|
+
isCollapsed: !__props.expandedItems[entry.id],
|
|
67
67
|
isLoading: false,
|
|
68
|
-
layout:
|
|
69
|
-
moreThanOneTag:
|
|
68
|
+
layout: __props.options.layout,
|
|
69
|
+
moreThanOneTag: __props.entries.filter(isTag).length > 1,
|
|
70
70
|
tag: entry
|
|
71
71
|
}, {
|
|
72
72
|
default: withCtx(() => [
|
|
73
73
|
"children" in entry && entry.children?.length ? (openBlock(), createBlock(_component_TraversedEntry, {
|
|
74
74
|
key: 0,
|
|
75
|
-
clientOptions:
|
|
76
|
-
document:
|
|
75
|
+
clientOptions: __props.clientOptions,
|
|
76
|
+
document: __props.document,
|
|
77
77
|
entries: entry.children,
|
|
78
|
-
eventBus:
|
|
79
|
-
expandedItems:
|
|
80
|
-
level:
|
|
81
|
-
options:
|
|
82
|
-
securitySchemes:
|
|
83
|
-
selectedClient:
|
|
84
|
-
selectedServer:
|
|
78
|
+
eventBus: __props.eventBus,
|
|
79
|
+
expandedItems: __props.expandedItems,
|
|
80
|
+
level: __props.level + 1,
|
|
81
|
+
options: __props.options,
|
|
82
|
+
securitySchemes: __props.securitySchemes,
|
|
83
|
+
selectedClient: __props.selectedClient,
|
|
84
|
+
selectedServer: __props.selectedServer
|
|
85
85
|
}, null, 8, ["clientOptions", "document", "entries", "eventBus", "expandedItems", "level", "options", "securitySchemes", "selectedClient", "selectedServer"])) : createCommentVNode("", true)
|
|
86
86
|
]),
|
|
87
87
|
_: 2
|
|
88
88
|
}, 1032, ["eventBus", "isCollapsed", "layout", "moreThanOneTag", "tag"])) : isTagGroup(entry) ? (openBlock(), createBlock(_component_TraversedEntry, {
|
|
89
89
|
key: 2,
|
|
90
|
-
clientOptions:
|
|
91
|
-
document:
|
|
90
|
+
clientOptions: __props.clientOptions,
|
|
91
|
+
document: __props.document,
|
|
92
92
|
entries: entry.children || [],
|
|
93
|
-
eventBus:
|
|
94
|
-
expandedItems:
|
|
95
|
-
level:
|
|
96
|
-
options:
|
|
97
|
-
securitySchemes:
|
|
98
|
-
selectedClient:
|
|
99
|
-
selectedServer:
|
|
100
|
-
}, null, 8, ["clientOptions", "document", "entries", "eventBus", "expandedItems", "level", "options", "securitySchemes", "selectedClient", "selectedServer"])) : isModelsTag(entry) &&
|
|
93
|
+
eventBus: __props.eventBus,
|
|
94
|
+
expandedItems: __props.expandedItems,
|
|
95
|
+
level: __props.level + 1,
|
|
96
|
+
options: __props.options,
|
|
97
|
+
securitySchemes: __props.securitySchemes,
|
|
98
|
+
selectedClient: __props.selectedClient,
|
|
99
|
+
selectedServer: __props.selectedServer
|
|
100
|
+
}, null, 8, ["clientOptions", "document", "entries", "eventBus", "expandedItems", "level", "options", "securitySchemes", "selectedClient", "selectedServer"])) : isModelsTag(entry) && __props.document.components?.schemas ? (openBlock(), createBlock(_sfc_main$4, {
|
|
101
101
|
key: 3,
|
|
102
102
|
id: entry.id,
|
|
103
|
-
eventBus:
|
|
104
|
-
isCollapsed: !
|
|
105
|
-
layout:
|
|
103
|
+
eventBus: __props.eventBus,
|
|
104
|
+
isCollapsed: !__props.expandedItems[entry.id],
|
|
105
|
+
layout: __props.options.layout
|
|
106
106
|
}, {
|
|
107
107
|
default: withCtx(() => [
|
|
108
108
|
createVNode(_component_TraversedEntry, {
|
|
109
|
-
clientOptions:
|
|
110
|
-
document:
|
|
109
|
+
clientOptions: __props.clientOptions,
|
|
110
|
+
document: __props.document,
|
|
111
111
|
entries: entry.children || [],
|
|
112
|
-
eventBus:
|
|
113
|
-
expandedItems:
|
|
114
|
-
level:
|
|
115
|
-
options:
|
|
116
|
-
securitySchemes:
|
|
117
|
-
selectedClient:
|
|
118
|
-
selectedServer:
|
|
112
|
+
eventBus: __props.eventBus,
|
|
113
|
+
expandedItems: __props.expandedItems,
|
|
114
|
+
level: __props.level + 1,
|
|
115
|
+
options: __props.options,
|
|
116
|
+
securitySchemes: __props.securitySchemes,
|
|
117
|
+
selectedClient: __props.selectedClient,
|
|
118
|
+
selectedServer: __props.selectedServer
|
|
119
119
|
}, null, 8, ["clientOptions", "document", "entries", "eventBus", "expandedItems", "level", "options", "securitySchemes", "selectedClient", "selectedServer"])
|
|
120
120
|
]),
|
|
121
121
|
_: 2
|
|
122
|
-
}, 1032, ["id", "eventBus", "isCollapsed", "layout"])) : isModel(entry) &&
|
|
122
|
+
}, 1032, ["id", "eventBus", "isCollapsed", "layout"])) : isModel(entry) && __props.document.components?.schemas?.[entry.name] ? (openBlock(), createBlock(_sfc_main$5, {
|
|
123
123
|
key: 4,
|
|
124
124
|
id: entry.id,
|
|
125
|
-
eventBus:
|
|
126
|
-
isCollapsed: !
|
|
125
|
+
eventBus: __props.eventBus,
|
|
126
|
+
isCollapsed: !__props.expandedItems[entry.id],
|
|
127
127
|
name: entry.name,
|
|
128
|
-
options:
|
|
129
|
-
schema: unref(getResolvedRef)(
|
|
128
|
+
options: __props.options,
|
|
129
|
+
schema: unref(getResolvedRef)(__props.document.components.schemas[entry.name])
|
|
130
130
|
}, null, 8, ["id", "eventBus", "isCollapsed", "name", "options", "schema"])) : createCommentVNode("", true)
|
|
131
131
|
]),
|
|
132
132
|
_: 2
|