@scalar/api-reference 1.25.101 → 1.25.103
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 +40 -0
- package/dist/browser/standalone.js +7267 -7225
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +2 -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 +63 -61
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +2 -3
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +3 -3
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +162 -170
- package/dist/components/Content/Schema/helpers/formatExample.d.ts +5 -0
- package/dist/components/Content/Schema/helpers/formatExample.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/formatExample.js +6 -0
- package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/Tag.vue.js +1 -1
- package/dist/components/Content/Tag/Tag.vue2.js +39 -37
- package/dist/features/ApiClientModal/useApiClient.d.ts +20 -20
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +26 -18
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js +8 -7
- package/dist/features/Operation/components/ParameterList.vue.d.ts +2 -0
- package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.js +2 -2
- package/dist/features/Operation/components/ParameterList.vue2.js +18 -16
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +2 -0
- 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 +27 -25
- package/dist/helpers/get-request.d.ts.map +1 -1
- package/dist/hooks/useOperation.d.ts +1 -0
- package/dist/hooks/useOperation.d.ts.map +1 -1
- package/dist/hooks/useOperation.js +12 -11
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +10 -10
|
@@ -3,6 +3,7 @@ type __VLS_Props = {
|
|
|
3
3
|
parameters?: Parameter[];
|
|
4
4
|
showChildren?: boolean;
|
|
5
5
|
collapsableItems?: boolean;
|
|
6
|
+
withExamples?: boolean;
|
|
6
7
|
};
|
|
7
8
|
declare function __VLS_template(): {
|
|
8
9
|
attrs: Partial<{}>;
|
|
@@ -14,6 +15,7 @@ declare function __VLS_template(): {
|
|
|
14
15
|
};
|
|
15
16
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
17
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
18
|
+
withExamples: boolean;
|
|
17
19
|
showChildren: boolean;
|
|
18
20
|
collapsableItems: boolean;
|
|
19
21
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParameterList.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterList.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ParameterList.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterList.vue"],"names":[],"mappings":"AA6DA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAMrD,KAAK,WAAW,GAAG;IACf,UAAU,CAAC,EAAE,SAAS,EAAE,CAAA;IACxB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;AAoBJ,iBAAS,cAAc;WAsDT,OAAO,IAA6B;;uBARvB,GAAG;;;;EAa7B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;kBA3FF,OAAO;kBAFP,OAAO;sBACH,OAAO;6EAmG5B,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./ParameterList.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const e = /* @__PURE__ */
|
|
3
|
+
import a from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const e = /* @__PURE__ */ a(t, [["__scopeId", "data-v-dba0156a"]]);
|
|
5
5
|
export {
|
|
6
6
|
e as default
|
|
7
7
|
};
|
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
import { defineComponent as o, openBlock as t, createElementBlock as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as o, openBlock as t, createElementBlock as r, createElementVNode as s, renderSlot as m, Fragment as n, renderList as p, createBlock as i, createCommentVNode as d } from "vue";
|
|
2
|
+
import h from "./ParameterListItem.vue.js";
|
|
3
|
+
const c = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "parameter-list"
|
|
6
|
-
}, u = { class: "parameter-list-title" }, f = { class: "parameter-list-items" },
|
|
6
|
+
}, u = { class: "parameter-list-title" }, f = { class: "parameter-list-items" }, E = /* @__PURE__ */ o({
|
|
7
7
|
__name: "ParameterList",
|
|
8
8
|
props: {
|
|
9
9
|
parameters: {},
|
|
10
10
|
showChildren: { type: Boolean, default: !1 },
|
|
11
|
-
collapsableItems: { type: Boolean, default: !1 }
|
|
11
|
+
collapsableItems: { type: Boolean, default: !1 },
|
|
12
|
+
withExamples: { type: Boolean, default: !0 }
|
|
12
13
|
},
|
|
13
|
-
setup(
|
|
14
|
-
return (e,
|
|
15
|
-
var
|
|
16
|
-
return (
|
|
14
|
+
setup(w) {
|
|
15
|
+
return (e, _) => {
|
|
16
|
+
var a;
|
|
17
|
+
return (a = e.parameters) != null && a.length ? (t(), r("div", c, [
|
|
17
18
|
s("div", u, [
|
|
18
|
-
|
|
19
|
+
m(e.$slots, "title", {}, void 0, !0)
|
|
19
20
|
]),
|
|
20
21
|
s("ul", f, [
|
|
21
|
-
(t(!0),
|
|
22
|
-
key:
|
|
22
|
+
(t(!0), r(n, null, p(e.parameters, (l) => (t(), i(h, {
|
|
23
|
+
key: l.name,
|
|
23
24
|
collapsableItems: e.collapsableItems,
|
|
24
|
-
parameter:
|
|
25
|
-
showChildren: e.showChildren
|
|
26
|
-
|
|
25
|
+
parameter: l,
|
|
26
|
+
showChildren: e.showChildren,
|
|
27
|
+
withExamples: e.withExamples
|
|
28
|
+
}, null, 8, ["collapsableItems", "parameter", "showChildren", "withExamples"]))), 128))
|
|
27
29
|
])
|
|
28
30
|
])) : d("", !0);
|
|
29
31
|
};
|
|
30
32
|
}
|
|
31
33
|
});
|
|
32
34
|
export {
|
|
33
|
-
|
|
35
|
+
E as default
|
|
34
36
|
};
|
|
@@ -3,8 +3,10 @@ type __VLS_Props = {
|
|
|
3
3
|
parameter: Parameter;
|
|
4
4
|
showChildren?: boolean;
|
|
5
5
|
collapsableItems?: boolean;
|
|
6
|
+
withExamples?: boolean;
|
|
6
7
|
};
|
|
7
8
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
+
withExamples: boolean;
|
|
8
10
|
showChildren: boolean;
|
|
9
11
|
collapsableItems: boolean;
|
|
10
12
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLLIElement>;
|
|
@@ -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":"AAsOA,OAAO,KAAK,EAAe,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAQlE,KAAK,WAAW,GAAG;IACf,SAAS,EAAE,SAAS,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;;kBADe,OAAO;kBAFP,OAAO;sBACH,OAAO;;AAgP9B,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./ParameterListItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
4
|
+
const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-ab978914"]]);
|
|
5
5
|
export {
|
|
6
6
|
e as default
|
|
7
7
|
};
|
|
@@ -1,57 +1,58 @@
|
|
|
1
|
-
import { defineComponent as k, computed as y, ref as
|
|
2
|
-
import
|
|
3
|
-
import { Disclosure as
|
|
4
|
-
import { ScalarIcon as
|
|
5
|
-
import
|
|
1
|
+
import { defineComponent as k, computed as y, ref as w, openBlock as s, createElementBlock as B, createVNode as r, unref as o, withCtx as m, createBlock as i, normalizeClass as g, createTextVNode as E, toDisplayString as c, createElementVNode as u, createCommentVNode as d } from "vue";
|
|
2
|
+
import b from "../../../components/ScreenReader.vue.js";
|
|
3
|
+
import { Disclosure as S, DisclosureButton as V, DisclosurePanel as q } from "@headlessui/vue";
|
|
4
|
+
import { ScalarIcon as D } from "@scalar/components";
|
|
5
|
+
import T from "./ContentTypeSelect.vue.js";
|
|
6
6
|
import I from "./ParameterHeaders.vue.js";
|
|
7
7
|
import N from "../../../components/Content/Schema/SchemaProperty.vue.js";
|
|
8
|
-
const P = { class: "parameter-item" },
|
|
8
|
+
const P = { class: "parameter-item" }, _ = { class: "parameter-item-name" }, j = { class: "parameter-item-type" }, R = { class: "absolute right-0" }, J = /* @__PURE__ */ k({
|
|
9
9
|
__name: "ParameterListItem",
|
|
10
10
|
props: {
|
|
11
11
|
parameter: {},
|
|
12
12
|
showChildren: { type: Boolean, default: !1 },
|
|
13
|
-
collapsableItems: { type: Boolean, default: !1 }
|
|
13
|
+
collapsableItems: { type: Boolean, default: !1 },
|
|
14
|
+
withExamples: { type: Boolean, default: !0 }
|
|
14
15
|
},
|
|
15
16
|
setup(v) {
|
|
16
|
-
const t = v, C = y(() => t.parameter.content ? Object.keys(t.parameter.content) : []),
|
|
17
|
+
const t = v, C = y(() => t.parameter.content ? Object.keys(t.parameter.content) : []), n = w(
|
|
17
18
|
C.value[0]
|
|
18
19
|
);
|
|
19
|
-
t.parameter.content && "application/json" in t.parameter.content && (
|
|
20
|
+
t.parameter.content && "application/json" in t.parameter.content && (n.value = "application/json");
|
|
20
21
|
const a = y(() => !!(t.collapsableItems && t.parameter.content));
|
|
21
|
-
return (e, f) => (s(),
|
|
22
|
-
r(
|
|
22
|
+
return (e, f) => (s(), B("li", P, [
|
|
23
|
+
r(o(S), null, {
|
|
23
24
|
default: m(({ open: p }) => [
|
|
24
|
-
a.value ? (s(), i(
|
|
25
|
+
a.value ? (s(), i(o(V), {
|
|
25
26
|
key: 0,
|
|
26
|
-
class:
|
|
27
|
+
class: g(["flex parameter-item-trigger", { "parameter-item-trigger-open": p }])
|
|
27
28
|
}, {
|
|
28
29
|
default: m(() => [
|
|
29
|
-
r(
|
|
30
|
+
r(o(D), {
|
|
30
31
|
class: "parameter-item-icon",
|
|
31
32
|
icon: p ? "ChevronDown" : "ChevronRight",
|
|
32
33
|
thickness: "1.5"
|
|
33
34
|
}, null, 8, ["icon"]),
|
|
34
|
-
r(
|
|
35
|
+
r(b, null, {
|
|
35
36
|
default: m(() => [
|
|
36
|
-
|
|
37
|
+
E(c(p ? "Collapse" : "Expand"), 1)
|
|
37
38
|
]),
|
|
38
39
|
_: 2
|
|
39
40
|
}, 1024),
|
|
40
|
-
u("span",
|
|
41
|
-
u("span",
|
|
41
|
+
u("span", _, c(e.parameter.name), 1),
|
|
42
|
+
u("span", j, c(e.parameter.description), 1),
|
|
42
43
|
u("div", R, [
|
|
43
|
-
a.value && t.parameter.content ? (s(), i(
|
|
44
|
+
a.value && t.parameter.content ? (s(), i(T, {
|
|
44
45
|
key: 0,
|
|
45
46
|
class: "parameter-item-content-type",
|
|
46
|
-
defaultValue:
|
|
47
|
+
defaultValue: n.value,
|
|
47
48
|
requestBody: t.parameter,
|
|
48
|
-
onSelectContentType: f[0] || (f[0] = ({ contentType: l }) =>
|
|
49
|
+
onSelectContentType: f[0] || (f[0] = ({ contentType: l }) => n.value = l)
|
|
49
50
|
}, null, 8, ["defaultValue", "requestBody"])) : d("", !0)
|
|
50
51
|
])
|
|
51
52
|
]),
|
|
52
53
|
_: 2
|
|
53
54
|
}, 1032, ["class"])) : d("", !0),
|
|
54
|
-
r(
|
|
55
|
+
r(o(q), {
|
|
55
56
|
class: "parameter-item-container parameter-item-container-markdown",
|
|
56
57
|
static: !a.value
|
|
57
58
|
}, {
|
|
@@ -62,14 +63,15 @@ const P = { class: "parameter-item" }, j = { class: "parameter-item-name" }, E =
|
|
|
62
63
|
key: 0,
|
|
63
64
|
headers: e.parameter.headers
|
|
64
65
|
}, null, 8, ["headers"])) : d("", !0),
|
|
65
|
-
r(
|
|
66
|
+
r(o(N), {
|
|
66
67
|
compact: "",
|
|
67
68
|
description: a.value ? "" : e.parameter.description,
|
|
68
69
|
name: a.value ? "" : e.parameter.name,
|
|
69
70
|
noncollapsible: e.showChildren,
|
|
70
71
|
required: e.parameter.required,
|
|
71
|
-
value: e.parameter.content ? (h = (l = e.parameter.content) == null ? void 0 : l[
|
|
72
|
-
|
|
72
|
+
value: e.parameter.content ? (h = (l = e.parameter.content) == null ? void 0 : l[n.value]) == null ? void 0 : h.schema : e.parameter.schema,
|
|
73
|
+
withExamples: e.withExamples
|
|
74
|
+
}, null, 8, ["description", "name", "noncollapsible", "required", "value", "withExamples"])
|
|
73
75
|
];
|
|
74
76
|
}),
|
|
75
77
|
_: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-request.d.ts","sourceRoot":"","sources":["../../src/helpers/get-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D,6CAA6C;AAC7C,eAAO,MAAM,UAAU,aACX,cAAc,CAAC,UAAU,CAAC,QAC9B,MAAM,UACJ,MAAM;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-request.d.ts","sourceRoot":"","sources":["../../src/helpers/get-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D,6CAA6C;AAC7C,eAAO,MAAM,UAAU,aACX,cAAc,CAAC,UAAU,CAAC,QAC9B,MAAM,UACJ,MAAM;;;;;;;;;;;;;mBAKu4S,CAAC;;;;;;;;;;;mBAAia,CAAC;eAAyC,CAAC;cAA6B,CAAC;eAA8B,CAAC;aAA4B,CAAC;gBAA8H,CAAC;iBAAwC,CAAC;mBAAkC,CAAC;;;;;aADtoU,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOperation.d.ts","sourceRoot":"","sources":["../../src/hooks/useOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAG3E,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,SAAS,EAAE,CAAA;IACjB,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB,MAAM,EAAE,SAAS,EAAE,CAAA;IACnB,IAAI,EAAE,SAAS,EAAE,CAAA;IACjB,QAAQ,EAAE,SAAS,EAAE,CAAA;CACtB,CAAA;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,oBAAoB;;
|
|
1
|
+
{"version":3,"file":"useOperation.d.ts","sourceRoot":"","sources":["../../src/hooks/useOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAG3E,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,SAAS,EAAE,CAAA;IACjB,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB,MAAM,EAAE,SAAS,EAAE,CAAA;IACnB,MAAM,EAAE,SAAS,EAAE,CAAA;IACnB,IAAI,EAAE,SAAS,EAAE,CAAA;IACjB,QAAQ,EAAE,SAAS,EAAE,CAAA;CACtB,CAAA;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,oBAAoB;;EAuD3D"}
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
function e(
|
|
1
|
+
import { computed as u } from "vue";
|
|
2
|
+
function e(o) {
|
|
3
3
|
return {
|
|
4
|
-
parameterMap:
|
|
5
|
-
var
|
|
6
|
-
const
|
|
4
|
+
parameterMap: u(() => {
|
|
5
|
+
var f;
|
|
6
|
+
const s = {
|
|
7
7
|
path: [],
|
|
8
8
|
query: [],
|
|
9
9
|
header: [],
|
|
10
|
+
cookie: [],
|
|
10
11
|
body: [],
|
|
11
12
|
formData: []
|
|
12
13
|
};
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
o.pathParameters && o.pathParameters.forEach((i) => {
|
|
15
|
+
i.in === "path" ? s.path.push(i) : i.in === "query" ? s.query.push(i) : i.in === "header" ? s.header.push(i) : i.in === "cookie" ? s.cookie.push(i) : i.in === "body" ? s.body.push(i) : i.in === "formData" && s.formData.push(i);
|
|
15
16
|
});
|
|
16
|
-
const
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
}),
|
|
17
|
+
const h = ((f = o.information) == null ? void 0 : f.parameters) ?? [];
|
|
18
|
+
return h && h.forEach((i) => {
|
|
19
|
+
i.in === "path" ? s.path.push(i) : i.in === "query" ? s.query.push(i) : i.in === "header" ? s.header.push(i) : i.in === "cookie" ? s.cookie.push(i) : i.in === "body" ? s.body.push(i) : i.in === "formData" && s.formData.push(i);
|
|
20
|
+
}), s;
|
|
20
21
|
})
|
|
21
22
|
};
|
|
22
23
|
}
|