@scalar/api-reference 1.44.9 → 1.44.12
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 +72 -0
- package/dist/browser/standalone.js +13583 -13314
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +1 -1
- package/dist/components/ApiReference.vue2.js +4 -3
- package/dist/components/Content/Auth/Auth.vue.d.ts +2 -0
- package/dist/components/Content/Auth/Auth.vue.d.ts.map +1 -1
- package/dist/components/Content/Auth/Auth.vue.js +11 -4
- package/dist/components/Content/Content.vue.d.ts +2 -0
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +10 -5
- package/dist/components/Content/Models/components/ClassicLayout.vue.js +1 -1
- package/dist/components/Content/Models/components/ClassicLayout.vue2.js +2 -2
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +3 -0
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.js +9 -4
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +2 -3
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js +3 -3
- package/dist/components/Content/Schema/SchemaEnumValues.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +2 -2
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +4 -4
- 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 +3 -3
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +3 -3
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.js +3 -3
- package/dist/components/Content/Schema/helpers/get-enum-values.js +2 -2
- package/dist/components/Content/Schema/helpers/get-schema-type.d.ts +1 -2
- package/dist/components/Content/Schema/helpers/get-schema-type.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/get-schema-type.js +3 -9
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +15 -14
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts +1 -5
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +4 -6
- package/dist/components/Content/Schema/helpers/schema-name.d.ts +2 -2
- package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-name.js +4 -4
- package/dist/components/Content/Schema/helpers/sort-property-names.js +2 -2
- package/dist/features/Operation/Operation.vue.d.ts +6 -0
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +17 -2
- package/dist/features/Operation/helpers/filter-selected-security.d.ts +4 -3
- package/dist/features/Operation/helpers/filter-selected-security.d.ts.map +1 -1
- package/dist/features/Operation/helpers/filter-selected-security.js +2 -5
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +4 -3
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +4 -3
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
- package/dist/helpers/load-from-perssistance.d.ts +3 -23
- package/dist/helpers/load-from-perssistance.d.ts.map +1 -1
- package/dist/helpers/load-from-perssistance.js +5 -61
- package/dist/helpers/storage.d.ts +39 -278
- package/dist/helpers/storage.d.ts.map +1 -1
- package/dist/helpers/storage.js +9 -28
- package/dist/plugins/persistance-plugin.d.ts.map +1 -1
- package/dist/plugins/persistance-plugin.js +3 -19
- package/dist/style.css +157 -154
- package/package.json +15 -15
|
@@ -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":"AAssCA,OAAO,EAEL,KAAK,4BAA4B,EAGlC,MAAM,6BAA6B,CAAA;AA4BpC,OAAO,8BAA8B,CAAA;AAiCrC,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;AA+vCF,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-8a22e3d2"]]);
|
|
8
8
|
export {
|
|
9
9
|
ApiReference as default
|
|
10
10
|
};
|
|
@@ -30,7 +30,7 @@ import { getSystemModePreference } from "../helpers/color-mode.js";
|
|
|
30
30
|
import { downloadDocument } from "../helpers/download.js";
|
|
31
31
|
import { getIdFromUrl, makeUrlFromId } from "../helpers/id-routing.js";
|
|
32
32
|
import { intersectionEnabled, scrollToLazy, blockIntersection } from "../helpers/lazy-bus.js";
|
|
33
|
-
import { loadClientFromStorage,
|
|
33
|
+
import { loadClientFromStorage, loadAuthFromStorage } from "../helpers/load-from-perssistance.js";
|
|
34
34
|
import { mapConfigPlugins } from "../helpers/map-config-plugins.js";
|
|
35
35
|
import { mapConfigToWorkspaceStore } from "../helpers/map-config-to-workspace-store.js";
|
|
36
36
|
import { normalizeConfigurations } from "../helpers/normalize-configurations.js";
|
|
@@ -301,7 +301,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
301
301
|
}
|
|
302
302
|
workspaceStore.update("x-scalar-active-document", slug);
|
|
303
303
|
if (config.persistAuth) {
|
|
304
|
-
|
|
304
|
+
loadAuthFromStorage(workspaceStore, slug);
|
|
305
305
|
}
|
|
306
306
|
void (async () => {
|
|
307
307
|
await onDocumentSelectPromise;
|
|
@@ -622,6 +622,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
622
622
|
class: "references-rendered"
|
|
623
623
|
}, [
|
|
624
624
|
createVNode(_sfc_main$5, {
|
|
625
|
+
authStore: unref(workspaceStore).auth,
|
|
625
626
|
document: unref(workspaceStore).workspace.activeDocument,
|
|
626
627
|
environment: environment.value,
|
|
627
628
|
eventBus: unref(eventBus),
|
|
@@ -689,7 +690,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
689
690
|
]),
|
|
690
691
|
key: "0"
|
|
691
692
|
} : void 0
|
|
692
|
-
]), 1032, ["document", "environment", "eventBus", "expandedItems", "headingSlugGenerator", "infoSectionId", "items", "options", "xScalarDefaultClient"])
|
|
693
|
+
]), 1032, ["authStore", "document", "environment", "eventBus", "expandedItems", "headingSlugGenerator", "infoSectionId", "items", "options", "xScalarDefaultClient"])
|
|
693
694
|
], 8, _hoisted_3),
|
|
694
695
|
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
695
696
|
renderSlot(_ctx.$slots, "footer", normalizeProps(guardReactiveProps(slotProps.value)), void 0, true)
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { type MergedSecuritySchemes } from '@scalar/api-client/v2/blocks/scalar-auth-selector-block';
|
|
2
2
|
import type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference';
|
|
3
|
+
import type { AuthStore } from '@scalar/workspace-store/entities/auth';
|
|
3
4
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
4
5
|
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
5
6
|
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
6
7
|
import type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace';
|
|
7
8
|
type __VLS_Props = {
|
|
8
9
|
options: Pick<ApiReferenceConfigurationRaw, 'authentication' | 'persistAuth' | 'proxyUrl'>;
|
|
10
|
+
authStore: AuthStore;
|
|
9
11
|
document: WorkspaceDocument | undefined;
|
|
10
12
|
eventBus: WorkspaceEventBus;
|
|
11
13
|
securitySchemes: MergedSecuritySchemes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Auth.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Auth/Auth.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Auth.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Auth/Auth.vue"],"names":[],"mappings":"AAmGA,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,yDAAyD,CAAA;AAKhE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAChG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAKlF,KAAK,WAAW,GAAG;IACf,OAAO,EAAE,IAAI,CACX,4BAA4B,EAC5B,gBAAgB,GAAG,aAAa,GAAG,UAAU,CAC9C,CAAA;IACD,SAAS,EAAE,SAAS,CAAA;IACpB,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAA;IACvC,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,eAAe,EAAE,qBAAqB,CAAA;IACtC,cAAc,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;AAqHJ,wBAMG"}
|
|
@@ -6,6 +6,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
6
6
|
__name: "Auth",
|
|
7
7
|
props: {
|
|
8
8
|
options: {},
|
|
9
|
+
authStore: {},
|
|
9
10
|
document: {},
|
|
10
11
|
eventBus: {},
|
|
11
12
|
securitySchemes: {},
|
|
@@ -16,17 +17,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16
17
|
const securityRequirements = computed(
|
|
17
18
|
() => getSecurityRequirements(__props.document?.security)
|
|
18
19
|
);
|
|
20
|
+
const documentSelectedSecurity = computed(
|
|
21
|
+
() => __props.authStore.getAuthSelectedSchemas({
|
|
22
|
+
type: "document",
|
|
23
|
+
documentName: __props.document?.["x-scalar-navigation"]?.name ?? ""
|
|
24
|
+
})
|
|
25
|
+
);
|
|
19
26
|
const selectedSecurity = computed(
|
|
20
27
|
() => getSelectedSecurity(
|
|
21
|
-
|
|
28
|
+
documentSelectedSecurity.value,
|
|
22
29
|
void 0,
|
|
23
30
|
securityRequirements.value
|
|
24
31
|
)
|
|
25
32
|
);
|
|
26
33
|
watch(
|
|
27
|
-
|
|
28
|
-
(
|
|
29
|
-
if (typeof
|
|
34
|
+
documentSelectedSecurity,
|
|
35
|
+
(newDocumentSelectedSecurity) => {
|
|
36
|
+
if (typeof newDocumentSelectedSecurity !== "undefined") {
|
|
30
37
|
return;
|
|
31
38
|
}
|
|
32
39
|
const defaultSecurity = getDefaultSecurity(
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference';
|
|
2
2
|
import type { Heading } from '@scalar/types/legacy';
|
|
3
|
+
import type { AuthStore } from '@scalar/workspace-store/entities/auth';
|
|
3
4
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
4
5
|
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
5
6
|
import type { TraversedEntry as TraversedEntryType } from '@scalar/workspace-store/schemas/navigation';
|
|
@@ -9,6 +10,7 @@ type __VLS_Props = {
|
|
|
9
10
|
/** The subset of the configuration object required for the content component */
|
|
10
11
|
options: Pick<ApiReferenceConfigurationRaw, 'authentication' | 'baseServerURL' | 'documentDownloadType' | 'expandAllResponses' | 'hiddenClients' | 'hideTestRequestButton' | 'layout' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy' | 'persistAuth' | 'proxyUrl' | 'servers' | 'showOperationId'>;
|
|
11
12
|
document: WorkspaceDocument | undefined;
|
|
13
|
+
authStore: AuthStore;
|
|
12
14
|
xScalarDefaultClient: Workspace['x-scalar-default-client'];
|
|
13
15
|
items: TraversedEntryType[];
|
|
14
16
|
expandedItems: Record<string, boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue"],"names":[],"mappings":"AAkNA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,4CAA4C,CAAA;AACtG,OAAO,KAAK,EACV,SAAS,EACT,iBAAiB,EAClB,MAAM,2CAA2C,CAAA;AAelD,KAAK,WAAW,GAAG;IACf,aAAa,EAAE,MAAM,CAAA;IACrB,gFAAgF;IAChF,OAAO,EAAE,IAAI,CACX,4BAA4B,EAC1B,gBAAgB,GAChB,eAAe,GACf,sBAAsB,GACtB,oBAAoB,GACpB,eAAe,GACf,uBAAuB,GACvB,QAAQ,GACR,8BAA8B,GAC9B,yBAAyB,GACzB,aAAa,GACb,UAAU,GACV,SAAS,GACT,iBAAiB,CACpB,CAAA;IACD,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAA;IACvC,SAAS,EAAE,SAAS,CAAA;IACpB,oBAAoB,EAAE,SAAS,CAAC,yBAAyB,CAAC,CAAA;IAC1D,KAAK,EAAE,kBAAkB,EAAE,CAAA;IAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACtC,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,WAAW,EAAE,kBAAkB,CAAA;IAC/B,iDAAiD;IACjD,oBAAoB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAA;CACnD,CAAC;AAmSJ,QAAA,IAAI,OAAO,IAAU,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAClE,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC1C;IAAE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACnD;IAAE,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAmC5C,QAAA,MAAM,eAAe,kSAMnB,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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, createElementBlock, openBlock, Fragment, createVNode, createElementVNode, unref, renderSlot, createBlock, createCommentVNode, withCtx } from "vue";
|
|
2
2
|
import { generateClientOptions } from "@scalar/api-client/v2/blocks/operation-code-sample";
|
|
3
|
-
import {
|
|
3
|
+
import { mergeSecurity } from "@scalar/api-client/v2/blocks/scalar-auth-selector-block";
|
|
4
4
|
import { mapHiddenClientsConfig } from "@scalar/api-client/v2/features/modal";
|
|
5
5
|
import { getSelectedServer } from "@scalar/api-client/v2/features/operation";
|
|
6
6
|
import { getServers } from "@scalar/api-client/v2/helpers";
|
|
@@ -27,6 +27,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
27
|
infoSectionId: {},
|
|
28
28
|
options: {},
|
|
29
29
|
document: {},
|
|
30
|
+
authStore: {},
|
|
30
31
|
xScalarDefaultClient: {},
|
|
31
32
|
items: {},
|
|
32
33
|
expandedItems: {},
|
|
@@ -50,9 +51,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
51
|
() => getSelectedServer(__props.document ?? null, servers.value)
|
|
51
52
|
);
|
|
52
53
|
const securitySchemes = computed(
|
|
53
|
-
() =>
|
|
54
|
+
() => mergeSecurity(
|
|
54
55
|
__props.document?.components?.securitySchemes,
|
|
55
|
-
__props.options.authentication?.securitySchemes
|
|
56
|
+
__props.options.authentication?.securitySchemes,
|
|
57
|
+
__props.authStore,
|
|
58
|
+
__props.document?.["x-scalar-navigation"]?.name ?? ""
|
|
56
59
|
)
|
|
57
60
|
);
|
|
58
61
|
return (_ctx, _cache) => {
|
|
@@ -104,13 +107,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
104
107
|
}, {
|
|
105
108
|
default: withCtx(() => [
|
|
106
109
|
createVNode(unref(_sfc_main$4), {
|
|
110
|
+
authStore: __props.authStore,
|
|
107
111
|
document: __props.document,
|
|
108
112
|
environment: __props.environment,
|
|
109
113
|
eventBus: __props.eventBus,
|
|
110
114
|
options: __props.options,
|
|
111
115
|
securitySchemes: securitySchemes.value,
|
|
112
116
|
selectedServer: selectedServer.value
|
|
113
|
-
}, null, 8, ["document", "environment", "eventBus", "options", "securitySchemes", "selectedServer"])
|
|
117
|
+
}, null, 8, ["authStore", "document", "environment", "eventBus", "options", "securitySchemes", "selectedServer"])
|
|
114
118
|
]),
|
|
115
119
|
_: 1
|
|
116
120
|
})) : createCommentVNode("", true)
|
|
@@ -145,6 +149,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
145
149
|
}, 8, ["id"]),
|
|
146
150
|
__props.items.length && __props.document ? (openBlock(), createBlock(_sfc_main$5, {
|
|
147
151
|
key: 0,
|
|
152
|
+
authStore: __props.authStore,
|
|
148
153
|
clientOptions: clientOptions.value,
|
|
149
154
|
document: __props.document,
|
|
150
155
|
entries: __props.items,
|
|
@@ -154,7 +159,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
154
159
|
securitySchemes: securitySchemes.value,
|
|
155
160
|
selectedClient: __props.xScalarDefaultClient,
|
|
156
161
|
selectedServer: selectedServer.value
|
|
157
|
-
}, null, 8, ["clientOptions", "document", "entries", "eventBus", "expandedItems", "options", "securitySchemes", "selectedClient", "selectedServer"])) : createCommentVNode("", true),
|
|
162
|
+
}, null, 8, ["authStore", "clientOptions", "document", "entries", "eventBus", "expandedItems", "options", "securitySchemes", "selectedClient", "selectedServer"])) : createCommentVNode("", true),
|
|
158
163
|
createVNode(unref(_sfc_main$6), {
|
|
159
164
|
options: __props.options,
|
|
160
165
|
viewName: "content.end"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./ClassicLayout.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const ClassicLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const ClassicLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e4ca3c0f"]]);
|
|
5
5
|
export {
|
|
6
6
|
ClassicLayout as default
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, createBlock, openBlock, unref, withCtx, createElementBlock, Fragment, renderList, createVNode } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { resolve } from "@scalar/workspace-store/resolve";
|
|
3
3
|
import SectionAccordion from "../../../Section/SectionAccordion.vue.js";
|
|
4
4
|
import SchemaProperty from "../../Schema/SchemaProperty.vue.js";
|
|
5
5
|
import _sfc_main$1 from "../../../Anchor/Anchor.vue.js";
|
|
@@ -57,7 +57,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
57
57
|
name: property,
|
|
58
58
|
options: __props.options,
|
|
59
59
|
required: __props.schema.required?.includes(property),
|
|
60
|
-
schema: unref(
|
|
60
|
+
schema: unref(resolve).schema(value)
|
|
61
61
|
}, null, 8, ["eventBus", "name", "options", "required", "schema"]);
|
|
62
62
|
}), 128))
|
|
63
63
|
])) : (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
@@ -2,11 +2,14 @@ import type { ClientOptionGroup } from '@scalar/api-client/v2/blocks/operation-c
|
|
|
2
2
|
import type { MergedSecuritySchemes } from '@scalar/api-client/v2/blocks/scalar-auth-selector-block';
|
|
3
3
|
import type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference';
|
|
4
4
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
5
|
+
import type { AuthStore } from '@scalar/workspace-store/entities/auth';
|
|
5
6
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
6
7
|
import type { WorkspaceDocument } from '@scalar/workspace-store/schemas';
|
|
7
8
|
import type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation';
|
|
8
9
|
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
9
10
|
type __VLS_Props = {
|
|
11
|
+
/** The auth store */
|
|
12
|
+
authStore: AuthStore;
|
|
10
13
|
/** The level of depth */
|
|
11
14
|
level?: number;
|
|
12
15
|
/** Traversed entries to render */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TraversedEntry.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operations/TraversedEntry.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TraversedEntry.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operations/TraversedEntry.vue"],"names":[],"mappings":"AA2MA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAC3F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yDAAyD,CAAA;AACpG,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACxE,OAAO,KAAK,EACV,cAAc,EAMf,MAAM,4CAA4C,CAAA;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAShG,KAAK,WAAW,GAAG;IACjB,qBAAqB;IACrB,SAAS,EAAE,SAAS,CAAA;IACpB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kCAAkC;IAClC,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,0BAA0B;IAC1B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,+CAA+C;IAC/C,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,kFAAkF;IAClF,OAAO,EAAE,IAAI,CACX,4BAA4B,EAC1B,oBAAoB,GACpB,uBAAuB,GACvB,QAAQ,GACR,8BAA8B,GAC9B,yBAAyB,GACzB,iBAAiB,CACpB,CAAA;IACD,iDAAiD;IACjD,cAAc,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,wFAAwF;IACxF,eAAe,EAAE,qBAAqB,CAAA;IACtC,sDAAsD;IACtD,cAAc,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,yBAAyB,CAAC,CAAA;IACtE,iDAAiD;IACjD,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACtC,iDAAiD;IACjD,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;;AAuSF,wBAMG"}
|
|
@@ -9,6 +9,7 @@ import _sfc_main$3 from "../Tags/Tag.vue.js";
|
|
|
9
9
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
10
|
__name: "TraversedEntry",
|
|
11
11
|
props: {
|
|
12
|
+
authStore: {},
|
|
12
13
|
level: { default: 0 },
|
|
13
14
|
entries: {},
|
|
14
15
|
document: {},
|
|
@@ -45,6 +46,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
46
|
default: withCtx(() => [
|
|
46
47
|
createVNode(unref(_sfc_main$2), {
|
|
47
48
|
id: entry.id,
|
|
49
|
+
authStore: __props.authStore,
|
|
48
50
|
clientOptions: __props.clientOptions,
|
|
49
51
|
document: __props.document,
|
|
50
52
|
eventBus: __props.eventBus,
|
|
@@ -57,7 +59,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
57
59
|
securitySchemes: __props.securitySchemes,
|
|
58
60
|
selectedClient: __props.selectedClient,
|
|
59
61
|
server: __props.selectedServer
|
|
60
|
-
}, null, 8, ["id", "clientOptions", "document", "eventBus", "isCollapsed", "isWebhook", "method", "options", "path", "pathValue", "securitySchemes", "selectedClient", "server"])
|
|
62
|
+
}, null, 8, ["id", "authStore", "clientOptions", "document", "eventBus", "isCollapsed", "isWebhook", "method", "options", "path", "pathValue", "securitySchemes", "selectedClient", "server"])
|
|
61
63
|
]),
|
|
62
64
|
_: 2
|
|
63
65
|
}, 1032, ["omit"])) : isTag(entry) ? (openBlock(), createBlock(unref(_sfc_main$3), {
|
|
@@ -72,6 +74,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
72
74
|
default: withCtx(() => [
|
|
73
75
|
"children" in entry && entry.children?.length ? (openBlock(), createBlock(_component_TraversedEntry, {
|
|
74
76
|
key: 0,
|
|
77
|
+
authStore: __props.authStore,
|
|
75
78
|
clientOptions: __props.clientOptions,
|
|
76
79
|
document: __props.document,
|
|
77
80
|
entries: entry.children,
|
|
@@ -82,11 +85,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
82
85
|
securitySchemes: __props.securitySchemes,
|
|
83
86
|
selectedClient: __props.selectedClient,
|
|
84
87
|
selectedServer: __props.selectedServer
|
|
85
|
-
}, null, 8, ["clientOptions", "document", "entries", "eventBus", "expandedItems", "level", "options", "securitySchemes", "selectedClient", "selectedServer"])) : createCommentVNode("", true)
|
|
88
|
+
}, null, 8, ["authStore", "clientOptions", "document", "entries", "eventBus", "expandedItems", "level", "options", "securitySchemes", "selectedClient", "selectedServer"])) : createCommentVNode("", true)
|
|
86
89
|
]),
|
|
87
90
|
_: 2
|
|
88
91
|
}, 1032, ["eventBus", "isCollapsed", "layout", "moreThanOneTag", "tag"])) : isTagGroup(entry) ? (openBlock(), createBlock(_component_TraversedEntry, {
|
|
89
92
|
key: 2,
|
|
93
|
+
authStore: __props.authStore,
|
|
90
94
|
clientOptions: __props.clientOptions,
|
|
91
95
|
document: __props.document,
|
|
92
96
|
entries: entry.children || [],
|
|
@@ -97,7 +101,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
97
101
|
securitySchemes: __props.securitySchemes,
|
|
98
102
|
selectedClient: __props.selectedClient,
|
|
99
103
|
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, {
|
|
104
|
+
}, null, 8, ["authStore", "clientOptions", "document", "entries", "eventBus", "expandedItems", "level", "options", "securitySchemes", "selectedClient", "selectedServer"])) : isModelsTag(entry) && __props.document.components?.schemas ? (openBlock(), createBlock(_sfc_main$4, {
|
|
101
105
|
key: 3,
|
|
102
106
|
id: entry.id,
|
|
103
107
|
eventBus: __props.eventBus,
|
|
@@ -106,6 +110,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
106
110
|
}, {
|
|
107
111
|
default: withCtx(() => [
|
|
108
112
|
createVNode(_component_TraversedEntry, {
|
|
113
|
+
authStore: __props.authStore,
|
|
109
114
|
clientOptions: __props.clientOptions,
|
|
110
115
|
document: __props.document,
|
|
111
116
|
entries: entry.children || [],
|
|
@@ -116,7 +121,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
116
121
|
securitySchemes: __props.securitySchemes,
|
|
117
122
|
selectedClient: __props.selectedClient,
|
|
118
123
|
selectedServer: __props.selectedServer
|
|
119
|
-
}, null, 8, ["clientOptions", "document", "entries", "eventBus", "expandedItems", "level", "options", "securitySchemes", "selectedClient", "selectedServer"])
|
|
124
|
+
}, null, 8, ["authStore", "clientOptions", "document", "entries", "eventBus", "expandedItems", "level", "options", "securitySchemes", "selectedClient", "selectedServer"])
|
|
120
125
|
]),
|
|
121
126
|
_: 2
|
|
122
127
|
}, 1032, ["id", "eventBus", "isCollapsed", "layout"])) : isModel(entry) && __props.document.components?.schemas?.[entry.name] ? (openBlock(), createBlock(_sfc_main$5, {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
2
|
-
import type { DiscriminatorObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
-
import type { SchemaWithOriginalRef } from '../../../components/Content/Schema/helpers/optimize-value-for-display.js';
|
|
2
|
+
import type { DiscriminatorObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
4
3
|
import type { SchemaOptions } from '../../../components/Content/Schema/types';
|
|
5
4
|
import { type CompositionKeyword } from './helpers/schema-composition.js';
|
|
6
5
|
type __VLS_Props = {
|
|
@@ -11,7 +10,7 @@ type __VLS_Props = {
|
|
|
11
10
|
/** Optional name for the schema */
|
|
12
11
|
name?: string;
|
|
13
12
|
/** The schema value containing the composition */
|
|
14
|
-
schema:
|
|
13
|
+
schema: SchemaObject;
|
|
15
14
|
/** Nesting level for proper indentation */
|
|
16
15
|
level: number;
|
|
17
16
|
/** Whether to use compact layout */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaComposition.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaComposition.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaComposition.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaComposition.vue"],"names":[],"mappings":"AA4JA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAGrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAItE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAGtE,KAAK,WAAW,GAAG;IACf,oDAAoD;IACpD,WAAW,EAAE,kBAAkB,CAAA;IAC/B,4DAA4D;IAC5D,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,kDAAkD;IAClD,MAAM,EAAE,YAAY,CAAA;IACpB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAA;IACb,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,kCAAkC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,iCAAiC;IACjC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,yEAAyE;IACzE,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;aATU,OAAO;iBAEH,OAAO;;AAgOzB,wBAOG"}
|
|
@@ -2,7 +2,7 @@ import { defineComponent, computed, ref, createElementBlock, openBlock, createBl
|
|
|
2
2
|
import { ScalarListbox } from "@scalar/components";
|
|
3
3
|
import { isDefined } from "@scalar/helpers/array/is-defined";
|
|
4
4
|
import { ScalarIconCaretDown } from "@scalar/icons";
|
|
5
|
-
import {
|
|
5
|
+
import { resolve } from "@scalar/workspace-store/resolve";
|
|
6
6
|
import { getSchemaType } from "./helpers/get-schema-type.js";
|
|
7
7
|
import { mergeAllOfSchemas } from "./helpers/merge-all-of-schemas.js";
|
|
8
8
|
import Schema from "./Schema.vue.js";
|
|
@@ -34,12 +34,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
34
34
|
setup(__props) {
|
|
35
35
|
const props = __props;
|
|
36
36
|
const composition = computed(
|
|
37
|
-
() => [props.schema[props.composition]].flat().map((schema) => ({ value:
|
|
37
|
+
() => [props.schema[props.composition]].flat().map((schema) => ({ value: resolve.schema(schema), original: schema })).filter((it) => isDefined(it.value))
|
|
38
38
|
);
|
|
39
39
|
const listboxOptions = computed(
|
|
40
40
|
() => composition.value.map((schema, index) => ({
|
|
41
41
|
id: String(index),
|
|
42
|
-
label: getSchemaType(schema.original) || "Schema"
|
|
42
|
+
label: getSchemaType(resolve.schema(schema.original)) || "Schema"
|
|
43
43
|
}))
|
|
44
44
|
);
|
|
45
45
|
const selectedOption = ref(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./SchemaEnumValues.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const SchemaEnumValues = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const SchemaEnumValues = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d5367294"]]);
|
|
5
5
|
export {
|
|
6
6
|
SchemaEnumValues as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed, ref, createElementBlock, createCommentVNode, openBlock, createElementVNode, Fragment, renderList, createBlock, createVNode, unref, withCtx, createTextVNode, normalizeClass, toDisplayString } from "vue";
|
|
2
2
|
import { ScalarButton } from "@scalar/components";
|
|
3
3
|
import { ScalarIconPlus } from "@scalar/icons";
|
|
4
|
-
import {
|
|
4
|
+
import { resolve } from "@scalar/workspace-store/resolve";
|
|
5
5
|
import { isArraySchema } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
|
|
6
6
|
import SchemaEnumPropertyItem from "./SchemaEnumPropertyItem.vue.js";
|
|
7
7
|
const _hoisted_1 = {
|
|
@@ -23,7 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
if (!__props.value) {
|
|
24
24
|
return [];
|
|
25
25
|
}
|
|
26
|
-
return __props.value.enum || isArraySchema(__props.value) &&
|
|
26
|
+
return __props.value.enum || isArraySchema(__props.value) && resolve.schema(__props.value.items)?.enum || [];
|
|
27
27
|
});
|
|
28
28
|
const shouldUseLongListDisplay = computed(
|
|
29
29
|
() => enumValues.value.length > ENUM_DISPLAY_THRESHOLD
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaObjectProperties.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaObjectProperties.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaObjectProperties.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaObjectProperties.vue"],"names":[],"mappings":"AAkJA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAItE,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,YAAY,CAAA;IACpB,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;AAoMF,wBAMG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, computed, createElementBlock, openBlock, Fragment, createCommentVNode, createBlock, unref, renderList } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { resolve } from "@scalar/workspace-store/resolve";
|
|
3
3
|
import { isTypeObject } from "./helpers/is-type-object.js";
|
|
4
4
|
import { sortPropertyNames } from "./helpers/sort-property-names.js";
|
|
5
5
|
import SchemaProperty from "./SchemaProperty.vue.js";
|
|
@@ -21,7 +21,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
() => sortPropertyNames(__props.schema, __props.discriminator, __props.options)
|
|
22
22
|
);
|
|
23
23
|
const getAdditionalPropertiesName = (_additionalProperties) => {
|
|
24
|
-
const additionalProperties =
|
|
24
|
+
const additionalProperties = typeof _additionalProperties === "boolean" ? _additionalProperties : resolve.schema(_additionalProperties);
|
|
25
25
|
if (typeof additionalProperties === "object" && typeof additionalProperties["x-additionalPropertiesName"] === "string" && additionalProperties["x-additionalPropertiesName"].trim().length > 0) {
|
|
26
26
|
return `${additionalProperties["x-additionalPropertiesName"].trim()}`;
|
|
27
27
|
}
|
|
@@ -52,7 +52,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
52
52
|
name: property,
|
|
53
53
|
options: __props.options,
|
|
54
54
|
required: __props.schema.required?.includes(property),
|
|
55
|
-
schema: unref(
|
|
55
|
+
schema: unref(resolve).schema(__props.schema.properties[property])
|
|
56
56
|
}, null, 8, ["breadcrumb", "compact", "discriminator", "eventBus", "hideHeading", "hideModelNames", "level", "name", "options", "required", "schema"]);
|
|
57
57
|
}), 128)) : createCommentVNode("", true),
|
|
58
58
|
unref(isTypeObject)(__props.schema) && __props.schema.patternProperties ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(Object.entries(__props.schema.patternProperties), ([key, property]) => {
|
|
@@ -67,7 +67,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
67
67
|
level: __props.level,
|
|
68
68
|
name: key,
|
|
69
69
|
options: __props.options,
|
|
70
|
-
schema: unref(
|
|
70
|
+
schema: unref(resolve).schema(property)
|
|
71
71
|
}, null, 8, ["breadcrumb", "compact", "discriminator", "eventBus", "hideHeading", "hideModelNames", "level", "name", "options", "schema"]);
|
|
72
72
|
}), 128)) : createCommentVNode("", true),
|
|
73
73
|
unref(isTypeObject)(__props.schema) && __props.schema.additionalProperties ? (openBlock(), createBlock(SchemaProperty, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAyaA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAErE,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAI9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAetE;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,sBAAsB,GAAG,mBAAmB,CAAA;IACtD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;WAZQ,MAAM;cAEH,OAAO;aACR,OAAO;oBAGA,OAAO;;
|
|
1
|
+
{"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAyaA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAErE,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAI9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAetE;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,sBAAsB,GAAG,mBAAmB,CAAA;IACtD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;WAZQ,MAAM;cAEH,OAAO;aACR,OAAO;oBAGA,OAAO;;AAuc5B,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./SchemaProperty.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const SchemaProperty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const SchemaProperty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-dfddcb79"]]);
|
|
5
5
|
export {
|
|
6
6
|
SchemaProperty as default
|
|
7
7
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, createBlock, openBlock, resolveDynamicComponent, normalizeClass, withCtx, createCommentVNode, createElementBlock, createVNode, createSlots, unref, createTextVNode, toDisplayString, Fragment, renderList } from "vue";
|
|
2
2
|
import { ScalarWrappingText, ScalarMarkdown } from "@scalar/components";
|
|
3
|
-
import {
|
|
3
|
+
import { resolve } from "@scalar/workspace-store/resolve";
|
|
4
4
|
import { isArraySchema } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
|
|
5
5
|
import { isTypeObject } from "./helpers/is-type-object.js";
|
|
6
6
|
import { getCompositionsToRender } from "./helpers/get-compositions-to-render.js";
|
|
@@ -98,7 +98,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
98
98
|
if (!value || !isArraySchema(value) || typeof value.items !== "object") {
|
|
99
99
|
return void 0;
|
|
100
100
|
}
|
|
101
|
-
return
|
|
101
|
+
return resolve.schema(value.items);
|
|
102
102
|
});
|
|
103
103
|
const isDiscriminatorProperty = computed(
|
|
104
104
|
() => Boolean(props.name && props.discriminator?.propertyName === props.name)
|
|
@@ -189,7 +189,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
189
189
|
name: __props.name,
|
|
190
190
|
noncollapsible: __props.noncollapsible,
|
|
191
191
|
options: __props.options,
|
|
192
|
-
schema: resolvedArrayItems.value
|
|
192
|
+
schema: unref(resolve).schema(resolvedArrayItems.value)
|
|
193
193
|
}, null, 8, ["compact", "eventBus", "level", "name", "noncollapsible", "options", "schema"])
|
|
194
194
|
])) : createCommentVNode("", true),
|
|
195
195
|
(openBlock(true), createElementBlock(Fragment, null, renderList(compositionsToRender.value, (compositionData) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./SchemaPropertyHeading.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const SchemaPropertyHeading = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const SchemaPropertyHeading = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e94a52f3"]]);
|
|
5
5
|
export {
|
|
6
6
|
SchemaPropertyHeading as default
|
|
7
7
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, toRef, computed, createElementBlock, openBlock, createCommentVNode, createBlock, normalizeClass, renderSlot, Fragment, withCtx, createVNode, createTextVNode, toDisplayString, renderList, createSlots, unref } from "vue";
|
|
2
2
|
import { isDefined } from "@scalar/helpers/array/is-defined";
|
|
3
|
-
import {
|
|
3
|
+
import { resolve } from "@scalar/workspace-store/resolve";
|
|
4
4
|
import { isArraySchema, isStringSchema, isNumberSchema } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
|
|
5
5
|
import ScreenReader from "../../ScreenReader.vue.js";
|
|
6
6
|
import { getSchemaType } from "./helpers/get-schema-type.js";
|
|
@@ -64,7 +64,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
64
64
|
return schema.enum[0];
|
|
65
65
|
}
|
|
66
66
|
if (isArraySchema(schema) && schema.items) {
|
|
67
|
-
const items =
|
|
67
|
+
const items = resolve.schema(schema.items);
|
|
68
68
|
if (isDefined(items.const)) {
|
|
69
69
|
return items.const;
|
|
70
70
|
}
|
|
@@ -318,7 +318,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
318
318
|
props.required ? (openBlock(), createElementBlock("div", _hoisted_8, " required ")) : createCommentVNode("", true),
|
|
319
319
|
props.withExamples ? (openBlock(), createBlock(SchemaPropertyExamples, {
|
|
320
320
|
key: 10,
|
|
321
|
-
example: props.value?.example || props.value && unref(isArraySchema)(props.value) && unref(
|
|
321
|
+
example: props.value?.example || props.value && unref(isArraySchema)(props.value) && unref(resolve).schema(props.value?.items)?.example,
|
|
322
322
|
examples: props.value?.examples
|
|
323
323
|
}, null, 8, ["example", "examples"])) : createCommentVNode("", true)
|
|
324
324
|
]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isDefined } from "@scalar/helpers/array/is-defined";
|
|
2
|
-
import {
|
|
2
|
+
import { resolve } from "@scalar/workspace-store/resolve";
|
|
3
3
|
import { isArraySchema } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
|
|
4
4
|
import { compositions } from "./schema-composition.js";
|
|
5
5
|
import { shouldRenderArrayItemComposition } from "./should-render-array-item-composition.js";
|
|
@@ -11,7 +11,7 @@ const getCompositionsToRender = (value) => {
|
|
|
11
11
|
if (shouldRenderArrayItemComposition(value, composition) && isArraySchema(value) && value.items) {
|
|
12
12
|
return {
|
|
13
13
|
composition,
|
|
14
|
-
value:
|
|
14
|
+
value: resolve.schema(value.items)
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
if (value[composition]) {
|
|
@@ -19,7 +19,7 @@ const getCompositionsToRender = (value) => {
|
|
|
19
19
|
if (!hasArrayItemComposition) {
|
|
20
20
|
return {
|
|
21
21
|
composition,
|
|
22
|
-
value:
|
|
22
|
+
value: resolve.schema(value)
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolve } from "@scalar/workspace-store/resolve";
|
|
2
2
|
import { isArraySchema } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
|
|
3
3
|
const getEnumValues = (value) => {
|
|
4
4
|
if (!value) {
|
|
@@ -8,7 +8,7 @@ const getEnumValues = (value) => {
|
|
|
8
8
|
return value.enum;
|
|
9
9
|
}
|
|
10
10
|
if (isArraySchema(value) && typeof value.items === "object") {
|
|
11
|
-
const resolvedItems =
|
|
11
|
+
const resolvedItems = resolve.schema(value.items);
|
|
12
12
|
if (resolvedItems && "enum" in resolvedItems && resolvedItems.enum) {
|
|
13
13
|
return resolvedItems.enum;
|
|
14
14
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ReferenceType, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
-
import type { SchemaWithOriginalRef } from '../../../../components/Content/Schema/helpers/optimize-value-for-display.js';
|
|
3
2
|
/**
|
|
4
3
|
* Computes the human-readable type for a schema.
|
|
5
4
|
*
|
|
@@ -12,5 +11,5 @@ import type { SchemaWithOriginalRef } from '../../../../components/Content/Schem
|
|
|
12
11
|
* 6. $ref names
|
|
13
12
|
* 7. raw type
|
|
14
13
|
*/
|
|
15
|
-
export declare const getSchemaType: (valueOrRef:
|
|
14
|
+
export declare const getSchemaType: (valueOrRef: SchemaObject | ReferenceType<SchemaObject>) => string;
|
|
16
15
|
//# sourceMappingURL=get-schema-type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-schema-type.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/get-schema-type.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;
|
|
1
|
+
{"version":3,"file":"get-schema-type.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/get-schema-type.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAoC/G;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,GAAI,YAAY,YAAY,GAAG,aAAa,CAAC,YAAY,CAAC,KAAG,MA0DtF,CAAA"}
|