@scalar/api-reference 1.48.2 → 1.48.4
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 +56 -0
- package/dist/browser/standalone.js +2793 -2738
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue.d.ts.map +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue.js +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue2.js +9 -7
- package/dist/components/Content/Schema/{SchemaEnumValues.vue.d.ts → SchemaEnums.vue.d.ts} +3 -1
- package/dist/components/Content/Schema/SchemaEnums.vue.d.ts.map +1 -0
- package/dist/components/Content/Schema/SchemaEnums.vue.js +7 -0
- package/dist/components/Content/Schema/{SchemaEnumValues.vue2.js → SchemaEnums.vue2.js} +16 -6
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +29 -3
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +4 -0
- 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 +14 -6
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +2 -0
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +5 -1
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue2.js +19 -3
- package/dist/style.css +165 -114
- package/package.json +14 -14
- package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts.map +0 -1
- package/dist/components/Content/Schema/SchemaEnumValues.vue.js +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenMCPButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AgentScalar/OpenMCPButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OpenMCPButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AgentScalar/OpenMCPButton.vue"],"names":[],"mappings":"AA6SA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAMpE,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE;QACP,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,GAAG,CAAC,EAAE,MAAM,CAAA;KACb,CAAA;IACD,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,cAAc,CAAA;CAC1B,CAAC;AAmEF,KAAK,gBAAgB,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAiOxD,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./OpenMCPButton.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const OpenMCPButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const OpenMCPButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d7102814"]]);
|
|
5
5
|
export {
|
|
6
6
|
OpenMCPButton as default
|
|
7
7
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent, mergeModels, useModel, createElementBlock, openBlock, createElementVNode, unref, createTextVNode, createVNode, nextTick } from "vue";
|
|
2
2
|
import { useLoadingState } from "@scalar/components";
|
|
3
3
|
import { ScalarIconArrowUpRight } from "@scalar/icons";
|
|
4
|
+
import { isValidUrl } from "@scalar/oas-utils/helpers";
|
|
4
5
|
import { useClipboard } from "@scalar/use-hooks/useClipboard";
|
|
5
6
|
import { useToasts } from "@scalar/use-toasts";
|
|
6
7
|
import { DASHBOARD_REGISTER_URL } from "../../consts/urls.js";
|
|
@@ -29,13 +30,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
29
30
|
const name = encodeURIComponent(props.config?.name ?? "");
|
|
30
31
|
const cursorLink = `cursor://anysphere.cursor-deeplink/mcp/install?name=${name}&config=${encoded}`;
|
|
31
32
|
const vscodeLink = `vscode:mcp/install?${encodeURIComponent(JSON.stringify(props.config ?? {}))}`;
|
|
32
|
-
const
|
|
33
|
+
const docUrl = useModel(__props, "url");
|
|
33
34
|
async function generateRegisterLink() {
|
|
34
35
|
if (loader.isLoading || !props.workspace) {
|
|
35
36
|
return;
|
|
36
37
|
}
|
|
37
|
-
if (
|
|
38
|
-
openRegisterLink(
|
|
38
|
+
if (docUrl.value && isValidUrl(docUrl.value)) {
|
|
39
|
+
openRegisterLink(docUrl.value);
|
|
39
40
|
return;
|
|
40
41
|
}
|
|
41
42
|
loader.start();
|
|
@@ -46,9 +47,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
46
47
|
return;
|
|
47
48
|
}
|
|
48
49
|
try {
|
|
49
|
-
|
|
50
|
+
docUrl.value = await uploadTempDocument(document);
|
|
50
51
|
await loader.validate();
|
|
51
|
-
openRegisterLink(
|
|
52
|
+
openRegisterLink(docUrl.value);
|
|
52
53
|
await nextTick();
|
|
53
54
|
await loader.clear();
|
|
54
55
|
} catch (error) {
|
|
@@ -57,9 +58,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
57
58
|
await loader.invalidate();
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
|
-
function openRegisterLink(
|
|
61
|
+
function openRegisterLink(docUrl2) {
|
|
61
62
|
const url = new URL(DASHBOARD_REGISTER_URL);
|
|
62
|
-
url.searchParams.set("url",
|
|
63
|
+
url.searchParams.set("url", docUrl2);
|
|
64
|
+
url.searchParams.set("createMcp", "true");
|
|
63
65
|
window.open(url.toString(), "_blank");
|
|
64
66
|
}
|
|
65
67
|
return (_ctx, _cache) => {
|
|
@@ -2,8 +2,10 @@ import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/o
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
/** The schema object containing enum values and metadata */
|
|
4
4
|
value: SchemaObject | undefined;
|
|
5
|
+
/** Whether to display the enum for property names */
|
|
6
|
+
propertyNames?: boolean;
|
|
5
7
|
};
|
|
6
8
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
9
|
declare const _default: typeof __VLS_export;
|
|
8
10
|
export default _default;
|
|
9
|
-
//# sourceMappingURL=
|
|
11
|
+
//# sourceMappingURL=SchemaEnums.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaEnums.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaEnums.vue"],"names":[],"mappings":"AAsMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAMhG,KAAK,WAAW,GAAG;IACjB,4DAA4D;IAC5D,KAAK,EAAE,YAAY,GAAG,SAAS,CAAA;IAC/B,qDAAqD;IACrD,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAC;AAyPF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _sfc_main from "./SchemaEnums.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const SchemaEnums = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-55c01b89"]]);
|
|
5
|
+
export {
|
|
6
|
+
SchemaEnums as default
|
|
7
|
+
};
|
|
@@ -8,15 +8,24 @@ const _hoisted_1 = {
|
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "property-enum"
|
|
10
10
|
};
|
|
11
|
-
const _hoisted_2 = {
|
|
12
|
-
|
|
11
|
+
const _hoisted_2 = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "property-enum-property-names"
|
|
14
|
+
};
|
|
15
|
+
const _hoisted_3 = {
|
|
16
|
+
key: 1,
|
|
17
|
+
class: "property-enum-property-names"
|
|
18
|
+
};
|
|
19
|
+
const _hoisted_4 = { class: "property-enum-values" };
|
|
20
|
+
const _hoisted_5 = { key: 1 };
|
|
13
21
|
const ENUM_DISPLAY_THRESHOLD = 9;
|
|
14
22
|
const INITIAL_VISIBLE_COUNT = 5;
|
|
15
23
|
const THIN_SPACE = " ";
|
|
16
24
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
17
|
-
__name: "
|
|
25
|
+
__name: "SchemaEnums",
|
|
18
26
|
props: {
|
|
19
|
-
value: {}
|
|
27
|
+
value: {},
|
|
28
|
+
propertyNames: { type: Boolean }
|
|
20
29
|
},
|
|
21
30
|
setup(__props) {
|
|
22
31
|
const enumValues = computed(() => {
|
|
@@ -61,7 +70,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
61
70
|
};
|
|
62
71
|
return (_ctx, _cache) => {
|
|
63
72
|
return enumValues.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
64
|
-
|
|
73
|
+
__props.propertyNames ? (openBlock(), createElementBlock("div", _hoisted_2, " property names ")) : (openBlock(), createElementBlock("div", _hoisted_3, " values ")),
|
|
74
|
+
createElementVNode("ul", _hoisted_4, [
|
|
65
75
|
(openBlock(true), createElementBlock(Fragment, null, renderList(visibleEnumValues.value, (enumValue, index) => {
|
|
66
76
|
return openBlock(), createBlock(SchemaEnumPropertyItem, {
|
|
67
77
|
key: String(enumValue),
|
|
@@ -76,7 +86,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
76
86
|
label: formatEnumValueWithName(enumValue, initialVisibleCount.value + index)
|
|
77
87
|
}, null, 8, ["description", "label"]);
|
|
78
88
|
}), 128)) : createCommentVNode("", true),
|
|
79
|
-
shouldUseLongListDisplay.value ? (openBlock(), createElementBlock("li",
|
|
89
|
+
shouldUseLongListDisplay.value ? (openBlock(), createElementBlock("li", _hoisted_5, [
|
|
80
90
|
createVNode(unref(ScalarButton), {
|
|
81
91
|
class: "enum-toggle-button my-2 flex h-fit gap-1 rounded-full border py-1.5 pr-2.5 pl-2 leading-none",
|
|
82
92
|
variant: "ghost",
|
|
@@ -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":"AAsMA,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;AA0PF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -20,13 +20,35 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20
20
|
const sortedProperties = computed(
|
|
21
21
|
() => sortPropertyNames(__props.schema, __props.discriminator, __props.options)
|
|
22
22
|
);
|
|
23
|
-
const getAdditionalPropertiesName = (_additionalProperties) => {
|
|
23
|
+
const getAdditionalPropertiesName = (_additionalProperties, _propertyNames) => {
|
|
24
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
|
}
|
|
28
|
+
if (_propertyNames) {
|
|
29
|
+
const resolved = resolve.schema(_propertyNames);
|
|
30
|
+
if (resolved?.title) {
|
|
31
|
+
return resolved.title;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
28
34
|
return "propertyName";
|
|
29
35
|
};
|
|
36
|
+
const getPropertyNamesEnum = (_propertyNames) => {
|
|
37
|
+
if (!_propertyNames) {
|
|
38
|
+
return void 0;
|
|
39
|
+
}
|
|
40
|
+
const resolved = resolve.schema(_propertyNames);
|
|
41
|
+
if (resolved && "enum" in resolved && Array.isArray(resolved.enum) && resolved.enum.length > 0) {
|
|
42
|
+
return resolved.enum;
|
|
43
|
+
}
|
|
44
|
+
return void 0;
|
|
45
|
+
};
|
|
46
|
+
const additionalPropertiesEnum = computed(() => {
|
|
47
|
+
if (!isTypeObject(__props.schema) || !__props.schema.additionalProperties) {
|
|
48
|
+
return void 0;
|
|
49
|
+
}
|
|
50
|
+
return getPropertyNamesEnum(__props.schema.propertyNames);
|
|
51
|
+
});
|
|
30
52
|
const getAdditionalPropertiesValue = (additionalProperties) => {
|
|
31
53
|
if (additionalProperties === true || typeof additionalProperties === "object" && Object.keys(additionalProperties).length === 0 || typeof additionalProperties !== "object" || !("type" in additionalProperties)) {
|
|
32
54
|
return {
|
|
@@ -79,12 +101,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
79
101
|
hideHeading: __props.hideHeading,
|
|
80
102
|
hideModelNames: __props.hideModelNames,
|
|
81
103
|
level: __props.level,
|
|
82
|
-
name: getAdditionalPropertiesName(
|
|
104
|
+
name: getAdditionalPropertiesName(
|
|
105
|
+
__props.schema.additionalProperties,
|
|
106
|
+
__props.schema.propertyNames
|
|
107
|
+
),
|
|
83
108
|
noncollapsible: "",
|
|
84
109
|
options: __props.options,
|
|
110
|
+
propertyNamesEnum: additionalPropertiesEnum.value,
|
|
85
111
|
schema: getAdditionalPropertiesValue(__props.schema.additionalProperties),
|
|
86
112
|
variant: "additionalProperties"
|
|
87
|
-
}, null, 8, ["breadcrumb", "compact", "discriminator", "eventBus", "hideHeading", "hideModelNames", "level", "name", "options", "schema"])) : createCommentVNode("", true)
|
|
113
|
+
}, null, 8, ["breadcrumb", "compact", "discriminator", "eventBus", "hideHeading", "hideModelNames", "level", "name", "options", "propertyNamesEnum", "schema"])) : createCommentVNode("", true)
|
|
88
114
|
], 64);
|
|
89
115
|
};
|
|
90
116
|
}
|
|
@@ -20,10 +20,14 @@ type __VLS_Props = {
|
|
|
20
20
|
description?: string;
|
|
21
21
|
hideModelNames?: boolean;
|
|
22
22
|
hideHeading?: boolean;
|
|
23
|
+
/** When the root schema was resolved from a $ref, pass the ref name for display (e.g. "Data"). */
|
|
24
|
+
modelName?: string | null;
|
|
23
25
|
variant?: 'additionalProperties' | 'patternProperties';
|
|
24
26
|
breadcrumb?: string[];
|
|
25
27
|
eventBus: WorkspaceEventBus | null;
|
|
26
28
|
options: SchemaOptions;
|
|
29
|
+
/** Enum values for property names (from JSON Schema propertyNames keyword). */
|
|
30
|
+
propertyNamesEnum?: string[];
|
|
27
31
|
};
|
|
28
32
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
29
33
|
level: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AA0bA,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,kGAAkG;IAClG,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,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;IACtB,+EAA+E;IAC/E,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC7B,CAAC;AAudJ,QAAA,MAAM,YAAY;WAveN,MAAM;cAEH,OAAO;aACR,OAAO;oBAGA,OAAO;6EAoe1B,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -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-8d72f803"]]);
|
|
5
5
|
export {
|
|
6
6
|
SchemaProperty as default
|
|
7
7
|
};
|
|
@@ -12,7 +12,7 @@ import { shouldDisplayDescription } from "./helpers/should-display-description.j
|
|
|
12
12
|
import { shouldDisplayHeading } from "./helpers/should-display-heading.js";
|
|
13
13
|
import Schema from "./Schema.vue.js";
|
|
14
14
|
import _sfc_main$2 from "./SchemaComposition.vue.js";
|
|
15
|
-
import
|
|
15
|
+
import SchemaEnums from "./SchemaEnums.vue.js";
|
|
16
16
|
import SchemaPropertyHeading from "./SchemaPropertyHeading.vue.js";
|
|
17
17
|
import _sfc_main$1 from "../../Anchor/WithBreadcrumb.vue.js";
|
|
18
18
|
import _sfc_main$3 from "../../../features/specification-extension/SpecificationExtension.vue2.js";
|
|
@@ -29,11 +29,11 @@ const _hoisted_3 = {
|
|
|
29
29
|
class: "property-description"
|
|
30
30
|
};
|
|
31
31
|
const _hoisted_4 = {
|
|
32
|
-
key:
|
|
32
|
+
key: 4,
|
|
33
33
|
class: "children"
|
|
34
34
|
};
|
|
35
35
|
const _hoisted_5 = {
|
|
36
|
-
key:
|
|
36
|
+
key: 5,
|
|
37
37
|
class: "children"
|
|
38
38
|
};
|
|
39
39
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -50,10 +50,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
50
|
description: {},
|
|
51
51
|
hideModelNames: { type: Boolean, default: false },
|
|
52
52
|
hideHeading: { type: Boolean },
|
|
53
|
+
modelName: {},
|
|
53
54
|
variant: {},
|
|
54
55
|
breadcrumb: {},
|
|
55
56
|
eventBus: {},
|
|
56
|
-
options: {}
|
|
57
|
+
options: {},
|
|
58
|
+
propertyNamesEnum: {}
|
|
57
59
|
},
|
|
58
60
|
setup(__props) {
|
|
59
61
|
const props = __props;
|
|
@@ -120,6 +122,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
120
122
|
enum: hasEnum.value,
|
|
121
123
|
hideModelNames: __props.hideModelNames,
|
|
122
124
|
isDiscriminator: isDiscriminatorProperty.value,
|
|
125
|
+
modelName: __props.modelName,
|
|
123
126
|
required: __props.required,
|
|
124
127
|
value: optimizedValue.value
|
|
125
128
|
}, createSlots({ _: 2 }, [
|
|
@@ -159,14 +162,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
159
162
|
]),
|
|
160
163
|
key: "1"
|
|
161
164
|
} : void 0
|
|
162
|
-
]), 1032, ["enum", "hideModelNames", "isDiscriminator", "required", "value"])) : createCommentVNode("", true),
|
|
165
|
+
]), 1032, ["enum", "hideModelNames", "isDiscriminator", "modelName", "required", "value"])) : createCommentVNode("", true),
|
|
163
166
|
displayDescription.value || propertyDescription.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
164
167
|
createVNode(unref(ScalarMarkdown), {
|
|
165
168
|
value: displayDescription.value || propertyDescription.value || ""
|
|
166
169
|
}, null, 8, ["value"])
|
|
167
170
|
])) : createCommentVNode("", true),
|
|
168
|
-
|
|
171
|
+
__props.propertyNamesEnum && __props.propertyNamesEnum.length > 0 ? (openBlock(), createBlock(SchemaEnums, {
|
|
169
172
|
key: 2,
|
|
173
|
+
propertyNames: "",
|
|
174
|
+
value: { enum: __props.propertyNamesEnum }
|
|
175
|
+
}, null, 8, ["value"])) : createCommentVNode("", true),
|
|
176
|
+
enumValues.value.length > 0 ? (openBlock(), createBlock(SchemaEnums, {
|
|
177
|
+
key: 3,
|
|
170
178
|
value: optimizedValue.value
|
|
171
179
|
}, null, 8, ["value"])) : createCommentVNode("", true),
|
|
172
180
|
shouldRenderObjectProperties.value ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
@@ -7,6 +7,8 @@ type __VLS_Props = {
|
|
|
7
7
|
additional?: boolean;
|
|
8
8
|
withExamples?: boolean;
|
|
9
9
|
hideModelNames?: boolean;
|
|
10
|
+
/** When the schema was resolved from a $ref, pass the ref name so it displays as e.g. "Data" instead of "object". */
|
|
11
|
+
modelName?: string | null;
|
|
10
12
|
};
|
|
11
13
|
declare var __VLS_1: {};
|
|
12
14
|
type __VLS_Slots = {} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaPropertyHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaPropertyHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"names":[],"mappings":"AAwaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAkBhG,KAAK,WAAW,GAAG;IACf,KAAK,EAAE,YAAY,GAAG,SAAS,CAAA;IAC/B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,qHAAqH;IACrH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B,CAAC;AAkfJ,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK5C,QAAA,MAAM,UAAU;cA/fD,OAAO;oBAGD,OAAO;qBAJN,OAAO;kBAGV,OAAO;6EAggBxB,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -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-881aa734"]]);
|
|
5
5
|
export {
|
|
6
6
|
SchemaPropertyHeading as default
|
|
7
7
|
};
|
|
@@ -48,7 +48,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
48
48
|
required: { type: Boolean, default: false },
|
|
49
49
|
additional: { type: Boolean },
|
|
50
50
|
withExamples: { type: Boolean, default: true },
|
|
51
|
-
hideModelNames: { type: Boolean, default: false }
|
|
51
|
+
hideModelNames: { type: Boolean, default: false },
|
|
52
|
+
modelName: {}
|
|
52
53
|
},
|
|
53
54
|
setup(__props) {
|
|
54
55
|
const props = __props;
|
|
@@ -174,6 +175,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
174
175
|
if (props.hideModelNames) {
|
|
175
176
|
return null;
|
|
176
177
|
}
|
|
178
|
+
if (props.modelName) {
|
|
179
|
+
return props.modelName;
|
|
180
|
+
}
|
|
177
181
|
const modelName = getModelNameFromSchema(props.value);
|
|
178
182
|
if (modelName) {
|
|
179
183
|
return modelName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"AAmUA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAEf,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAKxE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,GAAG,cAAc,CAAA;IAC3C,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,EAAE,IAAI,CACX,cAAc,CAAC,SAAS,CAAC,EACzB,8BAA8B,GAAG,yBAAyB,CAC3D,CAAA;CACF,CAAC;AAkYF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./ParameterListItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const ParameterListItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const ParameterListItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d03ca136"]]);
|
|
5
5
|
export {
|
|
6
6
|
ParameterListItem as default
|
|
7
7
|
};
|
|
@@ -3,6 +3,7 @@ import { Disclosure, DisclosureButton, DisclosurePanel } from "@headlessui/vue";
|
|
|
3
3
|
import { ScalarWrappingText, ScalarMarkdownSummary, ScalarMarkdown } from "@scalar/components";
|
|
4
4
|
import { ScalarIconCaretRight } from "@scalar/icons";
|
|
5
5
|
import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
6
|
+
import { getRefName } from "../../../components/Content/Schema/helpers/get-ref-name.js";
|
|
6
7
|
import SchemaProperty from "../../../components/Content/Schema/SchemaProperty.vue.js";
|
|
7
8
|
import _sfc_main$1 from "./ContentTypeSelect.vue.js";
|
|
8
9
|
import Headers from "./Headers.vue.js";
|
|
@@ -35,8 +36,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
35
36
|
const headers = computed(
|
|
36
37
|
() => "headers" in __props.parameter && __props.parameter.headers ? __props.parameter.headers : null
|
|
37
38
|
);
|
|
39
|
+
const baseSchema = computed(
|
|
40
|
+
() => content.value ? content.value?.[selectedContentType.value]?.schema : "schema" in __props.parameter && __props.parameter.schema ? __props.parameter.schema : null
|
|
41
|
+
);
|
|
42
|
+
const schemaModelName = computed(() => {
|
|
43
|
+
const raw = baseSchema.value;
|
|
44
|
+
if (!raw) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
if ("$ref" in raw) {
|
|
48
|
+
return getRefName(raw.$ref);
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
});
|
|
38
52
|
const value = computed(() => {
|
|
39
|
-
const
|
|
53
|
+
const base = baseSchema.value;
|
|
54
|
+
const resolvedBase = content.value ? getResolvedRef(base) : schema.value;
|
|
40
55
|
const deprecated = "deprecated" in __props.parameter ? __props.parameter.deprecated : schema.value?.deprecated;
|
|
41
56
|
const paramExamples = "examples" in __props.parameter ? __props.parameter.examples : {};
|
|
42
57
|
const recordExamples = Object.values({
|
|
@@ -46,7 +61,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
46
61
|
const arrayExamples = schema.value?.examples ?? (recordExamples.length === 0 && "example" in __props.parameter ? [__props.parameter.example] : []);
|
|
47
62
|
const examples = [...recordExamples, ...arrayExamples];
|
|
48
63
|
return {
|
|
49
|
-
...
|
|
64
|
+
...resolvedBase,
|
|
50
65
|
deprecated,
|
|
51
66
|
examples
|
|
52
67
|
};
|
|
@@ -122,6 +137,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
122
137
|
description: shouldCollapse.value ? "" : __props.parameter.description,
|
|
123
138
|
eventBus: __props.eventBus,
|
|
124
139
|
hideWriteOnly: true,
|
|
140
|
+
modelName: schemaModelName.value,
|
|
125
141
|
name: shouldCollapse.value ? "" : __props.name,
|
|
126
142
|
noncollapsible: true,
|
|
127
143
|
options: {
|
|
@@ -131,7 +147,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
131
147
|
},
|
|
132
148
|
required: "required" in __props.parameter && __props.parameter.required,
|
|
133
149
|
schema: value.value
|
|
134
|
-
}, null, 8, ["breadcrumb", "description", "eventBus", "name", "options", "required", "schema"])
|
|
150
|
+
}, null, 8, ["breadcrumb", "description", "eventBus", "modelName", "name", "options", "required", "schema"])
|
|
135
151
|
]),
|
|
136
152
|
_: 1
|
|
137
153
|
}, 8, ["static"])
|